General register.
More...
#include <RegisterBase.h>
|
| ~RegisterBase () noexcept override |
|
ID | add (std::string key, const Content &content) |
| Register a new class. More...
|
|
bool | check (const std::string &key) const |
| Verify if a key is present in the register, only considering the default image. More...
|
|
bool | check (const std::vector< void * > &images, const std::string &key) const |
| Verify if a key is present in the register, accessing to registered images. More...
|
|
void | clearStaged () noexcept override |
| Clear staged objects. More...
|
|
void | completeRegistration (void *handle) override |
| complete registration all staged keys will be enabled Should be called after dlopen has been completed correctly. More...
|
|
const Content & | get (const std::string &key) const |
| Return the content associated to a key in the register, only considering the default image. More...
|
|
const Content & | get (const std::vector< void * > &images, const std::string &key) const |
| Return the content associated to a key in the register, accessing to registerd images. More...
|
|
const std::string & | getFullPath (const std::vector< void * > &images, const std::string &key) const |
| Return the full path associated to a key in the register, accessing to registerd images. More...
|
|
std::vector< std::string > | getKeys () const override |
| Get a list of keys Notice that these are the keys in the map, not the plumed keywords! Also notice that this list includes keys from all images, including the textual version of the image void*. More...
|
|
std::vector< std::string > | getKeysWithDLHandle (void *handle) const |
| Get only keys registered specifically by a given image. More...
|
|
void | remove (ID id) |
| Remove a registered keyword. More...
|
|
|
std::shared_mutex | mutex |
| Mutex protecting access to map. More...
|
|
template<class Content>
class PLMD::RegisterBase< Content >
General register.
This class provide a generic implementation based on the content of the Register
◆ ~RegisterBase()
◆ add()
Register a new class.
- Parameters
-
key | The name of the directive to be used in the input file |
content | The registered content |
ID | A returned ID that can be used to remove the directive later |
◆ check() [1/2]
Verify if a key is present in the register, only considering the default image.
◆ check() [2/2]
template<class Content >
bool PLMD::RegisterBase< Content >::check |
( |
const std::vector< void * > & |
images, |
|
|
const std::string & |
key |
|
) |
| const |
Verify if a key is present in the register, accessing to registered images.
◆ clearStaged()
Clear staged objects.
Should be used when leaving the dlopen section to remove any dangling object.
Implements PLMD::Register.
◆ completeAllRegistrations()
void PLMD::Register::completeAllRegistrations |
( |
void * |
image | ) |
|
|
staticinherited |
Save all staged objects in all registers.
◆ completeRegistration()
complete registration all staged keys will be enabled Should be called after dlopen has been completed correctly.
Implements PLMD::Register.
◆ get() [1/2]
Return the content associated to a key in the register, only considering the default image.
◆ get() [2/2]
template<class Content >
const Content & PLMD::RegisterBase< Content >::get |
( |
const std::vector< void * > & |
images, |
|
|
const std::string & |
key |
|
) |
| const |
Return the content associated to a key in the register, accessing to registerd images.
◆ getFullPath()
template<class Content >
const std::string & PLMD::RegisterBase< Content >::getFullPath |
( |
const std::vector< void * > & |
images, |
|
|
const std::string & |
key |
|
) |
| const |
Return the full path associated to a key in the register, accessing to registerd images.
◆ getKeys()
Get a list of keys Notice that these are the keys in the map, not the plumed keywords! Also notice that this list includes keys from all images, including the textual version of the image void*.
Implements PLMD::Register.
◆ getKeysWithDLHandle()
std::vector< std::string > PLMD::Register::getKeysWithDLHandle |
( |
void * |
handle | ) |
const |
|
inherited |
Get only keys registered specifically by a given image.
◆ getRegisteringFullPath()
const std::string PLMD::Register::getRegisteringFullPath |
( |
| ) |
|
|
staticprotectednoexceptinherited |
Return the path of the currently-loading library.
◆ imageToString()
std::string PLMD::Register::imageToString |
( |
void * |
image | ) |
|
|
staticprotectedinherited |
Internal tool to format image addresses.
◆ isDLRegistering()
bool PLMD::Register::isDLRegistering |
( |
| ) |
|
|
staticprotectednoexceptinherited |
Check if we are in a dlopen section.
◆ popDLRegistration()
void PLMD::Register::popDLRegistration |
( |
| ) |
|
|
staticprivatenoexceptinherited |
◆ pushDLRegistration()
void PLMD::Register::pushDLRegistration |
( |
const std::string & |
fullpath | ) |
|
|
staticprivateinherited |
◆ registrationLock()
return a registration lock
◆ remove()
Remove a registered keyword.
Use the ID returned by add().
◆ mutex
std::shared_mutex PLMD::Register::mutex |
|
mutableprotectedinherited |
Mutex protecting access to map.
◆ staged_m
The documentation for this class was generated from the following file: