μ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 | Static Public Member Functions | Public Attributes | Private Types | Private Attributes | List of all members
accessor< Policy > Class Template Reference

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

Inheritance diagram for accessor< Policy >:
[legend]
Collaboration diagram for accessor< Policy >:
[legend]

Public Member Functions

 accessor (handle obj, key_type key)
 
 accessor (const accessor &)=default
 
 accessor (accessor &&) noexcept=default
 
void operator= (const accessor &a) &&
 
void operator= (const accessor &a) &
 
template<typename T >
void operator= (T &&value) &&
 
template<typename T >
void operator= (T &&value) &
 
 accessor (handle obj, key_type key)
 
 accessor (const accessor &)=default
 
 accessor (accessor &&) noexcept=default
 
void operator= (const accessor &a) &&
 
void operator= (const accessor &a) &
 
template<typename T >
void operator= (T &&value) &&
 
template<typename T >
void operator= (T &&value) &
 
template<typename T = Policy>
 PYBIND11_DEPRECATED ("Use of obj.attr(...) as bool is deprecated in favor of pybind11::hasattr(obj, ...)") explicit operator enable_if_t< std
 
objectget_cache () const
 
- Public Member Functions inherited from object_api< accessor< Policy > >
iterator begin () const
 \rst Return an iterator equivalent to calling iter() in Python. More...
 
iterator begin () const
 \rst Return an iterator equivalent to calling iter() in Python. More...
 
iterator end () const
 Return a sentinel which ends iteration. More...
 
iterator end () const
 Return a sentinel which ends iteration. More...
 
item_accessor operator[] (handle key) const
 \rst Return an internal functor to invoke the object's sequence protocol. More...
 
item_accessor operator[] (const char *key) const
 See above (the only difference is that they key is provided as a string literal) More...
 
item_accessor operator[] (handle key) const
 \rst Return an internal functor to invoke the object's sequence protocol. More...
 
