ximol/xml/stag.hpp File Reference


Detailed Description

Define stag Interface.

Author:
Tournois Florent
Version:
1.0
Id
stag.hpp,v 1.17 2004/03/19 18:28:39 tournois Exp
Log
stag.hpp,v
Revision 1.17 2004/03/19 18:28:39 tournois packaging for the version 0.8

Revision 1.16 2004/03/04 18:45:29 tournois Compatibility with gcc.

Revision 1.15 2004/03/03 22:05:30 tournois Add a short roadmap. Add BOOST_NO_STD_WSTRING for gcc.

Revision 1.14 2004/02/25 18:59:13 tournois imporve the gcc compatibility.

Revision 1.13 2004/02/22 10:27:34 tournois Add some doc.

Revision 1.12 2004/02/22 09:54:21 tournois Change years on the copyright.

Revision 1.11 2004/02/21 20:03:58 tournois Change the stag, etag, open_stag, box and rebox template with macro.

Revision 1.10 2004/02/09 12:41:25 tournois Fix bug about error message. Add a read_optionnal_space before the stag read.

Revision 1.9 2004/01/27 21:49:52 tournois Add docs and tutorial.

Revision 1.8 2004/01/25 17:33:09 tournois no message

Revision 1.7 2004/01/15 21:26:01 tournois no message

Revision 1.6 2004/01/09 18:26:29 tournois Add box and content manipulator.

Revision 1.5 2003/12/10 20:32:18 tournois Fix somes bugs about attributes and now tests are all check.

Revision 1.4 2003/12/09 19:57:28 tournois Fix some bugs about attributes classes.

Revision 1.3 2003/12/03 12:50:37 hfp include dependencies and type forwarding

Revision 1.2 2003/11/27 15:31:55 hfp partially adapted to vc6.

Revision 1.1 2003/11/19 20:52:54 tournois Add new manipulator for stag and etag. Correct bugs and add tests.

Definition in file stag.hpp.

#include <ximol/qname.hpp>
#include <ximol/parser/utils.hpp>
#include <ximol/config/define_functions_prefix_local_attributes.hpp>
#include <ximol/config/define_functions_prefix_local.hpp>
#include <ximol/config/define_functions_local_attributes.hpp>
#include <ximol/config/define_functions_local.hpp>

Include dependency graph for stag.hpp:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  manipulator_stag
 Manipulator for the start tag. More...


Defines

#define XIMOL_HEADER_DEFINE_FUNCTION(type1, type2, type3)   XIMOL_EXPORT manipulator_stag< qualified_name<type1, type2>, type3> stag(type1 & prefix, type2 & local, type3 & att);
 Start tag manipulator creator.

#define XIMOL_HEADER_DEFINE_FUNCTION(type1, type2)   XIMOL_EXPORT manipulator_stag< qualified_name<type1, type2>, xml::attributes> stag(type1 & prefix, type2 & local);
 Start tag manipulator creator.

#define XIMOL_HEADER_DEFINE_FUNCTION(type1, type3)   XIMOL_EXPORT manipulator_stag< qualified_name<type1, type1>, type3> stag(type1 & local, type3 & att);
 Start tag manipulator creator.

#define XIMOL_HEADER_DEFINE_FUNCTION(type1)   XIMOL_EXPORT manipulator_stag< qualified_name<type1, type1>, xml::attributes> stag(type1 & local);
 Start tag manipulator creator.


Functions

template<typename Qname, typename Attributes> xostreamoperator<< (xostream &xos, const manipulator_stag< Qname, Attributes > &m)
template<typename Qname, typename Attributes> xistreamoperator>> (xistream &xis, manipulator_stag< Qname, Attributes > m)


Define Documentation

#define XIMOL_HEADER_DEFINE_FUNCTION type1   )     XIMOL_EXPORT manipulator_stag< qualified_name<type1, type1>, xml::attributes> stag(type1 & local);
 

Start tag manipulator creator.

This function create the start tag manipulator with the adjusted type. Only the local part of the tag name will be written or read from the stream. This manipulator read or write start tag on the stream. The writer does not make any problem, but the reader could. If the lement is const, the manipulator only check the equality.

The following code write the start tag on the stream:

