C++ wrapper for plumed.
More...
#include <Plumed.h>
|
| Plumed (const Plumed &) |
| Copy constructor is disabled (private and unimplemented) The problem here is that after copying it will not be clear who is going to finalize the corresponding plumed structure. More...
|
|
Plumed & | operator= (const Plumed &) |
| Assignment operator is disabled (private and unimplemented) The problem here is that after copying it will not be clear who is going to finalize the corresponding plumed structure. More...
|
|
|
plumed | main |
| C structure. More...
|
|
bool | reference |
| keeps track if the object was created from scratch using the defaults destructor (reference=false) or if it was imported from C or FORTRAN (reference=true). More...
|
|
C++ wrapper for plumed.
This class provides a C++ interface to PLUMED.
PLMD::Plumed::Plumed |
( |
const char * |
c | ) |
|
|
inline |
Clone a Plumed object from a FORTRAN char* handler.
- Parameters
-
c | The FORTRAN handler (a char[32]). |
- Attention
- The Plumed object created in this manner will not finalize the corresponding plumed structure. It is expected that the FORTRAN code calls plumed_c_finalize for it
PLMD::Plumed::Plumed |
( |
plumed |
p | ) |
|
|
inline |
Clone a Plumed object from a C plumed structure.
- Parameters
-
- Attention
- The Plumed object created in this manner will not finalize the corresponding plumed structure. It is expected that the C code calls plumed_finalize for it
PLMD::Plumed::Plumed |
( |
const Plumed & |
| ) |
|
|
private |
Copy constructor is disabled (private and unimplemented) The problem here is that after copying it will not be clear who is going to finalize the corresponding plumed structure.
PLMD::Plumed::~Plumed |
( |
| ) |
|
|
inlinevirtual |
Destructor.
Destructor is virtual so as to allow correct inheritance from Plumed object. To avoid linking problems with g++, I specify "inline" also here (in principle it should be enough to specify it down in the definition of the function, but for some reason that I do not understand g++ does not inline it properly in that case and complains when Plumed.h is included but Plumed.o is not linked. Anyway, the way it is done here seems to work properly).
void PLMD::Plumed::cmd |
( |
const char * |
key, |
|
|
const void * |
val = NULL |
|
) |
| |
|
inline |
Send a command to this plumed object.
- Parameters
-
key | The name of the command to be executed |
val | The argument. It is declared as const to allow calls like p.cmd("A","B"), but for some choice of key it can change the content |
- Note
- Equivalent to plumed_cmd()
void PLMD::Plumed::gcmd |
( |
const char * |
key, |
|
|
const void * |
val |
|
) |
| |
|
inlinestatic |
Send a command to global-plumed.
- Parameters
-
key | The name of the command to be executed |
val | The argument. It is declared as const to allow calls like gcmd("A","B"), but for some choice of key it can change the content |
- Note
- Equivalent to plumed_gcmd()
void PLMD::Plumed::gcreate |
( |
| ) |
|
|
inlinestatic |
void PLMD::Plumed::gfinalize |
( |
| ) |
|
|
inlinestatic |
bool PLMD::Plumed::ginitialized |
( |
| ) |
|
|
inlinestatic |
Check if global-plumed has been initialized.
- Returns
- true if global plumed object (see global()) is initialized (i.e. if gcreate() has been called), false otherwise.
- Note
- Equivalent to plumed_ginitialized() but returns a bool
Plumed PLMD::Plumed::global |
( |
| ) |
|
|
inlinestatic |
Returns the Plumed global object.
- Returns
- The Plumed global object
bool PLMD::Plumed::installed |
( |
| ) |
|
|
inlinestatic |
Check if plumed is installed (for runtime binding)
- Returns
- true if plumed is installed, false otherwise
- Note
- Equivalent to plumed_installed() but returns a bool
PLMD::Plumed::operator plumed |
( |
| ) |
const |
|
inline |
Retrieve the C plumed structure for this object.
Assignment operator is disabled (private and unimplemented) The problem here is that after copying it will not be clear who is going to finalize the corresponding plumed structure.
void PLMD::Plumed::toFortran |
( |
char * |
c | ) |
const |
|
inline |
Retrieve a FORTRAN handler for this object.
- Parameters
-
c | The FORTRAN handler (a char[32]). |
bool PLMD::Plumed::reference |
|
private |
keeps track if the object was created from scratch using the defaults destructor (reference=false) or if it was imported from C or FORTRAN (reference=true).
In the latter case, the plumed_finalize() method is not called when destructing the object, since it is expected to be finalized in the C/FORTRAN code
The documentation for this class was generated from the following file: