![]() |
Scarab
v2.9.1
Project 8 C++ Utility Library
|
#include <pytypes.h>

Public Member Functions | |
| iterator | begin () const |
| iterator | end () const |
| Return a sentinel which ends iteration. More... | |
| item_accessor | operator[] (handle key) const |
| item_accessor | operator[] (const char *key) const |
| See above (the only difference is that they key is provided as a string literal) More... | |
| obj_attr_accessor | attr (handle key) const |
| str_attr_accessor | attr (const char *key) const |
| See above (the only difference is that they key is provided as a string literal) More... | |
| args_proxy | operator* () const |
| template<typename T > | |
| bool | contains (T &&item) const |
Check if the given item is contained within this object, i.e. item in obj. More... | |
| template<return_value_policy policy = return_value_policy::automatic_reference, typename... Args> | |
| object | operator() (Args &&...args) const |
| template<return_value_policy policy = return_value_policy::automatic_reference, typename... Args> | |
| __attribute__ ((deprecated("call(...) was deprecated in favor of operator()(...)"))) object call(Args &&... args) const | |
Get or set the object's docstring, i.e. obj.__doc__. More... | |
| bool | is (object_api const &other) const |
Equivalent to obj is other in Python. More... | |
| bool | is_none () const |
Equivalent to obj is None in Python. More... | |
| bool | equal (object_api const &other) const |
| Equivalent to obj == other in Python. More... | |
| bool | not_equal (object_api const &other) const |
| bool | operator< (object_api const &other) const |
| bool | operator<= (object_api const &other) const |
| bool | operator> (object_api const &other) const |
| bool | operator>= (object_api const &other) const |
| object | operator- () const |
| object | operator~ () const |
| object | operator+ (object_api const &other) const |
| object | operator+= (object_api const &other) const |
| object | operator- (object_api const &other) const |
| object | operator-= (object_api const &other) const |
| object | operator* (object_api const &other) const |
| object | operator*= (object_api const &other) const |
| object | operator/ (object_api const &other) const |
| object | operator/= (object_api const &other) const |
| object | operator| (object_api const &other) const |
| object | operator|= (object_api const &other) const |
| object | operator & (object_api const &other) const |
| object | operator &= (object_api const &other) const |
| object | operator^ (object_api const &other) const |
| object | operator^= (object_api const &other) const |
| object | operator<< (object_api const &other) const |
| object | operator<<= (object_api const &other) const |
| object | operator>> (object_api const &other) const |
| object | operator>>= (object_api const &other) const |
| int | ref_count () const |
| Return the object's current reference count. More... | |
| handle | get_type () const |
| Return a handle to the Python type object underlying the instance. More... | |
Private Member Functions | |
| const Derived & | derived () const |
| bool | rich_compare (object_api const &other, int value) const |
A mixin class which adds common functions to handle, object and various accessors. The only requirement for Derived is to implement PyObject *Derived::ptr() const.
| __attribute__ | ( | (deprecated("call(...) was deprecated in favor of operator()(...)")) | ) | const && |
Get or set the object's docstring, i.e. obj.__doc__.
| obj_attr_accessor attr | ( | handle | key | ) | const |
Return an internal functor to access the object's attributes. Casting the returned detail::obj_attr_accessor instance to a handle or object subclass causes a corresponding call to getattr. Assigning a handle or object subclass causes a call to setattr.
| str_attr_accessor attr | ( | const char * | key | ) | const |
| iterator begin | ( | ) | const |
| bool contains | ( | T && | item | ) | const |
| iterator end | ( | ) | const |
|
inline |
| handle get_type | ( | ) | const |
|
inline |
|
inline |
|
inline |
| object operator& | ( | object_api< Derived > const & | other | ) | const |
| object operator&= | ( | object_api< Derived > const & | other | ) | const |
| object operator() | ( | Args &&... | args | ) | const |
Assuming the Python object is a function or implements the __call__ protocol, operator() invokes the underlying function, passing an arbitrary set of parameters. The result is returned as a object and may need to be converted back into a Python object using handle::cast().
When some of the arguments cannot be converted to Python objects, the function will throw a cast_error exception. When the Python function call fails, a error_already_set exception is thrown.
| args_proxy operator* | ( | ) | const |
| object operator* | ( | object_api< Derived > const & | other | ) | const |
| object operator*= | ( | object_api< Derived > const & | other | ) | const |
| object operator+ | ( | object_api< Derived > const & | other | ) | const |
| object operator+= | ( | object_api< Derived > const & | other | ) | const |
| object operator- | ( | object_api< Derived > const & | other | ) | const |
| object operator-= | ( | object_api< Derived > const & | other | ) | const |
| object operator/ | ( | object_api< Derived > const & | other | ) | const |
| object operator/= | ( | object_api< Derived > const & | other | ) | const |
|
inline |
| object operator<< | ( | object_api< Derived > const & | other | ) | const |
| object operator<<= | ( | object_api< Derived > const & | other | ) | const |
|
inline |
|
inline |
|
inline |
| object operator>> | ( | object_api< Derived > const & | other | ) | const |
| object operator>>= | ( | object_api< Derived > const & | other | ) | const |
| item_accessor operator[] | ( | handle | key | ) | const |
Return an internal functor to invoke the object's sequence protocol. Casting the returned detail::item_accessor instance to a handle or object subclass causes a corresponding call to __getitem__. Assigning a handle or object subclass causes a call to __setitem__.
| item_accessor operator[] | ( | const char * | key | ) | const |
| object operator^ | ( | object_api< Derived > const & | other | ) | const |
| object operator^= | ( | object_api< Derived > const & | other | ) | const |
| object operator| | ( | object_api< Derived > const & | other | ) | const |
| object operator|= | ( | object_api< Derived > const & | other | ) | const |
|
inline |
|
private |
1.8.13