OpenLexocad  27.1
Core::PropertyContainer Class Reference

#include <PropertyContainer.h>

Inheritance diagram for Core::PropertyContainer:
Base::Persistence Base::BaseClass Core::CoreDocument Core::DocObject Core::PropertyBundle< T > Core::ExecObject Core::PostSolver Core::PreSolver Core::PropertyDescriptor Core::PythonClassObject Core::PythonScriptObject Core::Geometry Core::PropertyBoolDescriptor Core::PropertyButtonDescriptor Core::PropertyColorDescriptor Core::PropertyDoubleDescriptor Core::PropertyEnumDescriptor Core::PropertyGroupDescriptor Core::PropertyIntegerDescriptor Core::PropertyLxAttributeDescriptor Core::PropertyLxFormulaDescriptor Core::PropertyStringDescriptor

Public Member Functions

 PropertyContainer (void)
 
 PropertyContainer (const PropertyContainer &rhs)
 
virtual ~PropertyContainer (void)=default
 
bool addProperty (Core::Property *p, const std::string &name)
 
Core::PropertyaddProperty (Base::Type t, const std::string &name, const Core::Variant &defaultValue)
 Adds a property to the PropertyContainer. Returns the added property on success, '0' on failure. More...
 
Core::PropertyUseraddPropertyUser (const std::string &name, const Core::Variant &value)
 Convenience method for Python bindings. More...
 
void removeProperty (Core::Property *p, std::string pName)
 Removes a property from the PropertyContainer and deletes it. More...
 
void removeAllProperties ()
 Removes all properties from the PropertyContainer and deletes them. More...
 
Core::PropertygetPropertyByName (const std::string &name) const
 Returns the property with name 'name'. Returns '0' on failure. More...
 
Core::PropertygetPropertyByName (const Base::String &name) const
 Returns the property with name 'name'. Returns '0' on failure. More...
 
virtual const char * getPropertyName (const Property *prop) const
 get the name of a property More...
 
template<typename T >
T * getPropertyByName (const std::string &name) const
 Returns the property of type T with name 'name'. Returns 'nullptr' on failure. More...
 
void getPropertyMap (Core::PropertyMap &) const
 Fills a PropertyMap. More...
 
std::vector< std::pair< Core::Property *, std::string > > getPropertiesAndNameByType (Base::Type type) const
 Returns all properties of type 'type'. More...
 
std::vector< Core::Property * > getPropertiesByType (Base::Type type) const
 
std::vector< Core::Property * > getPropertiesByTypes (const std::vector< Base::Type > &type) const
 
bool setPropertyFromVariant (const std::string &name, const Core::Variant &value)
 Sets a property to value. More...
 
bool setProperty (const std::string &name, double value)
 
bool setProperty (const std::string &name, int value)
 
bool setProperty (const std::string &name, const Geom::Vec &value)
 
bool setProperty (const std::string &name, const std::list< Geom::Vec > &value)
 
bool setProperty (const std::string &name, const Geom::Trsf &value)
 
bool setProperty (const std::string &name, const std::string &value)
 
bool setProperty (const std::string &name, const char *value)
 
bool setProperty (const std::string &name, const Base::String &value)
 
bool setProperty (const std::string &name, const Geom::Pnt &value)
 
bool setProperty (const std::string &name, const Geom::Pnt2d &value)
 
bool setProperty (const std::string &name, const std::vector< Geom::Pnt > &value)
 
bool setProperty (const std::string &name, const std::vector< Geom::Pnt2d > &value)
 
bool setProperty (const std::string &name, const MD5 &value)
 
bool setProperty (const std::string &name, bool value)
 
bool setProperty (const std::string &name, Core::DocObject *value)
 
bool setProperty (const std::string &name, const Core::DocObject *value)
 
bool setProperty (const std::string &name, const std::unordered_set< Core::DocObject * > &value)
 
bool setProperty (const std::string &name, const std::list< Core::DocObject * > &value)
 
bool setProperty (const std::string &name, const std::vector< int > &value)
 
bool setProperty (const std::string &name, const QFont &value)
 
bool setProperty (const std::string &name, const Draw::DrawStyle &value)
 
bool setProperty (const std::string &name, const Draw::Arrowheads &value)
 
bool setProperty (const std::string &name, const Geom::Dir &value)
 
