DWFToolkit::DWFSection Class Reference
[DWF Package API]

#include "dwf/package/Section.h"

Inheritance diagram for DWFToolkit::DWFSection:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Since:
7.0.1
Section Descriptors
While the package manifest outlines general section information, it is the section's descriptor that provides the details. The section classes in the toolkit are structured for highly efficient processing. As such, the descriptors are never automatically loaded. On-demand descriptor parsing allows for the most flexibility when processing an entire DWF package. That said, it is very strongly recommended that a section's descriptor is read into the DWFSection object before using it's data and resources; especially when copying or moving resources between sections.
Examples:

Aggregate/Aggregate.cpp, ReadContentDefinition/ReadContentDefinition.cpp, SimpleEnumReader/SimpleEnumReader.cpp, and TimedXMLReader/TimedXMLReader.cpp.

Definition at line 81 of file Section.h.

Public Types

typedef DWFWCharKeySkipList<
DWFSection * > 
tMap
 This type defines a mapped collection of DWFSection pointers.
typedef std::multimap< const
wchar_t *, DWFSection *, tDWFWCharCompareLess
tMultiMap
 This type defines a multi-value mapped collection of DWFSection pointers.
typedef std::map< DWFString,
DWFString
tStringMap
 This type defines a map of strings to strings.

Public Member Functions

typedef _DWFTK_STD_VECTOR (DWFSection *) tList
 This type defines a list of DWFSection pointers.
typedef _DWFTK_STD_MULTIMAP (DWFString, DWFString) tStringMultiMap
 This type defines a multi-map of strings to strings.
