Drag[en]gine Game Engine  1.0
deLanguagePack Class Reference

Language Pack. More...

#include <deLanguagePack.h>

Inheritance diagram for deLanguagePack:
deFileResource deResource deObject

Public Member Functions

Management
const decUnicodeStringGetName () const
 
void SetName (const decUnicodeString &name)
 
const decUnicodeStringGetDescription () const
 
void SetDescription (const decUnicodeString &description)
 
const decUnicodeStringGetMissingText () const
 
void SetMissingText (const decUnicodeString &missingText)
 
Entries
int GetEntryCount () const
 
deLanguagePackEntryGetEntryAt (int index) const
 
deLanguagePackEntryGetEntryNamed (const char *name) const
 
int FindEntry (deLanguagePackEntry *entry) const
 
bool HasEntry (deLanguagePackEntry *entry) const
 
bool HasEntryNamed (const char *name) const
 
void AddEntry (deLanguagePackEntry *entry)
 
void RemoveEntry (deLanguagePackEntry *entry)
 
void RemoveAllEntries ()
 
- Public Member Functions inherited from deFileResource
deVirtualFileSystemGetVirtualFileSystem () const
 Virtual file system or NULL if build from memory. More...
 
const decStringGetFilename () const
 Filename or empty string if build from memory. More...
 
bool GetAsynchron () const
 Resource is asynchron. More...
 
void SetAsynchron (bool asynchron)
 Set if resource is asynchron. More...
 
 deFileResource (deResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename)
 Create file resource. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deLanguagePack (deLanguagePackManager *manager, deVirtualFileSystem *vfs, const char *filename)
 
virtual ~deLanguagePack ()
 Clean up translator section. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deFileResource
virtual ~deFileResource ()
 Clean up file resource. More...
 
- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Language Pack.

Provides translations from external files. A language pack contains a large list of entries which assign translations to a name. This list is not very optimal which is why the translator exists to fetch the translations from language packs organizing them in a section/entry list.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deLanguagePack()

deLanguagePack::deLanguagePack ( deLanguagePackManager manager,
deVirtualFileSystem vfs,
const char *  filename 
)

Creates a new translator section object.

◆ ~deLanguagePack()

virtual deLanguagePack::~deLanguagePack ( )
protectedvirtual

Clean up translator section.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddEntry()

void deLanguagePack::AddEntry ( deLanguagePackEntry entry)

Adds a new entry.

Referenced by GetEntryCount().

◆ FindEntry()

int deLanguagePack::FindEntry ( deLanguagePackEntry entry) const

Retrieves the index of the entry or -1 if not part of this translator.

Referenced by GetEntryCount().

◆ GetDescription()

const decUnicodeString& deLanguagePack::GetDescription ( ) const
inline

Retrieves the description in the native language.

References SetDescription().

◆ GetEntryAt()

deLanguagePackEntry* deLanguagePack::GetEntryAt ( int  index) const

Retrieves the entry at the given index.

Referenced by GetEntryCount().

◆ GetEntryCount()

int deLanguagePack::GetEntryCount ( ) const
inline

◆ GetEntryNamed()

deLanguagePackEntry* deLanguagePack::GetEntryNamed ( const char *  name) const

Retrieves the entry with the given name.

Referenced by GetEntryCount().

◆ GetMissingText()

const decUnicodeString& deLanguagePack::GetMissingText ( ) const
inline

Retrieves the missing text in the native language.

References SetMissingText().

◆ GetName()

const decUnicodeString& deLanguagePack::GetName ( ) const
inline

Retrieves the name in the native language.

References SetName().

◆ HasEntry()

bool deLanguagePack::HasEntry ( deLanguagePackEntry entry) const

Determines if the entry is part of this translator.

Referenced by GetEntryCount().

◆ HasEntryNamed()

bool deLanguagePack::HasEntryNamed ( const char *  name) const

Determines if the entry is part of this translator.

Referenced by GetEntryCount().

◆ RemoveAllEntries()

void deLanguagePack::RemoveAllEntries ( )

Removes all entries.

Referenced by GetEntryCount().

◆ RemoveEntry()

void deLanguagePack::RemoveEntry ( deLanguagePackEntry entry)

Removes a entry.

Referenced by GetEntryCount().

◆ SetDescription()

void deLanguagePack::SetDescription ( const decUnicodeString description)

Sets the description in the native language.

Referenced by GetDescription().

◆ SetMissingText()

void deLanguagePack::SetMissingText ( const decUnicodeString missingText)

Sets the description in the native language.

Referenced by GetMissingText().

◆ SetName()

void deLanguagePack::SetName ( const decUnicodeString name)

Sets the name in the native language.

Referenced by GetName().


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