Home

HELIX Class Reference
[Geometric Entities]

Defines a helix as an object in the model. More...

#include <helix.hxx>

Inheritance diagram for HELIX:

Inheritance graph
[legend]
Collaboration diagram for HELIX:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void add ()
 If this ENTITY is use counted, adds one to the count.
void add_owner (ENTITY *owner, logical incr=TRUE)
 Adds the owner argument to the list of owners.
virtual logical apply_transform (SPAtransf const &, ENTITY_LIST &, logical=FALSE, logical=TRUE)
 Transforms this ENTITY.
ATTRIBattrib () const
 Returns this ENTITY's attribute pointer, or NULL if there is no attached attribute.
const SPAunit_vectoraxis_dir () const
 Returns the axis direction of this HELIX.
const SPApositionaxis_root () const
 Returns the axis root position of this HELIX.
ENTITYbackup ()
 Creates a duplicate record and a change bulletin, if needed, as a backup for roll back.
int bulletin_count () const
 Returns the number of bulletins referring to this ENTITY.
virtual logical call_method (METHOD_ID const &, METHOD_ARGS const &)
 Executes the implementation function for a routine virtual method.
virtual ENTITYcopy_data (ENTITY_LIST &, pointer_map *pm=NULL, logical dpcpy_skip=FALSE, SCAN_TYPE reason=SCAN_COPY) const
 Allocates a new ENTITY and calls copy_common to fill it in.
virtual void copy_scan (ENTITY_LIST &, SCAN_TYPE reason=SCAN_COPY, logical dpcpy_skip=FALSE) const
 Adds dependent ENTITYs of this ENTITY to the list of ENTITYs to be copied.
virtual void debug_ent (FILE *) const
 Prints the type and address of this ENTITY, roll back pointer, attributes, and any unknown subtype information.
virtual logical deletable () const
 Indicates whether this CURVE is normally destroyed by lose.
const curveequation () const
 Returns the curve's equation of this HELIX, for reading only.
curveequation_for_update ()
 Returns the curve equation for update operations, backing it up first.
virtual void fix_pointers (ENTITY *[], SCAN_TYPE reason=SCAN_COPY)
 Converts pointers from copy indices into real pointers.
int get_owners (ENTITY_LIST &list) const
 Copies the list of owners of this CURVE to the list argument.
logical handedness () const
 Returns the handedness of this HELIX.
 HELIX (const helix &hel)
 Constructs a HELIX from the specified helix.
 HELIX (SPAposition const &axis_root, SPAunit_vector const &axis_dir, SPAvector const &start_disp, double pitch, logical handedness, SPAinterval const &helix_range, double par_scaling=1.0, double taper=0.0)
 Constructs a HELIX with specified root point (on the axis), axis direction, displacement vector from root point to a point on the helix, thread distance, handedness, parameter range, parameter scaling and taper.
 HELIX ()
 Constructs a HELIX (default constructor).
HISTORY_STREAMhistory () const
 Returns a pointer to the history stream for this ENTITY.
virtual int identity (int=0) const
 Returns a type identifier for this ENTITY.
virtual logical is_deepcopyable () const
 Returns TRUE if this ENTITY can be deep copied.
virtual logical is_use_counted () const
 Indicates if this ENTITY is use-counted or not.
virtual int lookup (logical) const
 Looks up this ENTITY in the appropriate debug list.
virtual void lose ()
 Posts a delete bulletin to the bulletin board indicating the instance is no longer used in the active model.
SPAbox make_box (APOINT *start, APOINT *end, const SPAtransf *t, double tol=0.0) const
 Makes a bounding box.
logical needs_rollback () const
 Checks whether or not the record is already backed up.
void operator*= (const SPAtransf &t)
 Transforms this HELIX.
ENTITYowner () const
 Returns the first owner of this CURVE.
double pitch () const
 Returns the pitch of this HELIX.
virtual void remove (logical lose_if_zero=TRUE)
 Decrements the use count of this ENTITY.
