Small class that wraps plumed_safeptr in order to make its initialization easier.
More...
|
| SafePtr (const SafePtr &) |
| non copyable (copy would require managing buffer, could be added in the future if needed) More...
|
|
SafePtr & | operator= (SafePtr const &) |
| non assignable (assignment would require managing buffer, could be added in the future if needed) More...
|
|
Small class that wraps plumed_safeptr in order to make its initialization easier.
◆ SafePtr() [1/4]
PLMD::Plumed::SafePtr::SafePtr |
( |
const SafePtr & |
| ) |
|
|
private |
non copyable (copy would require managing buffer, could be added in the future if needed)
◆ SafePtr() [2/4]
PLMD::Plumed::SafePtr::SafePtr |
( |
| ) |
|
|
inlinenoexcept |
Default constructor, nullptr.
◆ SafePtr() [3/4]
◆ SafePtr() [4/4]
◆ get_safeptr()
Here we create all the required instances 1: void 3: integral 4: floating 5: FILE 0x100: unsigned.
Return the contained plumed_safeptr
◆ operator=()
non assignable (assignment would require managing buffer, could be added in the future if needed)
◆ buffer
char PLMD::Plumed::SafePtr::buffer[32] |
This buffer holds a copy of the data when they are passed by value.
The size is sufficient to hold any primitive type. Notice that the buffer is required to enable conversions (e.g., passing a class that can be converted to int) and, at the same time, allow the object to exist after SafePtr constructor has completed. A perhaps cleaner implementation would require a base class containing the plumed_safeptr object, derived classes depending on the argument type as a template parameter, and overloaded functions returning this derived class.
◆ safe
The documentation for this class was generated from the following file: