Classes | |
| class | CLigoConfig |
| Ligo config file. More... | |
| class | IProperty |
| class | CPropertyString |
| class | CPropertyStringArray |
| class | CPropertyColor |
| class | CPrimVector |
| class | IPrimitive |
| class | CPrimNode |
| class | CPrimPoint |
| class | CPrimPath |
| class | CPrimZone |
| class | CPrimAlias |
| This primitive type is used to handle unique alias across a primitive file. More... | |
| class | CPrimRegion |
| class | CPrimitives |
| This class is a ligo primitives set. More... | |
| class | CPrimitiveContext |
| Singleton to manage special loading feature related to unique alias assignment. More... | |
| class | CPrimitiveClass |
| Class of primitive. More... | |
| class | CPrimitiveConfigurations |
| Ligo primitive configuration description. More... | |
| struct | TPrimitiveClassPredicate |
| Default predicate for primitive enumerator. More... | |
| struct | TPrimitiveNamePredicate |
| Predicate for primitive enumerator. More... | |
| struct | TPrimitiveClassAndNamePredicate |
| Predicate for primitive enumerator. More... | |
| struct | TPrimitivePropertyPredicate |
| Predicate for primitive enumerator. More... | |
| class | CPrimitiveEnumerator |
| The primitive enumerator class is used to iterate over primitive node that match a given predicate. More... | |
| class | CPrimitiveSet |
| Build a primitive set that match the predicate This class makes use of the CPrimitiveEnumerator class to iterate on each valid node and fill the result primitive set. More... | |
| class | CPrimitiveSetFilter |
| Filter a primitive set against a predicate. More... | |
| class | CLigoError |
| Error handling. More... | |
| class | CMaterial |
| A ligoscape material. More... | |
| class | CTransition |
| A transition template. More... | |
| class | CZoneBankElement |
| class | CZoneBank |
| class | CZoneEdge |
| A ZoneEdge descriptor. More... | |
| struct | SPiece |
| class | CZoneRegion |
| class | CZoneTemplate |
| Ligo zone template. More... | |
Typedefs | |
| typedef std::vector< IPrimitive * > | TPrimitiveSet |
Functions | |
| void | Register () |
| bool | loadXmlPrimitiveFile (CPrimitives &primDoc, const std::string &fileName, CLigoConfig &ligoConfig) |
| Utility function that load an xml primitive file into a CPrimitives object. | |
| bool | saveXmlPrimitiveFile (CPrimitives &primDoc, const std::string &fileName) |
| Utility function that save a CPrimitives object into an xml file. | |
| template<class Pred > | |
| IPrimitive * | getPrimitiveChild (IPrimitive *parent, Pred &predicate) |
| Utility function to look for the first child of a primitive node that match the predicate. | |
| template<class Pred > | |
| IPrimitive * | getPrimitiveParent (IPrimitive *prim, Pred &predicate) |
| Utility function to look for the first parent of a primitive node that match the predicate. | |
| template<class Pred > | |
| void | filterPrimitiveChilds (IPrimitive *parent, Pred &predicate, TPrimitiveSet &result) |
| Utility function that fill a primitive set with all the child nodes that match the predicate. | |
| std::string | buildPrimPath (const IPrimitive *prim) |
| Build a string that represent the path to a node Note that the reverse operation does not guaranty to return a unique node because there is no name uniqueness constraint in the primitive system. | |
| void | selectPrimByPath (IPrimitive *rootNode, const std::string &path, TPrimitiveSet &result) |
| Return a set of primitive that match a given path. | |
| void | Error (const char *filename, const char *format,...) |
| void | XMLError (xmlNodePtr xmlNode, const char *filename, const char *format,...) |
| xmlNodePtr | GetFirstChildNode (xmlNodePtr xmlNode, const char *filename, const char *childName) |
| bool | GetPropertyString (string &result, const char *filename, xmlNodePtr xmlNode, const char *propName) |
| bool | ReadInt (const char *propName, int &result, const char *filename, xmlNodePtr xmlNode) |
| void | WriteInt (const char *propName, int value, xmlNodePtr xmlNode) |
| bool | ReadUInt (const char *propName, uint &result, const char *filename, xmlNodePtr xmlNode) |
| void | WriteUInt (const char *propName, uint value, xmlNodePtr xmlNode) |
| bool | ReadFloat (const char *propName, float &result, const char *filename, xmlNodePtr xmlNode) |
| void | WriteFloat (const char *propName, float value, xmlNodePtr xmlNode) |
| bool | ReadVector (CPrimVector &point, const char *filename, xmlNodePtr xmlNode) |
| void | WriteVector (const CPrimVector &point, xmlNodePtr xmlNode) |
| bool | GetNodeString (string &result, const char *filename, xmlNodePtr xmlNode, const char *nodeName) |
| bool | GetContentString (string &result, const char *filename, xmlNodePtr xmlNode) |
Variables | |
| const uint | SnappedXFlag = 1 |
| const uint | SnappedYFlag = 2 |
| typedef std::vector<IPrimitive*> NLLIGO::TPrimitiveSet |
Definition at line 68 of file primitive_utils.h.
| std::string NLLIGO::buildPrimPath | ( | const IPrimitive * | prim | ) |
Build a string that represent the path to a node Note that the reverse operation does not guaranty to return a unique node because there is no name uniqueness constraint in the primitive system.
Definition at line 38 of file primitive_utils.cpp.
References NLLIGO::IPrimitive::getParent(), and NLLIGO::IPrimitive::getPropertyByName().
| void NLLIGO::Error | ( | const char * | filename, | |
| const char * | format, | |||
| ... | ||||
| ) |
Definition at line 47 of file primitive.cpp.
References nlwarning.
Referenced by NLLIGO::CPrimitives::read(), and XMLError().
| void NLLIGO::filterPrimitiveChilds | ( | IPrimitive * | parent, | |
| Pred & | predicate, | |||
| TPrimitiveSet & | result | |||
| ) | [inline] |
Utility function that fill a primitive set with all the child nodes that match the predicate.
Definition at line 381 of file primitive_utils.h.
References NLLIGO::IPrimitive::getChild(), and NLLIGO::IPrimitive::getNumChildren().
| bool NLLIGO::GetContentString | ( | string & | result, | |
| const char * | filename, | |||
| xmlNodePtr | xmlNode | |||
| ) |
Definition at line 225 of file primitive.cpp.
References XMLError().
Referenced by NLLIGO::IPrimitive::read().
| xmlNodePtr NLLIGO::GetFirstChildNode | ( | xmlNodePtr | xmlNode, | |
| const char * | filename, | |||
| const char * | childName | |||
| ) |
Definition at line 74 of file primitive.cpp.
References XMLError().
Referenced by NLLIGO::CPrimitives::read(), and NLLIGO::CPrimPoint::read().
| bool NLLIGO::GetNodeString | ( | string & | result, | |
| const char * | filename, | |||
| xmlNodePtr | xmlNode, | |||
| const char * | nodeName | |||
| ) |
Definition at line 203 of file primitive.cpp.
References XMLError().
Referenced by NLLIGO::IPrimitive::read().
| IPrimitive* NLLIGO::getPrimitiveChild | ( | IPrimitive * | parent, | |
| Pred & | predicate | |||
| ) | [inline] |
Utility function to look for the first child of a primitive node that match the predicate.
Return NULL if none of the child match the predicate. There is no way to get the next matching child using this function, you must use filterPrimitiveChilds to do this.
Definition at line 344 of file primitive_utils.h.
References NLLIGO::IPrimitive::getChild(), and NLLIGO::IPrimitive::getNumChildren().
| IPrimitive* NLLIGO::getPrimitiveParent | ( | IPrimitive * | prim, | |
| Pred & | predicate | |||
| ) | [inline] |
Utility function to look for the first parent of a primitive node that match the predicate.
Return NULL if none of the parent match the predicate.
Definition at line 363 of file primitive_utils.h.
References NLLIGO::IPrimitive::getParent().
| bool NLLIGO::GetPropertyString | ( | string & | result, | |
| const char * | filename, | |||
| xmlNodePtr | xmlNode, | |||
| const char * | propName | |||
| ) |
Definition at line 87 of file primitive.cpp.
References XMLError().
Referenced by NLLIGO::CPrimitives::read(), NLLIGO::IPrimitive::read(), ReadFloat(), ReadInt(), and ReadUInt().
| bool NLLIGO::loadXmlPrimitiveFile | ( | CPrimitives & | primDoc, | |
| const std::string & | fileName, | |||
| CLigoConfig & | ligoConfig | |||
| ) | [inline] |
Utility function that load an xml primitive file into a CPrimitives object.
This function deal with file IO and XML parsing call. Return false if the loading fail for some reason, true otherwise.
Definition at line 286 of file primitive_utils.h.
References NLMISC::CFile::getFilename(), NLMISC::CIXml::getRootNode(), NLMISC::CIXml::init(), nlwarning, NLLIGO::CPrimitives::read(), and NLMISC::Exception::what().
| bool NLLIGO::ReadFloat | ( | const char * | propName, | |
| float & | result, | |||
| const char * | filename, | |||
| xmlNodePtr | xmlNode | |||
| ) |
Definition at line 143 of file primitive.cpp.
References GetPropertyString().
Referenced by NLLIGO::CPrimPoint::read(), ReadColor(), and ReadVector().
| bool NLLIGO::ReadInt | ( | const char * | propName, | |
| int & | result, | |||
| const char * | filename, | |||
| xmlNodePtr | xmlNode | |||
| ) |
Definition at line 101 of file primitive.cpp.
References GetPropertyString().
Referenced by NLLIGO::CPrimitiveClass::read(), and NLLIGO::CPrimAlias::read().
| bool NLLIGO::ReadUInt | ( | const char * | propName, | |
| uint & | result, | |||
| const char * | filename, | |||
| xmlNodePtr | xmlNode | |||
| ) |
Definition at line 122 of file primitive.cpp.
References GetPropertyString().
Referenced by NLLIGO::CPrimitives::read().
| bool NLLIGO::ReadVector | ( | CPrimVector & | point, | |
| const char * | filename, | |||
| xmlNodePtr | xmlNode | |||
| ) |
Definition at line 164 of file primitive.cpp.
References ReadFloat(), NLLIGO::CPrimVector::Selected, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.
Referenced by NLLIGO::CPrimZone::read(), NLLIGO::CPrimPath::read(), and NLLIGO::CPrimPoint::read().
| void NLLIGO::Register | ( | ) |
Definition at line 2747 of file primitive.cpp.
References NLMISC_REGISTER_CLASS.
| bool NLLIGO::saveXmlPrimitiveFile | ( | CPrimitives & | primDoc, | |
| const std::string & | fileName | |||
| ) | [inline] |
Utility function that save a CPrimitives object into an xml file.
This function deal with file IO and XML parsing call. Return false if the saving fail for some reason, true otherwise.
Definition at line 308 of file primitive_utils.h.
References NLMISC::COFile::close(), NLMISC::COXml::flush(), NLMISC::COXml::getDocument(), NLMISC::COXml::init(), nlwarning, NLMISC::Exception::what(), and NLLIGO::CPrimitives::write().
| void NLLIGO::selectPrimByPath | ( | IPrimitive * | rootNode, | |
| const std::string & | path, | |||
| TPrimitiveSet & | result | |||
| ) |
Return a set of primitive that match a given path.
Definition at line 56 of file primitive_utils.cpp.
References NLMISC::explode(), and NLLIGO::IPrimitive::getPropertyByName().
| void NLLIGO::WriteFloat | ( | const char * | propName, | |
| float | value, | |||
| xmlNodePtr | xmlNode | |||
| ) |
Definition at line 156 of file primitive.cpp.
References NLMISC::toString().
Referenced by NLLIGO::CPrimPoint::write().
| void NLLIGO::WriteInt | ( | const char * | propName, | |
| int | value, | |||
| xmlNodePtr | xmlNode | |||
| ) |
Definition at line 114 of file primitive.cpp.
References NLMISC::toString().
Referenced by NLLIGO::CPrimAlias::write().
| void NLLIGO::WriteUInt | ( | const char * | propName, | |
| uint | value, | |||
| xmlNodePtr | xmlNode | |||
| ) |
Definition at line 135 of file primitive.cpp.
References NLMISC::toString().
Referenced by NLLIGO::CPrimitives::write().
| void NLLIGO::WriteVector | ( | const CPrimVector & | point, | |
| xmlNodePtr | xmlNode | |||
| ) |
Definition at line 190 of file primitive.cpp.
References NLLIGO::CPrimVector::Selected, NLMISC::toString(), NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.
Referenced by NLLIGO::CPrimZone::write(), NLLIGO::CPrimPath::write(), and NLLIGO::CPrimPoint::write().
| void NLLIGO::XMLError | ( | xmlNodePtr | xmlNode, | |
| const char * | filename, | |||
| const char * | format, | |||
| ... | ||||
| ) |
Definition at line 60 of file primitive.cpp.
References Error().
Referenced by GetContentString(), GetFirstChildNode(), GetNodeString(), GetPropertyString(), NLLIGO::CPrimitives::read(), and NLLIGO::IPrimitive::read().
| const uint NLLIGO::SnappedXFlag = 1 |
Definition at line 37 of file zone_template.cpp.
Referenced by NLLIGO::CZoneTemplate::build().
| const uint NLLIGO::SnappedYFlag = 2 |
Definition at line 38 of file zone_template.cpp.
Referenced by NLLIGO::CZoneTemplate::build().
1.6.1