Handles text encoding from font images.
More...
#include <VGearsTexCodec.h>
|
| TexCodec () |
| Constructor. More...
|
|
virtual | ~TexCodec () |
| Destructor. More...
|
|
virtual Ogre::String | getType () const |
| Retrieves the codec type. More...
|
|
virtual Ogre::DataStreamPtr | encode (Ogre::MemoryDataStreamPtr &input, CodecDataPtr &output) const final |
| Encodes data. More...
|
|
virtual void | encodeToFile (Ogre::MemoryDataStreamPtr &input, const Ogre::String &output, CodecDataPtr &extra) const final |
| Encodes data to a file. More...
|
|
Ogre::Codec::DecodeResult | decode (Ogre::DataStreamPtr &input) const |
| Decodes data. More...
|
|
virtual Ogre::String | magicNumberToFileExt (const char *magic_number, size_t max_bytes) const |
| Maps a magic number header to a file extension. More...
|
|
|
static void | install () |
| Perform the plugin initial installation sequence. More...
|
|
static void | initialise () |
| Perform any tasks the plugin needs to perform initialization. More...
|
|
static void | shutdown () |
| Perform any tasks the needed when the system is shut down. More...
|
|
static void | uninstall () |
| Perform the final plugin uninstallation sequence. More...
|
|
Handles text encoding from font images.
◆ TexCodec()
VGears::TexCodec::TexCodec |
( |
| ) |
|
◆ ~TexCodec()
VGears::TexCodec::~TexCodec |
( |
| ) |
|
|
virtual |
◆ decode()
Codec::DecodeResult VGears::TexCodec::decode |
( |
Ogre::DataStreamPtr & |
input | ) |
const |
Decodes data.
- Parameters
-
- Returns
- Decoded data.
◆ encode()
Ogre::DataStreamPtr VGears::TexCodec::encode |
( |
Ogre::MemoryDataStreamPtr & |
input, |
|
|
CodecDataPtr & |
output |
|
) |
| const |
|
finalvirtual |
Encodes data.
Unimplemented, not required.
- Parameters
-
[in] | input | Data to encode. |
[out] | output | Encoded data. |
◆ encodeToFile()
void VGears::TexCodec::encodeToFile |
( |
Ogre::MemoryDataStreamPtr & |
input, |
|
|
const Ogre::String & |
output, |
|
|
CodecDataPtr & |
extra |
|
) |
| const |
|
finalvirtual |
Encodes data to a file.
Unimplemented, not required.
- Parameters
-
[in] | input | Data to encode. |
[in] | output | Nome for the file with the encoded data. |
[in] | extra | Extra information for the encoder. |
◆ getType()
String VGears::TexCodec::getType |
( |
void |
| ) |
const |
|
virtual |
Retrieves the codec type.
- Returns
- The codec type.
◆ initialise()
void VGears::TexCodec::initialise |
( |
| ) |
|
|
static |
Perform any tasks the plugin needs to perform initialization.
An implementation must be supplied for this method. It is called just after the system is fully initialised (either after Root::initialise if a window is created then, or after the first window is created) and therefore all rendersystem functionality is available at this time. You can use this hook to create any resources which are dependent on a rendersystem or have rendersystem-specific implementations.
◆ install()
void VGears::TexCodec::install |
( |
| ) |
|
|
static |
Perform the plugin initial installation sequence.
An implementation must be supplied for this method. It must perform the startup tasks necessary to install any rende rsystem customizations or anything else that is not dependent on system initialization, ie only dependent on the core of Ogre. It must not perform any operations that would create rendersystem-specific objects at this stage, that should be done in {
- See also
- initialise()}.
◆ magicNumberToFileExt()
String VGears::TexCodec::magicNumberToFileExt |
( |
const char * |
magic_number, |
|
|
size_t |
max_bytes |
|
) |
| const |
|
virtual |
Maps a magic number header to a file extension.
- Parameters
-
[in] | magic_number | Pointer to a stream of bytes which should identify the file. Note that this may be more than needed - each codec may be looking for a different size magic number. |
[in] | max_bytes | The number of bytes passed. |
- Returns
- A blank string if the magic number was unknown, or a file extension.
◆ shutdown()
void VGears::TexCodec::shutdown |
( |
| ) |
|
|
static |
Perform any tasks the needed when the system is shut down.
An implementation must be supplied for this method. This method is called just before key parts of the system are unloaded, such as rendersystems being shut down. This hook should be used to free up resources and decouple custom objects from the OGRE system, whilst all the instances of other plugins (e.g. rendersystems) still exist.
◆ uninstall()
void VGears::TexCodec::uninstall |
( |
| ) |
|
|
static |
Perform the final plugin uninstallation sequence.
An implementation must be supplied for this method. It must perform the cleanup tasks which haven't already been performed in shutdown() (e.g. final deletion of custom instances,if they are kept around in case the system was reinitialised). At this stage it can't be guaranteed what other plugins are still loaded or active. It must therefore not perform any operations that would reference any rendersystem-specific objects - those should have been sorted out in the 'shutdown' method.
◆ tex_codec_
◆ TYPE_NAME
String VGears::TexCodec::TYPE_NAME |
|
static |
The documentation for this class was generated from the following files: