Classes | Namespaces | Macros | Functions
Plumed.h File Reference
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <exception>
#include <stdexcept>
#include <string>
#include <ios>
#include <new>
#include <typeinfo>

Classes

class  PLMD::Plumed::Exception
 Base class used to rethrow PLUMED exceptions. More...
 
class  PLMD::Plumed::ExceptionDebug
 Used to rethrow a PLMD::ExceptionDebug. More...
 
class  PLMD::Plumed::ExceptionError
 Used to rethrow a PLMD::ExceptionError. More...
 
class  PLMD::Plumed::Invalid
 Thrown when trying to access an invalid plumed object. More...
 
class  PLMD::Plumed::LeptonException
 Class used to rethrow Lepton exceptions. More...
 
struct  PLMD::Plumed::NothrowHandler
 Error handler used to rethrow exceptions. More...
 
class  PLMD::Plumed
 C++ wrapper for plumed. More...
 
struct  plumed
 Main plumed object. More...
 
struct  plumed_nothrow_handler
 

Namespaces

 PLMD
 

Macros

#define __PLUMED_WRAPPER_ANONYMOUS_BEGIN
 
#define __PLUMED_WRAPPER_ANONYMOUS_END
 
#define __PLUMED_WRAPPER_C_BEGIN   __PLUMED_WRAPPER_EXTERN_C_BEGIN extern
 
#define __PLUMED_WRAPPER_C_END   __PLUMED_WRAPPER_EXTERN_C_END
 
#define __PLUMED_WRAPPER_CXX   1
 
#define __PLUMED_WRAPPER_CXX_ANONYMOUS_NAMESPACE   0
 
#define __PLUMED_WRAPPER_CXX_DEFAULT_INVALID   0
 
#define __PLUMED_WRAPPER_CXX_EXCEPTION_BUFFER   512
 
#define __PLUMED_WRAPPER_CXX_EXPLICIT   explicit
 
#define __PLUMED_WRAPPER_CXX_NOEXCEPT   noexcept
 
#define __PLUMED_WRAPPER_CXX_OVERRIDE   override
 
#define __PLUMED_WRAPPER_CXX_POLYMORPHIC   1
 
#define __PLUMED_WRAPPER_CXX_STD   1
 
#define __PLUMED_WRAPPER_EXTERN   1
 
#define __PLUMED_WRAPPER_EXTERN_C_BEGIN   extern "C" {
 
#define __PLUMED_WRAPPER_EXTERN_C_END   }
 
#define __PLUMED_WRAPPER_GLOBAL   1
 
#define __PLUMED_WRAPPER_IMPLEMENTATION_   0
 
#define __PLUMED_WRAPPER_INTERNALS_BEGIN   __PLUMED_WRAPPER_EXTERN_C_BEGIN static
 
#define __PLUMED_WRAPPER_INTERNALS_END   __PLUMED_WRAPPER_EXTERN_C_END
 
#define __PLUMED_WRAPPER_LIBCXX11   0
 
#define __PLUMED_WRAPPER_NOSTRING_EXCEPTION(name)
 
#define __PLUMED_WRAPPER_STD   ::std::
 

Functions

plumed plumed_create_dlopen2 (const char *path, int mode)
 Constructor from path. More...
 

Macro Definition Documentation

◆ __PLUMED_WRAPPER_ANONYMOUS_BEGIN

#define __PLUMED_WRAPPER_ANONYMOUS_BEGIN

◆ __PLUMED_WRAPPER_ANONYMOUS_END

#define __PLUMED_WRAPPER_ANONYMOUS_END

◆ __PLUMED_WRAPPER_C_BEGIN

#define __PLUMED_WRAPPER_C_BEGIN   __PLUMED_WRAPPER_EXTERN_C_BEGIN extern

◆ __PLUMED_WRAPPER_C_END

#define __PLUMED_WRAPPER_C_END   __PLUMED_WRAPPER_EXTERN_C_END

◆ __PLUMED_WRAPPER_CXX

#define __PLUMED_WRAPPER_CXX   1

◆ __PLUMED_WRAPPER_CXX_ANONYMOUS_NAMESPACE

#define __PLUMED_WRAPPER_CXX_ANONYMOUS_NAMESPACE   0

◆ __PLUMED_WRAPPER_CXX_DEFAULT_INVALID

#define __PLUMED_WRAPPER_CXX_DEFAULT_INVALID   0

◆ __PLUMED_WRAPPER_CXX_EXCEPTION_BUFFER

#define __PLUMED_WRAPPER_CXX_EXCEPTION_BUFFER   512

◆ __PLUMED_WRAPPER_CXX_EXPLICIT

#define __PLUMED_WRAPPER_CXX_EXPLICIT   explicit