bool setProperty (const std::string &name, const Geom::Dir2d &value)
 
bool setProperty (const std::string &name, const Base::Color &value)
 
bool setProperty (const std::string &name, const Geom::Ax1 &value)
 
bool setProperty (const std::string &name, const Geom::Ax2 &value)
 
bool setProperty (const std::string &name, const Draw::Texture2Transform &value)
 
bool setProperty (const std::string &name, const std::list< std::list< Geom::Pnt > > &value)
 
bool setProperty (const std::string &name, const std::vector< double > &value)
 
bool setProperty (const std::string &name, pBrepData &value)
 
virtual bool onBeforeChange (Core::Property *p, const Core::Variant &newValue=Core::Variant())
 
virtual void onChanged (Core::Property *p)
 Is called after a property in a PropertyContainer has been changed. More...
 
virtual void onDeleted ()
 Is called when a PropertyContainer's status is set to MarkedForDelete. More...
 
virtual void onNew ()
 Is called when a PropertyContainer's status is set to New. More...
 
virtual void onPropertyStatusBitsChanged (const Property &prop, unsigned long oldStatus)
 Is called when the Property StatusBits are changed. More...
 
virtual void save (Base::AbstractWriter &writer, Base::PersistenceVersion &version)
 Saves the PropertyContainer to writer. More...
 
virtual void restore (Base::AbstractXMLReader &reader, Base::PersistenceVersion &version)
 Restores the PropertyContainer from reader in specified version. More...
 
bool enableNotify (const bool enable)
 
bool isNotifyEnabled (void) const
 Returns whether notification of changes to the field values in the container is propagated to its auditors. More...
 
void touch ()
 Sets all properties of this PropertyContainer to updated. More...
 
bool isDeleted () const
 
bool isStatusDeleted () const
 Returns true if the status is set to 'Deleted'. More...
 
bool isMarkedForDelete () const
 Returns true if the status is set to 'MarkedForDelete'. More...
 
bool isMarkedForDeleteFinal () const
 Returns true if the status is set to 'MarkedForDeleteFinal'. More...
 
bool isDeletedFinal () const
 Returns true if the status is set to 'DeletedFinal'. More...
 
bool isNew () const
 Returns true if the status is set to 'New'. More...
 
bool isUpdated () const
 Returns true if the status is set to 'Updated'. More...
 
bool isValid () const
 Returns true if the status is set to 'Valid'. More...
 
bool hasErrors () const
 Returns true if the status is set to 'Error'. More...
 
void setData (const std::string &key, void *data)
 Adds arbitrary data for this key to the PropertyContainer (Used in SDK) More...
 
void * getData (const std::string &key, bool *ok=nullptr) const
 Returns data for this key from the PropertyContainer (Used in SDK) More...
 
void removeData (const std::string &key)
 Removes the data from the PropertyContainer (Used in SDK) More...
 
bool hasSameValuesAs (const PropertyContainer *container) const
 Returns 'true' if all values in 'container' match the corresponding property in this PropertyContainer. More...
 
void setPropertyValues (const PropertyContainer *other)
 Copies the property values from 'other' PropertyContainer to this PropertyContainer. More...
 
template<typename T >
getPropertyValueByName (const std::string &propertyName, bool *ok=0) const
 Returns the property value T with this name. If ok=true T holds a valid value. More...
 
virtual void ensureIntegrity ()
 
void integrityMaintained ()
 
void integrityLost ()
 Sets _integrity to false. More...
 
bool checkIntegrity ()
 Returns the value of _integrity. More...
 
virtual bool onChangedDebug (Core::Property *p)
 Is called after a property in a PropertyContainers has been changed, it ignores notify-flag. More...
 
virtual void checkAfterOnDeleted ()
 
Core::PropertyValueMap getPropertyValueMap () const
 Returns a map with the name of the property and its PropertyValue as a struct of the property type and the Core::Variant value. More...
 
std::map< std::string, Core::VariantgetKeyValueMap () const
 Returns all keys and sub keys with their values of this container. More...
 
bool setPropertyFromKeyValue (const std::string &propertyName, const std::string &key, const Core::Variant &value)
 Sets the key in a property to value. More...
 
std::set< Core::Property * > getUpdatedProperties () const
 Returns all properties that were updated since the last recompute. More...
 
