WT_Object Class Reference

#include <object.h>

Inheritance diagram for WT_Object:

Inheritance graph
[legend]
List of all members.

Detailed Description

Base class for all WHIP! objects and attributes that can be serialized to or materialized from a file.

Definition at line 32 of file object.h.

Public Types

enum  WT_ID
 Object ID. Allows object class identification without having RTTI enabled.
enum  WT_Type
 General type of an object.

Public Member Functions

virtual WT_Type object_type () const =0
 Returns the WT_Type for this object.
virtual WT_ID object_id () const =0
 Returns the WT_ID for this object.
virtual WT_Result materialize (WT_Opcode const &opcode, WT_File &file)=0
 Materializes the contents of the object from the file and the given opcode.
virtual WT_Result process (WT_File &file)=0
 Calls the configured action handler for this object (passes in the file reference.).
virtual WT_Result serialize (WT_File &file) const =0
 Causes the serialization of the object to the file.
virtual WT_Result skip_operand (WT_Opcode const &opcode, WT_File &file)
 Causes the file reading to proceed to the end of this object.
const WT_Booleanmaterialized () const
 Returns WD_True if the instance has been materialized from a WT_File. */.
WT_Booleanmaterialized ()
 Returns WD_True if the instance has been materialized from a WT_File. */.

Protected Member Functions

 WT_Object ()
 Constructs a WT_Object object.
virtual ~WT_Object ()
 Destroys a WT_Object object.

Protected Attributes

WT_Boolean m_materialized
 WD_True if the instance has been materialized from a WT_File.

Friends

class WT_Viewport
class WT_Object_Stream
class WT_File
class WT_Class_Factory
class WT_DeprecatedClassFactory


Member Function Documentation

