DWFToolkit::DWFPropertySet Class Reference
[DWF Package API]

#include "dwf/package/PropertySet.h"

Inheritance diagram for DWFToolkit::DWFPropertySet:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Propertysets are used to collect related properties and property sets into one element.

Since:
7.2.0
Collections of related properties can be stored in a DWFPropertySet. Property sets can also contain other property sets. Open property sets on content elements allow their properties to be directly visible as properties of the element. Properties of a closed set can only be accessed by directly querying the set for the properties it contains. If a property set is closed then any subsets it contains will effectively be closed in that queries will not reach them unless the main set is explicitly queried, or the query is told to disregard the closed set flag.
Examples:

3DPublish/3DPublish_UTF8.cpp, ReadContentDefinition/ReadContentDefinition.cpp, and WriteContent/WriteContent.cpp.

Definition at line 58 of file PropertySet.h.

Public Types

typedef DWFVectorIterator<
DWFPropertySet *, _DWFTK_STL_ALLOCATOR<
DWFPropertySet * > > 
tListIterator
 This type defines a DWFIterator on the list of DWFProperty pointers.
typedef DWFStringKeySkipList<
DWFPropertySet * > 
tMap
 This type defines a mapped collection of property set pointers.
typedef DWFCachingIterator<
DWFPropertySet * > 
tCachingIterator
 This type defines a caching iterator on a collection of DWFPropertySet pointers, that caches the pointers in its own container.
typedef DWFIterator< DWFPropertySet * > tIterator
 This type defines a basic iterator on a collection of DWFPropertySet pointers.
typedef enum DWFToolkit::DWFPropertySet::teUnresolvedAttributes teUnresolvedAttributes
 This enum defines the attributes that this class will not resolve when parsing attributes for the reader.
typedef enum DWFToolkit::DWFPropertySet::teQueryIDType teQueryIDType
 ID based queries on property sets can use either the schema ID or the unique property set ID.
enum  teUnresolvedAttributes
 This enum defines the attributes that this class will not resolve when parsing attributes for the reader.
enum  teQueryIDType { eUUID, eSchemaID, eSetID }
 ID based queries on property sets can use either the schema ID or the unique property set ID. More...

Public Member Functions

typedef _DWFTK_STD_VECTOR (DWFPropertySet *) tList
 This type defines a list of DWFProperty pointers.
_DWFTK_API DWFPropertySet (const DWFString &zLabel=L"") throw ()
virtual _DWFTK_API ~DWFPropertySet () throw ()
_DWFTK_API const DWFStringgetLabel () const throw ()
_DWFTK_API void setLabel (const DWFString &zLabel=L"") throw ()
_DWFTK_API const DWFStringgetSchemaID () const throw ()
_DWFTK_API void setSchemaID (const DWFString &zSchemaID) throw ()
_DWFTK_API const DWFStringgetSetID () const throw ()
_DWFTK_API void setSetID (const DWFString &zSetID) throw ()
_DWFTK_API bool isClosed () const throw ()
_DWFTK_API void setClosed (const DWFString &zSetID) throw ( DWFException )
_DWFTK_API void unsetClosed () throw ()
virtual _DWFTK_API const DWFPropertygetProperty (const DWFString &zName, const DWFString &zCategory=L"", bool bSearchClosedSets=false) throw ( DWFException )
virtual _DWFTK_API const DWFPropertygetProperty (const DWFString &zID, const DWFString &zName, const DWFString &zCategory, teQueryIDType eIDType=eSchemaID) throw ()
virtual _DWFTK_API DWFProperty::tIteratorgetAllProperties (bool bSearchClosedSets=false) throw ()
virtual _DWFTK_API DWFProperty::tIteratorgetAllProperties (const DWFString &zCategory, bool bSearchClosedSets=false) throw ()
virtual _DWFTK_API DWFPropertySetgetPropertySet (const DWFString &zID, teQueryIDType eIDType=eSchemaID) const throw ()
virtual _DWFTK_API DWFPropertySet::tIteratorgetPropertySets (bool bReturnClosedSets=false) throw ()
virtual _DWFTK_API DWFPropertySetaddPropertySet (const DWFString &zLabel=L"") throw ( DWFException )
virtual _DWFTK_API void addPropertySet (DWFPropertySet *pPropertySet) throw ( DWFException )
virtual _DWFTK_API void referencePropertySet (DWFPropertySet *pPropertySet) throw ( DWFException )
virtual _DWFTK_API void parseAttributeList (const char **) throw ( DWFException )
virtual _DWFTK_API void parseAttributeList (const char **ppAttributeList, tUnresolvedList &rUnresolved) throw ( DWFException )
_DWFTK_API void setContent (DWFContent *pContent) throw ()
_DWFTK_API DWFContentgetContent () const throw ()
_DWFTK_API void setParentSet (DWFPropertySet *pParent) throw ()
_DWFTK_API DWFPropertySetgetParentSet () const throw ()
virtual _DWFTK_API void addPropertyContainer (DWFPropertyContainer *pPropertySet) throw ( DWFException )
virtual _DWFTK_API void referencePropertyContainer (const DWFPropertyContainer &rPropertySet) throw ( DWFException )