void setUpdated ()
 Sets the status to 'Updated' if the old status was 'Valid'. More...
 
void setUpdated (const Core::Property *p)
 
void setHasErrors ()
 Sets the status to 'Error'. More...
 
void setNew ()
 Sets the status to 'New'. More...
 
void setValid ()
 Sets the status to 'Valid'. More...
 
void setDeleted ()
 Sets the status to 'Delete'. More...
 
void setMarkedForDelete ()
 Sets the status to 'MarkedForDelete'. More...
 
void setMarkedForDeleteFinal ()
 Sets the status to 'MarkedForDeleteFinal'. More...
 
void setDeleteFinal ()
 Sets the status to 'DeleteFinal'. More...
 
virtual void breakLinks ()
 Sets all links of this container to null. More...
 
unsigned int getPropertyChangeStatus () const
 
void setAllPropertiesValid ()
 Sets the status of all properties to 'Valid'. More...
 
void setPropertyValues (const Core::PropertyValueMap &other)
 Copies the property values from a Core::PropertyValueMap to this PropertyContainer. More...
 
std::vector< Core::Property * > getPropertiesOrdered () const
 Returns the properties in the init order. More...
 
virtual bool check_lx (char *f, char *n)
 
bool rollBack ()
 Brings back the PropertyContainer to its last valid status. More...
 
void saveLastValidPropertyMap ()
 Saves the last valid property map, p.e. before a recompute to enable a rollback. More...
 
const Core::PropertyValueMapgetLastValidPropertyMap () const
 Returns the last valid PropertyValueMap. More...
 
DynamicProperty
virtual Core::PropertyaddDynamicProperty (const char *type, const char *name=0, const char *group=0, const char *doc=0, short attr=0, bool ro=false, bool hidden=false)
 
DynamicProperty::PropData getDynamicPropertyData (const Property *prop) const
 
virtual bool removeDynamicProperty (const char *name)
 
virtual std::vector< std::string > getDynamicPropertyNames () const
 
virtual Core::PropertygetDynamicPropertyByName (const char *name) const
 
- Public Member Functions inherited from Base::Persistence
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 bool createSQL (Base::AbstractWriter &, Base::PersistenceVersion &, bool)
 This method is used to save properties or very small amounts of data to an XML document. More...
 
- Public Member Functions inherited from Base::BaseClass
virtual Type getTypeId (void) const
 
template<typename T >
bool isDerivedFrom () const
 
bool isDerivedFrom (const Type type) const
 
 BaseClass ()
 Construction. More...
 
virtual ~BaseClass ()
 Destruction. More...
 

Public Attributes

bool isRestored = false
 
- Public Attributes inherited from Base::BaseClass
long ____deadVal = 0xBADEAFFE
 

Protected Types

enum  Status {
  Status::New = 1, Status::Updated = 2, Status::Valid = 3, Status::MarkedForDelete = 4,
  Status::MarkedForDeleteFinal, Status::Deleted, Status::DeletedFinal, Status::Error
}
 

Protected Member Functions

virtual void onBeforeChangeProperty (const Property *prop)
 
virtual void onChangedProperty (const Property *prop)
 
void addPropertiesFrom (const Core::PropertyContainer *other)
 Adds copy of all properties from other to this PropertyContainer. More...
 
virtual void setStatus (Status status)
 
Status getStatus () const
 
bool checkForAlreadyExistingProperty (Core::Property *property)
 
virtual void restoreProperty (Core::Property *property, const Base::String &name, Base::AbstractXMLReader &reader, Base::PersistenceVersion &version)
 Restores property from from reader in specified version. More...
 

Protected Attributes

unsigned int _changedProperties
 

Friends

class PostInitClass
 
class CoreDocument
 
class ObjectExecutor
 
class Property
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::Persistence
static std::string encodeAttribute (const std::string &)
 
- Static Public Member Functions inherited from Base::BaseClass
static Type getClassTypeId (void)
 
static void init (void)
 
static void * create (void)
 
static void setIfcNameAndID (const std::string &n, int id)
 
- Static Protected Member Functions inherited from Base::BaseClass
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)
 

Member Enumeration Documentation

◆ Status

enum Core::PropertyContainer::Status
strongprotected
Enumerator
New 
Updated 
Valid 
MarkedForDelete 
MarkedForDeleteFinal 
Deleted 
DeletedFinal 
Error 

