|
PCB Environment 2
|
NOTE: This does not do any automatic reference counting. More...
#include <PyObject.hpp>
Public Member Functions | |
| Object (PyObject *py) | |
| Object (bool) | |
| Object (double) | |
| Object (long) | |
| Object (const char *) | |
| Object (const std::string &) | |
| Object (const Point_2 &) | |
| Object (const Point_25 &) | |
| Object (const IPoint_3 &) | |
| Object (const Bbox_2 &) | |
| const Object & | incRef () const |
| const Object & | decRef () const |
| PyObject ** | o () |
| PyObject * | operator* () const |
| Object | at (uint i) const |
| Object | elem (uint i, const char *err=0) const |
| Object | item (uint i) const |
| Object | item (const char *name) const |
| void | setElem (uint i, const Object &) const |
| void | setElem (uint i, PyObject *) const |
| void | setItem (uint i, const Object &) const |
| void | setItem (uint i, PyObject *) const |
| void | setDictItem (uint i, PyObject *) const |
| void | setItem (const char *name, const Object &) const |
| void | refItem (const char *name, const Object &) const |
| void | setItem (const char *name, PyObject *) const |
| void | refItem (const char *name, PyObject *) const |
| bool | isNone () const |
| bool | isDict () const |
| bool | isList () const |
| bool | isList (uint n) const |
| bool | hasListItem (uint i) const |
| bool | isTuple () const |
| bool | isTuple (uint n) const |
| bool | hasTupleElem (uint i) const |
| bool | isTupleOrList (uint n) const |
| uint | listSize (const char *err="object is not a list") const |
| template<typename T> | |
| T | asIntegerContainer () const |
| template<typename T> | |
| T | asStringContainer () const |
| operator bool () const | |
| template<typename T, typename = std::enable_if_t<std::is_integral_v<T>>> | |
| operator T () const =delete | |
| bool | isBool () const |
| bool | isBool (bool value) const |
| bool | isFloat () const |
| bool | isLong () const |
| bool | isNumber () const |
| bool | asBool (const char *err="object is not a boolean") const |
| bool | toBool () const |
| double | asDouble (const char *err="object is not a float") const |
| double | toDouble (const char *err="object is not a number") const |
| long | asLong () const |
| long | toLong (const char *err="object is not a number") const |
| bool | isString () const |
| std::string | asString (const char *err="object is not a string") const |
| std::string | toString () const |
| std::string_view | asStringView (const char *err="object is not a string") const |
| bool | isVector (uint n) const |
| bool | isLongVector (uint n) const |
| bool | isPoint_25 () const |
| IPoint_2 | asIPoint_2 (const char *err="object is not a 2D integer point") const |
| IPoint_3 | asIPoint_3 (const char *err="object is not a 3D integer point") const |
| IVector_2 | asIVector_2 (const char *err="object is not a 2D integer vector") const |
| IVector_3 | asIVector_3 (const char *err="object is not a 3D integer vector") const |
| Vector_2 | asVector_2 (const char *err="object is not a 2D vector") const |
| Point_2 | asPoint_2 (const char *err="object is not a 2D point") const |
| Point_25 | asPoint_25 (const char *err="object is not a 2.5D point") const |
| ::Bbox_2 | asBbox_2 () const |
| ::IBox_3 | asIBox_3 () const |
| uint64_t | asBitmask (uint size) const |
| template<typename T> | |
| Object | new_ListFrom (const std::vector< T > &data, auto &&... args) |
Static Public Member Functions | |
| static Object | new_List (uint n, PyObject *v=0) |
| static Object | new_TupleOfLongs (const Point_25 &v, Real s) |
| template<typename T> | |
| static Object | new_TupleOfLongs (const T *, uint size) |
| template<typename T> | |
| static Object | new_ListFrom (const std::vector< T > &, auto &&...) |
NOTE: This does not do any automatic reference counting.