Protected Member Functions

virtual _DWFTK_API void identify (const DWFString &zID) throw ()
virtual _DWFTK_API void _serializeAttributes (DWFXMLSerializer &rSerializer, unsigned int nFlags) throw ( DWFException )
virtual _DWFTK_API void _serializeXML (DWFXMLSerializer &rSerializer, unsigned int nFlags) throw ( DWFException )

Protected Attributes

DWFString _zLabel
DWFString _zSchemaID
DWFString _zSetID
bool _bClosed
DWFContent_pContent
DWFPropertySet_pParent

Friends

class DWFContent


Member Enumeration Documentation

enum DWFToolkit::DWFPropertySet::teQueryIDType
 

ID based queries on property sets can use either the schema ID or the unique property set ID.

Enumerator:
eUUID  The globally unique identifier of the property set, returned by id().
eSchemaID  The schema identifier of the property set, returned by getSchemaID().
eSetID  The set identifier of property set, returned by getSetID().

Definition at line 105 of file PropertySet.h.


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFPropertySet::DWFPropertySet const DWFString zLabel = L""  )  throw ()
 

Constructor

Parameters:
zLabel The optional property set label.
Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

virtual _DWFTK_API void DWFToolkit::DWFPropertySet::_serializeAttributes DWFXMLSerializer rSerializer,
unsigned int  nFlags
throw ( DWFException ) [protected, virtual]
 

For internal use only.

This is used to serialize the attributes, when serializing to XML

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

virtual _DWFTK_API void DWFToolkit::DWFPropertySet::_serializeXML DWFXMLSerializer rSerializer,
unsigned int  nFlags
throw ( DWFException ) [protected, virtual]
 

For internal use only.

This is used to serialize the members of this object via the base DWFPropertyContainer's private _oSerializer.

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.
Exceptions:
None 

Reimplemented from DWFToolkit::DWFPropertyContainer.

virtual _DWFTK_API void DWFToolkit::DWFPropertySet::addPropertyContainer DWFPropertyContainer pPropertySet  )  throw ( DWFException ) [virtual]
 

For property sets addPropertySet() should be used rather than this call. Inserts another property container directly into the container. This cannot enforce compile time type checking, but it will throw an exception if the container added is not a DWFPropertySet derived class. This has been kept here for backwards compatibility in other parts of the code.

Parameters:
pPropertySet The container to add to this container (must not be NULL). This pointer will be owned by this container and deleted using the DWFCORE_FREE_OBJECT.
Exceptions:
DWFException is thrown if the container is not a DWFPropertySet derived class.

Reimplemented from DWFToolkit::DWFPropertyContainer.

virtual _DWFTK_API void DWFToolkit::DWFPropertySet::addPropertySet DWFPropertySet pPropertySet  )  throw ( DWFException ) [virtual]
 

Add an existing property set to this set. This set will take ownership of the incoming set.

Parameters:
pPropertySet The property set to be added.
Exceptions:
DWFException 

virtual _DWFTK_API DWFPropertySet* DWFToolkit::DWFPropertySet::addPropertySet const DWFString zLabel = L""  )  throw ( DWFException ) [virtual]
 

Create and add a property set to this set. This set will own the new property set.

Parameters:
zLabel The option label for the property set.
Returns:
A pointer to the created property set.
Exceptions:
DWFException 
Examples:
WriteContent/WriteContent.cpp.

virtual _DWFTK_API DWFProperty::tIterator* DWFToolkit::DWFPropertySet::getAllProperties const DWFString zCategory,
bool  bSearchClosedSets = false
throw () [virtual]
 

Access all properties that this property set owns directly or indirectly in contained property sets, that occur in the given category.

Parameters:
zCategory The category within which to search.
bSearchClosedSets If false closed property sets will not be searched.
Returns:
A pointer to an iterator that must be deleted by the caller with the DWFCORE_FREE_OBJECT macro. This pointer may be NULL.
Exceptions:
None 

