OpenLexocad
28.0
|
#include <Property.h>
Public Types | |
enum | Status { New = 1 << 1, Valid = 1 << 2, Updated = 1 << 3 } |
enum | ExStatus { Touched = 0, Immutable = 1, ReadOnly = 2, Hidden = 3, Transient = 4, MaterialEdit = 5, NoMaterialListEdit = 6, Output = 7, LockDynamic = 8, NoModify = 9, PartialTrigger = 10, NoRecompute = 11, Single = 12, Ordered = 13, EvalOnRestore = 14, PropStaticBegin = 21, PropDynamic = 21, PropNoPersist = 22, PropNoRecompute = 23, PropReadOnly = 24, PropTransient = 25, PropHidden = 26, PropOutput = 27, PropStaticEnd = 28, User1 = 28, User2 = 29, User3 = 30, User4 = 31 } |
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 Property * | copy (void) const =0 |
Returns a new copy of the property (mainly for Undo/Redo and transactions). The copy has no container. More... | |
virtual void | paste (const Property &from)=0 |
Paste the value from the property (mainly for Undo/Redo and transactions) More... | |
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... | |
![]() | |
virtual void | save (Base::AbstractWriter &, Base::PersistenceVersion &)=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::PersistenceVersion &)=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 |
bool | isDerivedFrom (const Type type) const |
void * | operator new (size_t size) |
void | operator delete (void *p) |
BaseClass * | operator-> () |
BaseClass * | operator-> () const |
BaseClass ()=default | |
Construction. More... | |
virtual | ~BaseClass () |
Destruction. More... | |
Friends | |
class | DynamicProperty |
StatusBits | |
std::bitset< 32 > | StatusBits |
unsigned long | getExStatus () const |
bool | testExStatus (ExStatus pos) const |
void | setExStatus (ExStatus pos, bool on) |
void | setExStatusValue (unsigned long status) |
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::PersistenceVersion &save_version, bool data) override |
This method is used to save properties or very small amounts of data to an XML document. More... | |
short | getType (void) const |
Get the type of the property in the container. More... | |
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 () |
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 std::string | encodeAttribute (const std::string &) |
![]() | |
static Type | getClassTypeId (void) |
static void | init (void) |
static void * | create (void) |
static void | setIfcNameAndID (const std::string &n, int id) |
![]() | |
long | ____deadVal = 0xBADEAFFE |
![]() | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=0) |
static void | initIfcTypes (const 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, PropertyBoolean, PropertyDrawStyle
void Core::Property::accept | ( | Core::CoreVisitor * | visitor | ) |
void Core::Property::addToContainer | ( | const std::string & | name | ) |
|
pure virtual |
Returns a new copy of the property (mainly for Undo/Redo and transactions). The copy has no container.
Implemented in Core::PropertyUInt8List, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyTexture2List, Core::PropertyUInt8, Core::PropertyPoint2d, Core::PropertyBackLinkSetBase, Core::PropertyAxis2List, Core::PropertyLinkMap< T >, Core::PropertyTextureCoordinateFunction, Core::PropertyListPointList, Core::PropertyUInt32, Core::PropertyTextureCoordinateMapping, Core::PropertyAxis22D, Core::PropertyUInt64, Core::PropertyAxis2D, Core::PropertyBrepDataSet, Core::PropertyColorList, Core::PropertyRealList, Core::PropertyDateTimeList, Core::PropertyArrowheads, Core::PropertyGTransform, Core::PropertyPointList, Core::PropertyType2Link, Core::PropertyRelaxationSet, Core::PropertyGUID, Core::PropertySearchSettingsVector, Core::PropertyVectorList, Core::PropertyDirection2d, Core::PropertyTexture2Transform, Core::PropertyLong, Core::PropertyMD5, Core::PropertyLinkSetBase, Core::PropertyBackLinkBase, Core::PropertyLinkBase, Core::PropertyAxis2, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyString, Core::PropertyLinkListBase, Core::PropertyAxis1, Core::PropertyGeometryList, Core::PropertyProxy, Core::PropertyUser, Core::PropertyBoolean, Core::PropertyColor, Core::PropertyFont, Core::PropertyBrepData, Core::PropertySearchSettings, Core::PropertyTransform, Core::PropertyBrush, Core::PropertyDrawStyle, Core::PropertyEmbeddedFile, Core::PropertyMesh, Core::PropertyRelaxation, Core::PropertyPoint, Core::PropertyDirection, Core::PropertyFile, Core::PropertyReal, Core::PropertyCompoundPlaneAngle, Core::PropertyDateTime, Core::PropertyInteger, Core::PropertyPen, Core::PropertyPercent, Core::PropertyTexture2, Core::PropertyVector, Core::PropertyTextList, Core::PropertyTextMap, Core::PropertyString2DoubleMap, and Core::PropertyMultiLineText.
|
pure virtual |
Implemented in Core::PropertyFace, Core::PropertyTypedLinkList< T >, Core::PropertyLinkList, Core::PropertyLinkMap< T >, Core::PropertyGUID, Core::PropertyType2Link, Core::PropertyBackLinkBase, Core::PropertyLinkBase, Core::PropertyGeometryList, Core::PropertyLinkSetBase, Core::PropertyUser, Core::PropertyMultiLineText, Core::PropertyString2DoubleMap, Core::PropertyTextList, Core::PropertyTextMap, Core::PropertyUInt8List, Core::PropertyEnum, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyTexture2List, Core::PropertyUInt8, Core::PropertyPoint2d, Core::PropertyAxis2List, Core::PropertyBackLinkSetBase, Core::PropertyTextureCoordinateFunction, Core::PropertyUInt32, Core::PropertyListPointList, Core::PropertyTextureCoordinateMapping, Core::PropertyUInt64, Core::PropertyAxis22D, Core::PropertyDirection2d, Core::PropertyAxis2D, Core::PropertyRealList, Core::PropertyBrepDataSet, Core::PropertyArrowheads, Core::PropertyColorList, Core::PropertyGTransform, Core::PropertyDateTimeList, Core::PropertySearchSettingsVector, Core::PropertyRelaxationSet, Core::PropertyPointList, Core::PropertyDirection2d, Core::PropertyLong, Core::PropertyVectorList, Core::PropertyMD5, Core::PropertyTexture2Transform, Core::PropertyDirection, Core::PropertyAxis2, Core::PropertyString, Core::PropertyAxis1, Core::PropertyProxy, Core::PropertyBoolean, Core::PropertyColor, Core::PropertyFont, Core::PropertySearchSettings, Core::PropertyBrush, Core::PropertyEmbeddedFile, Core::PropertyRelaxation, Core::PropertyBrepData, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyMesh, Core::PropertyFile, Core::PropertyPoint, Core::PropertyDateTime, Core::PropertyDirection, Core::PropertyDrawStyle, Core::PropertyPen, Core::PropertyTransform, Core::PropertyCompoundPlaneAngle, Core::PropertyInteger, Core::PropertyPercent, Core::PropertyReal, Core::PropertyTexture2, Core::PropertyVector, and Core::PropertyLinkListBase.
|
overridevirtual |
This method is used to save properties or very small amounts of data to an XML document.
Reimplemented from Base::Persistence.
Reimplemented in Core::PropertyGUID, Core::PropertyString, Core::PropertyLinkBase, Core::PropertyInteger, Core::PropertyReal, and Core::PropertyDateTime.
|
virtual |
|
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::PropertyLinkMap< T >, Core::PropertyAxis22D, Core::PropertyGUID, Core::PropertyType2Link, Core::PropertyTexture2Transform, Core::PropertyLinkSetBase, Core::PropertyAxis2, Core::PropertyLinkBase, Core::PropertyBackLinkBase, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyLinkListBase, Core::PropertyGeometryList, Core::PropertyTransform, and Core::PropertyDrawStyle.
|
inline |
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::PropertyLinkBase, Core::PropertyLinkSetBase, Core::PropertyArrowheads, Core::PropertyAxis2, Core::PropertyDrawStyle, Core::PropertyPoint, and Core::PropertyColor.
|
inline |
|
virtual |
|
static |
Returns the properties with default values of type t;.
|
inline |
|
inline |
short Core::Property::getType | ( | void | ) | const |
Get the type of the property in the container.
|
pure virtual |
Implemented in Core::PropertyLinkMap< T >, Core::PropertyGUID, Core::PropertyGeometryList, Core::PropertyType2Link, Core::PropertyUser, Core::PropertyLinkBase, Core::PropertyLinkListBase, Core::PropertyFace, Core::PropertyUInt8List, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyTexture2List, Core::PropertyUInt8, Core::PropertyPoint2d, Core::PropertyAxis2List, Core::PropertyBackLinkSetBase, Core::PropertyTextureCoordinateFunction, Core::PropertyUInt32, Core::PropertyListPointList, Core::PropertyTextureCoordinateMapping, Core::PropertyUInt64, Core::PropertyAxis22D, Core::PropertyDirection2d, Core::PropertyBrepDataSet, Core::PropertyAxis2D, Core::PropertyColorList, Core::PropertyRealList, Core::PropertyDateTimeList, Core::PropertyArrowheads, Core::PropertyPointList, Core::PropertyGTransform, Core::PropertyRelaxationSet, Core::PropertySearchSettingsVector, Core::PropertyVectorList, Core::PropertyDirection2d, Core::PropertyLong, Core::PropertyMD5, Core::PropertyTexture2Transform, Core::PropertyDirection, Core::PropertyBackLinkBase, Core::PropertyAxis2, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyString, Core::PropertyAxis1, Core::PropertyProxy, Core::PropertyBoolean, Core::PropertyColor, Core::PropertyFont, Core::PropertyBrepData, Core::PropertySearchSettings, Core::PropertyBrush, Core::PropertyEmbeddedFile, Core::PropertyMesh, Core::PropertyRelaxation, Core::PropertyFile, Core::PropertyTransform, Core::PropertyPoint, Core::PropertyReal, Core::PropertyDateTime, Core::PropertyDirection, Core::PropertyDrawStyle, Core::PropertyPen, Core::PropertyCompoundPlaneAngle, Core::PropertyInteger, Core::PropertyPercent, Core::PropertyTexture2, Core::PropertyVector, Core::PropertyLinkList, Core::PropertyTextList, Core::PropertyLinkSetBase, Core::PropertyMultiLineText, Core::PropertyString2DoubleMap, and Core::PropertyTextMap.
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::PropertyLinkList, Core::PropertyLinkSetBase, Core::PropertyLinkMap< T >, Core::PropertyType2Link, Core::PropertyTypedLinkList< T >, Core::PropertyBackLinkSetBase, Core::PropertyGUID, Core::PropertyBackLinkBase, Core::PropertyLinkBase, Core::PropertyLinkListBase, Core::PropertyTextList, Core::PropertyTextMap, Core::PropertyGeometryList, Core::PropertyString2DoubleMap, Core::PropertyMultiLineText, Core::PropertyUInt8List, Core::PropertyEnum, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyTexture2List, Core::PropertyUInt8, Core::PropertyPoint2d, Core::PropertyAxis2List, Core::PropertyTextureCoordinateFunction, Core::PropertyListPointList, Core::PropertyUInt32, Core::PropertyTextureCoordinateMapping, Core::PropertyAxis22D, Core::PropertyUInt64, Core::PropertyAxis2D, Core::PropertyBrepDataSet, Core::PropertyColorList, Core::PropertyRealList, Core::PropertyDateTimeList, Core::PropertyArrowheads, Core::PropertyGTransform, Core::PropertyPointList, Core::PropertyRelaxationSet, Core::PropertySearchSettingsVector, Core::PropertyVectorList, Core::PropertyDirection2d, Core::PropertyTexture2Transform, Core::PropertyLong, Core::PropertyMD5, Core::PropertyAxis2, Core::PropertyString, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyAxis1, Core::PropertyProxy, Core::PropertyUser, Core::PropertyBoolean, Core::PropertyColor, Core::PropertyFont, Core::PropertyBrepData, Core::PropertySearchSettings, Core::PropertyBrush, Core::PropertyEmbeddedFile, Core::PropertyMesh, Core::PropertyRelaxation, Core::PropertyTransform, Core::PropertyDrawStyle, Core::PropertyPoint, Core::PropertyDirection, Core::PropertyFace, Core::PropertyFile, Core::PropertyReal, Core::PropertyCompoundPlaneAngle, Core::PropertyDateTime, Core::PropertyPen, Core::PropertyInteger, Core::PropertyPercent, Core::PropertyTexture2, and Core::PropertyVector.
|
inlinevirtual |
Check if Property is of type PropertyLink, LinkSet etc. For better performance.
Reimplemented in Core::PropertyLinkSetBase, Core::PropertyLinkBase, Core::PropertyLinkListBase, 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.
|
pure virtual |
Paste the value from the property (mainly for Undo/Redo and transactions)
Implemented in Core::PropertyUInt8List, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyTexture2List, Core::PropertyUInt8, Core::PropertyPoint2d, Core::PropertyBackLinkSetBase, Core::PropertyAxis2List, Core::PropertyLinkMap< T >, Core::PropertyTextureCoordinateFunction, Core::PropertyListPointList, Core::PropertyUInt32, Core::PropertyTextureCoordinateMapping, Core::PropertyAxis22D, Core::PropertyUInt64, Core::PropertyAxis2D, Core::PropertyBrepDataSet, Core::PropertyColorList, Core::PropertyRealList, Core::PropertyDateTimeList, Core::PropertyArrowheads, Core::PropertyGTransform, Core::PropertyPointList, Core::PropertyType2Link, Core::PropertyRelaxationSet, Core::PropertyGUID, Core::PropertySearchSettingsVector, Core::PropertyVectorList, Core::PropertyDirection2d, Core::PropertyTexture2Transform, Core::PropertyLong, Core::PropertyMD5, Core::PropertyLinkSetBase, Core::PropertyBackLinkBase, Core::PropertyLinkBase, Core::PropertyAxis2, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, Core::PropertyString, Core::PropertyLinkListBase, Core::PropertyAxis1, Core::PropertyTextList, Core::PropertyTextMap, Core::PropertyGeometryList, Core::PropertyProxy, Core::PropertyUser, Core::PropertyBoolean, Core::PropertyColor, Core::PropertyFont, Core::PropertyBrepData, Core::PropertySearchSettings, Core::PropertyTransform, Core::PropertyBrush, Core::PropertyDrawStyle, Core::PropertyEmbeddedFile, Core::PropertyMesh, Core::PropertyRelaxation, Core::PropertyString2DoubleMap, Core::PropertyPoint, Core::PropertyDirection, Core::PropertyFile, Core::PropertyReal, Core::PropertyCompoundPlaneAngle, Core::PropertyDateTime, Core::PropertyInteger, Core::PropertyPen, Core::PropertyMultiLineText, Core::PropertyPercent, Core::PropertyTexture2, and Core::PropertyVector.
|
static |
Registers the properties with default values for type 't'.
void Core::Property::setContainer | ( | Core::PropertyContainer * | container | ) |
|
inline |
void Core::Property::setExStatus | ( | ExStatus | pos, |
bool | on | ||
) |
void Core::Property::setExStatusValue | ( | unsigned long | status | ) |
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::PropertyAxis2, Core::PropertyColor, Core::PropertyPoint, Core::PropertyDrawStyle, Core::PropertyLinkBase, and Core::PropertyLinkSetBase.
|
inline |
|
virtual |
|
inline |
|
pure virtual |
Implemented in Core::PropertyFace, Core::PropertyTypedLinkList< T >, Core::PropertyLinkList, Core::PropertyGUID, Core::PropertyBackLinkBase, Core::PropertyGeometryList, Core::PropertyLinkBase, Core::PropertyScriptParam, Core::PropertyLinkSetBase, Core::PropertyMultiLineText, Core::PropertyString2DoubleMap, Core::PropertyTextList, Core::PropertyTextMap, Core::PropertyUInt8List, Core::PropertyIndexList, Core::PropertyPoint2dList, Core::PropertyUInt8, Core::PropertyPoint2d, Core::PropertyAxis2List, Core::PropertyBackLinkSetBase, Core::PropertyTextureCoordinateFunction, Core::PropertyUInt32, Core::PropertyListPointList, Core::PropertyTextureCoordinateMapping, Core::PropertyUInt64, Core::PropertyAxis22D, Core::PropertyDirection2d, Core::PropertyAxis2D, Core::PropertyRealList, Core::PropertyBrepDataSet, Core::PropertyArrowheads, Core::PropertyColorList, Core::PropertyGTransform, Core::PropertyDateTimeList, Core::PropertySearchSettingsVector, Core::PropertyPointList, Core::PropertyDirection2d, Core::PropertyLong, Core::PropertyVectorList, Core::PropertyMD5, Core::PropertyTexture2Transform, Core::PropertyDirection, Core::PropertyString, Core::PropertyProxy, Core::PropertyBoolean, Core::PropertyFont, Core::PropertyUser, Core::PropertyAxis2, Core::PropertySearchSettings, Core::PropertyAxis1, Core::PropertyBrush, Core::PropertyEmbeddedFile, Core::PropertyRelaxation, Core::PropertyBrepData, Core::PropertyMesh, Core::PropertyFile, Core::PropertyColor, Core::PropertyDateTime, Core::PropertyDirection, Core::PropertyPen, Core::PropertyTransform, Core::PropertyCompoundPlaneAngle, Core::PropertyDrawStyle, Core::PropertyInteger, Core::PropertyPercent, Core::PropertyPoint, Core::PropertyReal, Core::PropertyTexture2, Core::PropertyVector, Core::PropertyType2Link, Core::PropertyLinkMap< T >, Core::PropertyTexture2List, Core::PropertyRelaxationSet, Core::PropertySolverElementLinkVector, Core::PropertySolverSolverLinkList, and Core::PropertyLinkListBase.
|
inline |
|
inline |
|
inline |
Simulates the value being changed - calls aboutToSetValue() and hasSetValue(), aboutToSetValue() is called without the optional argument Core::Variant &newValue,
|
friend |
|
protected |
Status bits of the property The first 8 bits are used for the base system the rest can be used in descendant classes to mark special statuses on the objects. The bits and their meaning are listed below: 0 - object is marked as 'touched' 1 - object is marked as 'immutable' 2 - object is marked as 'read-only' (for property editor) 3 - object is marked as 'hidden' (for property editor)