#include <typechain.hh>
Use it's static methods for registering and unregistering type/encoding handlers (TypeHandler), and for processing data according to typechain identifiers. Typechain is described in more detail in the Virtual Object System manual (see http://interreality.org/doc/manual/html)
methods that operate on streams
support "?" (unknown type): if type is unknown (no type identifier given), attempt to find a magic number or otherwise guess the datatype, and re-decode until next type in typestring (or an unknown type) is reached.
Definition at line 68 of file typechain.hh.
|
Definition at line 333 of file typechain.cc. |
|
Decode data, with no params list.
Definition at line 136 of file typechain.hh. |
|
Decode data (stored in a string) according to a type identifier. For each unit in the type identifier, the first type handler in the handlers list is
Definition at line 235 of file typechain.cc. Referenced by Property::checkDecoded(), main(), and FileProperty::read(). |
|
Unregister a type handler, and also delete it: it will be removed from internal list, and the C++ handler object will be destroyed with 'delete'.
Definition at line 265 of file typechain.cc. |
|
Encode data, with no params list.
Definition at line 152 of file typechain.hh. |
|
Encode data according to type identifier, analagous to decode.
Definition at line 244 of file typechain.cc. Referenced by main(). |
|
Guess at the type of a file, given the filename with an abbreviated extension, based on currently registered set of type handlers.
Definition at line 278 of file typechain.cc. Referenced by main(). |
|
Initialize plugins.
Definition at line 189 of file typechain.cc. |
|
Initialize plugins. Scans the plugins directory and loads (or schedules for later loading) dynamically loadable libraries whose names match a certain form. The plugin libraries should be named like this: Plugins should have a void function with no arguments named plugin_init(), which should call TypeChain::registerHandler().
Definition at line 183 of file typechain.cc. Referenced by main(). |
|
Construct useful filename from type.
Definition at line 297 of file typechain.cc. Referenced by main(). |
|
Register a type handler. If it already exists, it will be replaced.
Definition at line 250 of file typechain.cc. Referenced by initialize(). |
|
Unregister a type handler (remove from internal list).
Definition at line 258 of file typechain.cc. |
|
Uninitialize typechain: all handlers are deleted and DLL's are closed.
Definition at line 212 of file typechain.cc. Referenced by main(). |
|
internal list of abbreviated type names for filename "extensions" and type names: used by guessTypeFromFilename().
Definition at line 180 of file typechain.cc. Referenced by guessTypeFromFilename(), registerHandler(), and uninitialize(). |
|
the internal handlers list, which is a map<string, TypeHandler*>. If a key exists, but the type handler is a PluginPlaceholder, that means that the handler was detected as a plugin, but not loaded.
Definition at line 179 of file typechain.cc. Referenced by deleteHandler(), registerHandler(), removeHandler(), and uninitialize(). |