C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Object attributes. More...

#include <attribute_item.h>

+ Inheritance diagram for MbAttribute:
+ Collaboration diagram for MbAttribute:

Public Types

enum  OnChangeOwnerAction { chn_Self = 0 , chn_Free , chn_Keep , chn_ActCount }
 
enum  OnConvertOwnerAction {
  cnv_Self = 0 , cnv_Free , cnv_Keep , cnv_Copy ,
  cnv_Convert , cnv_ActCount
}
 
enum  OnTransformOwnerAction { trn_Self = 0 , trn_Free , trn_Keep , trn_ActCount }
 
enum  OnCopyOwnerAction {
  cpy_Self = 0 , cpy_Free , cpy_Keep , cpy_Copy ,
  cpy_ActCount
}
 
enum  OnMergeOwnerAction {
  mrg_Self = 0 , mrg_Free , mrg_Keep , mrg_KeepAll ,
  mrg_KeepRep , mrg_ActCount
}
 
enum  OnReplaceOwnerAction {
  rep_Self = 0 , rep_Free , rep_Keep , rep_KeepAll ,
  rep_KeepRep , rep_ActCount
}
 
enum  OnSplitOwnerAction {
  spl_Self = 0 , spl_Free , spl_Keep , spl_Copy ,
  spl_ActCount
}
 
enum  OnDeleteOwnerAction { del_Self = 0 , del_Free , del_ActCount }
 

Public Member Functions

virtual ~MbAttribute ()
 Destructor.
 
OnChangeOwnerAction GetActionForChange () const
 Get behavior of attribute when changing the owner.
 
OnConvertOwnerAction GetActionForConvert () const
 Get behavior of attribute when converting the owner.
 
OnTransformOwnerAction GetActionForTransform () const
 Get behavior of attribute when transforming the owner.
 
OnCopyOwnerAction GetActionForCopy () const
 Get behavior of attribute when copying the owner.
 
OnMergeOwnerAction GetActionForMerge () const
 Get behavior of attribute when merging the owner.
 
OnReplaceOwnerAction GetActionForReplace () const
 Get behavior of attribute when replacing the owner.
 
OnSplitOwnerAction GetActionForSplit () const
 Get behavior of attribute when splitting the owner.
 
OnDeleteOwnerAction GetActionForDelete () const
 Get behavior of attribute when deleting the owner.
 
void SetActionForChange (OnChangeOwnerAction a)
 Set behavior of attribute when changing the owner.
 
void SetActionForConvert (OnConvertOwnerAction a)
 Set behavior of attribute when converting the owner.
 
void SetActionForTransform (OnTransformOwnerAction a)
 Set behavior of attribute when transforming the owner.
 
void SetActionForCopy (OnCopyOwnerAction a)
 Set behavior of attribute when copying the owner.
 
void SetActionForMerge (OnMergeOwnerAction a)
 Set behavior of attribute when merging the owner.
 
void SetActionForReplace (OnReplaceOwnerAction a)
 Set behavior of attribute when replacing the owner.
 
void SetActionForSplit (OnSplitOwnerAction a)
 Set behavior of attribute when splitting the owner.
 
void SetActionForDelete (OnDeleteOwnerAction a)
 Set behavior of attribute when deleting the owner.
 
void InitActions (const MbAttribute &)
 Define behavior of an attribute by another attribute.
 
virtual void GetProperties (MbProperties &)
 Get properties of the object.
 
virtual size_t SetProperties (const MbProperties &)
 Set properties of object.
 
virtual MbePrompt GetPropertyName ()=0
 Get a name of object property.
 
bool IsFamilyRegistrable () const override
 Whether the object belongs to a registrable family.
 
Common functions of attributes
MbeRefType RefType () const override
 Get registrational type (for copying, duplication)
 
virtual MbeImplicationType ImplicationType () const
 Get attribute container type.
 
virtual MbeAttributeType AttributeFamily () const =0
 Get attribute type.
 
virtual MbeAttributeType AttributeType () const =0
 Get subtype of an attribute.
 
virtual MbAttributeDuplicate (MbRegDuplicate *=nullptr) const =0
 Create a copy of the element.
 
virtual bool IsSame (const MbAttribute &item, double accuracy) const =0
 Determine whether objects are equal. More...
 
virtual bool Init (const MbAttribute &)=0
 Initialize data.
 
bool IsA (MbeAttributeType t) const
 Check an attribute type.
 
