WT_Attribute_URL Class Reference
[Rendition attributes]

#include <attribute_url.h>

Inheritance diagram for WT_Attribute_URL:

Inheritance graph
[legend]
Collaboration diagram for WT_Attribute_URL:

Collaboration graph
[legend]
List of all members.

Detailed Description

Rendition attribute describing the a single or multiple-target hyperlink to be applied to a subsequent attribute of a given type.

Note:
This attribute will not be written until after the subsequent dependent attribute type is written.
See also:
WT_Rendition

Definition at line 40 of file attribute_url.h.

Public Member Functions

 WT_Attribute_URL ()
 Constructs a WT_Attribute_URL object.
 WT_Attribute_URL (WT_Attribute &attribute)
 Constructs a WT_Attribute_URL object with the given dependent attribute.
 WT_Attribute_URL (WT_Attribute &attribute, WT_URL_Item &item)
 Constructs a WT_Attribute_URL object with the given dependent attribute and initial URL item.
 WT_Attribute_URL (WT_Attribute &attribute, WT_Integer32 index, WT_Unsigned_Integer16 const *address, WT_Unsigned_Integer16 const *friendly_name)
 Constructs a WT_Attribute_URL object with the given initial data.
 WT_Attribute_URL (WT_Attribute_URL const &url)
 Copy Constructor.
virtual ~WT_Attribute_URL ()
WT_Integer32 const & attribute_id (void) const
 Returns the ID of the attributes to which the contained URLs apply.
WT_Integer32attribute_id ()
void add_url (WT_URL_Item &item)
 Adds the specified URL item to the list of current URLs.
void add_url (WT_Integer32 index, WT_Unsigned_Integer16 const *address, WT_Unsigned_Integer16 const *friendly_name)
 Adds the specified URL data to the list of current URLs.
void add_url (WT_Integer32 index, WT_String &address, WT_String &friendly_name)
 Adds the specified URL data to the list of current URLs.
void add_url_optimized (WT_URL_Item &item, WT_File &file)
 Adds the specified URL item to the list of current URLs.
void add_url_optimized (WT_Integer32 index, WT_Unsigned_Integer16 const *address, WT_Unsigned_Integer16 const *friendly_name, WT_File &file)
 Adds the specified URL item to the list of current URLs.
void add_url_optimized (WT_Integer32 index, WT_String &address, WT_String &friendly_name, WT_File &file)
 Adds the specified URL item to the list of current URLs.
virtual void clear ()
 Clears the list of current URLs.
void flush_rendition (WT_File &file)
 Updates the incarnation value so that the URLs will serialized when needed.
void set (WT_Integer32 index, WT_Unsigned_Integer16 const *address, WT_Unsigned_Integer16 const *friendly_name)
 Adds the specified URL data to the list of current URLs.
WT_URL_List const & url ()
 Returns the list of current URLs.
virtual WT_Attribute_URL const & operator= (WT_Attribute_URL const &url)
 Assignment operator. Copies the contents of the given WT_Attribute_URL object to this one.
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.
WT_Result process (WT_File &file)
 Calls the configured action handler for this object (passes in the file reference.).
WT_Result skip_operand (WT_Opcode const &opcode, WT_File &file)
 Causes the file reading to proceed to the end of this object.
WT_Result serialize (WT_File &file) const
 Forces the serialization of the object to the file.
WT_Result sync (WT_File &file) const
 Serializes the attribute out to the file, if necessary.
WT_Boolean operator== (WT_Attribute const &attrib) const
 Returns WD_True if the attributes are equal.

Static Public Member Functions