virtual _DWFTK_API DWFProperty::tIterator* DWFToolkit::DWFPropertySet::getAllProperties bool  bSearchClosedSets = false  )  throw () [virtual]
 

Access all properties that this property set owns directly or indirectly in contained property sets.

Parameters:
bSearchClosedSets If false closed property sets will not be searched.
Returns:
A pointer to an iterator that must be deleted by the caller with the DWFCORE_FREE_OBJECT macro. This pointer may be NULL.
Exceptions:
None 

_DWFTK_API DWFContent* DWFToolkit::DWFPropertySet::getContent  )  const throw () [inline]
 

Determine which content this set is associated with.

Exceptions:
None 

Definition at line 433 of file PropertySet.h.

_DWFTK_API const DWFString& DWFToolkit::DWFPropertySet::getLabel  )  const throw () [inline]
 

Get the associated label.

Returns:
A string representing the label.
Exceptions:
None 

Definition at line 150 of file PropertySet.h.

_DWFTK_API DWFPropertySet* DWFToolkit::DWFPropertySet::getParentSet  )  const throw () [inline]
 

get the parent.

Returns:
Pointer to the parent property set.
Exceptions:
None 

Definition at line 459 of file PropertySet.h.

virtual _DWFTK_API const DWFProperty* DWFToolkit::DWFPropertySet::getProperty const DWFString zID,
const DWFString zName,
const DWFString zCategory,
teQueryIDType  eIDType = eSchemaID
throw () [virtual]
 

Find a property with the given name and category, in a subset with a specific UUID or schema ID.

Parameters:
zID The Schema ID or UUID of the property set to be searched.
zName The property name.
zCategory The category of the property. The empty string is a valid category name.
eIDType Determines whether to get the property set based on schema ID or UUID.
Returns:
A pointer to the property if found, NULL otherwise.
Exceptions:
None 

virtual _DWFTK_API const DWFProperty* DWFToolkit::DWFPropertySet::getProperty const DWFString zName,
const DWFString zCategory = L"",
bool  bSearchClosedSets = false
throw ( DWFException ) [virtual]
 

Find a property with the given name and category, in this set or in contained or referenced subsets.

Parameters:
zName The property name.
zCategory The category of the property. The empty string is a valid category name.
bSearchClosedSets By default closed property sets will not be searched.
Returns:
A pointer to the property if found, NULL otherwise.
Exceptions:
None 

virtual _DWFTK_API DWFPropertySet* DWFToolkit::DWFPropertySet::getPropertySet const DWFString zID,
teQueryIDType  eIDType = eSchemaID
const throw () [virtual]
 

Find the property set with the property set ID. This will recursively search contained property sets unless told not to.

Parameters:
zID The unique ID or the schema id of the set being requested.
eIDType This determines whether to query using the unique id or the schema id.
Returns:
A pointer to a property set, or NULL if not found.
Exceptions:
None 

virtual _DWFTK_API DWFPropertySet::tIterator* DWFToolkit::DWFPropertySet::getPropertySets bool  bReturnClosedSets = false  )  throw () [virtual]
 

Access all property sets contained directly in this property set. The search is done in BFS order, i.e. all sets at a given level will be returned before the sets they contain.

Parameters:
bReturnClosedSets If false closed property sets will not be returned.
Returns:
A pointer to an iterator that must be deleted by the caller with the DWFCORE_FREE_OBJECT macro. This pointer may be NULL.
Exceptions:
None 

_DWFTK_API const DWFString& DWFToolkit::DWFPropertySet::getSchemaID  )  const throw () [inline]
 

Get the property schema ID. A set is given this ID to specify that is conforms to a publicly known schema. This is not necessarily unique, unlike the ID returned by id().

Returns:
The property set's schema ID.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFXDWFProperties.

Definition at line 178 of file PropertySet.h.

_DWFTK_API const DWFString& DWFToolkit::DWFPropertySet::getSetID  )  const throw () [inline]
 

Get the property set ID. This is not unique, unlike the ID returned by id(). Multiple sets can have the same property set ID. The property set ID is used to scope property set queries. For example suppose a number of content elements have many property sets, and each has one property set with same set ID. We can query the each element for their properties, scoping the query to only the given property set. This is is useful in cases where we are interested in a specific subset of all available properties on the set owner.

Returns:
The property set's set ID.
Exceptions:
None 

Definition at line 210 of file PropertySet.h.