Actions with objects of geometric kernel influencing on states of attributes.
virtual void OnChangeOwner (const MbAttributeContainer &owner)=0
 Perform actions which are not associated with other actions when changing the owner. More...
 
virtual void OnConvertOwner (const MbAttributeContainer &owner, MbAttributeContainer &other)=0
 
virtual void OnTransformOwner (const MbAttributeContainer &owner, const MbMatrix3D &, MbRegTransform *=nullptr)=0
 
virtual void OnMoveOwner (const MbAttributeContainer &owner, const MbVector3D &, MbRegTransform *=nullptr)=0
 
virtual void OnRotateOwner (const MbAttributeContainer &owner, const MbAxis3D &, double angle, MbRegTransform *=nullptr)=0
 
virtual void OnCopyOwner (const MbAttributeContainer &owner, MbAttributeContainer &other, MbRegDuplicate *=nullptr)=0
 
virtual void OnMergeOwner (const MbAttributeContainer &owner, MbAttributeContainer &other)=0
 
virtual void OnReplaceOwner (const MbAttributeContainer &owner, MbAttributeContainer &other)=0
 
virtual void OnSplitOwner (const MbAttributeContainer &owner, const std::vector< MbAttributeContainer * > &others)=0
 
virtual void OnDeleteOwner (const MbAttributeContainer &owner)=0
 
- Public Member Functions inherited from MbRefItem
refcount_t GetUseCount () const
 Get count of references (get count of owners of an object).
 
refcount_t AddRef () const
 Increase count of references by one.
 
refcount_t DecRef () const
 Decrease count of references by one.
 
refcount_t Release () const
 Decrease count of references by one and if count of references became zero, then remove itself.
 
- Public Member Functions inherited from TapeBase
 TapeBase (RegistrableRec regs=noRegistrable)
 Constructor.
 
 TapeBase (const TapeBase &)
 Copy-constructor.
 
virtual ~TapeBase ()
 Destructor.
 
RegistrableRec GetRegistrable () const
 Whether the stream class is registrable.
 
void SetRegistrable (RegistrableRec regs=registrable) const
 Set the state of registration of the stream class.
 
virtual const char * GetPureName (const VersionContainer &) const
 Get the class name.
 

Protected Member Functions

 MbAttribute ()
 Constructor without parameters for inheritors.
 
 MbAttribute (const MbAttribute &)
 Copy constructor for inheritors.
 
- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 

Detailed Description

Object attributes.

Attributes contain information supplementing description of object geometric shape. Attribute is not an intrinsic part of the object, but it is an element of data which the object may contain.
Attributes are geometric kernel agents for transferring data from one application to another.
The possible types of attributes are the following.
Elementary attribute - an attribute which reflects simple and clearly interpreted information, for example, color or selection attribute.
Common attribute - attribute of standard type with string naming, for example: name, integer value, double value, string, point, vector, pointer.
Applications may communicate any specific information using such attributes without necessity of additional complex attributes developing.
Complex attribute - an attribute which consists of predefined data set, which describe a nature of attribute, its semantic meaning and a way of its interpretation. Such attributes can describe some of constraints or simple dependences and annotation objects.
Directive attribute - an attribute defining the purpose of object or actions which should be performed with it, for example, an attribute "subtraction" implies that one solid is purposed for subtraction from another, no matter from what exactly. Linking attribute - an attribute designed for linking of geometric kernel object with abstract container of data, i.e. a set of data, which format and semantic meaning can not be described by other attributes.

Member Enumeration Documentation

◆ OnChangeOwnerAction

Behavior of attribute which is not associated with other described actions when changing the owner.

Enumerator
chn_Self 

Behavior defined by the virtual function OnChangeOwner.

chn_Free 

Free attribute if it is possible, otherwise delete it.

chn_Keep 

Save attribute, i.e. do not do anything with it.

chn_ActCount 

The number of elements in enumeration (add before the given value).

◆ OnConvertOwnerAction

Behavior of attribute when an object regenerates in other object.

Enumerator
cnv_Self 

Behavior defined by the virtual function OnConvertOwner.

cnv_Free 

Free attribute if it is possible, otherwise delete it.

cnv_Keep 

Save attribute, i.e. do not do anything with it.

cnv_Copy 

Copy an attribute and attach its copy to an owner copy.

cnv_Convert 

Copy an attribute and attach the result to an owner copy.

cnv_ActCount 

The number of elements in enumeration (add before the given value).

◆ OnTransformOwnerAction

Behaviour of attribute when transforming the owner (by the matrix).

Enumerator
trn_Self 

