00001
00002
00003 #ifndef MIX_XMLTOKEN_H_
00004 #define MIX_XMLTOKEN_H_
00005
00006 #include "classes.h"
00007 #include "misc.h"
00008 #include "XMLString.h"
00009
00010 namespace MiX{
00011 enum TokenType{
00012 Token_null = 0,
00013 Token_crlf,
00014 Token_space,
00015 Token_tab,
00016 Token_lt,
00017 Token_eq,
00018 Token_gt,
00019 Token_slash,
00020 Token_hyphen,
00021 Token_semicolon,
00022 Token_exclamation,
00023 Token_question,
00024 Token_amp,
00025 Token_dblquote,
00026 Token_quote,
00027 Token_text = 100
00028 };
00029
00030 template <class charT,class char_traits,class xml_traits>
00031 class XMLToken {
00032 public:
00033 MiX_Template_Typedef(charT,char_traits,xml_traits);
00034 typedef XMLToken<charT,char_traits,xml_traits> this_type;
00035 private:
00036 string_type str_;
00037 TokenType type_;
00038 long index_;
00039 public:
00041 XMLToken() : type_(Token_null),index_(-1){ };
00043 XMLToken(const charT* first,const charT* last,TokenType type,long index);
00045 string_type& getData() { return str_; };
00047 TokenType getType() { return type_; };
00049 long getIndex() { return index_; };
00050 };
00051 }
00052
00053 #ifndef MIX_XMLTOKEN_CPP_
00054 #include "XMLToken.cpp"
00055 #endif
00056
00057 #endif