WT_Polymarker Class Reference
[Drawable objects]

#include <polymark.h>

Inheritance diagram for WT_Polymarker:

Inheritance graph
[legend]
Collaboration diagram for WT_Polymarker:

Collaboration graph
[legend]
List of all members.

Detailed Description

A drawable describing a polymarker (a set of points).
Examples:

WhipExamples/Polymarker.cpp.

Definition at line 37 of file polymark.h.

Public Member Functions

 WT_Polymarker ()
 Constructs a WT_Polymarker object.
 WT_Polymarker (int count, WT_Logical_Point const *points, WT_Boolean copy) throw (WT_Result)
 Constructs a WT_Polymarker object from the given data.
 WT_Polymarker (WT_Polymarker const &marker) throw (WT_Result)
 Copy Constructor.
virtual ~WT_Polymarker ()
 Destroys a WT_Polymarker object.
WT_Polymarker const & operator= (const WT_Polymarker &pline) throw (WT_Result)
 Assignment operator. Assigns the data from the given polyline to this one.
virtual WT_Result delay (WT_File &file) const
 Delays the serialization of this object.
virtual WT_Result dump (WT_File &file) const
 Forces the serialization of the object to the file.
WT_ID object_id () const
 Returns the WT_ID for this object.
WT_Result materialize (WT_Opcode const &opcode, WT_File &file)
 Materializes the contents of the object from the file and the given opcode.
virtual WT_Boolean merge (WT_Drawable const &current)
 Merge a same-class drawable with this one.
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.
virtual void update_bounds (WT_File *file)
 Forces the drawable bounds to be updated.

Static Public Member Functions

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

Friends

class WT_Opcode
class WT_W2D_Class_Factory


Constructor & Destructor Documentation

WT_Polymarker::WT_Polymarker int  count,
WT_Logical_Point const *  points,
WT_Boolean  copy
throw (WT_Result) [inline]
 

Constructs a WT_Polymarker object from the given data.

Parameters:
count  The number of points in the array.
points  Pointer to the array of points.
copy  Whether the points should be copied or if their addresses should be used directly from the array.

Definition at line 49 of file polymark.h.


Member Function Documentation

static WT_Result WT_Polymarker::default_process WT_Polymarker 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.

virtual WT_Result WT_Polymarker::delay WT_File file  )  const [virtual]
 

Delays the serialization of this object.

Stores the object for later serialization (in case the following object is coincident and can be merged with 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::Internal_Error The drawable object does not implement the delay() method.

Reimplemented from WT_Drawable.

virtual WT_Result WT_Polymarker::dump WT_File file  )  const [virtual]
 

Forces the serialization of the object to the file.

Warning:
This is used by the framework and should not be called by client code. Clients should always call serialize() so as to take advantage of the optimizations gained through delayed serialization and merging.
Return values:
WT_Result::Success The operation was successful.

Reimplemented from WT_Drawable.

WT_Result WT_Polymarker::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.

virtual WT_Boolean WT_Polymarker::merge WT_Drawable const &  current  )  [virtual]
 

Merge a same-class drawable with this one.

Exceptions:
WT_Result::Internal_Error The drawable object does not implement the merge() method.
Return values:
WD_True The drawable was merged.

Reimplemented from WT_Drawable.

WT_Polymarker const& WT_Polymarker::operator= const WT_Polymarker pline  )  throw (WT_Result) [inline]
 

Assignment operator. Assigns the data from the given polyline to this one.

Note:
If the incoming polyline's points are not copied, i.e. it is directly using client memory, then the new polyline will do the same.

Definition at line 71 of file polymark.h.

WT_Result WT_Polymarker::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_Polymarker::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.

WT_Result WT_Polymarker::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 Jan 6 22:41:25 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5