|
FreeCAD C++
|
#include <Base/Parameter.h>
The parameter manager class This class manages a parameter XML document. Does loading, saving and handling the DOM document.
Public Member Functions | |
Parameter serialization | |
| void | SetSerializer (ParameterSerializer *) |
| Sets a serializer. The ParameterManager takes ownership of the serializer. | |
| bool | HasSerializer () const |
| Returns true if a serializer is set, otherwise false is returned. | |
| int | LoadDocument () |
| Loads an XML document by calling the serializer's load method. | |
| bool | LoadOrCreateDocument () |
| Loads or creates an XML document by calling the serializer's load method. | |
| void | SaveDocument () const |
| Saves an XML document by calling the serializer's save method. | |
Public Member Functions inherited from ParameterGrp | |
| const char * | GetGroupName (void) const |
| returns the name | |
| void | NotifyAll () |
| void | copyTo (Base::Reference< ParameterGrp >) |
| make a deep copy to the other group | |
| void | insertTo (Base::Reference< ParameterGrp >) |
| overwrite everything similar, leave the others alone | |
| void | exportTo (const char *FileName) |
| export this group to a file | |
| void | importFrom (const char *FileName) |
| import from a file to this group | |
| void | insert (const char *FileName) |
| insert from a file to this group, overwrite only the similar | |
| bool | GetBool (const char *Name, bool bPreset=false) const |
| read bool values or give default | |
| void | SetBool (const char *Name, bool bValue) |
| set a bool value | |
| std::vector< bool > | GetBools (const char *sFilter=NULL) const |
| get a vector of all bool values in this group | |
| std::vector< std::pair< std::string, bool > > | GetBoolMap (const char *sFilter=NULL) const |
| get a map with all bool values and the keys of this group | |
| void | RemoveBool (const char *Name) |
| remove a bool value from this group | |
| long | GetInt (const char *Name, long lPreset=0) const |
| read bool values or give default | |
| void | SetInt (const char *Name, long lValue) |
| set a int value | |
| std::vector< long > | GetInts (const char *sFilter=NULL) const |
| get a vector of all int values in this group | |
| std::vector< std::pair< std::string, long > > | GetIntMap (const char *sFilter=NULL) const |
| get a map with all int values and the keys of this group | |
| void | RemoveInt (const char *Name) |
| remove a int value from this group | |
| unsigned long | GetUnsigned (const char *Name, unsigned long lPreset=0) const |
| read uint values or give default | |
| void | SetUnsigned (const char *Name, unsigned long lValue) |
| set a uint value | |
| std::vector< unsigned long > | GetUnsigneds (const char *sFilter=NULL) const |
| get a vector of all uint values in this group | |
| std::vector< std::pair< std::string, unsigned long > > | GetUnsignedMap (const char *sFilter=NULL) const |
| get a map with all uint values and the keys of this group | |
| void | RemoveUnsigned (const char *Name) |
| remove a uint value from this group | |
| double | GetFloat (const char *Name, double dPreset=0.0) const |
| set a float value | |
| void | SetFloat (const char *Name, double dValue) |
| read float values or give default | |
| std::vector< double > | GetFloats (const char *sFilter=NULL) const |
| get a vector of all float values in this group | |
| std::vector< std::pair< std::string, double > > | GetFloatMap (const char *sFilter=NULL) const |
| get a map with all float values and the keys of this group | |
| void | RemoveFloat (const char *Name) |
| remove a float value from this group | |
| void | SetBlob (const char *Name, void *pValue, long lLength) |
| set a blob value | |
| void | GetBlob (const char *Name, void *pBuf, long lMaxLength, void *pPreset=NULL) const |
| read blob values or give default | |
| void | RemoveBlob (const char *Name) |
| remove a blob value from this group | |
| void | SetASCII (const char *Name, const char *sValue) |
| set a string value | |
| std::string | GetASCII (const char *Name, const char *pPreset=NULL) const |
| read a string values | |
| void | RemoveASCII (const char *Name) |
| remove a string value from this group | |
| std::vector< std::string > | GetASCIIs (const char *sFilter=NULL) const |
| std::vector< std::pair< std::string, std::string > > | GetASCIIMap (const char *sFilter=NULL) const |
| Same as GetASCIIs() but with key,value map. | |
| Base::Reference< ParameterGrp > | GetGroup (const char *Name) |
| get a handle to a sub group or create one | |
| std::vector< Base::Reference< ParameterGrp > > | GetGroups (void) |
| get a vector of all sub groups in this group | |
| bool | IsEmpty (void) const |
| test if this group is empty | |
| bool | HasGroup (const char *Name) const |
| test if a special sub group is in this group | |
| void | RemoveGrp (const char *Name) |
| remove a sub group from this group | |
| void | Clear (void) |
| clears everything in this group (all types) | |
Public Member Functions inherited from Base::Subject< const char * > | |
| Subject () | |
| virtual | ~Subject () |
| void | Attach (Observer< const char * > *ToObserv) |
| void | Detach (Observer< const char * > *ToObserv) |
| void | Notify (const char * rcReason) |
| Observer< const char * > * | Get (const char *Name) |
| void | ClearObserver () |
Additional Inherited Members | |
Public Types inherited from ParameterGrp | |
| typedef Base::Reference< ParameterGrp > | handle |
| type of the handle | |
Protected Member Functions inherited from ParameterGrp | |
| ParameterGrp (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *GroupNode=0L, const char *sName=0L) | |
| constructor is protected (handle concept) | |
| ~ParameterGrp () | |
| destructor is protected (handle concept) | |
| Base::Reference< ParameterGrp > | _GetGroup (const char *Name) |
| helper function for GetGroup | |
| XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | FindElement (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *Start, const char *Type, const char *Name=0L) const |
| XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | FindOrCreateElement (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *Start, const char *Type, const char *Name) const |
Protected Attributes inherited from ParameterGrp | |
| XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | _pGroupNode |
| DOM Node of the Base node of this group. | |
| std::string | _cName |
| the own name | |
| std::map< std::string,Base::Reference< ParameterGrp > > | _GroupMap |
| map of already exported groups | |
Protected Attributes inherited from Base::Subject< const char * > | |
| std::set< Observer< const char * > * > | _ObserverSet |
| Vector of attached observers. | |
1.8.15