Changeset 267 for trunk/src/xmlmodel.h


Ignore:
Timestamp:
Mar 20, 2009, 12:18:53 PM (10 years ago)
Author:
ksherdy
Message:

Construct and pass string literals as read only (const char *) types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/xmlmodel.h

    r174 r267  
    4040/* Attribute Modeling */
    4141
    42 enum ATT_type {CDATA_att, ID_att, IDREF_att, IDREFS_att, ENTITY_att, ENTITIES_att, 
     42enum ATT_type {CDATA_att, ID_att, IDREF_att, IDREFS_att, ENTITY_att, ENTITIES_att,
    4343               NMTOKEN_att, NMTOKENS_att, NOTATION_att, enumeration_att};
    4444/* Possible attribute types as specified in ATTLIST declarations. */
     
    6363        int globalGEntity_id;
    6464        bool is_external;
    65         char * ReplacementText;
     65        const char * ReplacementText;
    6666        char * systemLiteral;
    67         char * pubidLiteral;   
     67        char * pubidLiteral;
    6868        char * NDataName;
    6969        bool is_simple;
    70        
     70
    7171};
    7272
     
    7777        char * ReplacementText;
    7878        char * systemLiteral;
    79         char * pubidLiteral;   
     79        char * pubidLiteral;
    8080};
    8181
     
    8888public:
    8989        char * systemLiteral;
    90         char * pubidLiteral;   
     90        char * pubidLiteral;
    9191};
    9292
    9393
    9494class Model_Info {
    95        
    96 public: 
     95
     96public:
    9797        Model_Info();
    9898        ~Model_Info();
    9999        bool has_external_DTD;
    100100        char * external_DTD_systemLiteral;
    101         char * external_DTD_pubidLiteral;       
     101        char * external_DTD_pubidLiteral;
    102102        Symbol_Table * symbol_table;
    103        
    104    
     103
     104
    105105        /* Information computed from ATTLIST, ELEMENT, NOTATION and ENTITY declarations. */
    106106
     
    110110        hash_map<int, int > GlobalGEntityTable;
    111111        hash_map<int, int > GlobalPEntityTable;
    112        
    113        
     112
     113
    114114        int globalElementCount;
    115115        int globalAttributeCount;
     
    126126//      vector<ContentModel *> ContentModelData;
    127127        hash_map<int, ContentModel * > ContentModelData;
    128        
    129        
     128
     129
    130130        vector<GEntity_info *> GEntityData;
    131131        vector<PEntity_info *> PEntityData;
    132132        vector<Notation_info *> NotationData;
    133        
    134         void SimpleEntity(char * entity_Name, char * replText);
     133
     134        void SimpleEntity(const char * entity_Name, const char * replText);
    135135};
    136136
Note: See TracChangeset for help on using the changeset viewer.