Constructor & Destructor Documentation

◆ PropertyContainer() [1/2]

Core::PropertyContainer::PropertyContainer ( void  )

◆ PropertyContainer() [2/2]

Core::PropertyContainer::PropertyContainer ( const PropertyContainer rhs)

◆ ~PropertyContainer()

virtual Core::PropertyContainer::~PropertyContainer ( void  )
virtualdefault

Member Function Documentation

◆ addDynamicProperty()

virtual Core::Property* Core::PropertyContainer::addDynamicProperty ( const char *  type,
const char *  name = 0,
const char *  group = 0,
const char *  doc = 0,
short  attr = 0,
bool  ro = false,
bool  hidden = false 
)
virtual

◆ addPropertiesFrom()

void Core::PropertyContainer::addPropertiesFrom ( const Core::PropertyContainer other)
protected

Adds copy of all properties from other to this PropertyContainer.

◆ addProperty() [1/2]

bool Core::PropertyContainer::addProperty ( Core::Property p,
const std::string &  name 
)

Adds a property to the PropertyContainer. The PropertyContainer takes ownership of the property. Returns 'true' on success, 'false' on failure.

◆ addProperty() [2/2]

Core::Property* Core::PropertyContainer::addProperty ( Base::Type  t,
const std::string &  name,
const Core::Variant defaultValue 
)

Adds a property to the PropertyContainer. Returns the added property on success, '0' on failure.

◆ addPropertyUser()

Core::PropertyUser* Core::PropertyContainer::addPropertyUser ( const std::string &  name,
const Core::Variant value 
)

Convenience method for Python bindings.

◆ breakLinks()

virtual void Core::PropertyContainer::breakLinks ( )
virtual

Sets all links of this container to null.

Reimplemented in Core::DocObject.

◆ check_lx()

virtual bool Core::PropertyContainer::check_lx ( char *  f,
char *  n 
)
virtual

◆ checkAfterOnDeleted()

virtual void Core::PropertyContainer::checkAfterOnDeleted ( )
virtual

Reimplemented in Core::DocObject.

◆ checkForAlreadyExistingProperty()

bool Core::PropertyContainer::checkForAlreadyExistingProperty ( Core::Property property)
protected

◆ checkIntegrity()

bool Core::PropertyContainer::checkIntegrity ( )

Returns the value of _integrity.

◆ enableNotify()

bool Core::PropertyContainer::enableNotify ( const bool  enable)

Sets whether notification will be propagated on changing the values of the contained properties. The old value of the flag is returned.

◆ ensureIntegrity()

virtual void Core::PropertyContainer::ensureIntegrity ( )
virtual

Is called in enableNotify(true), at the end of this method the state of the container (object) has to be completely consistent (i.e. all properties that need to match other properties, match them) and _integrity should be set to true

◆ getData()

void* Core::PropertyContainer::getData ( const std::string &  key,
bool *  ok = nullptr 
) const

Returns data for this key from the PropertyContainer (Used in SDK)

◆ getDynamicPropertyByName()

virtual Core::Property* Core::PropertyContainer::getDynamicPropertyByName ( const char *  name) const
virtual

◆ getDynamicPropertyData()

DynamicProperty::PropData Core::PropertyContainer::getDynamicPropertyData ( const Property prop) const

◆ getDynamicPropertyNames()

virtual std::vector<std::string> Core::PropertyContainer::getDynamicPropertyNames ( ) const
virtual

◆ getKeyValueMap()

std::map<std::string, Core::Variant> Core::PropertyContainer::getKeyValueMap ( ) const

Returns all keys and sub keys with their values of this container.

◆ getLastValidPropertyMap()

const Core::PropertyValueMap& Core::PropertyContainer::getLastValidPropertyMap ( ) const

Returns the last valid PropertyValueMap.

◆ getPropertiesAndNameByType()

std::vector<std::pair<Core::Property*, std::string> > Core::PropertyContainer::getPropertiesAndNameByType ( Base::Type  type) const

Returns all properties of type 'type'.

◆ getPropertiesByType()

std::vector<Core::Property*> Core::PropertyContainer::getPropertiesByType ( Base::Type  type) const

◆ getPropertiesByTypes()

std::vector<Core::Property*> Core::PropertyContainer::getPropertiesByTypes ( const std::vector< Base::Type > &  type) const

