Changeset 93 for trunk/src/xmlmodel.h


Ignore:
Timestamp:
Apr 8, 2008, 11:24:38 AM (11 years ago)
Author:
lindanl
Message:

Hashmap for enumerated types in Attlists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/xmlmodel.h

    r91 r93  
    8383/* Possible kinds of attribute default in ATTLIST declarations. */
    8484
     85struct eqstr
     86{
     87  bool operator()(const char* s1, const char* s2) const
     88  {
     89    return strcmp(s1, s2) == 0;
     90  }
     91};
     92
    8593class ATT_info {
    8694public:
    8795        int globalATT_id;
    8896        ATT_type attType;
    89         vector<string> enumValues; /* For NOTATION_att or enumeration_att.*/
     97        hash_map<const char *, int, hash<const char *>, eqstr > enumValues; /* For NOTATION_att or enumeration_att.*/
    9098        ATT_default_kind defaultKind;
    9199        unsigned char * defaultValue;
     
    96104   specifications for particular attribute names. */
    97105//typedef vector<ATT_info> ElementAttributeModel;
    98 
    99 struct eqstr
    100 {
    101   bool operator()(const char* s1, const char* s2) const
    102   {
    103     return strcmp(s1, s2) == 0;
    104   }
    105 };
    106106
    107107class Model_Info {
Note: See TracChangeset for help on using the changeset viewer.