AccessorFactory< AccessorType > Class Template Reference

AccessorFactory< AccessorType > Class Template Reference

#include <adskDataAccessor.h>

Class Description

template<typename AccessorType>
class adsk::Data::AccessorFactory< AccessorType >

Calls the specified Accessor type's default constructor.

Accessor factories automatically register themselves upon construction and deregister themselves upon destruction. So the creator of a factory must maintain it in-scope as long as the factory for the supported file extension(s) is needed. Typically, this will be a file-scope variable declared with the accessor implementation.

For example (in myAccessor.cpp), to support *.myext files:

class MyAccessor : public adsk::Data::Accessor { ... };

adsk::Data::AccessorFactory< MyAccessor > myFactory( "myext" );

+ Inheritance diagram for AccessorFactory< AccessorType >:

Public Member Functions

virtual std::auto_ptr< Accessorcreate () const
 Returns a factory for creating accessors handling the supported file type. More...
 
- Public Member Functions inherited from AccessorFactoryBase
virtual ~AccessorFactoryBase ()
 Unregisters the factory.
 

Additional Inherited Members

- Protected Member Functions inherited from AccessorFactoryBase
 AccessorFactoryBase (const std::string &fileNameExtension)
 Registers the factory. More...
 

Member Function Documentation

virtual std::auto_ptr< Accessor > create ( ) const
inlinevirtual

Returns a factory for creating accessors handling the supported file type.

Returns
A new accessor for the file type supported by the concrete factory.

Implements AccessorFactoryBase.


The documentation for this class was generated from the following file:
  • adskDataAccessor.h