◆ getPropertiesOrdered()

std::vector<Core::Property*> Core::PropertyContainer::getPropertiesOrdered ( ) const

Returns the properties in the init order.

◆ getPropertyByName() [1/3]

Core::Property* Core::PropertyContainer::getPropertyByName ( const std::string &  name) const
inline

Returns the property with name 'name'. Returns '0' on failure.

◆ getPropertyByName() [2/3]

Core::Property* Core::PropertyContainer::getPropertyByName ( const Base::String name) const
inline

Returns the property with name 'name'. Returns '0' on failure.

◆ getPropertyByName() [3/3]

template<typename T >
T* Core::PropertyContainer::getPropertyByName ( const std::string &  name) const
inline

Returns the property of type T with name 'name'. Returns 'nullptr' on failure.

◆ getPropertyChangeStatus()

unsigned int Core::PropertyContainer::getPropertyChangeStatus ( ) const

◆ getPropertyMap()

void Core::PropertyContainer::getPropertyMap ( Core::PropertyMap ) const

Fills a PropertyMap.

◆ getPropertyName()

virtual const char* Core::PropertyContainer::getPropertyName ( const Property prop) const
virtual

get the name of a property

◆ getPropertyValueByName()

template<typename T >
T Core::PropertyContainer::getPropertyValueByName ( const std::string &  propertyName,
bool *  ok = 0 
) const
inline

Returns the property value T with this name. If ok=true T holds a valid value.

◆ getPropertyValueMap()

Core::PropertyValueMap Core::PropertyContainer::getPropertyValueMap ( ) const

Returns a map with the name of the property and its PropertyValue as a struct of the property type and the Core::Variant value.

◆ getStatus()

Status Core::PropertyContainer::getStatus ( ) const
protected

◆ getUpdatedProperties()

std::set<Core::Property*> Core::PropertyContainer::getUpdatedProperties ( ) const

Returns all properties that were updated since the last recompute.

◆ hasErrors()

bool Core::PropertyContainer::hasErrors ( ) const

Returns true if the status is set to 'Error'.

◆ hasSameValuesAs()

bool Core::PropertyContainer::hasSameValuesAs ( const PropertyContainer container) const

Returns 'true' if all values in 'container' match the corresponding property in this PropertyContainer.

◆ integrityLost()

void Core::PropertyContainer::integrityLost ( )

Sets _integrity to false.

◆ integrityMaintained()

void Core::PropertyContainer::integrityMaintained ( )

Sets _integrity to true If you know for certain the state of the container (object) is completely consistent (i.e. all properties that need to match other properties, match them), make sure to always call this method after enableNotify(false) and do it before enableNotify(true) is called

◆ isDeleted()

bool Core::PropertyContainer::isDeleted ( ) const

Returns true if the status of the PropertyContainer is set to MarkedForDelete, Deleted or DeletedFinal

◆ isDeletedFinal()

bool Core::PropertyContainer::isDeletedFinal ( ) const

Returns true if the status is set to 'DeletedFinal'.

◆ isMarkedForDelete()

bool Core::PropertyContainer::isMarkedForDelete ( ) const

Returns true if the status is set to 'MarkedForDelete'.

◆ isMarkedForDeleteFinal()

bool Core::PropertyContainer::isMarkedForDeleteFinal ( ) const

Returns true if the status is set to 'MarkedForDeleteFinal'.

◆ isNew()

bool Core::PropertyContainer::isNew ( ) const

Returns true if the status is set to 'New'.

◆ isNotifyEnabled()

bool Core::PropertyContainer::isNotifyEnabled ( void  ) const

Returns whether notification of changes to the field values in the container is propagated to its auditors.

◆ isStatusDeleted()

bool Core::PropertyContainer::isStatusDeleted ( ) const

Returns true if the status is set to 'Deleted'.

◆ isUpdated()

bool Core::PropertyContainer::isUpdated ( ) const

Returns true if the status is set to 'Updated'.

◆ isValid()

bool Core::PropertyContainer::isValid ( ) const

Returns true if the status is set to 'Valid'.

◆ onBeforeChange()

virtual bool Core::PropertyContainer::onBeforeChange ( Core::Property p,
const Core::Variant newValue = Core::Variant() 
)
virtual