_DWFTK_API DWFSection (DWFPackageReader *pPackageReader) throw ()
_DWFTK_API DWFSection (const DWFString &zType, const DWFString &zName, const DWFString &zTitle, DWFPackageReader *pPackageReader) throw ()
_DWFTK_API DWFSection (const DWFString &zType, const DWFString &zTitle, const DWFString &zObjectID, double nVersion, double nPlotOrder, const DWFSource &rSource) throw ()
_DWFTK_API DWFSection (const DWFSection &rSection) throw ()
_DWFTK_API DWFSectionoperator= (const DWFSection &rSection) throw ()
virtual _DWFTK_API ~DWFSection () throw ()
virtual _DWFTK_API const DWFStringname () const throw ()
virtual _DWFTK_API void rename (const DWFString &zName) throw ()
_DWFTK_API const DWFStringtype () const throw ()
virtual _DWFTK_API const DWFStringtitle () const throw ()
virtual _DWFTK_API void retitle (const DWFString &zTitle) throw ()
virtual _DWFTK_API void setLabel (const DWFString &zLabel) throw ()
virtual _DWFTK_API const DWFStringlabel () throw ()
virtual _DWFTK_API void setLabelIconResource (DWFResource &rResource) throw ()
virtual _DWFTK_API void setLabelIconResourceID (const DWFString &zResourceID) throw ()
virtual _DWFTK_API const DWFStringlabelIconResourceID () throw ()
virtual _DWFTK_API const DWFStringinitialURI () throw ()
virtual _DWFTK_API void setInitialURI (const DWFString &zInitialURI) throw ()
virtual _DWFTK_API const DWFSourcesource () const throw ()
virtual _DWFTK_API void addSource (const DWFSource &rSource) throw ()
virtual _DWFTK_API DWFInterfacebuildInterface () throw ( DWFException )
virtual _DWFTK_API const DWFStringobjectID () const throw ()
virtual _DWFTK_API double version () const throw ()
virtual _DWFTK_API double order () const throw ()
virtual _DWFTK_API void reorder (double nPlotOrder) throw ()
virtual _DWFTK_API void setContentManager (DWFContentManager *pContentManager) throw ()
virtual _DWFTK_API DWFContentManagergetContentManager () const throw ()
virtual _DWFTK_API DWFResourceaddResource (DWFResource *pResource, bool bOwnResource, bool bReplace=true, bool bDeleteReplacedIfOwned=true, const DWFResource *pParentResource=NULL) throw ( DWFException )
virtual _DWFTK_API const DWFResourcereadDescriptor (DWFSectionDescriptorReader *pSectionDescriptorReader=NULL) const throw ( DWFException )
virtual _DWFTK_API void readDescriptor (DWFSectionDescriptorReader &rSectionDescriptorReader, DWFResource &rResource) const throw ( DWFException )
virtual _DWFTK_API void readDescriptor (DWFSectionDescriptorReader &rSectionDescriptorReader, DWFInputStream &rSectionDescriptorStream) const throw ( DWFException )
virtual _DWFTK_API DWFContentgetContentDefinition (DWFResource *pResource, DWFContentResourceReader *pReaderFilter=NULL, bool bLoadContent=true) throw ( DWFException )
virtual _DWFTK_API DWFContent::tIteratorgetContentDefinition (DWFContentResourceReader *pReaderFilter=NULL, bool bLoadContent=true) throw ( DWFException )
virtual _DWFTK_API void getContentDefinition (DWFContent::tMap &oResourceObjectIDContent, DWFContentResourceReader *pReaderFilter=NULL, bool bLoadContent=true) throw ( DWFException )
virtual _DWFTK_API void getContentDefinition (DWFContentResourceReader &rReader, DWFResource *pResource=NULL) throw ( DWFException )
virtual _DWFTK_API void getContentDefinition (DWFContentResourceReader &rReader, DWFInputStream &rContentResourceStream) throw ( DWFException )
virtual _DWFTK_API void getAssociatedContentIDs (tStringMultiMap &oResourceIDContentIDMap) const throw ()
virtual _DWFTK_API void updateResourceContentMapping (const DWFString &zResourceObjectID, const DWFString &zOldContentID, const DWFString &zNewContentID) throw ( DWFException )
virtual _DWFTK_API void updateResourceContentMapping (DWFResource *pResource, const DWFString &zOldContentID, const DWFString &zNewContentID) throw ( DWFException )
virtual _DWFTK_API DWFObjectDefinitiongetObjectDefinition () const throw ( DWFException )
virtual _DWFTK_API DWFObjectDefinitiongetObjectDefinition (DWFObjectDefinitionReader &rObjectDefinitionFilter, DWFResource &rResource) const throw ( DWFException )
virtual _DWFTK_API void getObjectDefinition (DWFObjectDefinitionReader &rObjectDefinitionReader, DWFResource *pResource=NULL) const throw ( DWFException )
virtual _DWFTK_API void getObjectDefinition (DWFObjectDefinitionReader &rObjectDefinitionReader, DWFInputStream &rObjectDefinitionStream) const throw ( DWFException )
virtual _DWFTK_API void readContentPresentations () throw ( DWFException )
virtual _DWFTK_API void readContentPresentations (DWFContentPresentationReader &rContentPresentationFilter, DWFResource &rResource) const throw ( DWFException )
virtual _DWFTK_API void readContentPresentations (DWFContentPresentationReader &rContentPresentationReader, DWFResource *pResource) const throw ( DWFException )
virtual _DWFTK_API void readContentPresentations (DWFContentPresentationReader &rContentPresentationReader, DWFInputStream &rContentPresentationStream) const throw ( DWFException )
virtual _DWFTK_API void parseAttributeList (const char **ppAttributeList) throw ( DWFException )
virtual _DWFTK_API DWFSection::tBehavior behavior () const throw ()
virtual _DWFTK_API void applyBehavior (const DWFSection::tBehavior &rBehavior) throw ()
virtual _DWFTK_API void serializeXML (DWFXMLSerializer &rSerializer, unsigned int nFlags) throw ( DWFException )

Protected Types

typedef std::multimap< DWFResource *,
DWFString
tResourceStringMultiMap

Protected Member Functions

