Graphite  Version 3
An experimental 3D geometry processing program
OGF::Module Class Reference

Represents information associated with a module (i.e. a plugin). More...

#include <OGF/basic/modules/module.h>

Inheritance diagram for OGF::Module:
GEO::Counted

Public Member Functions

 Module ()
 Module constructor.
 
virtual ~Module ()
 Module destructor.
 
const std::string & name ()
 Gets the name of the module. More...
 
void set_name (const std::string &name_in)
 Sets the name of the module. More...
 
const std::string & vendor ()
 Gets the vendor of this module. More...
 
void set_vendor (const std::string &vendor_in)
 Sets the vendor of the module. More...
 
const std::string & version ()
 Gets the version string. More...
 
void set_version (const std::string &version_in)
 Sets the version of the module. More...
 
bool is_dynamic () const
 Tests whether this module is dynamic. More...
 
void set_is_dynamic (bool b)
 Sets the is_dynamic flag of this module. More...
 
bool is_system () const
 Tests whether this module belongs to the Graphite base system. More...
 
void set_is_system (bool x)
 Sets the is_system flag of this module. More...
 
const std::string & info ()
 Gets the information string. More...
 
void set_info (const std::string &info_in)
 Sets the information string associated with this module. More...
 
- Public Member Functions inherited from GEO::Counted
void ref () const
 Increments the reference count. More...
 
void unref () const
 Decrements the reference count. More...
 
bool is_shared () const
 Check if the object is shared. More...
 
int nb_refs () const
 Gets the number of references that point to this object. More...
 

Static Public Member Functions

static bool bind_module (const std::string &module_name, Module *module)
 Declares a Module object to the ModuleManager. More...
 
static bool unbind_module (const std::string &module_name)
 Removes a Module object from the ModuleManager. More...
 
static Moduleresolve_module (const std::string &module_name)
 Retreives a Module object by name. More...
 
- Static Public Member Functions inherited from GEO::Counted
static void ref (const Counted *counted)
 Increments the reference count. More...
 
static void unref (const Counted *counted)
 Decrements the reference count. More...
 

Additional Inherited Members

- Protected Member Functions inherited from GEO::Counted
 Counted ()
 Creates a reference counted object. More...
 
virtual ~Counted ()
 Destroys a reference counted object. More...
 

Detailed Description

Represents information associated with a module (i.e. a plugin).

Definition at line 57 of file module.h.

Member Function Documentation

◆ bind_module()

static bool OGF::Module::bind_module ( const std::string &  module_name,
Module module 
)
static

Declares a Module object to the ModuleManager.

Ownership of the module object is transfered to the module manager.

Parameters
[in]module_namename of the module
[in]modulea pointer to the module object
Return values
trueif the module could be successfully bound
falseotherwise (e.g. if a module with the same name was already bound)

◆ info()

const std::string& OGF::Module::info ( )
inline

Gets the information string.

Returns
a string that gives a short description of the functionalities implemented in a plugin.

Definition at line 180 of file module.h.

◆ is_dynamic()

bool OGF::Module::is_dynamic ( ) const
inline

Tests whether this module is dynamic.

Dynamic modules are those that are loaded on-demand by Graphite, i.e. those that are not linked with Graphite.

Definition at line 137 of file module.h.

◆ is_system()

bool OGF::Module::is_system ( ) const
inline

Tests whether this module belongs to the Graphite base system.

Return values
trueif this module is a system module
falseotherwise

Definition at line 159 of file module.h.

◆ name()

const std::string& OGF::Module::name ( )
inline

Gets the name of the module.

Returns
a const reference to the name of the module.

Definition at line 75 of file module.h.

◆ resolve_module()

static Module* OGF::Module::resolve_module ( const std::string &  module_name)
static

Retreives a Module object by name.

Parameters
[in]module_namename of the module
Returns
the module object associated with module_name if it exists, nil otherwise

◆ set_info()

void OGF::Module::set_info ( const std::string &  info_in)
inline

Sets the information string associated with this module.

Parameters
[in]info_inthe information string

This function is not meant to be used by client code. It is called automatically in the initializer of the module.

Definition at line 192 of file module.h.

◆ set_is_dynamic()

void OGF::Module::set_is_dynamic ( bool  b)
inline

Sets the is_dynamic flag of this module.

Parameters
[in]bthe is_dynamic flag

This function is not meant to be used by client code. It is called automatically in the initializer of the module.

See also
is_dynamic

Definition at line 149 of file module.h.

◆ set_is_system()

void OGF::Module::set_is_system ( bool  x)
inline

Sets the is_system flag of this module.

Parameters
[in]xthe is_system flag

This function is not meant to be used by client code. It is called automatically in the initializer of the module.

See also
is_system

Definition at line 171 of file module.h.

◆ set_name()

void OGF::Module::set_name ( const std::string &  name_in)
inline

Sets the name of the module.

Parameters
[in]name_inthe name of the module

This function is not meant to be used by client code. It is called automatically in the initializer of the module.

Definition at line 86 of file module.h.

◆ set_vendor()

void OGF::Module::set_vendor ( const std::string &  vendor_in)
inline

Sets the vendor of the module.

Parameters
[in]vendor_inthe name of the module's vendor

This function is not meant to be used by client code. It is called automatically in the initializer of the module.

Definition at line 107 of file module.h.

◆ set_version()

void OGF::Module::set_version ( const std::string &  version_in)
inline

Sets the version of the module.

Parameters
[in]version_ina string that represents the version of the module

This function is not meant to be used by client code. It is called automatically in the initializer of the module.

Definition at line 127 of file module.h.

◆ unbind_module()

static bool OGF::Module::unbind_module ( const std::string &  module_name)
static

Removes a Module object from the ModuleManager.

Parameters
[in]module_namename of the module.
Return values
trueif the module could be successfully unbound
falseotherwise (e.g. if no module of that name was found in the ModuleManager)

◆ vendor()

const std::string& OGF::Module::vendor ( )
inline

Gets the vendor of this module.

Returns
a string with the name of the vendor of this module (usually "OGF" for "Open Graphics Foundation")

Definition at line 96 of file module.h.

◆ version()

const std::string& OGF::Module::version ( )
inline

Gets the version string.

Returns
a string that encodes the version of this module.

Definition at line 115 of file module.h.


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