|
imebra
build 2011-09-18_22-24-41
|
This class maintains a list of the available codecs. More...
#include <codecFactory.h>
Public Member Functions | |
| void | registerCodec (ptr< codec > pCodec) |
| Register a new codec. | |
| ptr< dataSet > | load (ptr< streamReader > pStream, imbxUint32 maxSizeBufferLoad=0xffffffff) |
| Build a dataSet structure from the specified stream of data. | |
Static Public Member Functions | |
| static ptr< codec > | getCodec (std::wstring transferSyntax) |
| Get a pointer to the codec that can handle the requested transfer syntax. | |
| static ptr< codecFactory > | getCodecFactory () |
| Retrieve the only reference to the codecFactory instance. | |
This class maintains a list of the available codecs.
It is used to retrieve the right codec when the transfer syntax is known, or to automatically select the right codec that can parse the specified stream of data.
An instance of this class is automatically allocated by the library and can be retrieved using the static function codecFactory::getCodecFactory().
| ptr< codec > puntoexe::imebra::codecs::codecFactory::getCodec | ( | std::wstring | transferSyntax | ) | [static] |
Get a pointer to the codec that can handle the requested transfer syntax.
All the registered codecs are queried until the codec that can handle the specified transfer syntax replies.
A new instance of the requested codec is allocated and its pointer is returned.
| transferSyntax | a string with the requested transfer syntax. |
| ptr< codecFactory > puntoexe::imebra::codecs::codecFactory::getCodecFactory | ( | ) | [static] |
Retrieve the only reference to the codecFactory instance.
An instance of codecFactory class is statically allocated by the imebra framework.
The applications should use only the statically allocated instance of codecFactory.
| ptr< dataSet > puntoexe::imebra::codecs::codecFactory::load | ( | ptr< streamReader > | pStream, |
| imbxUint32 | maxSizeBufferLoad = 0xffffffff |
||
| ) |
Build a dataSet structure from the specified stream of data.
The function selects automatically the codec that can read the specified stream.
| pStream | the stream that contain the data to be parsed |
| maxSizeBufferLoad | if a loaded buffer exceedes the size in the parameter then it is not loaded immediatly but it will be loaded on demand. Some codecs may ignore this parameter. Set to 0xffffffff to load all the buffers immediatly |
Register a new codec.
This function is called by the framework during the library's startup, in order to register all the imebra codecs. The codecs distributed with the imebra library are automatically registered.
| pCodec | a pointer to the codec to register |