Is called before a property in a PropertyContainer has been changed. Checks if the change is possible - returns true if it is, otherwise returns false, Can be used to update other variables in the container according to the change being made. Beware, newValue is an optional argument - whenever you use it, make sure that this condition holds true: newValue.getType() != Core::Variant::Type::Undefined, otherwise you are checking invalid data

Reimplemented in Core::DocObject.

◆ onBeforeChangeProperty()

virtual void Core::PropertyContainer::onBeforeChangeProperty ( const Property prop)
inlineprotectedvirtual

Reimplemented in Core::DocObject.

◆ onChanged()

virtual void Core::PropertyContainer::onChanged ( Core::Property p)
virtual

Is called after a property in a PropertyContainer has been changed.

Reimplemented in Core::DocObject.

◆ onChangedDebug()

virtual bool Core::PropertyContainer::onChangedDebug ( Core::Property p)
virtual

Is called after a property in a PropertyContainers has been changed, it ignores notify-flag.

Reimplemented in Core::DocObject.

◆ onChangedProperty()

virtual void Core::PropertyContainer::onChangedProperty ( const Property prop)
inlineprotectedvirtual

Reimplemented in Core::DocObject.

◆ onDeleted()

virtual void Core::PropertyContainer::onDeleted ( )
virtual

Is called when a PropertyContainer's status is set to MarkedForDelete.

◆ onNew()

virtual void Core::PropertyContainer::onNew ( )
virtual

Is called when a PropertyContainer's status is set to New.

◆ onPropertyStatusBitsChanged()

virtual void Core::PropertyContainer::onPropertyStatusBitsChanged ( const Property prop,
unsigned long  oldStatus 
)
inlinevirtual

Is called when the Property StatusBits are changed.

◆ removeAllProperties()

void Core::PropertyContainer::removeAllProperties ( )

Removes all properties from the PropertyContainer and deletes them.

◆ removeData()

void Core::PropertyContainer::removeData ( const std::string &  key)

Removes the data from the PropertyContainer (Used in SDK)

◆ removeDynamicProperty()

virtual bool Core::PropertyContainer::removeDynamicProperty ( const char *  name)
virtual

◆ removeProperty()

void Core::PropertyContainer::removeProperty ( Core::Property p,
std::string  pName 
)

Removes a property from the PropertyContainer and deletes it.

◆ restore()

virtual void Core::PropertyContainer::restore ( Base::AbstractXMLReader reader,
Base::PersistenceVersion version 
)
virtual

Restores the PropertyContainer from reader in specified version.

Implements Base::Persistence.

Reimplemented in Core::PythonClassObject, and Core::PythonScriptObject.

◆ restoreProperty()

virtual void Core::PropertyContainer::restoreProperty ( Core::Property property,
const Base::String name,
Base::AbstractXMLReader reader,
Base::PersistenceVersion version 
)
protectedvirtual

Restores property from from reader in specified version.

Reimplemented in Core::PropertyDescriptor.

◆ rollBack()

bool Core::PropertyContainer::rollBack ( )

Brings back the PropertyContainer to its last valid status.

◆ save()

virtual void Core::PropertyContainer::save ( Base::AbstractWriter writer,
Base::PersistenceVersion version 
)
virtual

Saves the PropertyContainer to writer.

Implements Base::Persistence.

Reimplemented in Core::PythonClassObject, and Core::PythonScriptObject.

◆ saveLastValidPropertyMap()

void Core::PropertyContainer::saveLastValidPropertyMap ( )

Saves the last valid property map, p.e. before a recompute to enable a rollback.

◆ setAllPropertiesValid()

void Core::PropertyContainer::setAllPropertiesValid ( )

Sets the status of all properties to 'Valid'.

◆ setData()

void Core::PropertyContainer::setData ( const std::string &  key,
void *  data 
)

Adds arbitrary data for this key to the PropertyContainer (Used in SDK)

◆ setDeleted()

void Core::PropertyContainer::setDeleted ( )

Sets the status to 'Delete'.

◆ setDeleteFinal()

void Core::PropertyContainer::setDeleteFinal ( )

Sets the status to 'DeleteFinal'.

◆ setHasErrors()

void Core::PropertyContainer::setHasErrors ( )

Sets the status to 'Error'.

◆ setMarkedForDelete()

void Core::PropertyContainer::setMarkedForDelete ( )