virtual _DWFTK_API DWFResourcebuildResource (const char **ppAttributeList, DWFPackageReader *pPackageReader) throw ( DWFException )
virtual _DWFTK_API DWFFontResourcebuildFontResource (const char **ppAttributeList, DWFPackageReader *pPackageReader) throw ( DWFException )
virtual _DWFTK_API DWFImageResourcebuildImageResource (const char **ppAttributeList, DWFPackageReader *pPackageReader) throw ( DWFException )
_DWFTK_API DWFGraphicResourcebuildGraphicResource (const char **ppAttributeList, DWFPackageReader *pPackageReader) throw ( DWFException )

Protected Attributes

DWFString _zType
DWFString _zName
DWFString _zTitle
DWFString _zLabel
DWFString _zLabelIconResourceID
DWFResource_pLabelIconResource
DWFString _zInitialURI
DWFString _zObjectID
double _nVersion
double _nPlotOrder
DWFSource _oSource
DWFPackageReader_pPackageReader
DWFContentManager_pContentManager
tResourceStringMultiMap _oResourceToContentID
tBehavior _tBehavior
bool _bContentPresentationsRead

Static Protected Attributes

static const wchar_t *const kzProperty_Label
static const wchar_t *const kzProperty_LabelIconResourceID
static const wchar_t *const kzProperty_InitialURI
static const wchar_t *const kzPropertyCategory_Hidden

Classes

class  _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE
struct  tBehavior
 This data structure encapsulates certain logic required for the section to be processed correctly by the toolkit. More...


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFSection::DWFSection 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 section content data from the DWF package.

Parameters:
pPackageReader Provides access to section content in the DWF package.
Exceptions:
None 

_DWFTK_API DWFToolkit::DWFSection::DWFSection 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 section content data from the DWF package.

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

_DWFTK_API DWFToolkit::DWFSection::DWFSection const DWFString zType,
const DWFString zTitle,
const DWFString zObjectID,
double  nVersion,
double  nPlotOrder,
const DWFSource rSource
throw ()
 

Constructor

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

Parameters:
zType The section type identifier.
zTitle The descriptive and display friendly title text.
zObjectID Uniquely identifies the section.
nVersion Identifies the version of the section type and/or descriptor.
nPlotOrder Indicates the initial position in the package to which the section was/will be published.
rSource Describes the original source of the data in the section (a drawing file, for example.)
Exceptions:
None 

_DWFTK_API DWFToolkit::DWFSection::DWFSection const DWFSection rSection  )  throw ()
 

Copy Constructor

Parameters:
rSection The source from which to construct this object.
Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

virtual _DWFTK_API DWFResource* DWFToolkit::DWFSection::addResource DWFResource pResource,
bool  bOwnResource,
bool  bReplace = true,
bool  bDeleteReplacedIfOwned = true,
const DWFResource pParentResource = NULL
throw ( DWFException ) [virtual]
 

Inserts a resource to the container.

Parameters:
pResource The resource to add to the container (must not be NULL).
bOwnResource If true, the container will claim ownership of the resource and delete it using the DWFCORE_FREE_OBJECT macro upon destruction of this container if it is still owned.
bReplace If true, pResource will replace an existing resource at the same HREF.
bDeleteReplacedIfOwned If bReplace is true and pResource has the same HREF as one in the container, and the container has ownership of the resource, then the previous object will be deleted using the DWFCORE_FREE_OBJECT macro.
pParentResource - Identifies another resource is associated as a parent in the meta-structure.
Returns:
If pResource replaced an existing object but the previous was not deleted, this method will return a pointer to that object. The caller is responsible for either claiming ownership of the resource or recognizing that it is already owned by another object; otherwise, this method returns NULL.
Exceptions:
DWFException 

Reimplemented from DWFToolkit::DWFResourceContainer.

Examples:
SimpleEPlotWriter/SimpleEPlotWriter_UTF8.cpp, and WriteContent/WriteContent.cpp.

virtual _DWFTK_API void DWFToolkit::DWFSection::addSource const DWFSource rSource  )  throw () [virtual]
 

Identifies/updates the source information for this section.

This method will overwrite any existing data.

Parameters:
rSource The source object from which to copy data.
Exceptions:
None 