◆ __PLUMED_WRAPPER_CXX_NOEXCEPT

#define __PLUMED_WRAPPER_CXX_NOEXCEPT   noexcept

◆ __PLUMED_WRAPPER_CXX_OVERRIDE

#define __PLUMED_WRAPPER_CXX_OVERRIDE   override

◆ __PLUMED_WRAPPER_CXX_POLYMORPHIC

#define __PLUMED_WRAPPER_CXX_POLYMORPHIC   1

◆ __PLUMED_WRAPPER_CXX_STD

#define __PLUMED_WRAPPER_CXX_STD   1

◆ __PLUMED_WRAPPER_EXTERN

#define __PLUMED_WRAPPER_EXTERN   1

◆ __PLUMED_WRAPPER_EXTERN_C_BEGIN

#define __PLUMED_WRAPPER_EXTERN_C_BEGIN   extern "C" {

◆ __PLUMED_WRAPPER_EXTERN_C_END

#define __PLUMED_WRAPPER_EXTERN_C_END   }

◆ __PLUMED_WRAPPER_GLOBAL

#define __PLUMED_WRAPPER_GLOBAL   1

◆ __PLUMED_WRAPPER_IMPLEMENTATION_

#define __PLUMED_WRAPPER_IMPLEMENTATION_   0

◆ __PLUMED_WRAPPER_INTERNALS_BEGIN

#define __PLUMED_WRAPPER_INTERNALS_BEGIN   __PLUMED_WRAPPER_EXTERN_C_BEGIN static

◆ __PLUMED_WRAPPER_INTERNALS_END

#define __PLUMED_WRAPPER_INTERNALS_END   __PLUMED_WRAPPER_EXTERN_C_END

◆ __PLUMED_WRAPPER_LIBCXX11

#define __PLUMED_WRAPPER_LIBCXX11   0

◆ __PLUMED_WRAPPER_NOSTRING_EXCEPTION

#define __PLUMED_WRAPPER_NOSTRING_EXCEPTION (   name)
Value:
class std_ ## name : \
public ::std::name \
{ \
public: \
__PLUMED_WRAPPER_CXX_EXPLICIT std_ ## name(const char * msg) __PLUMED_WRAPPER_CXX_NOEXCEPT { \
this->msg[0]='\0'; \
__PLUMED_WRAPPER_STD strncat(this->msg,msg,__PLUMED_WRAPPER_CXX_EXCEPTION_BUFFER-1); \
static const char* debug=__PLUMED_WRAPPER_STD getenv("PLUMED_EXCEPTIONS_DEBUG"); \
if(debug && __PLUMED_WRAPPER_STD strlen(msg) > __PLUMED_WRAPPER_CXX_EXCEPTION_BUFFER-1) __PLUMED_WRAPPER_STD fprintf(stderr,"+++ WARNING: message will be truncated\n"); \
} \
std_ ## name(const std_ ## name & other) __PLUMED_WRAPPER_CXX_NOEXCEPT { \
msg[0]='\0'; \
__PLUMED_WRAPPER_STD strncat(msg,other.msg,__PLUMED_WRAPPER_CXX_EXCEPTION_BUFFER-1); \
} \
std_ ## name & operator=(const std_ ## name & other) __PLUMED_WRAPPER_CXX_NOEXCEPT { \
if(this==&other) return *this;\
msg[0]='\0'; \
__PLUMED_WRAPPER_STD strncat(msg,other.msg,__PLUMED_WRAPPER_CXX_EXCEPTION_BUFFER-1); \
return *this; \
} \
const char* what() const __PLUMED_WRAPPER_CXX_NOEXCEPT __PLUMED_WRAPPER_CXX_OVERRIDE {return msg;} \
~std_ ## name() __PLUMED_WRAPPER_CXX_NOEXCEPT __PLUMED_WRAPPER_CXX_OVERRIDE {} \
};
int n
Definition: blas.cpp:40
#define __PLUMED_WRAPPER_CXX_NOEXCEPT
Definition: Plumed.h:525
#define __PLUMED_WRAPPER_CXX_EXCEPTION_BUFFER
Definition: Plumed.h:487
#define __PLUMED_WRAPPER_STD
Definition: Plumed.h:518

◆ __PLUMED_WRAPPER_STD

#define __PLUMED_WRAPPER_STD   ::std::

Function Documentation

◆ plumed_create_dlopen2()

plumed plumed_create_dlopen2 ( const char *  path,
int  mode 
)

Constructor from path.

Available as of PLUMED 2.5

Same as plumed_create_dlopen, but also allows to specify the mode for dlopen.

Warning
Use with care, since not all the possible modes work correctly with PLUMED.