Behavior defined by the virtual function OnTransformOwner.

trn_Free 

Free attribute if it is possible, otherwise delete it.

trn_Keep 

Save attribute, i.e. do not do anything with it.

trn_ActCount 

The number of elements in enumeration (add before the given value).

◆ OnCopyOwnerAction

Behaviour of attribute when copying the owner.

Enumerator
cpy_Self 

Behavior defined by the virtual function OnCopyOwner.

cpy_Free 

Free attribute if it is possible, otherwise delete it.

cpy_Keep 

Save attribute, i.e. do not do anything with it.

cpy_Copy 

Copy an attribute and attach its copy to an owner copy.

cpy_ActCount 

The number of elements in enumeration (add before the given value).

◆ OnMergeOwnerAction

Behaviour of attribute when merging of the owner with another object.

Enumerator
mrg_Self 

Behavior is defined by the virtual function OnMergeOwner.

mrg_Free 

Free attribute if it is possible, otherwise delete it.

mrg_Keep 

Save attribute, i.e. do not do anything with it.

mrg_KeepAll 

Transmit attribute from absorbed object to absorbing object without replacing.

mrg_KeepRep 

Transmit attribute from absorbed object to absorbing object with replacing.

mrg_ActCount 

The number of elements in enumeration (add before the given value).

◆ OnReplaceOwnerAction

Behavior of attribute when replacing the owner by another object.

Enumerator
rep_Self 

Behavior is defined by the virtual function OnReplaceOwner.

rep_Free 

Free attribute if it is possible, otherwise delete it.

rep_Keep 

Save attribute, i.e. do not do anything with it.

rep_KeepAll 

Transmit attribute from replaced object to substitutional object without replacing.

rep_KeepRep 

Transmit attribute from replaced object to substitutional object with replacing.

rep_ActCount 

The number of elements in enumeration (add before the given value).

◆ OnSplitOwnerAction

Behavior of attribute when splitting the owner.

Enumerator
spl_Self 

Behavior is defined by the virtual function OnSplitOwner.

spl_Free 

Free attribute if it is possible, otherwise delete it.

spl_Keep 

Save attribute, i.e. do not do anything with it.

spl_Copy 

Duplicate (copy) attribute for each result of splitting.

spl_ActCount 

The number of elements in enumeration (add before the given value).

◆ OnDeleteOwnerAction

Behavior of attribute when deleting the owner.

Enumerator
del_Self 

Behavior defined by the virtual function OnDeleteOwner.

del_Free 

Free attribute if it is possible, otherwise delete it.

del_ActCount 

The number of elements in enumeration (add before the given value).

Member Function Documentation

◆ IsSame()

virtual bool MbAttribute::IsSame ( const MbAttribute item,
double  accuracy 
) const
pure virtual

◆ OnChangeOwner()

virtual void MbAttribute::OnChangeOwner ( const MbAttributeContainer owner)
pure virtual

Perform actions which are not associated with other actions when changing the owner.

Actions which are not associated with other actions when changing the owner.
This function is called after changing the owning object in a case when GetActionForChange() == chn_Self.

Implemented in MbUuidInstanceAttribute, MbExternalAttribute, MbUserAttribute, MbProductAttribute, MbAnchorAttribute, MbElementaryAttribute, and MbCommonAttribute.

◆ OnConvertOwner()

virtual void MbAttribute::OnConvertOwner ( const MbAttributeContainer owner,
MbAttributeContainer other 
)
pure virtual

Perform actions when converting the owner,
This function is called after converting the owning object in a case when GetActionForConvert() == cnv_Self.
The result of object converting is passed as input parameter.

Implemented in MbUuidInstanceAttribute, MbExternalAttribute, MbUserAttribute, MbProductAttribute, MbAnchorAttribute, MbElementaryAttribute, and MbCommonAttribute.

◆ OnTransformOwner()

virtual void MbAttribute::OnTransformOwner ( const MbAttributeContainer owner,
const MbMatrix3D ,
MbRegTransform = nullptr 
)
pure virtual

Perform actions when transforming the owner,
This function is called after transforming the owning object in a case when GetActionForTransform() == trn_Self. The registrator of transformed objects may be passed as input parameter.

Implemented in MbExternalAttribute, MbUserAttribute, MbStampRibAttribute, MbProductAttribute, MbAnchorAttribute, MbCompositeHotPointAttribute, MbHotPointAttribute, MbBaseHotPointAttribute, MbGeomAttribute, MbSheetFlangingAttribute, MbElementaryAttribute, and MbCommonAttribute.

