Classes | Public Member Functions | List of all members
PLMD::WithCmd Class Reference

Base for classes with cmd() method. More...

#include <WithCmd.h>

Inheritance diagram for PLMD::WithCmd:
Inheritance graph
[legend]

Classes

struct  SizeLike
 Small structure used to pass elements of a shape initializer_list. More...
 

Public Member Functions

virtual ~WithCmd ()
 
void cmd (const char *key, const TypesafePtr &val=nullptr)
 This is needed to avoid ambiguities. More...
 
virtual void cmd (const std::string &key, const TypesafePtr &val=nullptr)
 This is the legacy method we used in older plumed versions, so it is still possible. More...
 
void cmd (std::string_view key, const TypesafePtr &val, const std::size_t *shape)
 
template<typename I , typename std::enable_if< std::is_integral< I >::value, int >::type = 0>
void cmd (std::string_view key, const TypesafePtr &val, I nelem, const std::size_t *shape=nullptr)
 
void cmd (std::string_view key, const TypesafePtr &val, std::initializer_list< SizeLike > shape)
 
virtual void cmd (std::string_view key, const TypesafePtr &val=nullptr)
 This is the preferred method as it avoid allocations of temporaries. More...
 

Detailed Description

Base for classes with cmd() method.

This is an abstract base class for classes with cmd() method.

Constructor & Destructor Documentation

◆ ~WithCmd()

PLMD::WithCmd::~WithCmd ( )
inlinevirtual

Member Function Documentation

◆ cmd() [1/6]

void PLMD::WithCmd::cmd ( const char *  key,
const TypesafePtr val = nullptr 
)
inline

This is needed to avoid ambiguities.

◆ cmd() [2/6]

virtual void PLMD::WithCmd::cmd ( const std::string &  key,
const TypesafePtr val = nullptr 
)
inlinevirtual

This is the legacy method we used in older plumed versions, so it is still possible.

If this is not overridden, it will call the preferred method

◆ cmd() [3/6]

void PLMD::WithCmd::cmd ( std::string_view  key,
const TypesafePtr val,
const std::size_t *  shape 
)
inline

◆ cmd() [4/6]

template<typename I , typename std::enable_if< std::is_integral< I >::value, int >::type = 0>
void PLMD::WithCmd::cmd ( std::string_view  key,
const TypesafePtr val,
nelem,
const std::size_t *  shape = nullptr 
)
inline

◆ cmd() [5/6]

void PLMD::WithCmd::cmd ( std::string_view  key,
const TypesafePtr val,
std::initializer_list< SizeLike shape 
)
inline

◆ cmd() [6/6]

virtual void PLMD::WithCmd::cmd ( std::string_view  key,
const TypesafePtr val = nullptr 
)
inlinevirtual

This is the preferred method as it avoid allocations of temporaries.

If this is not overridded, it will call the legacy method.

Reimplemented in PLMD::CLToolMain, PLMD::PlumedMain, PLMD::GREX, and PLMD::PlumedHandle.


The documentation for this class was generated from the following file: