WT_File_Heuristics Class Reference
[File I/O objects]

#include <heuristics.h>

Collaboration diagram for WT_File_Heuristics:

Collaboration graph
[legend]
List of all members.

Detailed Description

Contains settings used during file I/O operations.

See also:
WT_File

Definition at line 34 of file heuristics.h.

Public Member Functions

 WT_File_Heuristics ()
 Constructs a WT_File_Heuristics object for the optional WT_File object.
virtual ~WT_File_Heuristics ()
 Destroys a WT_File_Heuristics object.
void set_allow_binary_data (WT_Boolean binary)
 Sets whether the file should be opened for writing as a binary file (defaults to WD_True.).
void set_allow_data_compression (WT_Boolean allowed)
 Sets whether the file should be opened for writing as a compressed file (defaults to WD_False.).
void set_allow_drawable_merging (WT_Boolean merging)
 Sets whether the file should, whenever possible, merge drawables to save space (defaults to WD_True.).
void set_allow_indexed_colors (WT_Boolean indexed)
 Sets whether the file should, whenever possible, use colors indexes (in the color map) to save space (defaults to WD_True.).
void set_apply_transform (WT_Boolean apply)
 Sets whether the file should apply a transform to geometry (defaults to WD_False.).
void set_apply_transform_to_units_matrix (WT_Boolean apply)
 Sets whether the file should apply a transform to the units matrix (defaults to WD_True.).
void set_deferred_delete (WT_Boolean state)
 Sets the deferred delete state (client code is responsible for deleting objects created by the toolkit).
void set_target_version (int target, WT_File *file=WD_Null)
 Sets the target version which should be used when creating this file.
void set_transform (WT_Transform const &transform)
 Sets a transform to be applied to geometry (and potentially the units matrix).
void set_user_data (void *user_data)
 Sets a pointer to a user-defined data item.
WT_Boolean allow_binary_data () const
 Returns WD_True if the file was opened for writing as a binary file.
WT_Boolean allow_data_compression () const
 Returns WD_True if the file was be opened for writing as a compressed file.
WT_Boolean allow_drawable_merging () const
 Returns WD_True if the file is set to merge drawables to save space.
WT_Boolean allow_indexed_colors () const
 Returns WD_True if the file is set to use colors indexes (in the color map) to save space.
WT_Boolean apply_transform () const
 Returns WD_True if the file is set to apply a transform to geometry.
WT_Boolean apply_transform_to_units_matrix () const
 Returns WD_True if the file is set to apply a transform to the units matrix.
WT_Boolean deferred_delete () const
 Returns WD_True if objects that are created by the toolkit will be deleted by the client code.
int target_version () const
 Returns the desired target version.
WT_Transform const & transform () const
 Returns the desired transform to be applied to geometry (and possibly the units matrix) when writing a file.
WT_Transformtransform ()
void * user_data ()
 Returns the pointer to a user-defined data item.

Friends

class WT_Plot_Info
class WT_Informational
class WT_Opcode
class WT_DWF_Header
class WT_File


Member Function Documentation

WT_Boolean WT_File_Heuristics::apply_transform  )  const [inline]
 

Returns WD_True if the file is set to apply a transform to geometry.

Note:
This is only used when writing to a file. There is not applicable in a read mode.

Definition at line 124 of file heuristics.h.

WT_Boolean WT_File_Heuristics::apply_transform_to_units_matrix  )  const [inline]
 

Returns WD_True if the file is set to apply a transform to the units matrix.

Note:
This is only used when writing to a file. There is not applicable in a read mode.
See also:
WT_Drawing_Info.

Definition at line 129 of file heuristics.h.

WT_Boolean WT_File_Heuristics::deferred_delete  )  const [inline]
 

Returns WD_True if objects that are created by the toolkit will be deleted by the client code.

Note:
This is only used when reading a file. There is not applicable in a write mode.
See also:
set_deferred_delete().

Definition at line 133 of file heuristics.h.

void WT_File_Heuristics::set_allow_binary_data WT_Boolean  binary  )  [inline]
 

Sets whether the file should be opened for writing as a binary file (defaults to WD_True.).

Attention:
Set this AFTER calling WT_File::open().
Note:
This is only used when writing to a file. There is not applicable in a read mode.
Examples:
WhipExamples/FileWrite.cpp.

Definition at line 51 of file heuristics.h.

void WT_File_Heuristics::set_allow_data_compression WT_Boolean  allowed  )  [inline]
 

