Shiokaze Framework
A research-oriented fluid solver for computer graphics
module Class Reference

Module class. More...

#include <module.h>

Inheritance diagram for module:
credit messageable recursive_configurable_module array_core2 array_core3 camera2_interface camera3_interface cellmesher2_interface cellmesher3_interface environment_interface graphics_interface graphplotter_interface gridutility2_interface gridutility3_interface gridvisualizer2_interface gridvisualizer3_interface image_io_interface loop_splitter macadvection2_interface macadvection3_interface macbackwardflip2_interface macbackwardflip3_interface macflip2_interface macflip3_interface maclevelsetsurfacetracker2_interface maclevelsetsurfacetracker3_interface macproject2_interface macproject3_interface macstats2_interface macstats3_interface macutility2_interface macutility3_interface macvisualizer2_interface macvisualizer3_interface meshexporter3_interface meshlevelset_interface meshutility2_interface meshutility3_interface ordering_core parallel_core particlerasterizer2_interface particlerasterizer3_interface pointgridhash2_interface pointgridhash3_interface polygon3_interface RCMatrix_factory_interface< N, T > RCMatrix_solver_interface< N, T > redistancer2_interface redistancer3_interface rigidworld2_interface rigidworld3_interface runnable sysstats_interface timestepper_interface

Public Member Functions

 module ()
 Default constructor for module.
 
virtual ~module ()
 Default destructor for module.
 
virtual std::string get_module_name () const
 Get the module name. More...
 
- Public Member Functions inherited from credit
 credit ()=default
 Default constructor.
 
 credit (std::string name, std::string argument_name)
 Constructor for credit. More...
 
virtual void set_name (std::string name, std::string argument_name="")
 Set name (and perhaps, argument name together) More...
 
virtual std::string get_name () const
 Get the name.
 
virtual void set_argument_name (std::string argument_name)
 Set an argument name. More...
 
virtual std::string get_argument_name () const
 Get an argument name. More...
 
virtual double get_version () const
 Get version. More...
 
virtual std::string get_author () const
 Get author's name. More...
 
virtual std::tuple< int, int, int > get_date () const
 Get currently set date. More...
 
virtual std::string get_email_address () const
 Get email address. More...
 
- Public Member Functions inherited from messageable
virtual bool send_message (std::string message, void *ptr=nullptr)
 Send a message. More...
 
virtual bool const_send_message (std::string message, void *ptr=nullptr) const
 Send a message. More...
 

Static Public Member Functions

static std::string module_libpath (std::string module_name)
 Get the path to the dynamic library. e.g., "mylib" -> "symlink-public/lib/libshiokaze_mylib.dylib". More...
 
static modulealloc_module (configuration &config, std::string arg_name, std::string default_module_name, std::string description)
 Automatically reads the parameter "arg_name" to fetch the name for the library, and allocate the library. More...
 
static modulealloc_module (std::string path)
 Reads the dynamic library of a class module, allocate, and return the pointer to it. More...
 
static unsigned close_all_handles ()
 Close all the handles that are still unloaded. More...
 
template<class T >
static std::unique_ptr< T > unique_alloc_module (configuration &config, std::string arg_name, std::string default_module_name, std::string description)
 Allocate the module and cast to the a specified class T. More...
 
static unsigned count_open_modules ()
 Count all the open modules. More...
 

Additional Inherited Members

- Protected Attributes inherited from credit
std::string m_name
 Name of credit.
 
std::string m_argument_name
 Argument name.
 

Detailed Description

Module class.

Member Function Documentation

◆ alloc_module() [1/2]

static module* module::alloc_module ( configuration config,
std::string  arg_name,
std::string  default_module_name,
std::string  description 
)
static

Automatically reads the parameter "arg_name" to fetch the name for the library, and allocate the library.

Parameters
[in]configConfigutation setting.
[in]arg_nameArgument corresponding argument key for the library.
[in]default_module_nameDefault module name in the case that module associated with arg_name key is not found.
[om]description Description of parameter arg_name.
Returns
Pointer to the loaded dynamic library.

◆ alloc_module() [2/2]

static module* module::alloc_module ( std::string  path)
static

Reads the dynamic library of a class module, allocate, and return the pointer to it.

Parameters
[in]pathPath to the dynamic library
Returns
Pointer to the loaded dynamic library.

◆ close_all_handles()

static unsigned module::close_all_handles ( )
static

Close all the handles that are still unloaded.

Returns
Number of closed handles by this call.

◆ count_open_modules()

static unsigned module::count_open_modules ( )
static

Count all the open modules.

Returns
Number of load modules.

◆ get_module_name()

virtual std::string module::get_module_name ( ) const
inlinevirtual

Get the module name.

Returns
module name

◆ module_libpath()

static std::string module::module_libpath ( std::string  module_name)
static

Get the path to the dynamic library. e.g., "mylib" -> "symlink-public/lib/libshiokaze_mylib.dylib".

Parameters
[in]module_nameName of module.

◆ unique_alloc_module()

template<class T >
static std::unique_ptr<T> module::unique_alloc_module ( configuration config,
std::string  arg_name,
std::string  default_module_name,
std::string  description 
)
inlinestatic

Allocate the module and cast to the a specified class T.

Parameters
[in]configConfigutation setting.
[in]arg_nameArgument corresponding argument key for the library.
[in]default_module_nameDefault module name in the case that module associated with arg_name key is not found.
[om]description Description of parameter arg_name.
Returns
Pointer to the loaded dynamic library.

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