Sets the status to 'MarkedForDelete'.

◆ setMarkedForDeleteFinal()

void Core::PropertyContainer::setMarkedForDeleteFinal ( )

Sets the status to 'MarkedForDeleteFinal'.

◆ setNew()

void Core::PropertyContainer::setNew ( )

Sets the status to 'New'.

◆ setProperty() [1/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
double  value 
)

◆ setProperty() [2/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
int  value 
)

◆ setProperty() [3/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Geom::Vec value 
)

◆ setProperty() [4/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const std::list< Geom::Vec > &  value 
)

◆ setProperty() [5/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Geom::Trsf value 
)

◆ setProperty() [6/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const std::string &  value 
)

◆ setProperty() [7/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const char *  value 
)

◆ setProperty() [8/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Base::String value 
)

◆ setProperty() [9/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Geom::Pnt value 
)

◆ setProperty() [10/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Geom::Pnt2d value 
)

◆ setProperty() [11/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const std::vector< Geom::Pnt > &  value 
)

◆ setProperty() [12/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const std::vector< Geom::Pnt2d > &  value 
)

◆ setProperty() [13/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const MD5 value 
)

◆ setProperty() [14/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
bool  value 
)

◆ setProperty() [15/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
Core::DocObject value 
)

◆ setProperty() [16/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Core::DocObject value 
)

◆ setProperty() [17/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const std::unordered_set< Core::DocObject * > &  value 
)

◆ setProperty() [18/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const std::list< Core::DocObject * > &  value 
)

◆ setProperty() [19/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const std::vector< int > &  value 
)

◆ setProperty() [20/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const QFont &  value 
)

◆ setProperty() [21/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Draw::DrawStyle &  value 
)

◆ setProperty() [22/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Draw::Arrowheads &  value 
)

◆ setProperty() [23/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Geom::Dir value 
)

◆ setProperty() [24/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Geom::Dir2d value 
)

◆ setProperty() [25/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Base::Color value 
)

◆ setProperty() [26/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Geom::Ax1 value 
)

◆ setProperty() [27/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Geom::Ax2 value 
)

◆ setProperty() [28/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const Draw::Texture2Transform &  value 
)

◆ setProperty() [29/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const std::list< std::list< Geom::Pnt > > &  value 
)

◆ setProperty() [30/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
const std::vector< double > &  value 
)

◆ setProperty() [31/31]

bool Core::PropertyContainer::setProperty ( const std::string &  name,
pBrepData value 
)

◆ setPropertyFromKeyValue()

bool Core::PropertyContainer::setPropertyFromKeyValue ( const std::string &  propertyName,
const std::string &  key,
const Core::Variant value 
)

Sets the key in a property to value.

◆ setPropertyFromVariant()

bool Core::PropertyContainer::setPropertyFromVariant ( const std::string &  name,
const Core::Variant value 
)

Sets a property to value.

◆ setPropertyValues() [1/2]

void Core::PropertyContainer::setPropertyValues ( const PropertyContainer other)

Copies the property values from 'other' PropertyContainer to this PropertyContainer.

◆ setPropertyValues() [2/2]

void Core::PropertyContainer::setPropertyValues ( const Core::PropertyValueMap other)

Copies the property values from a Core::PropertyValueMap to this PropertyContainer.

◆ setStatus()

virtual void Core::PropertyContainer::setStatus ( Status  status)
protectedvirtual

◆ setUpdated() [1/2]

void Core::PropertyContainer::setUpdated ( )

Sets the status to 'Updated' if the old status was 'Valid'.

◆ setUpdated() [2/2]

void Core::PropertyContainer::setUpdated ( const Core::Property p)

◆ setValid()

void Core::PropertyContainer::setValid ( )

Sets the status to 'Valid'.

◆ touch()

void Core::PropertyContainer::touch ( )

Sets all properties of this PropertyContainer to updated.

Friends And Related Function Documentation

◆ CoreDocument

friend class CoreDocument
friend

◆ ObjectExecutor

friend class ObjectExecutor
friend

◆ PostInitClass

friend class PostInitClass
friend

◆ Property

friend class Property
friend

Member Data Documentation

◆ _changedProperties

unsigned int Core::PropertyContainer::_changedProperties
protected

◆ isRestored

bool Core::PropertyContainer::isRestored = false

The documentation for this class was generated from the following file: