DWFToolkit::DWFGlobalSection Class Reference
[DWF Package API]

#include "dwf/package/GlobalSection.h"

Inheritance diagram for DWFToolkit::DWFGlobalSection:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

This class contains the base functionality for all global sections in a DWF package.

Since:
7.0.1
A global section is a special construct in that the data contained herein applies to all sections in the DWF package of the same type. Global sections also vary from standard sections (see DWFSection) in that their descriptors often contain object definitions. These data are generally small in number and, as noted, are applicable to all object defintions defined in sections whose type match the global section.

Global sections also hold bookmarks (see DWFBookmark.) A bookmark is a hyperlink reference that can apply across sections. Defined globally, bookmarks can provide a navigation option across a subsection of packaged sections (per type.)

Examples:

SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 65 of file GlobalSection.h.

Public Types

typedef DWFWCharKeySkipList<
DWFGlobalSection * > 
tMap
 This type defines a mapped collection of DWFGlobalSection pointers.
typedef std::multimap< const
wchar_t *, DWFGlobalSection *,
tDWFWCharCompareLess
tMultiMap
 This type defines a multi-value mapped collection of DWFGlobalSection pointers.

Public Member Functions

typedef _DWFTK_STD_VECTOR (DWFGlobalSection *) tList
 This type defines a list of DWFGlobalSection pointers.
_DWFTK_API DWFGlobalSection (const DWFString &zType, const DWFString &zName, const DWFString &zTitle, DWFPackageReader *pPackageReader) throw ()
_DWFTK_API DWFGlobalSection (const DWFString &zType, const DWFString &zName, const DWFString &zTitle, double nVersion, const DWFSource &rSource) throw ()
virtual _DWFTK_API ~DWFGlobalSection () throw ()
_DWFTK_API const DWFBookmark
*const 
bookmark () const throw ()
_DWFTK_API const DWFResourcereadDescriptor (DWFSectionDescriptorReader *pSectionDescriptorReader=NULL) const throw ( DWFException )
virtual _DWFTK_API void serializeXML (DWFXMLSerializer &rSerializer, unsigned int nFlags) throw ( DWFException )
_DWFTK_API const char * provideName (const char *zName) throw ()
_DWFTK_API double provideVersion (double nVersion) throw ()
_DWFTK_API DWFPropertyprovideProperty (DWFProperty *pProperty) throw ()
_DWFTK_API DWFResourceprovideResource (DWFResource *pResource) throw ()
_DWFTK_API DWFFontResourceprovideFontResource (DWFFontResource *pResource) throw ()
_DWFTK_API DWFGraphicResourceprovideGraphicResource (DWFGraphicResource *pResource) throw ()
_DWFTK_API DWFImageResourceprovideImageResource (DWFImageResource *pResource) throw ()
_DWFTK_API DWFBookmarkprovideBookmark (DWFBookmark *pBookmark) throw ()

Classes

class  Factory
 Class factory for DWFSection objects. More...


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFGlobalSection::DWFGlobalSection const DWFString zType,
const DWFString zName,
const DWFString zTitle,
DWFPackageReader pPackageReader
throw ()
 

Constructor

This constructor is generally only used by the parsing process when the DWFPackageReader associated with (and providing read access to) the DWF package file is available. The subsequent binding makes it possible to read global section content data from the DWF package.

Parameters:
zType The global section type identifier.
zName A string that uniquely identifies the global section in the DWF package.
zTitle The descriptive and display friendly title text.
pPackageReader Provides access to global section content in the DWF package.
Exceptions:
None 

_DWFTK_API DWFToolkit::DWFGlobalSection::DWFGlobalSection const DWFString zType,
const DWFString zName,
const DWFString zTitle,
double  nVersion,
const DWFSource rSource
throw ()
 

Constructor

This constructor is generally used by applications and publishers for creating new global section objects.

Parameters:
zType The global section type identifier.
zName A string that uniquely identifies the global section in the DWF package.
zTitle The descriptive and display friendly title text.
nVersion Identifies the version of the global section type and/or descriptor.
rSource Describes the original source of the data in the global section (a drawing file, for example.)
Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API const DWFBookmark* const DWFToolkit::DWFGlobalSection::bookmark  )  const throw () [inline]
 

