V-Gears 0
Free Final Fantasy VII engine.
VGears::TexCodec Class Reference

Handles text encoding from font images. More...

#include <VGearsTexCodec.h>

Inheritance diagram for VGears::TexCodec:
Collaboration diagram for VGears::TexCodec:

Public Member Functions

 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 Public Member Functions

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...
 

Static Public Attributes

static Ogre::String TYPE_NAME
 The codec type name. More...
 

Static Private Attributes

static TexCodectex_codec_
 The text codec. More...
 

Detailed Description

Handles text encoding from font images.

Constructor & Destructor Documentation

◆ TexCodec()

VGears::TexCodec::TexCodec ( )

Constructor.

◆ ~TexCodec()

VGears::TexCodec::~TexCodec ( )
virtual

Destructor.

Member Function Documentation

◆ decode()

Codec::DecodeResult VGears::TexCodec::decode ( Ogre::DataStreamPtr &  input) const

Decodes data.

Parameters
[in]inputData to encode.
Returns
Decoded data.

◆ encode()

Ogre::DataStreamPtr VGears::TexCodec::encode ( Ogre::MemoryDataStreamPtr &  input,
CodecDataPtr &  output 
) const
finalvirtual

Encodes data.

Unimplemented, not required.

Parameters
[in]inputData to encode.
[out]outputEncoded 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]inputData to encode.
[in]outputNome for the file with the encoded data.
[in]extraExtra 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_numberPointer 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_bytesThe 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.

Member Data Documentation

◆ tex_codec_

TexCodec * VGears::TexCodec::tex_codec_
staticprivate

The text codec.

◆ TYPE_NAME

String VGears::TexCodec::TYPE_NAME
static

The codec type name.


The documentation for this class was generated from the following files: