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

DWFToolkit::DWFBookmark Class Reference
[DWF Package API]

#include "dwf/package/Bookmark.h"

Inheritance diagram for DWFToolkit::DWFBookmark:

Inheritance graph
[legend]
Collaboration diagram for DWFToolkit::DWFBookmark:

Collaboration graph
[legend]
List of all members.

Detailed Description

A bookmark represents a global hyperlink in DWF package.
Since:
7.0.1.

The DWFBookmark is a composite object that defines a hierarchy (usually displayed in a tree view) of hyperlinks. A bookmark contains a friendly name and an HREF and optionally, a collection of child bookmarks. A bookmark is generally used for intra-DWF linking but there are no specified restrictions on the nature of the HREF.

Examples:

GlobalSectionWriter/GlobalSectionWriter.cpp, and SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 55 of file Bookmark.h.

Public Types

typedef vector< DWFBookmark * > tList
 This type defines a list of DWFBookmark pointers.

Public Member Functions

_DWFTK_API DWFBookmark () throw ()
_DWFTK_API DWFBookmark (const DWFString &zName, const DWFString &zHRef) throw ()
virtual _DWFTK_API ~DWFBookmark () throw ()
_DWFTK_API const DWFStringname () const throw ()
_DWFTK_API const DWFStringhref () const throw ()
_DWFTK_API const DWFBookmark::tListgetChildBookmarks () const throw ()
_DWFTK_API void addChildBookmark (DWFBookmark *pBookmark) throw ()
virtual _DWFTK_API void parseAttributeList (const char **ppAttributeList) throw ( DWFException )
_DWFTK_API void serializeXML (DWFXMLSerializer &rSerializer, unsigned int nFlags) throw ( DWFException )


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFBookmark::DWFBookmark  )  throw ()
 

Constructor

Exceptions:
None 

_DWFTK_API DWFToolkit::DWFBookmark::DWFBookmark const DWFString zName,
const DWFString zHRef
throw ()
 

Constructor

Parameters:
zName The friendly (display) name.
zHRef The hyperlink location.
Exceptions:
None 

virtual _DWFTK_API DWFToolkit::DWFBookmark::~DWFBookmark  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API void DWFToolkit::DWFBookmark::addChildBookmark DWFBookmark pBookmark  )  throw ()
 

Adds a bookmark to collection of child bookmarks.

Parameters:
pBookmark A pointer to a bookmark to add. pBookmark will now be owned by this object and ultimately deleted with the DWFCORE_FREE_OBJECT macro. Therefore it is required that pBookmark is allocated with the DWFCORE_ALLOC_OBJECT macro.
Exceptions:
None 
Examples:
GlobalSectionWriter/GlobalSectionWriter.cpp.

_DWFTK_API const DWFBookmark::tList& DWFToolkit::DWFBookmark::getChildBookmarks  )  const throw () [inline]
 

Returns the collection of child bookmarks.

Returns:
A reference to the child collection.
Exceptions:
None 
Todo:
Return an iterator not a direct reference to the internal collection.
Examples:
SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 136 of file Bookmark.h.

_DWFTK_API const DWFString& DWFToolkit::DWFBookmark::href  )  const throw () [inline]
 

Returns the hyperlink location of the bookmark.

Returns:
The HREF.
Exceptions:
None 

Definition at line 122 of file Bookmark.h.

_DWFTK_API const DWFString& DWFToolkit::DWFBookmark::name  )  const throw () [inline]
 

Returns the friendly (display) name of the bookmark.

Returns:
The name.
Exceptions:
None 
Examples:
SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 109 of file Bookmark.h.

virtual _DWFTK_API void DWFToolkit::DWFBookmark::parseAttributeList const char **  ppAttributeList  )  throw ( DWFException ) [virtual]
 

Receives and processes an attribute list from the parser; using it to initialize class members.

Example:

                 size_t iAttrib = 0;
       
                 for(; ppAttributeList[iAttrib]; iAttrib += 2)
                 {
                    //
                    // dump attribute 
                    //
                    cout << "Attribute Name: " << ppAttributeList[iAttrib] << " ";
                    cout << "Attribute Value: " << ppAttributeList[iAttrib+1] << endl;
                }

Parameters:
ppAttributeList An array of null-terminated atribute name, value string pairs. The array itself is zero-terminated.
Exceptions:
None 

Implements DWFToolkit::DWFXMLBuildable.

_DWFTK_API void DWFToolkit::DWFBookmark::serializeXML DWFXMLSerializer rSerializer,
unsigned int  nFlags
throw ( DWFException ) [virtual]
 

Writes an XML representation of the object into a stream.

Parameters:
rSerializer The object that accepts the serialization of the object.
nFlags An implementation-defined set of options for altering the serialization process of this object.

Implements DWFToolkit::DWFXMLSerializable.


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:38:54 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1