virtual _DWFTK_API void DWFToolkit::DWFSection::applyBehavior const DWFSection::tBehavior rBehavior  )  throw () [virtual]
 

Sets the section logic for the toolkit.

Parameters:
rBehavior The behavior logic.
Exceptions:
None 
Since:
7.2.0

virtual _DWFTK_API DWFSection::tBehavior DWFToolkit::DWFSection::behavior  )  const throw () [virtual]
 

The section logic for the toolkit.

Returns:
A copy of the behavior data.
Exceptions:
None 
Since:
7.2.0

virtual _DWFTK_API DWFFontResource* DWFToolkit::DWFSection::buildFontResource const char **  ppAttributeList,
DWFPackageReader pPackageReader
throw ( DWFException ) [protected, virtual]
 

Builds a font resource.

_DWFTK_API DWFGraphicResource* DWFToolkit::DWFSection::buildGraphicResource const char **  ppAttributeList,
DWFPackageReader pPackageReader
throw ( DWFException ) [protected]
 

Builds a graphic resource.

virtual _DWFTK_API DWFImageResource* DWFToolkit::DWFSection::buildImageResource const char **  ppAttributeList,
DWFPackageReader pPackageReader
throw ( DWFException ) [protected, virtual]
 

Builds a image resource.

virtual _DWFTK_API DWFInterface* DWFToolkit::DWFSection::buildInterface  )  throw ( DWFException ) [inline, virtual]
 

Returns the interface associated with the section type.

An interface identifier is used in the DWF package manifest for quick reference, to document all section types in the package.

Returns:
A pointer to a new interface object. This object will be allocated using the DWFCORE_ALLOC_OBJECT macro and must be deleted by the caller using the DWFCORE_FREE_OBJECT macro.
Exceptions:
DWFException 

Reimplemented in DWFToolkit::DWFDataSection, DWFToolkit::DWFEModelSection, DWFToolkit::DWFEPlotSection, and DWFToolkit::DWFSignatureSection.

Definition at line 565 of file Section.h.

virtual _DWFTK_API DWFResource* DWFToolkit::DWFSection::buildResource const char **  ppAttributeList,
DWFPackageReader pPackageReader
throw ( DWFException ) [protected, virtual]
 

Builds a generic or untyped resource.

virtual _DWFTK_API void DWFToolkit::DWFSection::getAssociatedContentIDs tStringMultiMap &  oResourceIDContentIDMap  )  const throw () [virtual]
 

Get the IDs of the all contents associated with this section. This does not load the global contents or any resources.

Parameters:
oResourceIDContentIDMap The container in which the resource object IDs and the associated content IDs are returned.

virtual _DWFTK_API void DWFToolkit::DWFSection::getContentDefinition DWFContentResourceReader rReader,
DWFInputStream rContentResourceStream
throw ( DWFException ) [virtual]
 

Processes content definitions using the reader interface provided. This allows the caller to participate directly in the parsing process. No in-memory data representation will be created nor cached by the DWFSection implicitly.

Parameters:
rReader An interface reference to an object that knows how to read and parse content resource documents.
rContentResourceStream A stream providing a content resource document for this section.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFSection::getContentDefinition DWFContentResourceReader rReader,
DWFResource pResource = NULL
throw ( DWFException ) [virtual]
 

This parses one or all content resources, i.e. resources with the the role of kzRole_ContentDefinition, in the section using the provided reader, allowing the caller to participate directly in the parsing process. No in-memory representation of the content will be created or cached by the DWFSection or the assocaited DWFContent.

Parameters:
rReader The custom content resource reader.
pResource Pointer to the content resource to read. If this is NULL all content resources in the section are read.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFSection::getContentDefinition DWFContent::tMap oResourceObjectIDContent,
DWFContentResourceReader pReaderFilter = NULL,
bool  bLoadContent = true
throw ( DWFException ) [virtual]
 

