μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | Private Member Functions | List of all members
arg_v Struct Reference

Annotation for arguments with values. More...

#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/cast.h>

Inheritance diagram for arg_v:
[legend]
Collaboration diagram for arg_v:
[legend]

Public Member Functions

template<typename T >
 arg_v (const char *name, T &&x, const char *descr=nullptr)
 Direct construction with name, default, and description. More...
 
template<typename T >
 arg_v (const arg &base, T &&x, const char *descr=nullptr)
 Called internally when invoking py::arg("a") = value More...
 
arg_vnoconvert (bool flag=true)
 Same as arg::noconvert(), but returns *this as arg_v&, not arg&. More...
 
arg_vnone (bool flag=true)
 Same as arg::nonone(), but returns *this as arg_v&, not arg&. More...
 
template<typename T >
 arg_v (const char *name, T &&x, const char *descr=nullptr)
 Direct construction with name, default, and description. More...
 
template<typename T >
 arg_v (const arg &base, T &&x, const char *descr=nullptr)
 Called internally when invoking py::arg("a") = value More...
 
arg_vnoconvert (bool flag=true)
 Same as arg::noconvert(), but returns *this as arg_v&, not arg&. More...
 
arg_vnone (bool flag=true)
 Same as arg::nonone(), but returns *this as arg_v&, not arg&. More...
 
- Public Member Functions inherited from arg
constexpr arg (const char *name=nullptr)
 Constructs an argument with the name of the argument; if null or omitted, this is a positional argument. More...
 
template<typename T >
arg_v operator= (T &&value) const
 Assign a value to this argument. More...
 
argnoconvert (bool flag=true)
 Indicate that the type should not be converted in the type caster. More...
 
argnone (bool flag=true)
 Indicates that the argument should/shouldn't allow None (e.g. for nullable pointer args) More...
 
constexpr arg (const char *name=nullptr)
 Constructs an argument with the name of the argument; if null or omitted, this is a positional argument. More...
 
template<typename T >
arg_v operator= (T &&value) const
 Assign a value to this argument. More...
 
argnoconvert (bool flag=true)
 Indicate that the type should not be converted in the type caster. More...
 
argnone (bool flag=true)
 Indicates that the argument should/shouldn't allow None (e.g. for nullable pointer args) More...
 

Public Attributes

object value
 The default value. More...
 
const char * descr
 The (optional) description of the default value. More...
 
std::string type
 The C++ type name of the default value (only available when compiled in debug mode) More...
 
- Public Attributes inherited from arg
const char * name
 If non-null, this is a named kwargs argument. More...
 
bool flag_noconvert: 1
 If set, do not allow conversion (requires a supporting type caster!) More...
 
bool flag_none: 1
 If set (the default), allow None to be passed to this argument. More...
 

Private Member Functions

template<typename T >
 arg_v (arg &&base, T &&x, const char *descr=nullptr)
 
template<typename T >
 arg_v (arg &&base, T &&x, const char *descr=nullptr)
 

Detailed Description

Annotation for arguments with values.

Definition at line 1265 of file cast.h.

Constructor & Destructor Documentation

◆ arg_v() [1/6]

template<typename T >
arg_v::arg_v ( arg &&  base,
T &&  x,
const char *  descr = nullptr 
)
inlineprivate

Definition at line 1268 of file cast.h.

◆ arg_v() [2/6]

template<typename T >
arg_v::arg_v ( const char *  name,
T &&  x,
const char *  descr = nullptr 
)
inline

Direct construction with name, default, and description.

Definition at line 1288 of file cast.h.

◆ arg_v() [3/6]

template<typename T >
arg_v::arg_v ( const arg base,
T &&  x,
const char *  descr = nullptr 
)
inline

Called internally when invoking py::arg("a") = value

Definition at line 1293 of file cast.h.

◆ arg_v() [4/6]

template<typename T >
arg_v::arg_v ( arg &&  base,
T &&  x,
const char *  descr = nullptr 
)
inlineprivate

Definition at line 1270 of file cast.h.

◆ arg_v() [5/6]

template<typename T >
arg_v::arg_v ( const char *  name,
T &&  x,
const char *  descr = nullptr 
)
inline

Direct construction with name, default, and description.

Definition at line 1290 of file cast.h.

◆ arg_v() [6/6]

template<typename T >
arg_v::arg_v ( const arg base,
T &&  x,
const char *  descr = nullptr 
)
inline

Called internally when invoking py::arg("a") = value

Definition at line 1295 of file cast.h.

Member Function Documentation

◆ noconvert() [1/2]

arg_v & arg_v::noconvert ( bool  flag = true)
inline

Same as arg::noconvert(), but returns *this as arg_v&, not arg&.

Definition at line 1297 of file cast.h.

References arg::noconvert().

◆ noconvert() [2/2]

arg_v & arg_v::noconvert ( bool  flag = true)
inline

Same as arg::noconvert(), but returns *this as arg_v&, not arg&.

Definition at line 1299 of file cast.h.

References arg::noconvert().

◆ none() [1/2]

arg_v & arg_v::none ( bool  flag = true)
inline

Same as arg::nonone(), but returns *this as arg_v&, not arg&.

Definition at line 1303 of file cast.h.

References arg::none().

◆ none() [2/2]

arg_v & arg_v::none ( bool  flag = true)
inline

Same as arg::nonone(), but returns *this as arg_v&, not arg&.

Definition at line 1305 of file cast.h.

References arg::none().

Member Data Documentation

◆ descr

const char * arg_v::descr

The (optional) description of the default value.

Definition at line 1311 of file cast.h.

Referenced by process_attribute< arg_v >::init().

◆ type

std::string arg_v::type

The C++ type name of the default value (only available when compiled in debug mode)

Definition at line 1314 of file cast.h.

Referenced by process_attribute< arg_v >::init(), and unpacking_collector< policy >::process().

◆ value

object arg_v::value

The default value.

Definition at line 1309 of file cast.h.

Referenced by process_attribute< arg_v >::init(), and unpacking_collector< policy >::process().


The documentation for this struct was generated from the following files: