Diff for /Amaya/amaya/templates.h between versions 1.14 and 1.15

version 1.14, 2007/02/15 08:16:50 version 1.15, 2007/04/25 13:26:52
Line 4 Line 4
 #define THOT_EXPORT extern  #define THOT_EXPORT extern
 #include "amaya.h"  #include "amaya.h"
 #include "document.h"  #include "document.h"
   #include "containers.h"
   
 #include "MENUconf.h"  #include "MENUconf.h"
   
 #define TEMPLATE_SSHEMA_NAME  "Template"  #define TEMPLATE_SSHEMA_NAME  "Template"
   
 typedef void  *DicElement;  
   
 //A record contains an element and its key.  
 struct sRecord;  
 typedef struct sRecord *Record;  
 struct sRecord  
 {  
         char        *key;  
   DicElement   element;  
         Record       next;  
 };  
   
 //A dictionary contains a sequence of Records  
 struct sDictionary;  
 typedef struct sDictionary* DicDictionary;  
 struct sDictionary  
 {  
         Record first;  
         Record iter;  
 };  
   
 /* Structure of a template */  /* Structure of a template */
 struct _XTigerTemplate;  struct _XTigerTemplate;
Line 43  struct _XTigerTemplate Line 24  struct _XTigerTemplate
   ThotBool        isLibrary;                    //Is this a library? (otherway it's a template)    ThotBool        isLibrary;                    //Is this a library? (otherway it's a template)
   ThotBool        isPredefined;   //Is this the predefined library    ThotBool        isPredefined;   //Is this the predefined library
   ThotBool        isLoaded;       //Is the template is loaded ?    ThotBool        isLoaded;       //Is the template is loaded ?
   DicDictionary   libraries;                    //Imported libraries    HashMap         libraries;                    //Imported libraries (StringHashMap<XTigerTemplate>)
   DicDictionary   simpleTypes;          //All simple types declared in the document    HashMap         simpleTypes;          //All simple types declared in the document (KeywordHashMap<Declaration>)
   DicDictionary   elements;                             //All element types declared in the document    HashMap         elements;                             //All element types declared in the document (KeywordHashMap<Declaration>)
   DicDictionary   components;                   //All component types declared in the document    HashMap         components;                   //All component types declared in the document (KeywordHashMap<Declaration>)
   DicDictionary   unions;                                 //All union types declared in the document    HashMap         unions;                                 //All union types declared in the document (KeywordHashMap<Declaration>)
   Document        doc;            //Use to store component structures    Document        doc;            //Use to store component structures
   int             users;          //Number of documents using this template    int             users;          //Number of documents using this template
 };  };
   
   // Notes : 
   // All KeywordHashMap<Declaration> must embed their own copy of their keys
   // in order to prevent corruption.
   
 typedef enum _TypeNature {SimpleTypeNat, XmlElementNat, ComponentNat,  typedef enum _TypeNature {SimpleTypeNat, XmlElementNat, ComponentNat,
                           UnionNat} TypeNature;                            UnionNat} TypeNature;
   
Line 77  typedef struct _Component Line 62  typedef struct _Component
   
 typedef struct _Union  typedef struct _Union
 {  {
         DicDictionary  include;  //Dictionary<Declaration>          HashMap  include;  //KeywordHashMap<Declaration>
         DicDictionary  exclude;  //Dictionary<Declaration>          HashMap  exclude;  //KeywordHashMap<Declaration>
   DicDictionary  expanded; //Dictionary<Declaration>    HashMap  expanded; //KeywordHashMap<Declaration>
 } Union;  } Union;
   
 /* Structure of a declaration */  /* Structure of a declaration */
Line 90  struct _Declaration Line 75  struct _Declaration
 {  {
         char          *name;          char          *name;
         TypeNature     nature;          TypeNature     nature;
         XTigerTemplate declaredIn;          XTigerTemplate declaredIn; // The template which declare the decl
     XTigerTemplate usedIn;     // The template which embed the decl
         union          union
         {          {
                 SimpleType   simpleType;                  SimpleType   simpleType;

Removed from v.1.14  
changed lines
  Added in v.1.15


Webmaster