static WT_Result default_process (WT_Attribute_URL &item, WT_File &file)
 Provides a default action handler for this attribute (e.g. sets the current rendition's corresponding attribute.).

Protected Types

enum  WT_Materialize_Stage

Protected Attributes

int m_incarnation
WT_Integer32 m_current_index
WT_String m_current_address
WT_String m_current_friendly_name
WT_URL_List m_url_list
WT_Integer32 m_count
WT_Integer32 m_attribute_id

Friends

class WT_Rendition
class WT_Opcode
class WT_W2D_Class_Factory


Member Function Documentation

void WT_Attribute_URL::add_url WT_Integer32  index,
WT_String address,
WT_String friendly_name
[inline]
 

Adds the specified URL data to the list of current URLs.

Warning:
Clients must call flush_rendition() before AND after adding urls to this object. To avoid this, call add_url_optimized() instead.
Note:
Clients should always use add_url_optimized().
Parameters:
index  Unique index for this hyperlink.
address  Machine-readable target for this hyperlink.
friendly_name  Human-readable friendly name for this hyperlink.

Definition at line 151 of file attribute_url.h.

void WT_Attribute_URL::add_url WT_Integer32  index,
WT_Unsigned_Integer16 const *  address,
WT_Unsigned_Integer16 const *  friendly_name
[inline]
 

Adds the specified URL data to the list of current URLs.

Warning:
Clients must call flush_rendition() before AND after adding urls to this object. To avoid this, call add_url_optimized() instead.
Note:
Clients should always use add_url_optimized().

Definition at line 137 of file attribute_url.h.

void WT_Attribute_URL::add_url WT_URL_Item item  )  [inline]
 

Adds the specified URL item to the list of current URLs.

Warning:
Clients must call flush_rendition() before AND after adding urls to this object. To avoid this, call add_url_optimized() instead.
Deprecated:
Clients should always use add_url_optimized().

Definition at line 124 of file attribute_url.h.

void WT_Attribute_URL::add_url_optimized WT_Integer32  index,
WT_String address,
WT_String friendly_name,
WT_File file
[inline]
 

Adds the specified URL item to the list of current URLs.

If the URL item has already been fully serialized once, only its idenfitier will be outputted when serialized for subsequent graphics.

Parameters:
index  Unique index for this hyperlink.
address  Machine-readable target for this hyperlink.
friendly_name  Human-readable friendly name for this hyperlink.
file  The file being written.

Definition at line 186 of file attribute_url.h.

void WT_Attribute_URL::add_url_optimized WT_Integer32  index,
WT_Unsigned_Integer16 const *  address,
WT_Unsigned_Integer16 const *  friendly_name,
WT_File file
[inline]
 

Adds the specified URL item to the list of current URLs.

If the URL item has already been fully serialized once, only its idenfitier will be outputted when serialized for subsequent graphics.

Parameters:
index  Unique index for this hyperlink.
address  Machine-readable target for this hyperlink.
friendly_name  Human-readable friendly name for this hyperlink.
file  The file being written.

Definition at line 172 of file attribute_url.h.

void WT_Attribute_URL::add_url_optimized WT_URL_Item item,
WT_File file
 

Adds the specified URL item to the list of current URLs.

If the URL item has already been fully serialized once, only its idenfitier will be outputted when serialized subsequently.

Parameters:
item  The URL to add.
file  The file being written.

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

Provides a default action handler for this attribute (e.g. sets the current rendition's corresponding attribute.).

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

void WT_Attribute_URL::flush_rendition WT_File file  ) 
 

Updates the incarnation value so that the URLs will serialized when needed.

Warning:
Clients must call flush_rendition() before AND after adding urls to this object. To avoid this, call add_url_optimized() instead of add_url().
Note:
Clients should always use add_url_optimized(), and if they do so, they need not use flush_rendition().

WT_Result WT_Attribute_URL::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_Attribute_URL::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_Attribute_URL::serialize 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.
Return values:
WT_Result::Success The operation was successful.

Implements WT_Attribute.

void WT_Attribute_URL::set WT_Integer32  index,
WT_Unsigned_Integer16 const *  address,
WT_Unsigned_Integer16 const *  friendly_name
 

Adds the specified URL data to the list of current URLs.

Parameters:
index  Unique index for this hyperlink.
address  Machine-readable target for this hyperlink.
friendly_name  Human-readable friendly name for this hyperlink.

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

WT_Result WT_Attribute_URL::sync WT_File file  )  const [virtual]
 

Serializes the attribute out to the file, if necessary.

Only outputs relevant desired rendition changes to the file.

Warning:
This is used by the framework and should not be called by client code.
Return values:
WT_Result::Success The operation was successful.
See also:
WT_File::desired_rendition().

Implements WT_Attribute.


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