Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gtwrap.interface_parser.type.Type Class Reference

Public Member Functions

def __init__ (self, Typename typename, str is_const, str is_shared_ptr, str is_ptr, str is_ref, bool is_basic)
 
str __repr__ (self)
 
def get_typename (self)
 
str to_cpp (self)
 

Static Public Member Functions

def from_parse_result (ParseResults t)
 

Public Attributes

 is_basic
 
 is_const
 
 is_ptr
 
 is_ref
 
 is_shared_ptr
 
 typename
 

Static Public Attributes

 rule
 

Detailed Description

Parsed datatype, can be either a fundamental/basic type or a custom datatype.
E.g. void, double, size_t, Matrix.
Think of this as a high-level type which encodes the typename and other
characteristics of the type.

The type can optionally be a raw pointer, shared pointer or reference.
Can also be optionally qualified with a `const`, e.g. `const int`.

Definition at line 158 of file type.py.

Constructor & Destructor Documentation

◆ __init__()

def gtwrap.interface_parser.type.Type.__init__ (   self,
Typename  typename,
str  is_const,
str  is_shared_ptr,
str  is_ptr,
str  is_ref,
bool  is_basic 
)

Definition at line 176 of file type.py.

Member Function Documentation

◆ __repr__()

str gtwrap.interface_parser.type.Type.__repr__ (   self)

Definition at line 210 of file type.py.

◆ from_parse_result()

def gtwrap.interface_parser.type.Type.from_parse_result ( ParseResults  t)
static
Return the resulting Type from parsing the source.

Definition at line 186 of file type.py.

◆ get_typename()

def gtwrap.interface_parser.type.Type.get_typename (   self)
Convenience method to get the typename of this type.

Definition at line 243 of file type.py.

◆ to_cpp()

str gtwrap.interface_parser.type.Type.to_cpp (   self)
Generate the C++ code for wrapping.

Treat all pointers as "const shared_ptr<T>&"
Treat Matrix and Vector as "const Matrix&" and "const Vector&" resp.

Definition at line 218 of file type.py.

Member Data Documentation

◆ is_basic

gtwrap.interface_parser.type.Type.is_basic

Definition at line 182 of file type.py.

◆ is_const

gtwrap.interface_parser.type.Type.is_const

Definition at line 178 of file type.py.

◆ is_ptr

gtwrap.interface_parser.type.Type.is_ptr

Definition at line 180 of file type.py.

◆ is_ref

gtwrap.interface_parser.type.Type.is_ref

Definition at line 181 of file type.py.

◆ is_shared_ptr

gtwrap.interface_parser.type.Type.is_shared_ptr

Definition at line 179 of file type.py.

◆ rule

gtwrap.interface_parser.type.Type.rule
static

Definition at line 168 of file type.py.

◆ typename

gtwrap.interface_parser.type.Type.typename

Definition at line 177 of file type.py.


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


gtsam
Author(s):
autogenerated on Tue Jun 25 2024 03:14:33