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 charT,class traitsT>
00036 class XMLToken {
00037 public:
00038 MiX_Template_Typedef(charT,traitsT);
00039 typedef XMLToken<charT,traitsT> this_type;
00040 private:
00041 string_type str_;
00042 TokenType type_;
00043 long index_;
00044 public:
00046 XMLToken() : type_(Token_null),index_(-1){ };
00048 XMLToken(const charT* first,const charT* last,TokenType type,long index);
00050 string_type& getData() { return str_; };
00052 TokenType getType() { return type_; };
00054 long getIndex() { return index_; };
00055 };
00056 }
00057
00058 #ifndef MIX_XMLTOKEN_CPP_
00059 #include "XMLToken.cpp"
00060 #endif
00061
00062 #endif