Namespaces | Macros | Functions | Variables
PlumedMainInitializer.cpp File Reference
#include "PlumedMainInitializer.h"
#include "PlumedMain.h"
#include "tools/Exception.h"
#include "lepton/Exception.h"
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <exception>
#include <stdexcept>
#include <ios>
#include <new>
#include <typeinfo>
#include <system_error>
#include <future>
#include <memory>
#include <functional>
#include <regex>
#include <any>
#include <variant>
#include <optional>
#include <filesystem>
#include "tools/TypesafePtr.h"
#include "tools/Log.h"
#include "tools/Tools.h"

Namespaces

 PLMD
 

Macros

#define plumed_convert_fptr(ptr, fptr)   { ptr=NULL; std::memcpy(&ptr,&fptr,(sizeof(fptr)>sizeof(ptr)?sizeof(ptr):sizeof(fptr))); }
 

Functions

static bool getenvTypesafeDebug () noexcept
 
void plumed_plumedmain_cmd (void *plumed, const char *key, const void *val)
 Send a command key and a pointer val to a void pointer returned by plumed_plumedmain_create. More...
 
static void plumed_plumedmain_cmd_nothrow (void *plumed, const char *key, const void *val, plumed_nothrow_handler_x nothrow)
 
static void plumed_plumedmain_cmd_safe (void *plumed, const char *key, plumed_safeptr_x safe)
 
static void plumed_plumedmain_cmd_safe_nothrow (void *plumed, const char *key, plumed_safeptr_x safe, plumed_nothrow_handler_x nothrow)
 
void * plumed_plumedmain_create ()
 Constructs a plumed object. More...
 
unsigned plumed_plumedmain_create_reference (void *plumed)
 
unsigned plumed_plumedmain_delete_reference (void *plumed)
 
void plumed_plumedmain_finalize (void *plumed)
 Finalize a void pointer returned by plumed_plumedmain_create. More...
 
unsigned plumed_plumedmain_use_count (void *plumed)
 
void plumed_symbol_table_init ()
 Function that makes sure that plumed_symbol_table is initialized. More...
 
static void translate_current (plumed_nothrow_handler_x nothrow, void **nested=nullptr, const char *msg=nullptr)
 Internal tool Throws the currently managed exception and call the nothrow handler. More...
 
static void translate_nested (plumed_nothrow_handler_x nothrow)
 
static void typesafeDebug (const char *key, plumed_safeptr_x safe) noexcept
 

Variables

plumed_symbol_table_type_x plumed_symbol_table
 

Macro Definition Documentation

◆ plumed_convert_fptr

#define plumed_convert_fptr (   ptr,
  fptr 
)    { ptr=NULL; std::memcpy(&ptr,&fptr,(sizeof(fptr)>sizeof(ptr)?sizeof(ptr):sizeof(fptr))); }

Function Documentation

◆ getenvTypesafeDebug()

static bool getenvTypesafeDebug ( )
staticnoexcept

◆ plumed_plumedmain_cmd()

void plumed_plumedmain_cmd ( void *  plumed,
const char *  key,
const void *  val 
)

Send a command key and a pointer val to a void pointer returned by plumed_plumedmain_create.

◆ plumed_plumedmain_cmd_nothrow()

static void plumed_plumedmain_cmd_nothrow ( void *  plumed,
const char *  key,
const void *  val,
plumed_nothrow_handler_x  nothrow 
)
static

◆ plumed_plumedmain_cmd_safe()

static void plumed_plumedmain_cmd_safe ( void *  plumed,
const char *  key,
plumed_safeptr_x  safe 
)
static

◆ plumed_plumedmain_cmd_safe_nothrow()

static void plumed_plumedmain_cmd_safe_nothrow ( void *  plumed,
const char *  key,
plumed_safeptr_x  safe,
plumed_nothrow_handler_x  nothrow 
)
static

◆ plumed_plumedmain_create()

void* plumed_plumedmain_create ( )

Constructs a plumed object.

This function returns a void pointer that can be used in plumed_plumedmain_cmd and plumed_plumedmain_finalize.

◆ plumed_plumedmain_create_reference()

unsigned plumed_plumedmain_create_reference ( void *  plumed)

◆ plumed_plumedmain_delete_reference()

unsigned plumed_plumedmain_delete_reference ( void *  plumed)

◆ plumed_plumedmain_finalize()

void plumed_plumedmain_finalize ( void *  plumed)

Finalize a void pointer returned by plumed_plumedmain_create.

◆ plumed_plumedmain_use_count()

unsigned plumed_plumedmain_use_count ( void *  plumed)

◆ plumed_symbol_table_init()

void plumed_symbol_table_init ( )

Function that makes sure that plumed_symbol_table is initialized.

Can be called multiple times.

◆ translate_current()

static void translate_current ( plumed_nothrow_handler_x  nothrow,
void **  nested = nullptr,
const char *  msg = nullptr 
)
static

Internal tool Throws the currently managed exception and call the nothrow handler.

If nested is not null, it is passed and then gets populated with a pointer that should be called on the nested exception If msg is not null, it overrides the message. Can be used to build a concatenated message.

◆ translate_nested()

static void translate_nested ( plumed_nothrow_handler_x  nothrow)
static

◆ typesafeDebug()

static void typesafeDebug ( const char *  key,
plumed_safeptr_x  safe 
)
staticnoexcept

Variable Documentation

◆ debug

const bool debug
private

◆ plumed_symbol_table

plumed_symbol_table_type_x plumed_symbol_table
plumed_plumedmain_use_count
unsigned plumed_plumedmain_use_count(void *plumed)
Definition: PlumedMainInitializer.cpp:100
plumed_plumedmain_cmd
void plumed_plumedmain_cmd(void *plumed, const char *key, const void *val)
Send a command key and a pointer val to a void pointer returned by plumed_plumedmain_create.
Definition: PlumedMainInitializer.cpp:106
plumed_plumedmain_create
void * plumed_plumedmain_create()
Constructs a plumed object.
Definition: PlumedMainInitializer.cpp:75
plumed_plumedmain_delete_reference
unsigned plumed_plumedmain_delete_reference(void *plumed)
Definition: PlumedMainInitializer.cpp:94
plumed_plumedmain_cmd_nothrow
static void plumed_plumedmain_cmd_nothrow(void *plumed, const char *key, const void *val, plumed_nothrow_handler_x nothrow)
Definition: PlumedMainInitializer.cpp:377
plumed_plumedmain_create_reference
unsigned plumed_plumedmain_create_reference(void *plumed)
Definition: PlumedMainInitializer.cpp:88
plumed_plumedmain_cmd_safe
static void plumed_plumedmain_cmd_safe(void *plumed, const char *key, plumed_safeptr_x safe)
Definition: PlumedMainInitializer.cpp:113
plumed_plumedmain_cmd_safe_nothrow
static void plumed_plumedmain_cmd_safe_nothrow(void *plumed, const char *key, plumed_safeptr_x safe, plumed_nothrow_handler_x nothrow)
Definition: PlumedMainInitializer.cpp:344
plumed_plumedmain_finalize
void plumed_plumedmain_finalize(void *plumed)
Finalize a void pointer returned by plumed_plumedmain_create.
Definition: PlumedMainInitializer.cpp:389