This parses all given section content resources, i.e. resources with the the role of kzRole_ContentDefinition, using the default content resource reader implemented by the associated contents. If a reader filter is provided, the filter will be set on the default reader. By default for any resource the associated global content will be loaded if it has not been. If bLoadContent is false, the content resource will not be parsed if the content is not loaded. This method returns the loaded contents in the provided map, where the key is content resource object ID, and the value is the corresponding loaded content.

Parameters:
oResourceObjectIDContent A mapping from resource object ID to the global content into which the corresponding information was loaded.
pReaderFilter A parsing filter. This will be set on the default content reader.
bLoadContent If this is false the content resource will not load if the global content has not been loaded.
Exceptions:
DWFException 

virtual _DWFTK_API DWFContent::tIterator* DWFToolkit::DWFSection::getContentDefinition DWFContentResourceReader pReaderFilter = NULL,
bool  bLoadContent = true
throw ( DWFException ) [virtual]
 

This parses all given section content resources, i.e. resources with the the role of kzRole_ContentDefinition, using the default content resource reader implemented by the associated contents. If a reader filter is provided, the filter will be set on the default reader. By default for any resource the associated global content will be loaded if it has not been. If bLoadContent is false, the content resource will not be parsed if the content is not loaded.

Parameters:
pReaderFilter A parsing filter. This will be set on the default content reader.
bLoadContent If this is false the content resource will not load if the global content has not been loaded.
Returns:
Pointer to an iterator over content that was successfully read. The caller is reponsible for deleting this pointer with the DWFCORE_FREE_OBJECT macro. Do not delete the content pointers.
Exceptions:
DWFException 

virtual _DWFTK_API DWFContent* DWFToolkit::DWFSection::getContentDefinition DWFResource pResource,
DWFContentResourceReader pReaderFilter = NULL,
bool  bLoadContent = true
throw ( DWFException ) [virtual]
 

This parses the given section content resource using the default content resource reader implemented by the associated content. The resource must have a role of kzRole_ContentDefinition. If a reader filter is provided, the filter will be set on the default reader. By default for any resource the associated global content will be loaded if it has not been. If bLoadContent is false, the content resource will not be parsed if the content is not loaded.

Parameters:
pResource Pointer to the content resource to read.
pReaderFilter A parsing filter. This will be set on the default content reader.
bLoadContent If this is false the content resource will not load if the global content has not been loaded.
Returns:
Pointer to content into which the resource was read. NULL if the read failed. Do not delete the content pointer.
Exceptions:
DWFException 
Examples:
ReadContentDefinition/ReadContentDefinition.cpp.

virtual _DWFTK_API DWFContentManager* DWFToolkit::DWFSection::getContentManager  )  const throw () [inline, virtual]
 

Get the content manager. This method is available for usage after a section has been read in from a package. There is no gaurantee that this will be set during publishing.

Returns:
Pointer to the content manager. May be NULL.
Exceptions:
None 

Definition at line 655 of file Section.h.

virtual _DWFTK_API void DWFToolkit::DWFSection::getObjectDefinition DWFObjectDefinitionReader rObjectDefinitionReader,
DWFInputStream rObjectDefinitionStream
const throw ( DWFException ) [virtual]
 

Processes object definitions using the reader interface provided. This allows the caller to participate directly in the parsing process. No in-memory data representation will be created nor cached by the DWFSection implicitly.

Parameters:
rObjectDefinitionReader An interface reference to an object that knows how to read and parse object definition documents.
rObjectDefinitionStream A stream providing an object definition document for this section.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFSection::getObjectDefinition DWFObjectDefinitionReader rObjectDefinitionReader,
DWFResource pResource = NULL
const throw ( DWFException ) [virtual]
 

Processes object definitions using the reader interface provided. This allows the caller to participate directly in the parsing process. No in-memory data representation will be created nor cached by the DWFSection implicitly.

Parameters:
rObjectDefinitionReader An interface reference to an object that knows how to read and parse object definition documents.
pResource An optional pointer to an object definition resource. If NULL, all object definition resources will be processed.
Exceptions:
DWFException 

