Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
accessor< Policy > Class Template Reference

#include <pytypes.h>

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

Public Member Functions

 accessor (handle obj, key_type key)
 
 accessor (const accessor &)=default
 
 accessor (accessor &&) noexcept=default
 
objectget_cache () const
 
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
 
- Public Member Functions inherited from object_api< accessor< Policy > >
obj_attr_accessor attr (handle key) const
 
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...
 
iterator begin () const
 
bool contains (T &&item) const
 Check if the given item is contained within this object, i.e. item in obj. More...
 
str_attr_accessor doc () const
 Get or set the object's docstring, i.e. obj.__doc__. More...
 
iterator end () const
 Return a sentinel which ends iteration. More...
 
bool equal (object_api const &other) const
 Equivalent to obj == other in Python. More...
 
handle get_type () const
 
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 not_equal (object_api const &other) const
 
object operator& (object_api const &other) const
 
object operator&= (object_api const &other) const
 
object operator() (Args &&...args) const
 
args_proxy 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- () 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
 
bool operator< (object_api const &other) const
 
object operator<< (object_api const &other) const
 
object 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>> (object_api const &other) const
 
object operator>>= (object_api const &other) const
 
item_accessor operator[] (handle key) const
 
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...
 
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~ () const
 
 PYBIND11_DEPRECATED ("call(...) was deprecated in favor of operator()(...)") object call(Args &&...args) const
 
int ref_count () const
 Return the object's current reference count. More...
 
pybind11::str str () const
 

Static Public Member Functions

static object ensure_object (handle h)
 

Private Types

using key_type = typename Policy::key_type
 

Private Attributes

object cache
 
key_type key
 
handle obj
 

Detailed Description

template<typename Policy>
class accessor< Policy >

Definition at line 51 of file pytypes.h.

Member Typedef Documentation

◆ key_type

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

Definition at line 860 of file pytypes.h.

Constructor & Destructor Documentation

◆ accessor() [1/3]

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

Definition at line 863 of file pytypes.h.

◆ accessor() [2/3]

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

◆ accessor() [3/3]

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 907 of file pytypes.h.

◆ get_cache()

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

Definition at line 909 of file pytypes.h.

◆ operator=() [1/4]

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

Definition at line 869 of file pytypes.h.

◆ operator=() [2/4]

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

Definition at line 870 of file pytypes.h.

◆ operator=() [3/4]

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

Definition at line 873 of file pytypes.h.

◆ operator=() [4/4]

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

Definition at line 877 of file pytypes.h.

◆ 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 882 of file pytypes.h.

Member Data Documentation

◆ cache

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

Definition at line 919 of file pytypes.h.

◆ key

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

Definition at line 918 of file pytypes.h.

◆ obj

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

Definition at line 917 of file pytypes.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:59