ANNOTATION
List of: Classes
Subjects: Feature Naming, SAT Save and Restore
Contents: Kernel

Purpose: Defines a base class for adding information to the bulletin boards.

Derivation: ANNOTATION : ENTITY : ACIS_OBJECT : -

SAT Identifier: "annotation"

Filename: kern/kernel/kerndata/data/annotation.hxx

Description: The ANNOTATION class is a base class derived from ENTITY. ACIS code has been enhanced to add calls to construct the ANNOTATION entities when the information is known.


The member data in the annotations is classified into inputs and outputs. Query functions within ANNOTATION populate an ENTITY_LIST with the inputs or outputs. Each derived ANNOTATION type has more specific query functions for full detail.


Annotation entities are used to add semantic information to the bulletin boards. The information is added in the form of create bulletins for derived types of this entity. The actual semantic information depends on the algorithm being annotated, so there will be a number of derived types.

References: by KERN ATTRIB_ANNOTATION

Constructor: public: ANNOTATION::ANNOTATION ();


C++ allocation constructor requests memory for this object, but does not populate it. 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 ANNOTATION::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.






protected: virtual ANNOTATION::~ANNOTATION ();


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 ANNOTATION(...) then later x->lose.)



Methods: protected: void ANNOTATION::add_attribute (


const ENTITY* e // owning entity


);


Adds an attribute to the specified entity that points to this annotation. It doesn't allow more than one attribute on the same entity that points here.






protected: void ANNOTATION::add_input_entity (


ENTITY*& eToSet, // pointer to entity list


ENTITY* newEnt // entity to add


);


Adds another input entity to the list.






protected: void ANNOTATION::add_output_entity (


ENTITY*& eToSet, // pointer to entity list


ENTITY* newEnt // entity to add


);


Adds another output entity to the list.






public: logical ANNOTATION::contains_this_entity (


ENTITY*const& eToCheck, // entity to check


const ENTITY* entity, // pointer to entity


logical eToCheck_guaranteed_alive // check alive



= FALSE // flag


) const;


Returns TRUE if one entity contains the other.






public: virtual void ANNOTATION::debug_ent (


FILE* // output file pointer


) const;


Outputs the entity debug information to the specified file.






public: virtual logical


ANNOTATION::deletable () const;


Returns whether or not the annotation can be deleted. If the annotation is owned by its ANNOTATION_ATTRIB, then its not deletable.






public: logical ANNOTATION::empty () const;


Returns whether or not the output array is empty.






protected: ATTRIB_ANNOTATION*


ANNOTATION::find_attrib_annotation (


const ENTITY* entity // entity to find


);


If there an ATTRIB_ANNOTATION for this ANNOTATION on the given ENTITY, this returns it. Otherwise, returns NULL






public: virtual ENTITY*&


ANNOTATION::find_entity_ref_by_name (


const char* name, // name of entity


logical& isInput // false to get entity




// true to set entity


);


Re-implements get_entity_by_name and set_entity_by_name so they don't have to be virtual stacks. The default for isInput is FALSE.






public: virtual ENTITY*


ANNOTATION::get_entity_by_name (


const char* name // name of entity


);


Returns a pointer to the entity specified by the given name.






public: virtual int ANNOTATION::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: virtual void ANNOTATION::inputs (


ENTITY_LIST& list, // input list


logical no_tags // tags or not



= TRUE


) const;


Returns a list of entities that are the inputs to the modeling operation.






public: virtual logical


ANNOTATION::is_deepcopyable () const;


Returns TRUE if it is deep copyable.






public: virtual logical


ANNOTATION::is_entity_by_name (


const char* name, // name of entity


ENTITY* entity // pointer to entity


);


Returns TRUE if the named entity is the given entity.






public: logical


ANNOTATION::members_are_hooked () const;


Returns either "unhooked" or "hooked".






public: virtual const char* ANNOTATION::member_name (


const ENTITY* entity // entity with name


) const;


Returns the name of the member.






public: virtual void ANNOTATION::outputs (


ENTITY_LIST& list // list of outputs


) const;


Returns an entity list that is the output result of the modeling operation.






protected: void ANNOTATION::remove_input_entity (


ENTITY*& eToSet, // entity list


ENTITY* oldEnt // entity to remove


);


Removes an input entity, converting an EE_LIST with two entries to a simple ENTITY* holding the remaining entity.






protected: void ANNOTATION::remove_output_entity (


ENTITY*& eToSet, // entity list


ENTITY* oldEnt // entity to remove


);


Removes an output entity, converting an EE_LIST with two entries to a simple ENTITY* holding the remaining entity.






public: void ANNOTATION::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.


if ( restore_version_number >= ANNO_HOOKED_VERSION)


read_logical

m_members_are_hooked (unhooked or hooked)






public: void ANNOTATION::restore_extra ();


The ANNOTATION_RESTORE_EXTRA_DEF macro expands to the restore_extra 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.


No data



This class does not save any data.






public: virtual void ANNOTATION::set_entity_by_name (


const char* name, // name for entity


ENTITY* value // entity pointer


);


Specifies the name for the entity.






protected: void ANNOTATION::set_input_entity (


ENTITY*& eToSet, // entity list


ENTITY* newEnt // entity pointer


);


Specifies a pointer to an input entity.






protected: void ANNOTATION::set_output_entity (


ENTITY*& eToSet, // entity list


ENTITY* newEnt // entity pointer


);


Specifies a pointer to an output entity.






public: void ANNOTATION::set_user_data (


void* ud // pointer


);


Specifies a pointer to user data.






public: virtual const char*


ANNOTATION::type_name () const;


Returns the string "annotation".






protected: void ANNOTATION::unhook (


ENTITY* entity // entity with name


);


Removes the attribute from the specified entity (or owner of the ATTRIB_TAG) without calling the member_lost function.






public: void* ANNOTATION::user_data () const;


Returns a pointer to the user data.

Internal Use: copy_extra, debug_extra, debug_helper, hook, hook_members, inputs_helper, lose_input_tags, lose_lists, member_lost, member_lost_helper, member_lost_hook, member_lost_internal, merge_member, remove_member, save, save_common, save_extra, split_member, trans_member, unhook_members, warp_member




Related Fncs: is_ANNOTATION
PDF/KERN/27CLA.PDF
HTM/DATA/KERN/KERN/27CLA/0004.HTM