Returns the root bookmark.

All bookmarks are rooted in an unnamed root bookmark. This method provides access to this composite object, if it exists.

Bookmarks Example:

                void dump_bookmarks( const DWFBookmark* pRoot )
                {
                    static size_t l = 0;
                    size_t i;
                
                    for (i=0;i<l;i++)
                    {
                        wcout << "  ";
                    }
                
                    if (pRoot->name())
                    {
                        wcout << (const wchar_t*)(pRoot->name()) << endl;
                    }
                
                    const DWFBookmark::tList& rChildren = pRoot->getChildBookmarks();
                
                    for (i=0; i < rChildren.size(); i++)
                    {
                        l++;
                        dump_bookmarks( rChildren[i] );
                        l--;
                    }
                }
       
                ...
       
                const DWFBookmark* pRoot = pGlobal->bookmark();
                if (pRoot)
                {
                    wcout << L"\tDumping bookmarks..." << endl;
                    dump_bookmarks( pRoot );
                }

Exceptions:
None 
Examples:
SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 263 of file GlobalSection.h.

_DWFTK_API DWFBookmark* DWFToolkit::DWFGlobalSection::provideBookmark DWFBookmark pBookmark  )  throw ()
 

Accepts bookmark element objects.

Parameters:
pBookmark The new bookmark. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered bookmark object.
Exceptions:
None 

_DWFTK_API DWFFontResource* DWFToolkit::DWFGlobalSection::provideFontResource DWFFontResource pResource  )  throw ()
 

Accepts font resource element objects.

Parameters:
pResource The new resource. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered resource object.
Exceptions:
None 

_DWFTK_API DWFGraphicResource* DWFToolkit::DWFGlobalSection::provideGraphicResource DWFGraphicResource pResource  )  throw ()
 

Accepts graphic resource element objects.

Parameters:
pResource The new resource. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered resource object.
Exceptions:
None 

_DWFTK_API DWFImageResource* DWFToolkit::DWFGlobalSection::provideImageResource DWFImageResource pResource  )  throw ()
 

Accepts image resource element objects.

Parameters:
pResource The new resource. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered resource object.
Exceptions:
None 

_DWFTK_API const char* DWFToolkit::DWFGlobalSection::provideName const char *  zName  )  throw ()
 

Accepts the section name attribute.

Parameters:
zName The section name.
Returns:
The filtered section name.
Exceptions:
None 

_DWFTK_API DWFProperty* DWFToolkit::DWFGlobalSection::provideProperty DWFProperty pProperty  )  throw ()
 

Accepts property element objects.

Parameters:
pProperty The new property. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered property object.
Exceptions:
None 

_DWFTK_API DWFResource* DWFToolkit::DWFGlobalSection::provideResource DWFResource pResource  )  throw ()
 

Accepts resource element objects.

Parameters:
pResource The new resource. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered resource object.
Exceptions:
None 

_DWFTK_API double DWFToolkit::DWFGlobalSection::provideVersion double  nVersion  )  throw ()
 

Accepts the descriptor document version attribute.

Parameters:
nVersion The document version.
Returns:
The filtered document version.
Exceptions:
None 

_DWFTK_API const DWFResource& DWFToolkit::DWFGlobalSection::readDescriptor DWFSectionDescriptorReader pSectionDescriptorReader = NULL  )  const throw ( DWFException ) [virtual]
 

Locates the one descriptor resource in the section and parses it accordingly with the reader provided.

Parameters:
pSectionDescriptorReader An optional interface pointer to an object that knows how to read and parse the descriptor associated with this section [type]. If NULL, this base implementation will always throw an DWFInvalidArgumentException as there is no generic parser.
Returns:
A reference to the descriptor document resource.
Exceptions:
DWFException 
(

Reimplemented from DWFToolkit::DWFSection.

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

Reimplemented from DWFToolkit::DWFSection.


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