virtual WT_Result WT_Object::materialize WT_Opcode const &  opcode,
WT_File file
[pure 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.
Parameters:
opcode  The opcode which corresponds to the object.
file  The file being read.

Implemented in WT_Attribute_URL, WT_Background, WT_BlockRef, WT_Block_Meaning, WT_Encryption, WT_Orientation, WT_Alignment, WT_Password, WT_Guid, WT_Code_Page, WT_Color, WT_Color_Map, WT_Compressed_Data_Moniker, WT_Contour_Set, WT_Contrast_Color, WT_Dash_Pattern, WT_Delineate, WT_Directory, WT_DWF_Header, WT_Ellipse, WT_Embed, WT_Embedded_Font, WT_End_Of_DWF, WT_FileTime, WT_Fill, WT_Fill_Pattern, WT_Font, WT_Font_Extension, WT_Gouraud_Polyline, WT_Gouraud_Polytriangle, WT_Group_Begin, WT_Group_End, WT_Guid_List, WT_Image, WT_Informational, WT_Inked_Area, WT_Layer, WT_Layer_List, WT_Line_Pattern, WT_Line_Style, WT_Line_Weight, WT_Macro_Definition, WT_Macro_Draw, WT_Macro_Index, WT_Macro_Scale, WT_Marker_Size, WT_Marker_Symbol, WT_Merge_Control, WT_Named_View, WT_Named_View_List, WT_Option, WT_Object_Node, WT_Object_Node_List, WT_Object_Stream, WT_Origin, WT_Overpost, WT_Pen_Pattern, WT_PenPat_Options, WT_Plot_Optimized, WT_Plot_Info, WT_PNG_Group4_Image, WT_Polygon, WT_Polyline, WT_Polymarker, WT_Polytriangle, WT_Projection, WT_SignData, WT_Text, WT_Text_Background, WT_Text_HAlign, WT_Text_VAlign, WT_Timestamp, WT_Trusted_Font_List, WT_Units, WT_Unknown, WT_URL, WT_URL_List, WT_UserData, WT_User_Fill_Pattern, WT_User_Hatch_Pattern, WT_View, WT_Viewport, and WT_Visibility.

virtual WT_Result WT_Object::process WT_File file  )  [pure 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.

Implemented in WT_Attribute_URL, WT_Background, WT_BlockRef, WT_Block_Meaning, WT_Encryption, WT_Orientation, WT_Alignment, WT_Password, WT_Guid, WT_Code_Page, WT_Color, WT_Color_Map, WT_Compressed_Data_Moniker, WT_Contour_Set, WT_Contrast_Color, WT_Dash_Pattern, WT_Delineate, WT_Directory, WT_DWF_Header, WT_Filled_Ellipse, WT_Outline_Ellipse, WT_Embed, WT_Embedded_Font, WT_End_Of_DWF, WT_FileTime, WT_Fill, WT_Fill_Pattern, WT_Font, WT_Font_Extension, WT_Gouraud_Polyline, WT_Gouraud_Polytriangle, WT_Group_Begin, WT_Group_End, WT_Guid_List, WT_Image, WT_Informational, WT_Inked_Area, WT_Layer, WT_Layer_List, WT_Line_Pattern, WT_Line_Style, WT_Line_Weight, WT_Macro_Definition, WT_Macro_Draw, WT_Macro_Index, WT_Macro_Scale, WT_Marker_Size, WT_Marker_Symbol, WT_Merge_Control, WT_Named_View, WT_Named_View_List, WT_Option, WT_Object_Node, WT_Object_Node_List, WT_Object_Stream, WT_Origin, WT_Overpost, WT_Pen_Pattern, WT_PenPat_Options, WT_Plot_Optimized, WT_Plot_Info, WT_PNG_Group4_Image, WT_Polygon, WT_Polyline, WT_Polymarker, WT_Polytriangle, WT_Projection, WT_SignData, WT_Text, WT_Text_Background, WT_Text_HAlign, WT_Text_VAlign, WT_Trusted_Font_List, WT_Units, WT_Unknown, WT_URL, WT_URL_List, WT_UserData, WT_User_Fill_Pattern, WT_User_Hatch_Pattern, WT_View, WT_Viewport, and WT_Visibility.

virtual WT_Result WT_Object::serialize WT_File file  )  const [pure 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.
Parameters:
file  The file being written.

Implemented in WT_Attribute, WT_Attribute_URL, WT_Background, WT_BlockRef, WT_Block_Meaning, WT_Encryption, WT_Orientation, WT_Alignment, WT_Password, WT_Guid, WT_Code_Page, WT_Color, WT_Color_Map, WT_Compressed_Data_Moniker, WT_Contour_Set, WT_Contrast_Color, WT_Dash_Pattern, WT_Delineate, WT_Directory, WT_DWF_Header, WT_Filled_Ellipse, WT_Outline_Ellipse, WT_Embed, WT_Embedded_Font, WT_End_Of_DWF, WT_FileTime, WT_Fill, WT_Fill_Pattern, WT_Font, WT_Font_Extension, WT_Gouraud_Polyline, WT_Gouraud_Polytriangle, WT_Group_Begin, WT_Group_End, WT_Guid_List, WT_Image, WT_Informational, WT_Inked_Area, WT_Layer, WT_Layer_List, WT_Line_Pattern, WT_Line_Style, WT_Line_Weight, WT_Macro_Definition, WT_Macro_Draw, WT_Macro_Index, WT_Macro_Scale, WT_Marker_Size, WT_Marker_Symbol, WT_Merge_Control, WT_Named_View, WT_Named_View_List, WT_Option, WT_Object_Node, WT_Object_Node_List, WT_Object_Stream, WT_Origin, WT_Overpost, WT_Pen_Pattern, WT_PenPat_Options, WT_Plot_Optimized, WT_Plot_Info, WT_PNG_Group4_Image, WT_Polygon, WT_Polyline, WT_Polymarker, WT_Polytriangle, WT_Projection, WT_SignData, WT_Text, WT_Text_Background, WT_Text_HAlign, WT_Text_VAlign, WT_Trusted_Font_List, WT_Units, WT_Unknown, WT_URL, WT_URL_List, WT_UserData, WT_User_Fill_Pattern, WT_User_Hatch_Pattern, WT_View, WT_Viewport, and WT_Visibility.

virtual WT_Result WT_Object::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 in WT_Attribute_URL, WT_Background, WT_BlockRef, WT_Block_Meaning, WT_Encryption, WT_Orientation, WT_Alignment, WT_Password, WT_Guid, WT_Code_Page, WT_Color, WT_Color_Map, WT_Compressed_Data_Moniker, WT_Contour_Set, WT_Contrast_Color, WT_Dash_Pattern, WT_Delineate, WT_Directory, WT_DWF_Header, WT_Ellipse, WT_Embed, WT_Embedded_Font, WT_End_Of_DWF, WT_FileTime, WT_Fill, WT_Fill_Pattern, WT_Font, WT_Font_Extension, WT_Gouraud_Polyline, WT_Gouraud_Polytriangle, WT_Group_Begin, WT_Group_End, WT_Guid_List, WT_Image, WT_Informational, WT_Inked_Area, WT_Layer, WT_Layer_List, WT_Line_Pattern, WT_Line_Style, WT_Line_Weight, WT_Macro_Draw, WT_Macro_Index, WT_Macro_Scale, WT_Marker_Size, WT_Marker_Symbol, WT_Merge_Control, WT_Named_View, WT_Named_View_List, WT_Object_Node, WT_Object_Node_List, WT_Origin, WT_Pen_Pattern, WT_PenPat_Options, WT_Plot_Optimized, WT_PNG_Group4_Image, WT_Polygon, WT_Polyline, WT_Polymarker, WT_Polytriangle, WT_Projection, WT_SignData, WT_Text, WT_Text_Background, WT_Text_HAlign, WT_Text_VAlign, WT_Timestamp, WT_Trusted_Font_List, WT_Units, WT_Unknown, WT_URL, WT_URL_List, WT_UserData, WT_User_Fill_Pattern, WT_User_Hatch_Pattern, WT_View, WT_Viewport, and WT_Visibility.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:22 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5