virtual _DWFTK_API DWFObjectDefinition* DWFToolkit::DWFSection::getObjectDefinition DWFObjectDefinitionReader rObjectDefinitionFilter,
DWFResource rResource
const throw ( DWFException ) [virtual]
 

Processes the object definition resource provided using the default reader implemented by DWFObjectDefinition.

rObjectDefinitionFilter A parsing filter. It will be set on the new DWFObjectDefinition before processing begins.

rResource An object definition resource to process.

Returns:
A pointer to a new DWFObjectDefinition. The caller is reponsible for deleting this pointer with the DWFCORE_FREE_OBJECT macro.
Exceptions:
DWFException 

virtual _DWFTK_API DWFObjectDefinition* DWFToolkit::DWFSection::getObjectDefinition  )  const throw ( DWFException ) [virtual]
 

Locates all object definitions in the section and parses them with the default reader implemented by DWFObjectDefinition.

Returns:
A pointer to a new DWFObjectDefinition. The caller is reponsible for deleting this pointer with the DWFCORE_FREE_OBJECT macro.
Exceptions:
DWFException 
Examples:
TimedXMLReader/TimedXMLReader.cpp.

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSection::initialURI  )  throw () [inline, virtual]
 

Gets the initial URI.

Returns:
A string containing the URI to be applied after the section is loaded.
Exceptions:
None 
Since:
7.2.0

Definition at line 504 of file Section.h.

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSection::label  )  throw () [inline, virtual]
 

Gets the section label.

Returns:
A string containing the label.
Exceptions:
None 
Since:
7.2.0

Definition at line 448 of file Section.h.

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSection::labelIconResourceID  )  throw () [inline, virtual]
 

Gets the objectid of the resource containing an icon for the section label.

Returns:
A string containing the objectid of the resource containing an icon for the section label.
Exceptions:
None 
Since:
7.2.0

Definition at line 490 of file Section.h.

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSection::name  )  const throw () [inline, virtual]
 

Returns the section name.

The section name refers to the string that uniquely identifies the section in the DWF package. The title() method should be used to retrieve the descriptive and display friendly text title of the section.

Returns:
A string that uniquely identifies the section in the DWF package.
Exceptions:
None 
Examples:
SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 362 of file Section.h.

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSection::objectID  )  const throw () [inline, virtual]
 

Returns a unique identifier for the section.

This identifier should be immutable for the life of the section; remaining unchanged during relocation and aggregation (the same is not true of the name()).

Returns:
A reference to the unique section identifier.
Exceptions:
None 
Examples:
SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 582 of file Section.h.

_DWFTK_API DWFSection& DWFToolkit::DWFSection::operator= const DWFSection rSection  )  throw ()
 

Assignment Operator

Parameters:
rSection The source from which to construct this object.
Exceptions:
None 

virtual _DWFTK_API double DWFToolkit::DWFSection::order  )  const throw () [inline, virtual]
 

Returns the order in which the section was published.

Returns:
The plot order.
Exceptions:
None 
Examples:
SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 611 of file Section.h.

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

Implements DWFCore::DWFXMLBuildable.

virtual _DWFTK_API void DWFToolkit::DWFSection::readContentPresentations DWFContentPresentationReader rContentPresentationReader,
DWFInputStream rContentPresentationStream
const throw ( DWFException ) [virtual]
 

Processes object definitions using the reader interface provided. This allows the caller to participate directly in the parsing process. No in-memory data representation will be created nor cached by the DWFSection implicitly.

Parameters:
rContentPresentationReader An interface reference to an object that knows how to read and parse object definition documents.
rContentPresentationStream A stream providing an object definition document for this section.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFSection::readContentPresentations DWFContentPresentationReader rContentPresentationReader,
DWFResource pResource
const throw ( DWFException ) [virtual]
 

Processes content presentations using the reader interface provided. This allows the caller to participate directly in the parsing process. No in-memory data representation will be created nor cached by the DWFSection implicitly.

