Purpose:
|
Defines a base class that contains a pointer to the original input entity as well as a flag indicating if the entity still exists.
|
|
Derivation:
|
ATTRIB_TAG : ATTRIB_SYS : ATTRIB : ENTITY : ACIS_OBJECT : -
|
|
SAT Identifier:
|
"tag"
|
|
Filename:
|
kern/kernel/kerndata/data/att_tag.hxx
|
|
Description:
|
Depending upon the modeling operation, a given input's entities may or may not exist after operation completion. They are represented in the
ANNOTATION with an
ATTRIB_TAG.
ATTRIB_TAG contains a pointer to the original input entity and a flag indicating if the entity has since been lost.
|
|
|
ATTRIB_TAG is designed to be a base class that can be derived from and enhanced. A user-defined application can use this to attach additional data to the input entities before an operation and have it carried forward to any annotations that reference it, even if the original entity is lost.
|
|
|
Applications which derive from
ATTRIB_TAG may want to set the
error_no_input_tag option
error_no_input_tag to
TRUE to cause a
sys_error if an input entity is not tagged. This assumes that the additional information is necessary. It is also a useful debugging aid which helps to find places where the application did not tag all the inputs. If the
error_no_input_tag option is
FALSE, tags are simply generated on the fly as needed.
|
|
References:
|
KERN
|
ENTITY
|
|
Constructor:
|
public: ATTRIB_TAG::ATTRIB_TAG
(
|
|
|
ENTITY* e
|
// owning entity
|
|
|
|
= NULL,
|
|
|
ENTITY* o
|
// original entity
|
|
|
|
= NULL,
|
|
|
logical internal
|
// made internally
|
|
|
|
= FALSE
|
|
|
);
|
|
|
C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments. Applications should call this constructor only with the overloaded
new operator, because this reserves the memory on the heap, a requirement to support roll back and history management.
|
|
|
|
|
Destructor:
|
public: virtual void ATTRIB_TAG::lose
();
|
|
|
Posts a delete bulletin to the bulletin board indicating the instance is no longer used in the active model. The
lose methods for attached attributes are also called.
|
|
|
|
|
|
|
public: void ATTRIB_TAG::lose_origin
();
|
|
|
The original entity is lost.
|
|
|
|
|
|
|
protected: virtual ATTRIB_TAG::~ATTRIB_TAG
();
|
|
|
This
C++ destructor should never be called directly. Instead, applications should use the overloaded
lose method inherited from the
ENTITY class, because this supports history management. (For example,
x=new ATTRIB_TAG(...) then later
x->lose.)
|
|
|
|
Methods:
|
public: ATTRIB_TAG* ATTRIB_TAG::copy
() const;
|
|
|
Returns the target of the copy operation.
|
|
|
|
|
|
|
public: virtual logical
|
|
|
ATTRIB_TAG::copyable () const;
|
|
|
Indicates that this attribute should not be included when the owning entity is copied. The default is to call
duplicatable.
|
|
|
|
|
|
|
public: virtual void ATTRIB_TAG::debug_ent
(
|
|
|
FILE*
|
// output file pointer
|
|
|
) const;
|
|
|
Outputs the entity debug information to the specified file.
|
|
|
|
|
|
|
public: virtual int ATTRIB_TAG::identity
(
|
|
|
int
|
|
// level
|
|
|
|
= 0
|
|
|
) const;
|
|
|
If
level is unspecified or 0, returns the type identifier
ATTRIB_SYS_TYPE. If
level is specified, returns
ATTRIB_SYS_TYPE for that level of derivation from
ENTITY. The level of this class is defined as
ATTRIB_SYS_LEVEL.
|
|
|
|
|
|
|
public: logical ATTRIB_TAG::internal
() const;
|
|
|
Determines whether this item is made internally.
|
|
|
|
|
|
|
public: virtual logical
|
|
|
ATTRIB_TAG::is_deepcopyable () const;
|
|
|
Returns
TRUE if the attribute is deep copyable.
|
|
|
|
|
|
|
public: ENTITY* ATTRIB_TAG::origin
() const;
|
|
|
Returns a pointer to the original entity.
|
|
|
|
|
|
|
public: logical ATTRIB_TAG::origin_lost
() const;
|
|
|
Determines whether or not the original entity has been lost.
|
|
|
|
|
|
|
public: void ATTRIB_TAG::restore_common
();
|
|
|
The
RESTORE_DEF macro expands to the
restore_common method, which is used in reading information from a SAT file. This method is never called directly. It is called by a higher hierarchical function if an item in the SAT file is determined to be of this class type. An instance of this class will already have been created through the allocation constructor. This method then populates the class instance with the appropriate data from the SAT file.
|
|
|
read_logical
|
True if the origin has been lost.
|
|
if(m_origin_lost)
|
|
read_int
|
Integer for the entity
|
|
else
|
|
|
read_ptr
|
|
|
|
Pointer to the origin.
|
|
|
|
|
|
|
public: virtual const char*
|
|
|
ATTRIB_TAG::type_name () const;
|
|
|
Returns the string "tag".
|
|
Internal Use:
|
lose_origin, save, save_common
|
|
|
|
|
Related Fncs:
|
get_attrib_tag_callbacks_list, is_ATTRIB_TAG
|