GeResource Class Reference

#include <c4d_resource.h>

详细描述

This class allows to access resource files on the hard drive, for example to load dialog resources or to access string tables.

公共成员函数

  GeResource ()
  ~GeResource ()
Bool   Init ()
Bool   Init (const Filename &path, Bool regardIsStopped=true)
Bool   InitAsGlobal ()
const String LoadString ( Int32 id)
Bool   ReloadResource ()
void  Free ()
LocalResource *  Get ()

Private Attributes

class LocalResource *  lr
Bool   state
Bool   glob
Filename initfn
Bool   _regardIsStopped

构造函数 & 析构函数文档编制

◆  GeResource()

GeResource ( )

Default constructor.

◆  ~GeResource()

~ GeResource ( )

Default destructor.

成员函数文档编制

◆  Init() [1/2]

Bool Init ( )

Initializes the resources from the default folder of the plugin.

返回
true successful, otherwise false .

◆  Init() [2/2]

Bool Init ( const Filename path ,
Bool   regardIsStopped = true  
)

Initializes the resources from their files in the 'res' 文件夹。

参数
[in] path The root path of the plugin's directory to find the 'res' 文件夹。
[in] regardIsStopped Internal .
返回
true successful, otherwise false .

◆  InitAsGlobal()

Bool InitAsGlobal ( )

Lets access the Cinema 4D main application string resource.

返回
true successful, otherwise false .

◆  LoadString()

const String & LoadString ( Int32   id )

Loads a string from the string resource file.

参数
[in] id The ID for the string in the resource file.
返回
The string from the resource file for the passed ID.

◆  ReloadResource()

Bool ReloadResource ( )

Private .

◆  Free()

void Free ( )

Frees all resources used by the class and sets the internal pointer to nullptr .

注意
Init() needs to be called before the object can be used again.

◆  Get()

LocalResource* Get ( )

Gets the main program's resource.

返回
The internal Cinema 4D resource. Cinema 4D owns the pointed resource.

Member Data Documentation

◆  lr

class LocalResource* lr private

◆  state

Bool state
private

◆  glob

Bool glob
private

◆  initfn

Filename * initfn
private

◆  _regardIsStopped

Bool _regardIsStopped
private