Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages | Examples

WT_Units Class Reference
[class Support objects]

#include <units.h>

Inheritance diagram for WT_Units:

Inheritance graph
[legend]
Collaboration diagram for WT_Units:

Collaboration graph
[legend]
List of all members.

Detailed Description

Stores the transform between source (authoring tool) coordinate space and WHIP! drawing coordinate space.

Definition at line 31 of file units.h.

Public Member Functions

WT_Boolean operator== (WT_Units const &) const
 Returns WD_True if the unit objects are equal.
WT_Boolean operator!= (WT_Units const &u) const
 Returns WD_True if the unit objects are NOT equal.
Construction
 WT_Units ()
 Constructs a WT_Units object.
 WT_Units (WT_Matrix const &xform, WT_String units)
 Constructs a WT_Units object with the given data.
Data access methods
WT_Matrix const & application_to_dwf_transform () const
 Returns a transform which converts from source (authoring tool) coordinates to WHIP! coordinates.
WT_Matrix const & dwf_to_application_adjoint_transform ()
 Returns a transform which converts from WHIP! coordinates to source (authoring tool) coordinates.
void set_application_to_dwf_transform (WT_Matrix const &xform)
 Sets the transform which converts from source (authoring tool) coordinates to WHIP! coordinates.
void set_units (WT_String const &units)
 Sets the string describing the source unit of measure.
void set_units (int length, WT_Unsigned_Integer16 const *units)
 Sets the string describing the source unit of measure from the given string buffer.
WT_String const & units () const
 Returns the string describing the source unit of measure.
Utility methods
WT_Point3D transform (WT_Logical_Point const &in_pt)
 Transforms the given point from WHIP! coordinates to source (authoring tool) coordinates.
WT_Logical_Point transform (WT_Point3D const &in_pt) const
 Transforms the given point from source (authoring tool) coordinates to WHIP! coordinates.
WT_Point3D transform_from_DWF_to_application (WT_Point3D const &in_pt)
 Transforms the given point from WHIP! coordinates to source (authoring tool) coordinates.
WT_Point3D transform_from_application_to_DWF (WT_Point3D const &in_pt) const
 Transforms the given point from source (authoring tool) coordinates to WHIP! coordinates.
WT_Object virtual methods
WT_Result materialize (WT_Opcode const &opcode, WT_File &file)
 Materializes the contents of the object from the file and the given opcode.
WT_Object::WT_ID object_id () const
 Returns the WT_ID for this object.
WT_Object::WT_Type object_type () const
 Returns the WT_Type for this object.
WT_Result process (WT_File &file)
 Calls the configured action handler for this object (passes in the file reference.).
WT_Result serialize (WT_File &file) const
 Causes the serialization of the object to the file.
WT_Result skip_operand (WT_Opcode const &opcode, WT_File &file)
 Causes the file reading to proceed to the end of this object.

Static Public Member Functions

static WT_Result default_process (WT_Units &item, WT_File &file)
 Provides a default action handler for this object.


Constructor & Destructor Documentation

WT_Units::WT_Units WT_Matrix const &  xform,
WT_String  units
[inline]
 

Constructs a WT_Units object with the given data.

Parameters:
xform  Transform from source (authoring tool) WHIP! coordinates.
units  A string describing the source unit of measure.

Definition at line 58 of file units.h.


Member Function Documentation

static WT_Result WT_Units::default_process WT_Units item,
WT_File file
[static]
 

Provides a default action handler for this object.

Warning:
This is used by the framework and should not be called by client code.
Parameters:
item  The object to process.
file  The file being read.

WT_Result WT_Units::materialize WT_Opcode const &  opcode,
WT_File file
[virtual]
 

Materializes the contents of the object from the file and the given opcode.

Reads in the object data and causes the file reading to proceed to the end of this object.

Warning:
This is used by the framework and should not be called by client code.
Return values:
WT_Result::Success The operation was successful.
WT_Result::Opcode_Not_Valid_For_This_Object The object does not support the opcode type.
WT_Result::Internal_Error Something went very wrong.

Implements WT_Object.

WT_Result WT_Units::process WT_File file  )  [virtual]
 

Calls the configured action handler for this object (passes in the file reference.).

Warning:
This is used by the framework and should not be called by client code.

Implements WT_Object.

WT_Result WT_Units::serialize WT_File file  )  const [virtual]
 

Causes the serialization of the object to the file.

If this is a WT_Drawable derived object, this method may cause the object to be delayed (in case a coincident like-object follows) and/or merged (in case a coincident like-object preceeded) so as to optimize the output.

Return values:
WT_Result::Success The operation was successful.

Implements WT_Object.

void WT_Units::set_units int  length,
WT_Unsigned_Integer16 const *  units
 

Sets the string describing the source unit of measure from the given string buffer.

Although optional, if applicable the units description should follow convention and be one of the following (non-localized) strings:

  • millimeters
  • centimeters
  • meters
  • kilometers
  • inches
  • feet
  • feet and inches
  • yards
  • miles

void WT_Units::set_units WT_String const &  units  )  [inline]
 

Sets the string describing the source unit of measure.

Although optional, if applicable the units description should follow convention and be one of the following (non-localized) strings:

  • millimeters
  • centimeters
  • meters
  • kilometers
  • inches
  • feet
  • feet and inches
  • yards
  • miles

Definition at line 88 of file units.h.

WT_Result WT_Units::skip_operand WT_Opcode const &  opcode,
WT_File file
[virtual]
 

Causes the file reading to proceed to the end of this object.

Warning:
This is used by the framework and should not be called by client code.

Bug:
Not all objects perform skip_operand() correctly; this is a known problem. For best results, if client code must use WT_File::get_next_object_shell() manually, it should also call the corresponding WT_Object::materialize() method to avoid this problem.
See also:
WT_File::get_next_object_shell(), WT_File_Heuristics::set_deferred_delete().

Reimplemented from WT_Object.


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:08:07 2005 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.1