void remove_owner (ENTITY *owner, logical decr=TRUE, logical lose=TRUE)
 Removes the owner argument from the list of owners.
void restore_common ()
 Restores data for a record from disc to memory.
void restore_end (char *id_str)
 Terminates a restore record.
void roll_notify (BULLETIN_TYPE, ENTITY *)
 Fields notifications of rollback operations.
BULLETIN *& rollback () const
 Returns the pointer to the bulletin board entry for this ENTITY.
virtual void save (ENTITY_LIST &) const
 Performs a save operation.
void set_attrib (ATTRIB *attr)
 Changes the attribute pointer of this ENTITY to point to the given attribute.
void set_axis_dir (const SPAunit_vector &axis_dir)
 Sets this HELIX's axis direction to the given unit vector.
void set_axis_root (const SPAposition &axis_root)
 Sets this HELIX's axis root position to the given position.
void set_handedness (logical handedness)
 Sets this HELIX's handedness to the given value.
void set_pitch (double pitch)
 Sets this HELIX's pitch to the given value.
void set_start_disp (const SPAvector &start_disp)
 Sets this HELIX's start displacement to the given vector.
virtual void set_use_count (int val)
 Sets the reference use count of this ENTITY.
virtual unsigned size () const
 Returns the size, in bytes, of this ENTITY.
const SPAvectorstart_disp () const
 Returns the start displacement of this HELIX.
tag_id_type tag (logical assign_new=TRUE) const
 Data reading routine.
curvetrans_curve (const SPAtransf &t=*(SPAtransf *) NULL_REF, logical negate=FALSE) const
 Transforms the curve equation of this HELIX.
virtual const char * type_name () const
 Returns a name for this ENTITY's type.
virtual int use_count () const
 Returns the use count of this ENTITY.

Static Public Member Functions

static MethodFunction add_method (METHOD_ID const &, MethodFunction)
 Registers an implementation function for a run-time virtual method.

Protected Member Functions

virtual logical bulletin_no_change_vf (ENTITY const *other, logical identical_comparator) const
 Compares subclass data.
void check_destroy () const
 Checks that entity deletion is legitimate.
void copy_common (ENTITY_LIST &list, const ENTITY *from, pointer_map *pm=NULL, logical dpcpy_skip=FALSE, SCAN_TYPE reason=SCAN_COPY)
 Fills in this ENTITY with data from the copied ENTITY, converting pointers into indices in the supplied ENTITY_LIST.
void fix_common (ENTITY *[], SCAN_TYPE reason=SCAN_COPY)
 Converts pointers from copy indices into real pointers.
void fixup_copy (ENTITY *rollback) const
 Fixes any pointers in the ENTITY after copying for backup.
virtual void full_size (SizeAccumulator &, logical) const
 Increments the SizeAccumulator by the size, in bytes, of everything owned by this ENTITY and, optionally, of the ENTITY itself.
logical holds_pattern () const
 Returns TRUE if this entity can have a pattern_holder.
logical is_unknown_entity (void) const
 Returns TRUE if this is an unknown entity.
void save_begin (logical terminator=FALSE) const
 Starts a save record.
void save_common (ENTITY_LIST &) const
 Handles the save operation.
void save_end (ENTITY_LIST &list) const
 Terminates a save record.


Detailed Description

Defines a helix as an object in the model.


Role: HELIX is a model geometry class that contains a pointer to a (lowercase) helix, the corresponding construction geometry class. In general, a model geometry class is derived from ENTITY and is used to define a permanent model object. It provides model management functionality, in addition to the geometry definition.

HELIX is one of several classes derived from CURVE to define a specific type of curve. The helix class defines a helix by its root point (a point on the axis), its axis direction, displacement vector from root point to a point on the curve, pitch, taper, handedness, parameter scaling, and parameter range.