◆ OnMoveOwner()

virtual void MbAttribute::OnMoveOwner ( const MbAttributeContainer owner,
const MbVector3D ,
MbRegTransform = nullptr 
)
pure virtual

Perform actions when moving the owner.
This function is called after moving the owning object in a case when GetActionForTransform() == trn_Self. The registrator of transformed objects may be passed as input parameter.

Implemented in MbExternalAttribute, MbUserAttribute, MbStampRibAttribute, MbProductAttribute, MbAnchorAttribute, MbCompositeHotPointAttribute, MbHotPointAttribute, MbBaseHotPointAttribute, MbGeomAttribute, MbSheetFlangingAttribute, MbElementaryAttribute, and MbCommonAttribute.

◆ OnRotateOwner()

virtual void MbAttribute::OnRotateOwner ( const MbAttributeContainer owner,
const MbAxis3D ,
double  angle,
MbRegTransform = nullptr 
)
pure virtual

Perform actions when rotating the owner.
This function is called after rotating the owning object in a case when GetActionForTransform() == trn_Self. The registrator of transformed objects may be passed as input parameter.

Implemented in MbExternalAttribute, MbUserAttribute, MbStampRibAttribute, MbProductAttribute, MbAnchorAttribute, MbCompositeHotPointAttribute, MbHotPointAttribute, MbBaseHotPointAttribute, MbGeomAttribute, MbSheetFlangingAttribute, MbElementaryAttribute, and MbCommonAttribute.

◆ OnCopyOwner()

virtual void MbAttribute::OnCopyOwner ( const MbAttributeContainer owner,
MbAttributeContainer other,
MbRegDuplicate = nullptr 
)
pure virtual

Perform actions when copying the owner.
This function is called after copying the owning object in a case when GetActionForCopy() == cpy_Self.
The following objects are passed as input parameters: the owning object copy and registrator of copied objects.

Implemented in MbExternalAttribute, MbUserAttribute, MbStampRibAttribute, MbProductAttribute, MbAnchorAttribute, MbCompositeHotPointAttribute, MbHotPointAttribute, MbBaseHotPointAttribute, MbGeomAttribute, MbSheetFlangingAttribute, MbElementaryAttribute, and MbCommonAttribute.

◆ OnMergeOwner()

virtual void MbAttribute::OnMergeOwner ( const MbAttributeContainer owner,
MbAttributeContainer other 
)
pure virtual

Perform actions when merging the owner.
This function is called before merging the owner in a case when GetActionForMerge() == mrg_Self.
The object which will be absorbed is passed as input parameter.

Implemented in MbExternalAttribute, MbUserAttribute, MbStampRibAttribute, MbProductAttribute, MbAnchorAttribute, MbNameAttribute, MbCompositeHotPointAttribute, MbHotPointAttribute, MbBaseHotPointAttribute, MbGeomAttribute, MbSheetFlangingAttribute, MbElementaryAttribute, and MbCommonAttribute.

◆ OnReplaceOwner()

virtual void MbAttribute::OnReplaceOwner ( const MbAttributeContainer owner,
MbAttributeContainer other 
)
pure virtual

Perform actions when replacing the owner.
This function is called before replacing the owner in a case when GetActionForReplace() == rep_Self.
The substitutional object is passed as input parameter.

Implemented in MbUuidInstanceAttribute, MbExternalAttribute, MbUserAttribute, MbProductAttribute, MbAnchorAttribute, MbElementaryAttribute, and MbCommonAttribute.

◆ OnSplitOwner()

virtual void MbAttribute::OnSplitOwner ( const MbAttributeContainer owner,
const std::vector< MbAttributeContainer * > &  others 
)
pure virtual

Perform actions when splitting the owner.
This function is called after splitting the owning object in a case when GetActionForSplit() == spl_Self.
The container of splitting results is passed as input parameter.

Implemented in MbExternalAttribute, MbUserAttribute, MbProductAttribute, MbAnchorAttribute, MbElementaryAttribute, and MbCommonAttribute.

◆ OnDeleteOwner()

virtual void MbAttribute::OnDeleteOwner ( const MbAttributeContainer owner)
pure virtual

Perform actions when deleting the owner.
This function is called before deleting the owner in a case when GetActionForDelete() == spl_Self.

Implemented in MbUuidInstanceAttribute, MbExternalAttribute, MbUserAttribute, MbProductAttribute, MbAnchorAttribute, MbElementaryAttribute, and MbCommonAttribute.


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