item_accessor operator[] (object &&key) const
 See above (the only difference is that the key's reference is stolen) More...
 
item_accessor operator[] (const char *key) const
 See above (the only difference is that the key is provided as a string literal) More...
 
obj_attr_accessor attr (handle key) const
 \rst Return an internal functor to access the object's attributes. More...
 
str_attr_accessor attr (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
 \rst Return an internal functor to access the object's attributes. More...
 
obj_attr_accessor attr (object &&key) const
 See above (the only difference is that the key's reference is stolen) More...
 
str_attr_accessor attr (const char *key) const
 See above (the only difference is that the key is provided as a string literal) More...
 
args_proxy operator* () const
 \rst Matches * unpacking in Python, e.g. More...
 
object operator* (object_api const &other) const
 
args_proxy operator* () const
 \rst Matches * unpacking in Python, e.g. More...
 
object operator* (object_api const &other) const
 
bool contains (T &&item) const
 Check if the given item is contained within this object, i.e. item in obj. More...
 
bool contains (T &&item) const
 Check if the given item is contained within this object, i.e. item in obj. More...
 
object operator() (Args &&...args) const
 \rst Assuming the Python object is a function or implements the __call__ protocol, operator() invokes the underlying function, passing an arbitrary set of parameters. More...
 
object operator() (Args &&...args) const
 \rst Assuming the Python object is a function or implements the __call__ protocol, operator() invokes the underlying function, passing an arbitrary set of parameters. More...
 
 PYBIND11_DEPRECATED ("call(...) was deprecated in favor of operator()(...)") object call(Args &&...args) const
 
 PYBIND11_DEPRECATED ("call(...) was deprecated in favor of operator()(...)") object call(Args &&...args) const
 
bool is (object_api const &other) const
 Equivalent to obj is other in Python. 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 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 equal (object_api const &other) const
 Equivalent to obj == other in Python. More...
 
bool not_equal (object_api const &other) const
 
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
 
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- (object_api const &other) const
 
object operator- () const
 
object 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)
 
object operator-= (object_api const &other) const
 
object operator-= (object_api const &other)
 
object operator*= (object_api const &other) const
 
object operator*= (object_api const &other)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
pybind11::str str () const
 
pybind11::str str () const
 
str_attr_accessor doc () const
 Get or set the object's docstring, i.e. obj.__doc__. More...
 
str_attr_accessor doc () const
 Get or set the object's docstring, i.e. obj.__doc__. More...
 
int ref_count () const
 Return the object's current reference count. More...
 
int ref_count () const
 Return the object's current reference count. More...
 
handle get_type () const
 
handle get_type () const
 

Static Public Member Functions

static object ensure_object (handle h)
 

Public Attributes

template<typename T = Policy>
PYBIND11_DEPRECATED("Use of obj.attr(...) as bool is deprecated in favor of pybind11::hasattr(obj, ...)") explicit operator enable_if_t< std key_type key
 
object cache
 

Private Types

using key_type = typename Policy::key_type
 
using key_type = typename Policy::key_type
 

Private Attributes

handle obj
 
key_type key
 

Detailed Description

template<typename Policy>
class accessor< Policy >

Definition at line 923 of file pytypes.h.

Member Typedef Documentation

◆ key_type [1/2]

template<typename Policy >
using accessor< Policy >::key_type = typename Policy::key_type
private

Definition at line 660 of file pytypes.h.

◆ key_type [2/2]

template<typename Policy >
using accessor< Policy >::key_type = typename Policy::key_type
private

Definition at line 924 of file pytypes.h.

Constructor & Destructor Documentation

◆ accessor() [1/6]

template<typename Policy >
accessor< Policy >::accessor ( handle  obj,
key_type  key 
)
inline

Definition at line 663 of file pytypes.h.

◆ accessor() [2/6]

template<typename Policy >
accessor< Policy >::accessor ( const accessor< Policy > &  )
default

◆ accessor() [3/6]

template<typename Policy >
accessor< Policy >::accessor ( accessor< Policy > &&  )
defaultnoexcept

◆ accessor() [4/6]

template<typename Policy >
accessor< Policy >::accessor ( handle  obj,
key_type  key 
)
inline

Definition at line 927 of file pytypes.h.

◆ accessor() [5/6]

template<typename Policy >
accessor< Policy >::accessor ( const accessor< Policy > &  )
default

◆ accessor() [6/6]

template<typename Policy >
accessor< Policy >::accessor ( accessor< Policy > &&  )
defaultnoexcept

Member Function Documentation

◆ ensure_object()

template<typename Policy >
static object accessor< Policy >::ensure_object ( handle  h)
inlinestatic

Definition at line 971 of file pytypes.h.

◆ get_cache()

template<typename Policy >
object & accessor< Policy >::get_cache ( ) const
inline

Definition at line 973 of file pytypes.h.

Referenced by accessor< Policy >::operator=().

◆ operator=() [1/8]

template<typename Policy >
void accessor< Policy >::operator= ( const accessor< Policy > &  a) &
inline

Definition at line 670 of file pytypes.h.

References accessor< Policy >::operator=().

Referenced by accessor< Policy >::operator=().

◆ operator=() [2/8]

template<typename Policy >
void accessor< Policy >::operator= ( const accessor< Policy > &  a) &
inline

Definition at line 934 of file pytypes.h.

References accessor< Policy >::operator=().

Referenced by accessor< Policy >::operator=().

◆ operator=() [3/8]

template<typename Policy >
void accessor< Policy >::operator= ( const accessor< Policy > &  a) &&
inline

Definition at line 669 of file pytypes.h.

◆ operator=() [4/8]

template<typename Policy >
void accessor< Policy >::operator= ( const accessor< Policy > &  a) &&
inline

Definition at line 933 of file pytypes.h.

◆ operator=() [5/8]

template<typename Policy >
template<typename T >
void accessor< Policy >::operator= ( T &&  value) &
inline

Definition at line 677 of file pytypes.h.

References accessor< Policy >::get_cache(), and object_or_cast().

◆ operator=() [6/8]

template<typename Policy >
template<typename T >
void accessor< Policy >::operator= ( T &&  value) &
inline

Definition at line 941 of file pytypes.h.

References object_or_cast().

◆ operator=() [7/8]

template<typename Policy >
template<typename T >
void accessor< Policy >::operator= ( T &&  value) &&
inline

Definition at line 673 of file pytypes.h.

References accessor< Policy >::key, accessor< Policy >::obj, and object_or_cast().

◆ operator=() [8/8]

template<typename Policy >
template<typename T >
void accessor< Policy >::operator= ( T &&  value) &&
inline

Definition at line 937 of file pytypes.h.

References object_or_cast().

◆ PYBIND11_DEPRECATED()

template<typename Policy >
template<typename T = Policy>
accessor< Policy >::PYBIND11_DEPRECATED ( "Use of obj.attr(...) as bool is deprecated in favor of pybind11::hasattr(obj, ...)"  )
inline

Definition at line 946 of file pytypes.h.

References hasattr().

Member Data Documentation

◆ cache

template<typename Policy >
object accessor< Policy >::cache
mutable

Definition at line 716 of file pytypes.h.

◆ key [1/2]

template<typename Policy >
template<typename T = Policy>
PYBIND11_DEPRECATED ( "Use of obj.attr(...) as bool is deprecated in favor of pybind11::hasattr(obj, ...)") explicit operator enable_if_t<std key_type accessor< Policy >::key

Definition at line 715 of file pytypes.h.

Referenced by accessor< Policy >::operator=().

◆ key [2/2]

template<typename Policy >
key_type accessor< Policy >::key
private

Definition at line 982 of file pytypes.h.

◆ obj

template<typename Policy >
handle accessor< Policy >::obj
private

Definition at line 981 of file pytypes.h.

Referenced by accessor< Policy >::operator=().


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