Actin  Version 5.5.5
Software for Robotics Simulation and Control
ecXmlObject.h
Go to the documentation of this file.
1 #ifndef ecXmlObject_H_
2 #define ecXmlObject_H_
3 //------------------------------------------------------------------------------
4 // Copyright (c) 2001-2013 Energid Technologies. All rights reserved.
5 //
13 //
14 //------------------------------------------------------------------------------
15 #include <foundCore/ecConfig.h> // Required to be first header.
16 #include <foundCore/ecMacros.h>
17 #include "ecXmlTokens.h"
18 
19 class EcXmlReader;
20 class EcXmlSchema;
21 class EcXmlWriter;
22 
24 {
25 public:
26 
30 
32  virtual EcXmlObject* clone
33  (
34  ) const = 0;
35 
37  virtual EcBoolean xmlInit
38  (
39  );
40 
42  virtual EcBoolean read
43  (
44  EcXmlReader& stream
45  );
46 
48  virtual EcBoolean readAttribute
49  (
50  EcXmlReader& stream
51  );
52 
54  virtual EcBoolean write
55  (
56  EcXmlWriter& stream
57  ) const;
58 
60  virtual EcBoolean writeSchema
61  (
62  EcXmlSchema& stream
63  ) const;
64 
66  virtual EcBoolean createSchema
67  (
68  const EcString& filename,
69  const EcToken& objectName = EcXml::EcDefaultToken
70  ) const;
71 
73  virtual EcBoolean xmlInitialized
74  (
75  ) const;
76 
78  virtual void setXmlInitialized
79  (
80  EcBoolean val = EcTrue
81  );
82 
84  virtual EcBoolean specified
85  (
86  ) const;
87 
89  virtual void setSpecified
90  (
91  EcBoolean val = EcTrue
92  );
93 
95  virtual EcBoolean isBasicType
96  (
97  ) const;
98 
100  virtual EcBoolean equalsDefault
101  (
102  ) const;
103 
105  virtual EcBoolean equality
106  (
107  const EcXmlObject* other
108  ) const = 0;
109 
111  virtual EcXmlObject* newObject
112  (
113  ) const = 0;
114 
116  virtual const EcToken& token
117  (
118  ) const = 0;
119 
120 
121 protected:
124 
127 
129  static const EcU8 m_theSpecifiedBit;
130 
131 };
132 
134 typedef EcXmlObject* (*EcXmlObjectCreator)();
135 
137 typedef std::map<EcToken, EcXmlObjectCreator> EcXmlCreatorMap;
138 
139 #endif // ecXmlObject_H_
Specify some global configuration parameters and values.
const EcBoolean EcTrue
gives a representation of true
Definition: ecConstants.h:19
An EcString-like class that holds a tag and a namespace.
Definition: ecToken.h:41
A base class for xml objects.
Definition: ecXmlObject.h:23
EcU8 m_State
the state of the object - eight boolean flags
Definition: ecXmlObject.h:123
#define EC_STABLE_XML_DECL
xml directory
Definition: ecConfig.h:220
#define ECDECLARE_BIGFOUR(EcCls)
Definition: ecMacros.h:312
bool EcBoolean
Boolean (0 or 1)
Definition: ecTypes.h:21
XML file writer.
Definition: ecXmlWriter.h:19
static const EcU8 m_theSpecifiedBit
the bit used to describe specification
Definition: ecXmlObject.h:129
std::basic_string< char > EcString
a character string
Definition: ecTypes.h:116
An XML file reader.
Definition: ecXmlReader.h:17
Macros and C-style general functions.
std::map< EcToken, EcXmlObjectCreator > EcXmlCreatorMap
type definition of a creator function map from std::map
Definition: ecXmlObject.h:137
unsigned char EcU8
8-bit unsigned integer
Definition: ecTypes.h:36
Class for generating schemas.
Definition: ecXmlSchema.h:22
static const EcU8 m_theXmlInitializedBit
the bit used to describe xml initialization
Definition: ecXmlObject.h:126