MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / arg

Class arg

extern/pybind/include/pybind11/cast.h:1236–1259  ·  view source on GitHub ↗

\ingroup annotations Annotation for arguments

Source from the content-addressed store, hash-verified

1234/// \ingroup annotations
1235/// Annotation for arguments
1236struct arg {
1237 /// Constructs an argument with the name of the argument; if null or omitted, this is a
1238 /// positional argument.
1239 constexpr explicit arg(const char *name = nullptr)
1240 : name(name), flag_noconvert(false), flag_none(true) {}
1241 /// Assign a value to this argument
1242 template <typename T>
1243 arg_v operator=(T &&value) const;
1244 /// Indicate that the type should not be converted in the type caster
1245 arg &noconvert(bool flag = true) {
1246 flag_noconvert = flag;
1247 return *this;
1248 }
1249 /// Indicates that the argument should/shouldn't allow None (e.g. for nullable pointer args)
1250 arg &none(bool flag = true) {
1251 flag_none = flag;
1252 return *this;
1253 }
1254
1255 const char *name; ///< If non-null, this is a named kwargs argument
1256 bool flag_noconvert : 1; ///< If set, do not allow conversion (requires a supporting type
1257 ///< caster!)
1258 bool flag_none : 1; ///< If set (the default), allow None to be passed to this argument
1259};
1260
1261/// \ingroup annotations
1262/// Annotation for arguments with values

Callers 9

add_ostream_redirectFunction · 0.70
arg_vMethod · 0.70
operator"" _aFunction · 0.70
pybind11.hFile · 0.70
enum_Method · 0.70
vector_if_equal_operatorFunction · 0.70
vector_modifiersFunction · 0.70
vector_pointer_modifiersFunction · 0.50
SimulationModelModuleFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected