30 #include <libxml/parser.h>
37 #define square(x) ((x)*(x))
117 std::set <TypeId> PossibleChildren;
118 std::set <TypeId> PossibleParents;
119 std::set <TypeId> RequiredChildren;
120 std::set <TypeId> RequiredParents;
121 std::string CreationLabel;
122 std::list <BuildMenuCb> MenuCbs;
181 void SetId (gchar
const *Id);
185 char const *
GetId ()
const {
return m_Id;}
288 virtual xmlNodePtr
Save (xmlDocPtr xml)
const;
305 virtual bool Load (xmlNodePtr node);
314 virtual bool GetCoords (
double *x,
double *y,
double *z = NULL)
const;
323 virtual void Move (
double x,
double y,
double z = 0.);
343 bool SaveChildren (xmlDocPtr xml, xmlNodePtr node)
const;
349 void SaveId (xmlNodePtr node)
const;
360 xmlNodePtr
GetNodeByProp (xmlNodePtr node,
char const *Property,
char const *Id);
370 xmlNodePtr
GetNextNodeByProp (xmlNodePtr node,
char const *Property,
char const *Id);
416 virtual bool Build (std::set < Object * >
const &Children)
throw (std::invalid_argument);
466 void Lock (
bool state =
true);
531 virtual bool SetProperty (
unsigned property,
char const *value);
539 virtual std::string
GetProperty (
unsigned property)
const;
555 virtual void Clear ();
560 virtual std::string
Name ();
669 static void AddRule (
const std::string& type1,
RuleId rule,
const std::string& type2);
689 static const std::set<TypeId>&
GetRules (
const std::string& type,
RuleId rule);
732 Object* RealGetDescendant (
const gchar* Id)
const;
738 std::map<std::string, Object*> m_Children;
739 std::set<Object*> m_Links;
740 TypeDesc
const *m_TypeDesc;
756 #endif //GCU_OBJECT_H