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 };
00035 template <class Char,class Traits,class XMLTraits>
00036 class XMLToken {
00037 public:
00038 MiX_Template_Typedef(Char,Traits,XMLTraits);
00039 typedef XMLToken<Char,Traits,XMLTraits> this_type;
00040 private:
00041 XMLString<Char,Traits,XMLTraits> str_;
00042 TokenType type_;
00043 long index_;
00044 public:
00046 XMLToken()
00047 : type_(Token_null),index_(-1){ };
00049 XMLToken(const Char* first,const Char* last,TokenType type,long index);
00051 string_type& getData() { return str_; };
00053 TokenType getType() { return type_; };
00055 long getIndex() { return index_; };
00056 };
00057 }
00058
00059 #ifndef MIX_XMLTOKEN_CPP_
00060 #include "XMLToken.cpp"
00061 #endif
00062
00063 #endif