Sets whether the file should be opened for writing as a compressed file (defaults to WD_False.).

Attention:
Set this AFTER calling WT_File::open().
Note:
This is only used when writing to a file. There is not applicable in a read mode.
Examples:
WhipExamples/FileWrite.cpp.

Definition at line 56 of file heuristics.h.

void WT_File_Heuristics::set_allow_drawable_merging WT_Boolean  merging  )  [inline]
 

Sets whether the file should, whenever possible, merge drawables to save space (defaults to WD_True.).

Note:
This is only used when writing to a file. There is not applicable in a read mode.

Definition at line 59 of file heuristics.h.

void WT_File_Heuristics::set_allow_indexed_colors WT_Boolean  indexed  )  [inline]
 

Sets whether the file should, whenever possible, use colors indexes (in the color map) to save space (defaults to WD_True.).

Note:
This is only used when writing to a file. There is not applicable in a read mode.

Definition at line 62 of file heuristics.h.

void WT_File_Heuristics::set_apply_transform WT_Boolean  apply  )  [inline]
 

Sets whether the file should apply a transform to geometry (defaults to WD_False.).

Note:
This is only used when writing to a file. There is not applicable in a read mode.

Definition at line 65 of file heuristics.h.

void WT_File_Heuristics::set_apply_transform_to_units_matrix WT_Boolean  apply  )  [inline]
 

Sets whether the file should apply a transform to the units matrix (defaults to WD_True.).

Note:
This is only used when writing to a file. There is not applicable in a read mode.

Definition at line 68 of file heuristics.h.

void WT_File_Heuristics::set_deferred_delete WT_Boolean  state  )  [inline]
 

Sets the deferred delete state (client code is responsible for deleting objects created by the toolkit).

Warning:
When using deferred delete, be very careful when using WT_File::get_next_object_shell(). The deferred delete processing assumes that the file pointer has been moved. This happens when the object has been materialized, or the operand has been skipped. Normally, in a non-deferred state, if the object hasn't been materialized, WT_File::get_next_object_shell() takes care of skipping the current (non-materialized) object's operand and thus advancing the file pointer, by using WT_Object::skip_operand(). However, in the deferred delete state, it's possible that the client has already deleted the current object before get_next_object_shell() is called, so we avoid calling the methods on the current object to discover whether or not it is materialized. Thus, the file pointer will not automatically get advanced in that case. The suggested usage by clients using deferred_delete is to either always use WT_File::get_next_object(), which always materializes the object and thus advances the file pointer - or to make sure the operand is skipped if the object is not materialized.
See also:
WT_File::get_next_object_shell(), WT_Object::skip_operand().

Definition at line 92 of file heuristics.h.

void WT_File_Heuristics::set_target_version int  target,
WT_File file = WD_Null
 

Sets the target version which should be used when creating this file.

The version is calculated as follows: (major_version * 100) + minor_version. For example, if the desired file version is 00.55, the target version should be set to 55; for version 06.00, the target version should be set to 600.

Note:
This is only used when writing to a file. This method is not applicable in a read mode. When reading a file, clients should call WT_Filerendition().drawing_info().decimal_revision() to retrieve the revision of the file being read.
Attention:
Set this before calling WT_File::open().
Examples:
WhipExamples/AppendBlocks.cpp, WhipExamples/WriteBlocks.cpp, and WhipExamples/WriteRedline.cpp.

void WT_File_Heuristics::set_transform WT_Transform const &  transform  )  [inline]
 

Sets a transform to be applied to geometry (and potentially the units matrix).

The use of the transform is goverened by the apply_transform and apply_transform_to_units_matrix flags set by set_apply_transform() and set_apply_transform_to_units_matrix(), respectively.

Note:
This is only used when writing to a file. There is not applicable in a read mode.

Definition at line 108 of file heuristics.h.

int WT_File_Heuristics::target_version  )  const [inline]
 

Returns the desired target version.

Note:
This is only used when writing to a file. This method is not applicable in a read mode. When reading a file, clients should call WT_Filerendition().drawing_info().decimal_revision() to retrieve the revision of the file being read.
See also:
WT_Drawing_Info::decimal_revision()

Definition at line 140 of file heuristics.h.

WT_Transform const& WT_File_Heuristics::transform  )  const [inline]
 

Returns the desired transform to be applied to geometry (and possibly the units matrix) when writing a file.

Note:
This is only used when writing to a file. There is not applicable in a read mode.

Definition at line 143 of file heuristics.h.


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