OpenLexocad
27.0
|
#include <Property.h>
Public Types | |
enum | Status { New = 1 << 1, Valid = 1 << 2, Updated = 1 << 3 } |
Public Member Functions | |
Property (void) | |
virtual | ~Property (void) |
void | setName (const std::string &name) |
std::string | getName () const |
Core::PropertyContainer * | getContainer () const |
void | setContainer (Core::PropertyContainer *container) |
void | addToContainer (const std::string &name) |
virtual Core::Variant | getVariant (void) const =0 |
virtual bool | setValueFromVariant (const Core::Variant &value)=0 |
virtual bool | setKeyValue (const std::string &key, const Core::Variant &value) |
Sets a sub key in this property. More... | |
virtual std::map< std::string, Core::Variant > | getKeyValueMap () const |
Returns all keys and their values of this property. More... | |
Core::Variant | getVariantFromKey (const std::string &key) const |
Gets the variant for a key. More... | |
std::vector< std::string > | getKeys () const |
Returns all keys of this property. More... | |
virtual void | copyValue (Core::Property *p)=0 |
virtual void | deepCopy (Core::Property *p, Core::CoreDocument *dest_doc, DocObjectMap ©Map) |
bool | enableNotify (bool on) |
bool | isNotifyEnabled (void) const |
void | touch () |
bool | setWillChangeStatusOnChange (bool on) |
long | getTransactionNumber () const |
bool | isUpdated () const |
Checks if the property was updated. More... | |
bool | isTheOnlyUpdatedPropertyInContainer () const |
Checks if this is the only updated property in the container. More... | |
virtual const Core::PropertyKind | getPropertyKind (void) const |
virtual void | setPropertyKind (Core::PropertyKind p) |
bool | hasValue () const |
Returns 'true' if the property has a value. This is mainly for optional properties. More... | |
virtual bool | isOptional () const |
Checks if this is an optional property. More... | |
void | setHasValue (bool yesno) |
is called when a property holds a value. For optional properties. More... | |
virtual bool | isEqual (const Property *) const =0 |
compare properties More... | |
virtual bool | isLink () const |
Check if Property is of type PropertyLink, LinkSet etc. For better performance. More... | |
virtual std::shared_ptr< Core::DbgInfo > | getDbgInfo () const |
Returns the debug information for this property. More... | |
void | setStatus (const Property::Status &in) |
Property::Status | getStatus () const |
bool | isDefaultValue () const |
void | setDefaultValue (bool on) |
void | accept (Core::CoreVisitor *visitor) |
virtual bool | createSQL (Base::AbstractWriter &writer, Base::PersistanceVersion &save_version, bool data) override |
This method is used to save properties or very small amounts of data to an XML document. More... | |
![]() | |
virtual void | save (Base::AbstractWriter &, Base::PersistanceVersion &)=0 |
This method is used to save properties or very small amounts of data to an XML document. More... | |
virtual void | restore (Base::AbstractXMLReader &, Base::PersistanceVersion &)=0 |
This method is used to restore properties from an XML document. More... | |
virtual void | saveDocFile (Base::AbstractWriter &, const Base::String &, const Base::String &) |
This method is used to save large amounts of data to a binary file. More... | |
virtual void | restoreDocFile (Base::Reader &, const Base::String &) |
This method is used to restore large amounts of data from a binary file. More... | |
virtual bool | mustbeSaved () const |
Return 'true' if this object must always be saved in the file. More... | |
![]() | |
virtual Type | getTypeId (void) const |
template<typename T > | |
bool | isDerivedFrom () const |
BaseClass () | |
Construction. More... | |
virtual | ~BaseClass () |
Destruction. More... | |
Static Public Member Functions | |
static void | registerProperties (Base::Type t, const Core::PropertyValueMap &pvm) |
Registers the properties with default values for type 't'. More... | |
static bool | getRegisteredProperties (Base::Type t, Core::PropertyValueMap &pvm) |
Returns the properties with default values of type t;. More... | |
static const char * | getXMLPropertyAttributeName () |
static const char * | getXMLPropertyAttributeValue () |
static void | setXMLPropertyAttributeName (const char *) |
static void | setXMLPropertyAttributeValue (const char *) |
![]() | |
static Type | getClassTypeId (void) |
static void | init (void) |
static void * | create (void) |
static void | setIfcNameAndID (std::string n, int id) |
Protected Member Functions | |
void | hasSetValue (void) |
Should be called by all setValue() methods after the value was changed. More... | |
bool | aboutToSetValue (const Core::Variant &newValue=Core::Variant()) |
Additional Inherited Members | |
![]() | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=0) |
static void | initIfcTypes (std::string s, Base::Type classTypeId, int id) |
Core::Property::Property | ( | void | ) |
|
virtual |
|
protected |
Should be called by all setValue() methods before the value is changed, returns true if the change is validated by container (false otherwise), so far only properties (and only their setValue() methods, copyValue() doesn't use it) in the following files use the container validation functionality: PropertyReal, PropertyInteger, PropertyLogical, PropertyDrawStyle
void Core::Property::accept | ( | Core::CoreVisitor * | visitor | ) |
void Core::Property::addToContainer | ( | const std::string & | name | ) |
|
pure virtual |
Implemented in Core::PropertyUInt8List, Core::PropertyEnum, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyTexture2List, Core::PropertyTypedLinkList< T >, Core::PropertyPoint2d, Core::PropertyUInt8, Core::PropertyTextureCoordinateFunction, Core::PropertyLinkList, Core::PropertyUInt32, Core::PropertyAxis2List, Core::PropertyListPointList, Core::PropertyTextureCoordinateMapping, Core::PropertyBackLinkSetBase, Core::PropertyMultiLineText, Core::PropertyUInt64, Core::PropertyAxis22D, Core::PropertyRealList, Core::PropertyDirection2d, Core::PropertyArrowheads, Core::PropertyTexture2Transform, Core::PropertyAxis2D, Core::PropertyColorList, Core::PropertyPointList, Core::PropertyGTransform, Core::PropertyBrepDataSet, Core::PropertyDirection2d, Core::PropertySearchSettingsVector, Core::PropertyRelaxationSet, Core::PropertyMD5, Core::PropertyDateTimeList, Core::PropertyVectorList, Core::PropertyLong, Core::PropertyGUID, Core::PropertyTextList, Core::PropertyLinkBase, Core::PropertyAxis2, Core::PropertyBackLinkBase, Core::PropertyProxy, Core::PropertyString, Core::PropertyLinkSetBase, Core::PropertyDirection, Core::PropertyTexture2, Core::PropertyUser, Core::PropertyLogical, Core::PropertyAxis1, Core::PropertyColor, Core::PropertyLinkListBase, Core::PropertySearchSettings, Core::PropertyPoint, Core::PropertyRelaxation, Core::PropertyBrush, Core::PropertyDirection, Core::PropertyEmbeddedFile, Core::PropertyFont, Core::PropertyMesh, Core::PropertyBoolean, Core::PropertyBrepData, Core::PropertyCompoundPlaneAngle, Core::PropertyFace, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyDateTime, Core::PropertyPen, Core::PropertyReal, Core::PropertyTransform, Core::PropertyVector, Core::PropertyDrawStyle, Core::PropertyFile, Core::PropertyPercent, and Core::PropertyInteger.
|
overridevirtual |
This method is used to save properties or very small amounts of data to an XML document.
Reimplemented from Base::Persistance.
Reimplemented in Core::PropertyGUID, Core::PropertyString, Core::PropertyLinkBase, Core::PropertyBoolean, Core::PropertyDateTime, Core::PropertyInteger, and Core::PropertyReal.
|
virtual |
Reimplemented in Core::PropertyLinkBase, Core::PropertyLinkSetBase, and Core::PropertyLinkListBase.
|
inline |
Controls whether to call container's aboutToSetValue() and hasSetValue(), if the parameter is false the integrity of the container is lost, when the parameter is true and the integrity isn't intact ensureIntegrity is called to resolve this
Core::PropertyContainer* Core::Property::getContainer | ( | ) | const |
|
virtual |
Returns the debug information for this property.
Reimplemented in Core::PropertyBackLinkSetBase, Core::PropertyAxis22D, Core::PropertyGUID, Core::PropertyTexture2Transform, Core::PropertyLinkSetBase, Core::PropertyAxis2, Core::PropertyLinkListBase, Core::PropertyLinkBase, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyBackLinkBase, Core::PropertyTransform, and Core::PropertyDrawStyle.
std::vector<std::string> Core::Property::getKeys | ( | ) | const |
Returns all keys of this property.
|
virtual |
Returns all keys and their values of this property.
Reimplemented in Core::PropertyArrowheads, Core::PropertyAxis2, Core::PropertyPoint, Core::PropertyDrawStyle, Core::PropertyLinkBase, Core::PropertyColor, and Core::PropertyLinkSetBase.
|
inline |
|
virtual |
|
static |
Returns the properties with default values of type t;.
|
inline |
|
inline |
|
pure virtual |
Implemented in Core::PropertyUInt8List, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyTexture2List, Core::PropertyPoint2d, Core::PropertyUInt8, Core::PropertyTextureCoordinateFunction, Core::PropertyLinkList, Core::PropertyListPointList, Core::PropertyAxis2List, Core::PropertyUInt32, Core::PropertyBackLinkSetBase, Core::PropertyTextureCoordinateMapping, Core::PropertyMultiLineText, Core::PropertyUInt64, Core::PropertyAxis22D, Core::PropertyPointList, Core::PropertyColorList, Core::PropertyRealList, Core::PropertyBrepDataSet, Core::PropertyDirection2d, Core::PropertyArrowheads, Core::PropertyTexture2Transform, Core::PropertyGTransform, Core::PropertyAxis2D, Core::PropertyDateTimeList, Core::PropertyRelaxationSet, Core::PropertyVectorList, Core::PropertyDirection2d, Core::PropertySearchSettingsVector, Core::PropertyMD5, Core::PropertyGUID, Core::PropertyLong, Core::PropertyTextList, Core::PropertyAxis2, Core::PropertyBackLinkBase, Core::PropertyProxy, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyString, Core::PropertyDirection, Core::PropertyTexture2, Core::PropertyUser, Core::PropertyLogical, Core::PropertyAxis1, Core::PropertyColor, Core::PropertySearchSettings, Core::PropertyLinkBase, Core::PropertyMesh, Core::PropertyPoint, Core::PropertyRelaxation, Core::PropertyBrepData, Core::PropertyBrush, Core::PropertyDirection, Core::PropertyEmbeddedFile, Core::PropertyLinkSetBase, Core::PropertyFont, Core::PropertyTransform, Core::PropertyBoolean, Core::PropertyCompoundPlaneAngle, Core::PropertyFace, Core::PropertyDateTime, Core::PropertyFile, Core::PropertyLinkListBase, Core::PropertyPen, Core::PropertyReal, Core::PropertyVector, Core::PropertyDrawStyle, Core::PropertyPercent, and Core::PropertyInteger.
Core::Variant Core::Property::getVariantFromKey | ( | const std::string & | key | ) | const |
Gets the variant for a key.
|
static |
|
static |
|
protected |
Should be called by all setValue() methods after the value was changed.
bool Core::Property::hasValue | ( | ) | const |
Returns 'true' if the property has a value. This is mainly for optional properties.
|
inline |
|
pure virtual |
compare properties
Implemented in Core::PropertyUInt8List, Core::PropertyEnum, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyTexture2List, Core::PropertyTypedLinkList< T >, Core::PropertyPoint2d, Core::PropertyUInt8, Core::PropertyTextureCoordinateFunction, Core::PropertyLinkList, Core::PropertyListPointList, Core::PropertyAxis2List, Core::PropertyUInt32, Core::PropertyBackLinkSetBase, Core::PropertyTextureCoordinateMapping, Core::PropertyMultiLineText, Core::PropertyUInt64, Core::PropertyAxis22D, Core::PropertyPointList, Core::PropertyColorList, Core::PropertyRealList, Core::PropertyTexture2Transform, Core::PropertyGTransform, Core::PropertyAxis2D, Core::PropertyBrepDataSet, Core::PropertyArrowheads, Core::PropertyDirection2d, Core::PropertyDateTimeList, Core::PropertyGUID, Core::PropertyRelaxationSet, Core::PropertyVectorList, Core::PropertySearchSettingsVector, Core::PropertyMD5, Core::PropertyLong, Core::PropertyTextList, Core::PropertyLinkSetBase, Core::PropertyAxis2, Core::PropertyLinkListBase, Core::PropertyLinkBase, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyString, Core::PropertyBackLinkBase, Core::PropertyProxy, Core::PropertyTexture2, Core::PropertyUser, Core::PropertyAxis1, Core::PropertyLogical, Core::PropertyPoint, Core::PropertyColor, Core::PropertyDirection, Core::PropertySearchSettings, Core::PropertyMesh, Core::PropertyRelaxation, Core::PropertyTransform, Core::PropertyBrepData, Core::PropertyBrush, Core::PropertyCompoundPlaneAngle, Core::PropertyEmbeddedFile, Core::PropertyBoolean, Core::PropertyDrawStyle, Core::PropertyFont, Core::PropertyDateTime, Core::PropertyFace, Core::PropertyReal, Core::PropertyFile, Core::PropertyPen, Core::PropertyVector, Core::PropertyPercent, and Core::PropertyInteger.
|
inlinevirtual |
Check if Property is of type PropertyLink, LinkSet etc. For better performance.
Reimplemented in Core::PropertyLinkSetBase, Core::PropertyLinkListBase, Core::PropertyLinkBase, Core::PropertySolverElementLinkVector, and Core::PropertySolverSolverLinkList.
|
inline |
|
inlinevirtual |
Checks if this is an optional property.
Reimplemented in Core::PropertyLengthOpt.
bool Core::Property::isTheOnlyUpdatedPropertyInContainer | ( | ) | const |
Checks if this is the only updated property in the container.
bool Core::Property::isUpdated | ( | ) | const |
Checks if the property was updated.
|
static |
Registers the properties with default values for type 't'.
void Core::Property::setContainer | ( | Core::PropertyContainer * | container | ) |
|
inline |
void Core::Property::setHasValue | ( | bool | yesno | ) |
is called when a property holds a value. For optional properties.
|
virtual |
Sets a sub key in this property.
Reimplemented in Core::PropertyArrowheads, Core::PropertyLinkBase, Core::PropertyPoint, Core::PropertyAxis2, Core::PropertyColor, Core::PropertyLinkSetBase, and Core::PropertyDrawStyle.
|
inline |
|
virtual |
|
inline |
|
pure virtual |
Implemented in Core::PropertyUInt8List, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyTexture2List, Core::PropertyTypedLinkList< T >, Core::PropertyPoint2d, Core::PropertyUInt8, Core::PropertyTextureCoordinateFunction, Core::PropertyLinkList, Core::PropertyUInt32, Core::PropertyAxis2List, Core::PropertyListPointList, Core::PropertyTextureCoordinateMapping, Core::PropertyBackLinkSetBase, Core::PropertyMultiLineText, Core::PropertyUInt64, Core::PropertyAxis22D, Core::PropertyRealList, Core::PropertyDirection2d, Core::PropertyTexture2Transform, Core::PropertyAxis2D, Core::PropertyArrowheads, Core::PropertyColorList, Core::PropertyPointList, Core::PropertyGTransform, Core::PropertyBrepDataSet, Core::PropertyDirection2d, Core::PropertySearchSettingsVector, Core::PropertyRelaxationSet, Core::PropertyMD5, Core::PropertyDateTimeList, Core::PropertyVectorList, Core::PropertyLong, Core::PropertyGUID, Core::PropertyTextList, Core::PropertyBackLinkBase, Core::PropertyProxy, Core::PropertyString, Core::PropertyDirection, Core::PropertyTexture2, Core::PropertyLogical, Core::PropertyUser, Core::PropertySearchSettings, Core::PropertyRelaxation, Core::PropertyBrush, Core::PropertyDirection, Core::PropertyEmbeddedFile, Core::PropertyLinkBase, Core::PropertyAxis2, Core::PropertyFont, Core::PropertyMesh, Core::PropertyPoint, Core::PropertyAxis1, Core::PropertyBoolean, Core::PropertyBrepData, Core::PropertyCompoundPlaneAngle, Core::PropertyLinkListBase, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyDateTime, Core::PropertyFace, Core::PropertyLinkSetBase, Core::PropertyPen, Core::PropertyReal, Core::PropertyTransform, Core::PropertyVector, Core::PropertyColor, Core::PropertyFile, Core::PropertyPercent, Core::PropertyDrawStyle, and Core::PropertyInteger.
|
inline |
|
static |
|
static |
|
inline |
Simulates the value being changed - calls aboutToSetValue() and hasSetValue(), aboutToSetValue() is called without the optional argument Core::Variant &newValue,