xos << xml::stag("tag"); \code If you want to read the tag, you could write: \code std::string tag; xis >> xml::stag(tag);
The probleme is the wide character conversion, because with this code, you could not read the wide character tag. You could also write:
std::xstring tag; xis >> xml::stag(tag);
And if you only want to verify the tag, you could write:
xis >> xml::stag("Tag");
or
xis >> xml::stag(L"Tag");

requirement: The character of the String1 must be managed by str<T>::cast

You could see examples.

Definition at line 229 of file stag.hpp.

#define XIMOL_HEADER_DEFINE_FUNCTION type1,
type3   )     XIMOL_EXPORT manipulator_stag< qualified_name<type1, type1>, type3> stag(type1 & local, type3 & att);
 

Start tag manipulator creator.

This function create the start tag manipulator with the adjusted type. Only the local part of the tag name will be written or read from the stream. This manipulator read or write start tag on the stream. The writer does not make any problem, but the reader could. If the lement is const, the manipulator only check the equality.

The following code write the start tag on the stream:

xos << xml::stag("tag"); \code If you want to read the tag, you could write: \code std::string tag; xis >> xml::stag(tag);
The probleme is the wide character conversion, because with this code, you could not read the wide character tag. You could also write:
std::xstring tag; xis >> xml::stag(tag);
And if you only want to verify the tag, you could write:
xis >> xml::stag("Tag");
or
xis >> xml::stag(L"Tag");

requirement: The character of the String1 must be managed by str<T>::cast

You could see examples.

Definition at line 229 of file stag.hpp.

#define XIMOL_HEADER_DEFINE_FUNCTION type1,
type2   )     XIMOL_EXPORT manipulator_stag< qualified_name<type1, type2>, xml::attributes> stag(type1 & prefix, type2 & local);
 

Start tag manipulator creator.

This function create the start tag manipulator with the adjusted type. Only the local part of the tag name will be written or read from the stream. This manipulator read or write start tag on the stream. The writer does not make any problem, but the reader could. If the lement is const, the manipulator only check the equality.

The following code write the start tag on the stream:

xos << xml::stag("tag"); \code If you want to read the tag, you could write: \code std::string tag; xis >> xml::stag(tag);
The probleme is the wide character conversion, because with this code, you could not read the wide character tag. You could also write:
std::xstring tag; xis >> xml::stag(tag);
And if you only want to verify the tag, you could write:
xis >> xml::stag("Tag");
or
xis >> xml::stag(L"Tag");

requirement: The character of the String1 must be managed by str<T>::cast

You could see examples.

Definition at line 229 of file stag.hpp.

#define XIMOL_HEADER_DEFINE_FUNCTION type1,
type2,
type3   )     XIMOL_EXPORT manipulator_stag< qualified_name<type1, type2>, type3> stag(type1 & prefix, type2 & local, type3 & att);
 

Start tag manipulator creator.

This function create the start tag manipulator with the adjusted type. Only the local part of the tag name will be written or read from the stream. This manipulator read or write start tag on the stream. The writer does not make any problem, but the reader could. If the lement is const, the manipulator only check the equality.

The following code write the start tag on the stream:

xos << xml::stag("tag"); \code If you want to read the tag, you could write: \code std::string tag; xis >> xml::stag(tag);
The probleme is the wide character conversion, because with this code, you could not read the wide character tag. You could also write:
std::xstring tag; xis >> xml::stag(tag);
And if you only want to verify the tag, you could write:
xis >> xml::stag("Tag");
or
xis >> xml::stag(L"Tag");

requirement: The character of the String1 must be managed by str<T>::cast

You could see examples.

Definition at line 229 of file stag.hpp.


Function Documentation

template<typename Qname, typename Attributes>
xostream& operator<< xostream xos,
const manipulator_stag< Qname, Attributes > &  m
 

Definition at line 117 of file stag.hpp.

References write_stag(), and XIMOL_PARSER_USING_NAMESPACE.

template<typename Qname, typename Attributes>
xistream& operator>> xistream xis,
manipulator_stag< Qname, Attributes >  m
 

Definition at line 139 of file stag.hpp.

References manipulator_stag< Qname, Attributes >::att_, xistream::context, has_skip_whitespace(), manipulator_stag< Qname, Attributes >::qname_, read_optionnal_space(), read_stag(), XIMOL_PARSER_USING_NAMESPACE, and xstring.



Donate to the XiMoL project SourceForge.net Logo If you have any questions about XiMoL, you could write to tournois@users.sourceforge.net.