virtual _DWFTK_API void DWFToolkit::DWFPropertySet::identify const DWFString zID  )  throw () [inline, protected, virtual]
 

For internal use only.

Assigns a transient UUID. This method is only intended for internal use within parseAttributeList().

Parameters:
zID The UUID to assign.
Exceptions:
None 

Reimplemented from DWFToolkit::DWFPropertyContainer.

Definition at line 508 of file PropertySet.h.

_DWFTK_API bool DWFToolkit::DWFPropertySet::isClosed  )  const throw () [inline]
 

Determine whether or not the set is closed.

Returns:
True if the set is closed.
Exceptions:
None 

Definition at line 237 of file PropertySet.h.

virtual _DWFTK_API void DWFToolkit::DWFPropertySet::parseAttributeList const char **  ppAttributeList,
tUnresolvedList &  rUnresolved
throw ( DWFException ) [virtual]
 

virtual _DWFTK_API void DWFToolkit::DWFPropertySet::parseAttributeList const char **   )  throw ( DWFException ) [inline, virtual]
 

For internal use only.

For the PropertySet use the overload parseAttributeList( const char** ppAttributeList, tUnresolvedList& rUnresolved )

Definition at line 403 of file PropertySet.h.

virtual _DWFTK_API void DWFToolkit::DWFPropertySet::referencePropertyContainer const DWFPropertyContainer rPropertySet  )  throw ( DWFException ) [virtual]
 

For property sets referencePropertySet() should be used rather than this call. Inserts another property container directly into the container. This cannot enforce compile time type checking, but it will throw an exception if the container added is not a DWFPropertySet derived class. This has been kept here for backwards compatibility in other parts of the code.

Parameters:
rPropertySet The property set to add to this container (must not be NULL). This pointer will be owned by this container and deleted using the DWFCORE_FREE_OBJECT.
Exceptions:
DWFException is thrown if the container is not a DWFPropertySet derived class.

Reimplemented from DWFToolkit::DWFPropertyContainer.

Examples:
WriteContent/WriteContent.cpp.

virtual _DWFTK_API void DWFToolkit::DWFPropertySet::referencePropertySet DWFPropertySet pPropertySet  )  throw ( DWFException ) [virtual]
 

Add a reference to an existing property set. This set will not take ownership of the incoming set.

Parameters:
pPropertySet The property set to be referenced.
Exceptions:
DWFException 

_DWFTK_API void DWFToolkit::DWFPropertySet::setClosed const DWFString zSetID  )  throw ( DWFException )
 

Make the property set closed. Every closed set is required to have a Set ID, so that it can be access by this ID.

Parameters:
zSetID The Set ID of the property set.
Exceptions:
DWFException. 
Examples:
WriteContent/WriteContent.cpp.

_DWFTK_API void DWFToolkit::DWFPropertySet::setContent DWFContent pContent  )  throw ()
 

This is mainly for internal use to set the content in which the property resides directly in the collection of shared property sets, or indirectly as a contained property set of a content element or another property set.

Parameters:
pContent The associated content
Exceptions:
None 

_DWFTK_API void DWFToolkit::DWFPropertySet::setLabel const DWFString zLabel = L""  )  throw () [inline]
 

Set the label.

Parameters:
zLabel The new label.
Exceptions:
None 

Definition at line 163 of file PropertySet.h.

_DWFTK_API void DWFToolkit::DWFPropertySet::setParentSet DWFPropertySet pParent  )  throw () [inline]
 

Set the parent.

Parameters:
pParent The parent property set.
Exceptions:
None 

Definition at line 446 of file PropertySet.h.

_DWFTK_API void DWFToolkit::DWFPropertySet::setSchemaID const DWFString zSchemaID  )  throw () [inline]
 

Set the schema identifier for this set.

Exceptions:
None 
Examples:
WriteContent/WriteContent.cpp.

Definition at line 190 of file PropertySet.h.

_DWFTK_API void DWFToolkit::DWFPropertySet::setSetID const DWFString zSetID  )  throw () [inline]
 

Set the set identifier, for various usage modes that require multiple sets to have a common way of grouping them. This should not be confused with the ID returned by id() which is always unique. Multiple sets may have the same set ID.

Exceptions:
None 

Definition at line 224 of file PropertySet.h.

_DWFTK_API void DWFToolkit::DWFPropertySet::unsetClosed  )  throw () [inline]
 

Make the property set open. This will not remove the Set ID, if it has one. The Set ID can be reset using the setSetID() call.

Exceptions:
None 

Definition at line 261 of file PropertySet.h.


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