Parameters:
rContentPresentationReader An interface reference to an object that knows how to read and parse object definition documents.
pResource An optional pointer to a content presentation resource. If NULL, all content definition resources will be processed.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFSection::readContentPresentations DWFContentPresentationReader rContentPresentationFilter,
DWFResource rResource
const throw ( DWFException ) [virtual]
 

Processes the content presentation resource provided using the default reader implemented by DWFContentPresentationResource.

rContentPresentationFilter A parsing filter. It will be set on the new DWFContentPresentation before processing begins.

rResource An object definition resource to process.

Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFSection::readContentPresentations  )  throw ( DWFException ) [virtual]
 

Reads all content presentations resources in the section and parses them with the default reader. The resources can then be directly accessed to get the presentations.

Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFSection::readDescriptor DWFSectionDescriptorReader rSectionDescriptorReader,
DWFInputStream rSectionDescriptorStream
const throw ( DWFException ) [virtual]
 

Processes the section descriptor using the reader interface provided. This allows the caller to participate directly in the parsing process. No in-memory data representation will be created nor cached by the DWFSection implicitly.

Parameters:
rSectionDescriptorReader An interface reference to an object that knows how to read and parse the descriptor associated with this section [type].
rSectionDescriptorStream A stream providing the descriptor document for this section.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFSection::readDescriptor DWFSectionDescriptorReader rSectionDescriptorReader,
DWFResource rResource
const throw ( DWFException ) [virtual]
 

Processes the section descriptor using the reader interface provided. This allows the caller to participate directly in the parsing process. No in-memory data representation will be created nor cached by the DWFSection implicitly.

Parameters:
rSectionDescriptorReader An interface reference to an object that knows how to read and parse the descriptor associated with this section [type].
rResource The descriptor document resource for this section.
Exceptions:
DWFException 

virtual _DWFTK_API const DWFResource& DWFToolkit::DWFSection::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 in DWFToolkit::DWFDataSection, DWFToolkit::DWFEModelSection, DWFToolkit::DWFEPlotSection, DWFToolkit::DWFGlobalSection, and DWFToolkit::DWFSignatureSection.

Examples:
Aggregate/Aggregate.cpp, ReadContentDefinition/ReadContentDefinition.cpp, SimpleEnumReader/SimpleEnumReader.cpp, and TimedXMLReader/TimedXMLReader.cpp.

virtual _DWFTK_API void DWFToolkit::DWFSection::rename const DWFString zName  )  throw () [virtual]
 

Change the section name.

This method is generally used during the internal publishing process in DWFPackageWriter::addSection() to ensure uniqueness.

The section name refers to the string that uniquely identifies the section in the DWF package. Usually this name is a string representation of a UUID. The title() method should be used to retrieve the descriptive and display friendly text title of the section.

Parameters:
zName A string that uniquely identifies the section in the DWF package.
Exceptions:
None 

Reimplemented from DWFToolkit::DWFResourceContainer.

virtual _DWFTK_API void DWFToolkit::DWFSection::reorder double  nPlotOrder  )  throw () [inline, virtual]
 

Changes the plot order value.

Parameters:
nPlotOrder The new value.
Exceptions:
None 
Note:
Sections are always re-ordered by the DWFPackageWriter.

Definition at line 626 of file Section.h.

virtual _DWFTK_API void DWFToolkit::DWFSection::retitle const DWFString zTitle  )  throw () [inline, virtual]
 

Change the section title.

Parameters:
zTitle A string for the new descriptive and display friendly title text.
Exceptions:
None 
Since:
7.2.0

Definition at line 420 of file Section.h.

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

Implements DWFCore::DWFXMLSerializableBase.

Reimplemented in DWFToolkit::DWFDataSection, DWFToolkit::DWFEModelSection, DWFToolkit::DWFEPlotSection, DWFToolkit::DWFGlobalSection, and DWFToolkit::DWFSignatureSection.

virtual _DWFTK_API void DWFToolkit::DWFSection::setContentManager DWFContentManager pContentManager  )  throw () [inline, virtual]
 

