All Frameworks Class Hierarchy This Framework Next Indexes
SPAkern Class ANNOTATION
SPAbase.ACIS_OBJECT
|
+---SPAkern.ENTITY
|
+---ANNOTATION
Usage: you can derive this class.
public class ANNOTATION
Defines a base class for adding information to the bulletin boards.
Role: 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.
- See also:
- ATTRIB_ANNOTATION
Constructor and Destructor Index
- o
ANNOTATION()
- Constructs an ANNOTATION (default constructor).
Method Index
- o
add_attribute(ENTITY*)
- Adds an attribute to the specified ENTITY that points to this ANNOTATION.
- o
add_input_entity(ENTITY*&,ENTITY*)
- Adds another input entity to the list.
- o
add_output_entity(ENTITY*&,ENTITY*)
- Adds another output entity to the list.
- o
contains_this_entity(ENTITY*const&,ENTITY*,logical)
- Returns TRUE if one ENTITY contains the other.
- o
deletable()
- Queries whether or not this ANNOTATION can be deleted.
- o
empty()
- Returns whether or not the output array is empty.
- o
find_attrib_annotation(ENTITY*)
- Returns the ATTRIB_ANNOTATION for this ANNOTATION on the given ENTITY.
- o
find_entity_ref_by_name(char*,logical&)
- Re-implements get_entity_by_name and set_entity_by_name so they don't have to be virtual stacks.
- o
get_entity_by_name(char*)
- Returns a pointer to the ENTITY specified by the given name.
- o
identity(int)
- Returns a type identifier for this object.
- o
inputs(ENTITY_LIST&,logical)
- Returns a list of ENTITYs that are the inputs to the modeling operation.
- o
is_entity_by_name(char*,ENTITY*)
- Returns TRUE if the named ENTITY is the given ENTITY.
- o
lose()
- Posts a delete bulletin to the bulletin board indicating this ANNOTATION is no longer used in the active model.
- o
member_name(ENTITY*)
- Returns the name of the member.
- o
members_are_hooked()
- Returns either "unhooked" or "hooked".
- o
outputs(ENTITY_LIST&)
- Returns an ENTITY list that is the output result of the modeling operation.
- o
remove_input_entity(ENTITY*&,ENTITY*)
- Removes an input entity.
- o
remove_output_entity(ENTITY*&,ENTITY*)
- Removes an output entity.
- o
restore_common()
- Restores this ANNOTATION from a SAT file.
- o
restore_extra()
- Reads information regarding this ANNOTATION from a SAT file.
- o
set_entity_by_name(char*,ENTITY*)
- Specifies the name for the given ENTITY.
- o
set_input_entity(ENTITY*&,ENTITY*)
- Specifies a pointer to an input ENTITY.
- o
set_output_entity(ENTITY*&,ENTITY*)
- Specifies a pointer to an output ENTITY.
- o
set_user_data(void*)
- Specifies a pointer to user data.
- o
type_name()
- Returns the string "annotation".
- o
unhook(ENTITY*)
- Removes the attribute from the specified entity (or owner of the ATTRIB_TAG) without calling the member_lost function.
- o
user_data()
- Returns a pointer to user data.
Constructor and Destructor
o ANNOTATION
-
Constructs an ANNOTATION (default constructor).
Role: Requests memory for this object but does not populate it. The
allocation constructor is used primarily by restore. 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.
Methods
o add_attribute
protected void add_attribute( | const ENTITY* | e) |
-
Adds an attribute to the specified ENTITY that points to this ANNOTATION.
- Parameters:
-
- e
- the ENTITY to which the attribute is added.
o add_input_entity
-
Adds another input entity to the list.
- Parameters:
-
- eToSet
- pointer to the ENTITY list.
- newEnt
- the ENTITY to add.
o add_output_entity
-
Adds another output entity to the list.
- Parameters:
-
- eToSet
- pointer to the ENTITY list.
- newEnt
- the ENTITY to add.
o contains_this_entity
public logical contains_this_entity( | ENTITY*const& | eToCheck, |
| const ENTITY* | entity, |
| logical | eToCheck_guaranteed_alive | = FALSE) const |
-
Returns TRUE if one ENTITY contains the other.
- Parameters:
-
- eToCheck
- the ENTITY to check.
- entity
- pointer to an ENTITY.
- eToCheck_guaranteed_alive
- check alive flag.
o deletable
public virtual logical deletable( | )const |
-
Queries whether or not this ANNOTATION can be deleted.
Role: If the annotation is owned by its ANNOTATION_ATTRIB, then it is not deletable.
o empty
public logical empty( | )const |
-
Returns whether or not the output array is empty.
o find_attrib_annotation
-
Returns the ATTRIB_ANNOTATION for this ANNOTATION on the given ENTITY.
Role: Returns NULL otherwise.
- Parameters:
-
- entity
- the ENTITY to check.
o find_entity_ref_by_name
public virtual ENTITY*& find_entity_ref_by_name( | const char* | name, |
| logical& | isInput) |
-
Re-implements get_entity_by_name and set_entity_by_name so they don't have to be virtual stacks.
Role: The default for isInput is FALSE.
- Parameters:
-
- name
- name of the ENTITY.
- isInput
- flag to get (FALSE) or set (TRUE) the ENTITY.
o get_entity_by_name
public virtual ENTITY* get_entity_by_name( | const char* | name) |
-
Returns a pointer to the ENTITY specified by the given name.
- Parameters:
-
- name
- name of the ENTITY.
o identity
public virtual int identity( | int | level | = 0 )const |
-
Returns a type identifier for this object.
Role: If level is unspecified or 0, returns the type identifier ANNOTATION_TYPE. If
level is specified, returns ANNOTATION_TYPE for that level of derivation from ENTITY. The
level of this class is defined as ANNOTATION_LEVEL.
- Parameters:
-
- level
- the derivation level at which the object is to be identified.
o inputs
public virtual void inputs( | ENTITY_LIST& | list, |
| logical | no_tags | = TRUE) const |
-
Returns a list of ENTITYs that are the inputs to the modeling operation.
- Parameters:
-
- list
- list of inputs.
- no_tags
- flag to use tags or not.
o is_entity_by_name
public virtual logical is_entity_by_name( | const char* | name, |
| ENTITY* | entity) |
-
Returns TRUE if the named ENTITY is the given ENTITY.
- Parameters:
-
- name
- name of the ENTITY.
- entity
- the ENTITY to test.
o lose
public virtual void lose( | ) |
-
Posts a delete bulletin to the bulletin board indicating this ANNOTATION is no longer used in the active model.
Role: The lose methods for attached attributes are also called.
o member_name
public virtual const char* member_name( | const ENTITY* | entity) const |
-
Returns the name of the member.
- Parameters:
-
- entity
- the ENTITY whose name is desired.
o members_are_hooked
public logical members_are_hooked( | ) |
-
Returns either "unhooked" or "hooked".
o outputs
-
Returns an ENTITY list that is the output result of the modeling operation.
- Parameters:
-
- list
- list of outputs.
o remove_input_entity
-
Removes an input entity.
Role: Converts an EE_LIST with two entries to a simple ENTITY* holding the
remaining ENTITY.
- Parameters:
-
- eToSet
- pointer to the ENTITY list.
- oldEnt
- the ENTITY to remove.
o remove_output_entity
-
Removes an output entity.
Role: Converts an EE_LIST with two entries to a simple ENTITY* holding the
remaining ENTITY.
- Parameters:
-
- eToSet
- pointer to the ENTITY list.
- oldEnt
- the ENTITY to remove.
o restore_common
public void restore_common( | ) |
-
Restores this ANNOTATION from a SAT file.
Role: 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)
o restore_extra
public void restore_extra( | ) |
-
Reads information regarding this ANNOTATION from a SAT file.
Role: 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
o set_entity_by_name
public virtual void set_entity_by_name( | const char* | name, |
| ENTITY* | value) |
-
Specifies the name for the given ENTITY.
- Parameters:
-
- name
- name of the ENTITY.
- value
- the ENTITY whose name is specified.
o set_input_entity
-
Specifies a pointer to an input ENTITY.
- Parameters:
-
- eToSet
- pointer to the ENTITY list.
- newEnt
- the ENTITY pointer.
o set_output_entity
-
Specifies a pointer to an output ENTITY.
- Parameters:
-
- eToSet
- pointer to the ENTITY list.
- newEnt
- the ENTITY pointer.
o set_user_data
public void set_user_data( | void* | ud) |
-
Specifies a pointer to user data.
- Parameters:
-
- ud
- pointer to the data.
o type_name
public virtual const char * type_name( | )const |
-
Returns the string "annotation".
o unhook
protected void unhook( | ENTITY* | entity) |
-
Removes the attribute from the specified entity (or owner of the ATTRIB_TAG) without calling the member_lost function.
- Parameters:
-
- entity
- the ENTITY from which the attribute is unhooked.
o user_data
-
Returns a pointer to user data.
This object is included in the file: annotation.hxx