- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# AccessorFactory< AccessorType > Class Template Reference

Search for all occurrences

## Detailed 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" );

`#include <adskDataAccessor.h>`

Inheritance diagram for AccessorFactory< AccessorType >:
[legend]

List of all members.

## Public Member Functions
virtual std::auto_ptr< Accessor > | create () const
| Returns a factory for creating accessors handling the supported file type.

## Member Function Documentation

virtual std::auto_ptr< Accessor > create | ( |  | ) | const`[inline, virtual]`

Search for all occurrences

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.