Set the content manager from which the section's content resources can get their contents during package reading.

Parameters:
pContentManager Pointer to the content manager.
Exceptions:
None 

Definition at line 640 of file Section.h.

virtual _DWFTK_API void DWFToolkit::DWFSection::setInitialURI const DWFString zInitialURI  )  throw () [inline, virtual]
 

Sets the initial URI.

Parameters:
zInitialURI A string containing the URI to be applied after the section is loaded.
Exceptions:
None 
Since:
7.2.0

Definition at line 518 of file Section.h.

virtual _DWFTK_API void DWFToolkit::DWFSection::setLabel const DWFString zLabel  )  throw () [inline, virtual]
 

Sets the section label.

Parameters:
zLabel A string containing the label.
Exceptions:
None 
Since:
7.2.0

Definition at line 434 of file Section.h.

virtual _DWFTK_API void DWFToolkit::DWFSection::setLabelIconResource DWFResource rResource  )  throw () [inline, virtual]
 

Sets the resource containing an icon for the section label.

Parameters:
rResource The resource containing the icon.
Exceptions:
None 
Since:
7.2.0

Definition at line 462 of file Section.h.

virtual _DWFTK_API void DWFToolkit::DWFSection::setLabelIconResourceID const DWFString zResourceID  )  throw () [inline, virtual]
 

Sets the objectid of the resource containing an icon for the section label.

Parameters:
zResourceID A string containing the objectid of the resource.
Exceptions:
None 
Since:
7.2.0

Definition at line 476 of file Section.h.

virtual _DWFTK_API const DWFSource& DWFToolkit::DWFSection::source  )  const throw () [inline, virtual]
 

Returns an object that can be used to identify the source of the original data from which the section content was created.

Source will always exist but may contain empty elements.

Returns:
The source object.
Exceptions:
None 

Definition at line 535 of file Section.h.

virtual _DWFTK_API const DWFString& DWFToolkit::DWFSection::title  )  const throw () [inline, virtual]
 

Returns the section title.

Returns:
The descriptive and display friendly title text.
Exceptions:
None 
Examples:
SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 406 of file Section.h.

_DWFTK_API const DWFString& DWFToolkit::DWFSection::type  )  const throw () [inline]
 

Returns the section type.

Returns:
The section type identifier.
Exceptions:
None 
Examples:
SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 393 of file Section.h.

virtual _DWFTK_API void DWFToolkit::DWFSection::updateResourceContentMapping DWFResource pResource,
const DWFString zOldContentID,
const DWFString zNewContentID
throw ( DWFException ) [virtual]
 

If the content or the ID of the content associated with a resource changes, then the section needs to be made aware of that change through this method. This will update the resource, and then update the sections collection of the resource object ID to content ID mapping.

Parameters:
pResource The resource whose content ID is being updated.
zOldContentID The old content ID that will be removed.
zNewContentID The new content ID that will be inserted.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFSection::updateResourceContentMapping const DWFString zResourceObjectID,
const DWFString zOldContentID,
const DWFString zNewContentID
throw ( DWFException ) [virtual]
 

If the content or the ID of the content associated with a resource changes, then the section needs to be made aware of that change through this method. This will update the resource, and then update the sections collection of the resource object ID to content ID mapping.

Parameters:
zResourceObjectID The object ID of the resource whose content ID is being updated.
zOldContentID The old content ID that will be removed.
zNewContentID The new content ID that will be inserted.
Exceptions:
DWFException 

virtual _DWFTK_API double DWFToolkit::DWFSection::version  )  const throw () [inline, virtual]
 

Returns the version of the section and/or descriptor.

Section types/classes should always be versioned to ensure backwards compatability.

Returns:
The version number.
Exceptions:
None 
Examples:
SimpleEnumReader/SimpleEnumReader.cpp.

Definition at line 598 of file Section.h.


Member Data Documentation

tBehavior DWFToolkit::DWFSection::_tBehavior [protected]
 

The current section logic used by the toolkit.

Definition at line 1080 of file Section.h.


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