soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
ITranslator Struct Reference

Language Translation Interface. More...

#include <STranslator-i.h>

Inheritance diagram for ITranslator:
IObjRef

Public Member Functions

long AddRef () PURE
 Increments the reference count.
 
long Release () PURE
 Decrements the reference count.
 
void OnFinalRelease () PURE
 Finalizes the release of the object.
 
BOOL Load (LPVOID pData, UINT uType) PURE
 Loads language translation data from a resource.
 
void GetName (wchar_t szBuf[TR_MAX_NAME_LEN]) SCONST PURE
 Retrieves the name of the translation resource.
 
void GetNameA (IStringA *str) SCONST PURE
 Retrieves the name of the translation resource.
 
BOOL NameEqual (LPCWSTR pszName) SCONST PURE
 Compares the translation resource name.
 
BOOL NameEqualA (const IStringA *str) SCONST PURE
 Compares the translation resource name.
 
GUID guid () SCONST PURE
 Retrieves the GUID of the translation resource.
 
int tr (const IStringW *strSrc, const IStringW *strCtx, wchar_t *pszOut, int nLen) SCONST PURE
 Translates a string.
 
void getFontInfo (IStringW *strFont) SCONST PURE
 Retrieves the default font information for translation.
 
- Public Member Functions inherited from IObjRef
long AddRef () PURE
 Increases the reference count.
 
long Release () PURE
 Decreases the reference count.
 
void OnFinalRelease () PURE
 Called when the reference count reaches zero and the object is about to be released.
 

Detailed Description

Language Translation Interface.

This interface defines the methods for language translation.

Definition at line 22 of file STranslator-i.h.

Member Function Documentation

◆ AddRef()

long ITranslator::AddRef ( )

Increments the reference count.

Returns
The new reference count.

◆ getFontInfo()

void ITranslator::getFontInfo ( IStringW * strFont)

Retrieves the default font information for translation.

Parameters
strFontPointer to the IStringW object to receive the font information.
Returns
void

◆ GetName()

void ITranslator::GetName ( wchar_t szBuf[TR_MAX_NAME_LEN])

Retrieves the name of the translation resource.

Parameters
szBufBuffer to receive the translation resource name.
Returns
void

◆ GetNameA()

void ITranslator::GetNameA ( IStringA * str)

Retrieves the name of the translation resource.

Parameters
strPointer to the IStringA object to receive the translation resource name.
Returns
void

◆ guid()

GUID ITranslator::guid ( )

Retrieves the GUID of the translation resource.

Returns
GUID of the translation resource.

◆ Load()

BOOL ITranslator::Load ( LPVOID pData,
UINT uType )

Loads language translation data from a resource.

Parameters
pDataPointer to the resource data, interpretation depends on the implementation.
uTypeType of the resource, interpretation depends on the implementation.
Returns
TRUE if loading is successful, FALSE otherwise.

◆ NameEqual()

BOOL ITranslator::NameEqual ( LPCWSTR pszName)

Compares the translation resource name.

Parameters
pszNameTranslation resource name to compare.
Returns
TRUE if the names are the same, FALSE otherwise.

◆ NameEqualA()

BOOL ITranslator::NameEqualA ( const IStringA * str)

Compares the translation resource name.

Parameters
strPointer to the IStringA object containing the translation resource name to compare.
Returns
TRUE if the names are the same, FALSE otherwise.

◆ OnFinalRelease()

void ITranslator::OnFinalRelease ( )

Finalizes the release of the object.

Returns
void

◆ Release()

long ITranslator::Release ( )

Decrements the reference count.

Returns
The new reference count.

◆ tr()

int ITranslator::tr ( const IStringW * strSrc,
const IStringW * strCtx,
wchar_t * pszOut,
int nLen )

Translates a string.

Parameters
strSrcPointer to the IStringW object containing the source string.
strCtxPointer to the IStringW object containing the translation context.
pszOutBuffer to receive the translated string.
nLenLength of the buffer.
Returns
Length of the translated string, 0 if no translation, -1 if buffer size is not enough.

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