COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Core Class Reference

#include <Core.hpp>

Inherits noncopyable.

Public Member Functions

void initiate (int argc, char **argv)
 
void terminate ()
 
common::Componentroot () const
 Gives the default root component. More...
 
common::EventHandlerevent_handler () const
 
common::BuildInfobuild_info () const
 
common::Environmentenvironment () const
 
common::Librarieslibraries () const
 
common::Factoriesfactories () const
 
common::Grouptools () const
 
void set_profiler (const std::string &profiler_name)
 Sets the profiler. More...
 
Handle< CodeProfilerprofiler () const
 Gives the current profiler. More...
 
NetworkInfonetwork_info () const
 
int argc () const
 
char ** argv () const
 

Static Public Member Functions

static Coreinstance ()
 

Private Member Functions

 Core ()
 Contructor. More...
 
 ~Core ()
 Destructor. More...
 

Private Attributes

boost::shared_ptr< common::BuildInfom_build_info
 the BuildInfo unique object More...
 
boost::shared_ptr< common::Environmentm_environment
 the Environment unique object More...
 
boost::shared_ptr< common::Librariesm_libraries
 the Libraries unique object More...
 
boost::shared_ptr< common::Factoriesm_factories
 the Factories unique object More...
 
boost::shared_ptr< common::Groupm_root
 The component tree root. More...
 
boost::shared_ptr< common::NetworkInfom_network_info
 The network information. More...
 
int m_argc
 command-line arguments count More...
 
char ** m_argv
 command-line arguments values More...
 

Detailed Description

This class represents a singleton object where which is used to initialize the CF runtime environment.

Author
Tiago Quintino

Definition at line 37 of file Core.hpp.

Constructor & Destructor Documentation

Core ( )
private

Contructor.

Definition at line 45 of file Core.cpp.

~Core ( )
private

Destructor.

Definition at line 90 of file Core.cpp.

Member Function Documentation

int argc ( ) const
inline

command-line arguments count

Returns
count of arguments

Definition at line 99 of file Core.hpp.

char** argv ( ) const
inline

command-line arguments values

Returns
values of arguments

Definition at line 103 of file Core.hpp.

common::BuildInfo & build_info ( ) const

Gets the BuildInfo

Precondition
Core does not need to be initialized before

Definition at line 160 of file Core.cpp.

common::Environment & environment ( ) const

Gets the Environment

Precondition
Core does not need to be initialized before

Definition at line 168 of file Core.cpp.

common::EventHandler & event_handler ( ) const

Gets the EventHandler of the CF runtime environment

Precondition
Core does not need to be initialized before

Definition at line 153 of file Core.cpp.

common::Factories & factories ( ) const

Gets the Factories

Precondition
Core does not need to be initialized before

Definition at line 184 of file Core.cpp.

void initiate ( int  argc,
char **  argv 
)

Initializes the CF runtime enviroment.

Precondition
Must be called prior to any CF runtime function, only module registration procedures are allowed beforehand.
Todo:
This is still broken for mpi as it doesn't allow modification of argc & argv

Definition at line 98 of file Core.cpp.

Core & instance ( )
static
Returns
the instance of this singleton

Definition at line 37 of file Core.cpp.

common::Libraries & libraries ( ) const

Gets the Libraries

Precondition
Core does not need to be initialized before

Definition at line 176 of file Core.cpp.

NetworkInfo & network_info ( ) const

Gets the network information.

Returns
Returns the network information.

Definition at line 216 of file Core.cpp.

Handle< CodeProfiler > profiler ( ) const

Gives the current profiler.

Returns
Returns the current profiler

Definition at line 210 of file Core.cpp.

Component & root ( ) const

Gives the default root component.

Returns
Returns the root component.

Definition at line 145 of file Core.cpp.

void set_profiler ( const std::string &  profiler_name)

Sets the profiler.

Parameters
profiler_nameProfiler name
Exceptions
ValueNotFoundif no such profiler was found
Todo:
Checks if another profiler has been set before

Definition at line 201 of file Core.cpp.

void terminate ( )

Closes the CF runtime environment.

Postcondition
Must not call any CF runtime functions after, only destruction procedures ar allowed afterwards.

Definition at line 131 of file Core.cpp.

common::Group & tools ( ) const

Gets the tools

Precondition
Core does not need to be initialized before

Definition at line 192 of file Core.cpp.

Member Data Documentation

int m_argc
private

command-line arguments count

Definition at line 128 of file Core.hpp.

char** m_argv
private

command-line arguments values

Definition at line 130 of file Core.hpp.

boost::shared_ptr< common::BuildInfo > m_build_info
private

the BuildInfo unique object

Definition at line 115 of file Core.hpp.

boost::shared_ptr< common::Environment > m_environment
private

the Environment unique object

Definition at line 117 of file Core.hpp.

boost::shared_ptr< common::Factories > m_factories
private

the Factories unique object

Definition at line 121 of file Core.hpp.

boost::shared_ptr< common::Libraries > m_libraries
private

the Libraries unique object

Definition at line 119 of file Core.hpp.

boost::shared_ptr< common::NetworkInfo > m_network_info
private

The network information.

Definition at line 125 of file Core.hpp.

boost::shared_ptr< common::Group > m_root
private

The component tree root.

Definition at line 123 of file Core.hpp.


The documentation for this class was generated from the following files:
Send comments to:
COOLFluiD Web Admin