Scarab  v2.11.1
Project 8 C++ Utility Library
Public Member Functions | Public Attributes | Private Types | List of all members
accessor< Policy > Class Template Reference

#include <pytypes.h>

Inheritance diagram for accessor< Policy >:
Inheritance graph

Public Member Functions

 accessor (handle obj, key_type key)
 
 accessor (const accessor &)=default
 
 accessor (accessor &&)=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) &
 
- Public Member Functions inherited from object_api< accessor< Policy > >
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
 
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...
 
object operator() (Args &&...args) const
 
 __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- (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
 
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...
 

Public Attributes

template<typename T = Policy>
__attribute__((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
 

Detailed Description

template<typename Policy>
class pybind11::detail::accessor< Policy >

Definition at line 29 of file pytypes.h.

Member Typedef Documentation

◆ key_type

using key_type = typename Policy::key_type
private

Definition at line 476 of file pytypes.h.

Constructor & Destructor Documentation

◆ accessor() [1/3]

accessor ( handle  obj,
key_type  key 
)
inline

Definition at line 479 of file pytypes.h.

◆ accessor() [2/3]

accessor ( const accessor< Policy > &  )
default

◆ accessor() [3/3]

accessor ( accessor< Policy > &&  )
default

Member Function Documentation

◆ operator=() [1/4]

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

Definition at line 485 of file pytypes.h.

◆ operator=() [2/4]

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

Definition at line 486 of file pytypes.h.

◆ operator=() [3/4]

void operator= ( T &&  value) &&
inline

Definition at line 488 of file pytypes.h.

◆ operator=() [4/4]

void operator= ( T &&  value) &
inline

Definition at line 491 of file pytypes.h.

Member Data Documentation

◆ cache

object cache
mutable

Definition at line 520 of file pytypes.h.

◆ key

__attribute__ ((deprecated( "Use of obj.attr(...) as bool is deprecated in favor of pybind11::hasattr(obj, ...)" ))) explicit operator enable_if_t<std key_type key

Definition at line 496 of file pytypes.h.


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