Open Search
    GeResource Class Reference

    #include <c4d_resource.h>

    Detailed Description

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

    Public Member Functions

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

    Private Attributes

    class LocalResource * lr
     
    Bool state
     
    Bool glob
     
    Filenameinitfn
     
    Bool _regardIsStopped
     

    Constructor & Destructor Documentation

    ◆ GeResource()

    Default constructor.

    ◆ ~GeResource()

    ~GeResource ( )

    Default destructor.

    Member Function Documentation

    ◆ Init() [1/2]

    Bool Init ( )

    Initializes the resources from the default folder of the plugin.

    Returns
    true successful, otherwise false.

    ◆ Init() [2/2]

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

    Initializes the resources from their files in the 'res' folder.

    Parameters
    [in]pathThe root path of the plugin's directory to find the 'res' folder.
    [in]regardIsStoppedInternal.
    Returns
    true successful, otherwise false.

    ◆ InitAsGlobal()

    Bool InitAsGlobal ( )

    Lets access the Cinema 4D main application string resource.

    Returns
    true successful, otherwise false.

    ◆ LoadString()

    const String& LoadString ( Int32  id)

    Loads a string from the string resource file.

    Parameters
    [in]idThe ID for the string in the resource file.
    Returns
    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.

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

    ◆ Get()

    LocalResource* Get ( )

    Gets the main program's resource.

    Returns
    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