My Project
Loading...
Searching...
No Matches
PythonCastStatic< PythonObject::sequence_tag > Class Reference

Template specialization for getting handling sequence. More...

Public Member Functions

 PythonCastStatic (leftv value)
Public Member Functions inherited from PythonObject
 PythonObject ()
 PythonObject (ptr_type ptr)
ptr_type check_context (ptr_type ptr) const
self operator() (int op) const
 Unary operations.
self operator() (int op, const self &arg) const
 Binary and n-ary operations.
self operator() (int op, const self &arg1, const self &arg2) const
 Ternary operations.
self operator[] (const self &idx) const
 Get item.
self operator[] (long idx) const
 operator const ptr_type () const
 Get actual PyObject*.
char * repr () const
 Get representative as C-style string.
char * str () const
 Extract C-style string.
Py_ssize_t size () const
BOOLEAN assign_to (leftv result)
void import_as (const char *name) const
int compare (int op, const self &arg) const
self attr (const self &arg) const
self del_attr (const self &arg) const

Private Types

typedef PythonCastStatic self

Private Member Functions

size_t size (leftv iter, size_t distance=0) const
void append_to (leftv iter) const
ptr_type get (ptr_type value)

Additional Inherited Members

Public Types inherited from PythonObject
typedef PyObject * ptr_type
Protected Member Functions inherited from PythonObject
self args2list (const self &args) const
BOOLEAN handle_exception () const
void append_iter (self iterator)
int py_opid (int op) const

Detailed Description

Template specialization for getting handling sequence.

Definition at line 390 of file pyobject.cc.

Member Typedef Documentation

◆ self

Definition at line 305 of file pyobject.cc.

Constructor & Destructor Documentation

◆ PythonCastStatic()

Definition at line 395 of file pyobject.cc.

395 :
This template class does conversion of Singular objects to python objects on compile-time.
Definition pyobject.cc:304
Py_ssize_t size() const
Definition pyobject.cc:187

Member Function Documentation

◆ append_to()

void PythonCastStatic< PythonObject::sequence_tag >::append_to ( leftv iter) const
inlineprivate

Definition at line 406 of file pyobject.cc.

407 {
408 for(size_t idx = 0; iter != NULL; iter = iter->next)
410 }

◆ get()

Definition at line 315 of file pyobject.cc.

315{ return value; }

◆ size()

size_t PythonCastStatic< PythonObject::sequence_tag >::size ( leftv iter,
size_t distance = 0 ) const
inlineprivate

Definition at line 400 of file pyobject.cc.

401 {
402 if (iter) { do { ++distance; } while((iter = iter->next)); };
403 return distance;
404 }

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