Along with the usual CURVE and ENTITY class methods, HELIX has member methods to provide access to specific implementations of the geometry. For example, methods are available to set and retrieve the axis, root point, and other information about a helix.

A use count allows multiple references to a HELIX. The construction of a new HELIX initializes the use count to 0. Methods are provided to increment and decrement the use count, and after the use count returns to 0, the entity is deleted.

See also:
helix

Constructor & Destructor Documentation

HELIX::HELIX (  ) 

Constructs a HELIX (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.

HELIX::HELIX ( SPAposition const &  axis_root,
SPAunit_vector const &  axis_dir,
SPAvector const &  start_disp,
double  pitch,
logical  handedness,
SPAinterval const &  helix_range,
double  par_scaling = 1.0,
double  taper = 0.0 
)

Constructs a HELIX with specified root point (on the axis), axis direction, displacement vector from root point to a point on the helix, thread distance, handedness, parameter range, parameter scaling and taper.



Role: 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.

Parameters:
axis_root axis root position.
axis_dir axis direction.
start_disp displacement to start point.
pitch pitch (distance between turns along axis direction).
handedness handedness (TRUE is right, FALSE is left).
helix_range maximum parameter range (must be bounded).
par_scaling parameter scaling (one turn corresponds to parameter distance of 2*pi*par_scaling ).
taper taper (radial distance between turns).

HELIX::HELIX ( const helix hel  ) 

Constructs a HELIX from the specified helix.



Role: Requests memory for this object and populates it with the data supplied as the argument. 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.

Parameters:
hel helix to be wrapped by the constructed HELIX.


Member Function Documentation

virtual void CURVE::add (  )  [virtual, inherited]

If this ENTITY is use counted, adds one to the count.



Role: If this ENTITY is not use counted, signals an error.

Every held pointer to a use counted ENTITY should be declared by calling add. There should a corresponding call to remove when the user is done with the pointer. For normal ENTITYs, simply call lose when the ENTITY is no longer part of the active model. For use counted ENTITYs, the implementations of add and remove come from macros in usecount.hxx. Use counted ENTITYs implemented without the macros should implement these virtual methods manually.

Reimplemented from ENTITY.

static MethodFunction HELIX::add_method ( METHOD_ID const &  method_id,
MethodFunction  method_func 
) [static]

Registers an implementation function for a run-time virtual method.



Role: (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Parameters:
method_id method id.
method_func method function.

Reimplemented from CURVE.

void CURVE::add_owner ( ENTITY owner,
logical  incr = TRUE 
) [inherited]

Adds the owner argument to the list of owners.



Parameters:
owner owner to be added.
incr flag to increment use count or not.

virtual logical CURVE::apply_transform ( SPAtransf const &  t,
ENTITY_LIST list,
logical  negate = FALSE,
logical  reset_pattern = TRUE 
) [virtual, inherited]

Transforms this ENTITY.



Role: The ENTITY_LIST is used to prevent sub-entities from being transformed more than once. This method is not included with the standard ENTITY methods in order to allow nontransformable ENTITYs to use the default implementation. (Supplied by the TRANSFORM_FUNCTION and TRANSFORM_DEF macros.)

Parameters:
t the transform to apply.
list list of entities to which the transform has already been applied.
negate negation flag.
reset_pattern internal use only.

Reimplemented from ENTITY.

ATTRIB* ENTITY::attrib (  )  const [inline, inherited]

Returns this ENTITY's attribute pointer, or NULL if there is no attached attribute.

const SPAunit_vector& HELIX::axis_dir (  )  const [inline]

Returns the axis direction of this HELIX.

const SPAposition& HELIX::axis_root (  )  const [inline]

Returns the axis root position of this HELIX.

ENTITY* ENTITY::backup (  )  [inherited]

Creates a duplicate record and a change bulletin, if needed, as a backup for roll back.



Role: The duplication is done via the virtual function make_copy, to let each derived type do its own backup. Before performing a change, each routine checks whether the data structure is posted on the bulletin board. If not, the posting is done automatically. Called by all system change functions.

int ENTITY::bulletin_count (  )  const [inline, inherited]

Returns the number of bulletins referring to this ENTITY.

virtual logical HELIX::bulletin_no_change_vf ( ENTITY const *  other,
logical  identical_comparator 
) const [protected, virtual]

Compares subclass data.



Role: This virtual method is called by bulletin_no_change. When the identical_comparator argument is TRUE, it requires an exact match when comparing doubles, and returns the result of memcmp as a default (for non-overridden subclasses). A FALSE argument indicates tolerant compares, in which case FALSE is returned by default.

Parameters:
other other ENTITY in the bulletin.
identical_comparator identity compare flag.

Reimplemented from CURVE.

virtual logical HELIX::call_method ( METHOD_ID const &  method_id,
METHOD_ARGS const &  method_args 
) [virtual]

Executes the implementation function for a routine virtual method.



Role: (Supplied by the ENTITY_FUNCTIONs and UTILITY_DEF macros).

Parameters:
method_id method id.
method_args method args.

Reimplemented from CURVE.

void ENTITY::check_destroy (  )  const [inline, protected, inherited]

Checks that entity deletion is legitimate.



Role: This method complains if there is an attempt to delete an entity other than through the private member function destroy, which is carefully controlled.

void ENTITY::copy_common ( ENTITY_LIST list,
const ENTITY from,
pointer_map pm = NULL,
logical  dpcpy_skip = FALSE,
SCAN_TYPE  reason = SCAN_COPY 
) [protected, inherited]

Fills in this ENTITY with data from the copied ENTITY, converting pointers into indices in the supplied ENTITY_LIST.



Role: Supports the copy operation. (Supplied by the ENTITY_FUNCTIONS and COPY_DEF macros.) Whenever the operation encounters a pointer to a dependent ENTITY, it find the index of the latter in the supplied ENTITY_LIST and sets the corresponding pointer in the copy to that index.

Parameters:
list list of ENTITYs being copied.
from original ENTITY being copied.
pm pointer map.
dpcpy_skip Used only by the base ENTITY and base ATTRIB class. No other derived entity or attribute should need to utilize this value. This logical indicates how non- deepcopyable attributes are handled during a deep copy. If TRUE, the copy will continue even if it encounters attributes marked as not deep-copyable. By default (FALSE), if any attributes that are found to be not deep-copyable, a sys_error will be thrown. (This flag only effects how attributes are handled; any non-deepcopyable non-attribute entities encountered will cause a sys_error to be thrown regardless of this flag's setting.)
reason type of scan.

virtual ENTITY* HELIX::copy_data ( ENTITY_LIST list,
pointer_map pm = NULL,
logical  dpcpy_skip = FALSE,
SCAN_TYPE  reason = SCAN_COPY 
) const [virtual]

Allocates a new ENTITY and calls copy_common to fill it in.



Role: Supports the copy operation. (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Parameters:
list ENTITYs to copy.
pm pointer map.
dpcpy_skip Used only by the base ENTITY and base ATTRIB class. No other derived entity or attribute should need to utilize this value. This logical indicates how non- deepcopyable attributes are handled during a deep copy. If TRUE, the copy will continue even if it encounters attributes marked as not deep-copyable. By default (FALSE), if any attributes that are found to be not deep-copyable, a sys_error will be thrown. (This flag only effects how attributes are handled; any non-deepcopyable non-attribute entities encountered will cause a sys_error to be thrown regardless of this flag's setting.)
reason scan type.

Reimplemented from CURVE.

virtual void HELIX::copy_scan ( ENTITY_LIST list,
SCAN_TYPE  reason = SCAN_COPY,
logical  dpcpy_skip = FALSE 
) const [virtual]

Adds dependent ENTITYs of this ENTITY to the list of ENTITYs to be copied.



Role: Supports the copy operation. (Supplied by the ENTITY_FUNCTIONS and SCAN_DEF macros.) The default type of scan (reason) is SCAN_COPY.

Parameters:
list ENTITYs to copy.
reason type of copy.
dpcpy_skip Used only by the base ENTITY and base ATTRIB class. No other derived entity or attribute should need to utilize this value. This logical indicates how non- deepcopyable attributes are handled during a deep copy. If TRUE, the copy will continue even if it encounters attributes marked as not deep-copyable. By default (FALSE), if any attributes that are found to be not deep-copyable, a sys_error will be thrown. (This flag only effects how attributes are handled; any non-deepcopyable non-attribute entities encountered will cause a sys_error to be thrown regardless of this flag's setting.)

Reimplemented from CURVE.

virtual void HELIX::debug_ent ( FILE *  file_pointer  )  const [virtual]

Prints the type and address of this ENTITY, roll back pointer, attributes, and any unknown subtype information.



Role: This method is called by DEBUG_LIST::debug for an entirely unknown ENTITY type, or at the start of any derived class's debug_ent method. Each derived class's debug_ent method uses the debug function described in the Spatial Product Documentation to print information added at that level. (Supplied by the ENTITY_FUNCTIONS and DEBUG_DEF macros.)

Parameters:
file_pointer file pointer.

Reimplemented from CURVE.

virtual logical CURVE::deletable (  )  const [virtual, inherited]

Indicates whether this CURVE is normally destroyed by lose.



Role: The method returns FALSE, indicating that CURVEs are, by default, shared among multiple owners by means of use-count tracking, and so are destroyed implicitly when every owner has been lost. Classes derived from CURVE may of course override this behavior.

Reimplemented from ENTITY.

const curve& HELIX::equation (  )  const [virtual]

Returns the curve's equation of this HELIX, for reading only.

Reimplemented from CURVE.

curve& HELIX::equation_for_update (  )  [virtual]

Returns the curve equation for update operations, backing it up first.

Reimplemented from CURVE.

void HELIX::fix_common ( ENTITY array[],
SCAN_TYPE  reason = SCAN_COPY 
) [protected]

Converts pointers from copy indices into real pointers.



Role: Called by fix_pointers. For ENTITY, converts the attribute pointer, and any pointers in the unknown_entity_text record. (Supplied by the ENTITY_FUNCTIONS and FIX_POINTER_DEF macros.)

Parameters:
array ENTITY pointers to fix.
reason type of scan.

Reimplemented from CURVE.

virtual void HELIX::fix_pointers ( ENTITY entity_array[],
SCAN_TYPE  reason = SCAN_COPY 
) [virtual]

Converts pointers from copy indices into real pointers.



Role: The fix_pointers method for each entity in the restore array is called, with the given array as an argument. This calls fix_common, which calls its parent's fix_common, and then corrects any pointers in the derived class. In practice there is never anything special for fix_pointers to do, but it is retained for consistency and compatibility. (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Parameters:
entity_array ENTITY pointers to fix.
reason type of scan.

Reimplemented from CURVE.

void ENTITY::fixup_copy ( ENTITY rollback  )  const [protected, inherited]

Fixes any pointers in the ENTITY after copying for backup.



Role: For ENTITY, this method has nothing to do, but because it is called by all data types, it is required to terminate the copy chain. (Supplied by the ENTITY_FUNCTIONS and SIMPLE_COPY_CONE macros.)

Parameters:
rollback the ENTITY to copy for backup.

Reimplemented in GA_WORKSPACE.

virtual void HELIX::full_size ( SizeAccumulator &  est,
logical  countSelf 
) const [protected, virtual]

Increments the SizeAccumulator by the size, in bytes, of everything owned by this ENTITY and, optionally, of the ENTITY itself.



Role: If countSelf is TRUE, increments the SizeAccumulator by the size, in bytes, of the ENTITY and everything owned by the ENTITY. If countSelf is FALSE, increments the SizeAccumulator by the size, in bytes, of everything owned by the ENTITY, but not including the size of the ENTITY itself.

For example, if an ENTITY contained a character string and full_size were called with countSelf == FALSE, the SizeAccumulator would be incremented by the size, in bytes, of the character string.

Reimplemented from CURVE.

int CURVE::get_owners ( ENTITY_LIST list  )  const [inherited]

Copies the list of owners of this CURVE to the list argument.



Role: Returns the number of owners copied.

Parameters:
list list of owners.

logical HELIX::handedness (  )  const [inline]

Returns the handedness of this HELIX.

HISTORY_STREAM* ENTITY::history (  )  const [inline, inherited]

Returns a pointer to the history stream for this ENTITY.

logical CURVE::holds_pattern (  )  const [inline, protected, virtual, inherited]

Returns TRUE if this entity can have a pattern_holder.

For internal use only.

Reimplemented from ENTITY.

virtual int HELIX::identity ( int  level = 0  )  const [virtual]

Returns a type identifier for this ENTITY.



Role: If level is unspecified or 0, returns the type identifier ENTITY_TYPE. If level is specified, returns ENTITY_TYPE for that level of derivation from ENTITY. The level of this class is defined as ENTITY_LEVEL.

A positive level specifies the level of derivation down from the ENTITY class to examine. ENTITY itself has level 0. If level is unspecified or 0, the type of the most specific class of object is returned. If level is 1, the type of the class one level down from ENTITY is returned. If level is 2, the type of the parent class 2 levels down from ENTITY is returned, and so on. If level is greater than the level of the instance, -1 ("unknown") is returned.

A negative level similarly specifies the level of derivation up from the most specific class of object returned.

(Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Parameters:
level the derivation level at which the object is to be identified.

Reimplemented from CURVE.

virtual logical HELIX::is_deepcopyable (  )  const [virtual]

Returns TRUE if this ENTITY can be deep copied.

Reimplemented from CURVE.

logical ENTITY::is_unknown_entity ( void   )  const [protected, inherited]

Returns TRUE if this is an unknown entity.

An unknown entity is one that is restored from SAT/SAB but is not native to the running app.

virtual logical CURVE::is_use_counted (  )  const [virtual, inherited]

Indicates if this ENTITY is use-counted or not.



Role: The default implementation returns FALSE.

Reimplemented from ENTITY.

virtual int CURVE::lookup ( logical  insert  )  const [virtual, inherited]

Looks up this ENTITY in the appropriate debug list.



Role: This method is not included among the standard ENTITY methods because often subclasses may wish to be included in their parent's debug list. This is done simply by not including a lookup method in the subclass.

When the logical argument is TRUE, the ENTITY is inserted into the debug list if it does not already exist in the list. If it is FALSE and the ENTITY does not exist in the list, a -1 is returned. (Supplied by the LOOK_FUNCTION and LOOKUP_DEF macros.)

Parameters:
insert flag to insert into debug list.

Reimplemented from ENTITY.

virtual void HELIX::lose (  )  [virtual]

Posts a delete bulletin to the bulletin board indicating the instance is no longer used in the active model.



Role: The lose methods for attached attributes are also called.

Reimplemented from CURVE.

SPAbox HELIX::make_box ( APOINT start,
APOINT end,
const SPAtransf t,
double  tol = 0.0 
) const [virtual]

Makes a bounding box.



Role: Makes a bounding box for the portion of this HELIX delimited by two specified points that lie on it, and transforms it. The box has sides parallel to the principal axes of the HELIX.

Parameters:
start first point on the curve.
end second point on the curve.
t transform.
tol tolerance.

Reimplemented from CURVE.

logical ENTITY::needs_rollback (  )  const [inline, inherited]

Checks whether or not the record is already backed up.

void HELIX::operator*= ( const SPAtransf t  )  [virtual]

Transforms this HELIX.



Role: Before performing the change, it checks if the data structure is posted on the bulletin board. If not, the method calls backup to put an entry on the bulletin board.

Parameters:
t transform to apply.

Reimplemented from CURVE.

ENTITY* CURVE::owner (  )  const [virtual, inherited]

Returns the first owner of this CURVE.



Role: If there are no owners, NULL is returned.

Reimplemented from ENTITY.

double HELIX::pitch (  )  const [inline]

Returns the pitch of this HELIX.

virtual void CURVE::remove ( logical  lose_if_zero = TRUE  )  [virtual, inherited]

Decrements the use count of this ENTITY.



Role: If the use count reaches 0, the ENTITY's lose method is called if the argument lose_if_zero is set to TRUE. (If the entity is not use counted, an error is signaled.)

Every held pointer to a use counted ENTITY should be declared by calling add. There should a corresponding call to remove when the user is done with the pointer. For normal ENTITYs, simply call lose when the ENTITY is no longer part of the active model. For use counted ENTITYs, the implementations of add and remove come from macros in usecount.hxx. Use counted ENTITYs implemented without the macros should implement these virtual methods manually.

Parameters:
lose_if_zero flag to lose the ENTITY when the use count drops to 0.

Reimplemented from ENTITY.

void CURVE::remove_owner ( ENTITY owner,
logical  decr = TRUE,
logical  lose = TRUE 
) [inherited]

Removes the owner argument from the list of owners.



Parameters:
owner owner to be removed.
decr flag to decrement the use count.
lose flag to lose if use count is zero.

void HELIX::restore_common (  ) 

Restores data for a record from disc to memory.



Role: Writes pointers as indices (fix_pointers turns them back into pointers) and returns a pointer to the ENTITY made. Generally, "common" functions that do the main work are protected, as they are called only from the main entry functions or by themselves up the derivation tree.

This method is public, however, because the main restore function is not a member function, and making it a friend would make it unable to be declared static, i.e., local to the defining module. (Supplied by the ENTITY_FUNCTIONS and RESTORE_DEF macros.)

    read_ptr  Pointer to record in save file for first attribute owned by entity.
    if (restore_version_number >= ENTITY_TAGS_VERSION)
       read_int      new tag 

Reimplemented from CURVE.

void ENTITY::restore_end ( char *  id_str  )  [inherited]

Terminates a restore record.



Role: Reads any trailing text and fills in the unknown text pointer. Used only by the save/restore system.

Parameters:
id_str the id string.

void CURVE::roll_notify ( BULLETIN_TYPE  bulletin_type,
ENTITY ent 
) [virtual, inherited]

Fields notifications of rollback operations.



Role: The first argument specifies the type of bulletin being rolled back (create, delete or change). In the case of a change notification, the second argument contains the information to be restored into this object. The base implementation, which is used for almost every derived class, does nothing at all.

Parameters:
bulletin_type type of bulletin being rolled back.
ent information to be restored into this argument.

Reimplemented from ENTITY.

BULLETIN*& ENTITY::rollback (  )  const [inline, inherited]

Returns the pointer to the bulletin board entry for this ENTITY.

virtual void HELIX::save ( ENTITY_LIST entity_list  )  const [virtual]

Performs a save operation.



Role: Calls save_begin, the particular class's save_common, and then save_end. (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

This save method is just like any other save, except that it calls save_begin with an optional argument to suppress writing of a trailing dash, because save_common does not write out an identifier, or call any parent class's save_common.

Parameters:
entity_list ENTITYs to save.

Reimplemented from CURVE.

void ENTITY::save_begin ( logical  terminator = FALSE  )  const [protected, inherited]

Starts a save record.



Role: Writes a preamble to a save file record, which contains any subclass identifiers not known to this version of ACIS. Called by the save method.

Parameters:
terminator terminator flag.

void HELIX::save_common ( ENTITY_LIST entity_list  )  const [protected]

Handles the save operation.



Role: Writes out the savable data associated with the base class. In the case of ENTITY, saveable data is simply the attribute pointer. In the case of child classes derived from ENTITY, class-specific save_common methods handle the class-specific data. Called by the save method. (Supplied by the ENTITY_FUNCTIONS and SAVE_DEF macros.)

Each derived class's save_common method first writes out that class's identifier, calls its parent class's save_common method, and then writes out data particular to the derived class. Thus the save record consists of identifiers in leaf-to-base order, followed by class data in base-to-leaf order. As it writes out any ENTITY pointers, it adds them to the ENTITY_LIST, so that any dependent data also gets written to the file.

Parameters:
entity_list ENTITYs to save

Reimplemented from CURVE.

void ENTITY::save_end ( ENTITY_LIST list  )  const [protected, inherited]

Terminates a save record.



Role: Writes out any data associated with subclasses not known to this version of ACIS before terminating the record. Called by the save method.

Parameters:
list list of entities.

void ENTITY::set_attrib ( ATTRIB attr  )  [inherited]

Changes the attribute pointer of this ENTITY to point to the given attribute.



Parameters:
attr the new attribute.

void HELIX::set_axis_dir ( const SPAunit_vector axis_dir  ) 

Sets this HELIX's axis direction to the given unit vector.



Role: Before performing the change, it checks if the data structure is posted on the bulletin board. If not, the method calls backup to put an entry on the bulletin board.

Parameters:
axis_dir the new axis direction.

void HELIX::set_axis_root ( const SPAposition axis_root  ) 

Sets this HELIX's axis root position to the given position.



Role: Before performing the change, it checks if the data structure is posted on the bulletin board. If not, the method calls backup to put an entry on the bulletin board.

Parameters:
axis_root the new root position.

void HELIX::set_handedness ( logical  handedness  ) 

Sets this HELIX's handedness to the given value.



Role: Before performing the change, it checks if the data structure is posted on the bulletin board. If not, the method calls backup to put an entry on the bulletin board.

Parameters:
handedness the new handedness.

void HELIX::set_pitch ( double  pitch  ) 

Sets this HELIX's pitch to the given value.



Role: Before performing the change, it checks if the data structure is posted on the bulletin board. If not, the method calls backup to put an entry on the bulletin board.

Parameters:
pitch the new pitch.

void HELIX::set_start_disp ( const SPAvector start_disp  ) 

Sets this HELIX's start displacement to the given vector.



Role: Before performing the change, it checks if the data structure is posted on the bulletin board. If not, the method calls backup to put an entry on the bulletin board.

Parameters:
start_disp the new start displacement.

virtual void CURVE::set_use_count ( int  use  )  [virtual, inherited]

Sets the reference use count of this ENTITY.



Role: If the ENTITY is not use counted, this method does nothing.

Parameters:
use new use count.

Reimplemented from ENTITY.

virtual unsigned HELIX::size (  )  const [virtual]

Returns the size, in bytes, of this ENTITY.



Role: (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Reimplemented from CURVE.

const SPAvector& HELIX::start_disp (  )  const [inline]

Returns the start displacement of this HELIX.

tag_id_type ENTITY::tag ( logical  assign_new = TRUE  )  const [inline, inherited]

Data reading routine.



Parameters:
assign_new flag to assign a new tag number or not.

curve* HELIX::trans_curve ( const SPAtransf t = *(SPAtransf *) NULL_REF,
logical  negate = FALSE 
) const [virtual]

Transforms the curve equation of this HELIX.



Role: If the logical negate is TRUE, the curve is reversed.

Parameters:
t transform to apply.
negate flag to reverse the curve.

Reimplemented from CURVE.

virtual const char* HELIX::type_name (  )  const [virtual]

Returns a name for this ENTITY's type.



Role: For the ENTITY class, unknown is returned.

Reimplemented from CURVE.

virtual int CURVE::use_count (  )  const [virtual, inherited]

Returns the use count of this ENTITY.



Role: Returns zero if the ENTITY is not use counted.

Reimplemented from ENTITY.