Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
gtwrap.pybind_wrapper.PybindWrapper Class Reference

Public Member Functions

def __init__ (self, module, module_name, top_module_namespaces='', use_boost=False, ignore_classes=(), module_template="")
 
def wrap (self)
 
def wrap_ctors (self, my_class)
 
def wrap_enum (self, enum, class_name='', module=None, prefix=' '*4)
 
def wrap_enums (self, enums, instantiated_class, prefix=' '*4)
 
def wrap_instantiated_class
 
def wrap_methods (self, methods, cpp_class, prefix='\n'+ ' '*8, suffix='')
 
def wrap_namespace (self, namespace)
 
def wrap_operators (self, operators, cpp_class, prefix='\n'+ ' '*8)
 
def wrap_properties (self, properties, cpp_class, prefix='\n'+ ' '*8)
 
def wrap_stl_class (self, stl_class)
 
def wrap_variable (self, namespace, module_var, variable, prefix='\n'+ ' '*8)
 

Public Attributes

 ignore_classes
 
 method_indent
 
 module
 
 module_name
 
 module_template
 
 python_keywords
 
 top_module_namespaces
 
 use_boost
 

Private Member Functions

def _add_namespaces (self, name, namespaces)
 
def _gen_module_var (self, namespaces)
 
def _method_args_signature_with_names (self, args_list)
 
def _partial_match (self, namespaces1, namespaces2)
 
def _py_args_names (self, args_list)
 
def _wrap_method (self, method, cpp_class, prefix, suffix, method_suffix="")
 

Private Attributes

 _serializing_classes
 

Detailed Description

Class to generate binding code for Pybind11 specifically.

Definition at line 21 of file pybind_wrapper.py.

Constructor & Destructor Documentation

def gtwrap.pybind_wrapper.PybindWrapper.__init__ (   self,
  module,
  module_name,
  top_module_namespaces = '',
  use_boost = False,
  ignore_classes = (),
  module_template = "" 
)

Definition at line 31 of file pybind_wrapper.py.

Member Function Documentation

def gtwrap.pybind_wrapper.PybindWrapper._add_namespaces (   self,
  name,
  namespaces 
)
private

Definition at line 400 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper._gen_module_var (   self,
  namespaces 
)
private
Get the Pybind11 module name from the namespaces.

Definition at line 394 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper._method_args_signature_with_names (   self,
  args_list 
)
private
Define the method signature types with the argument names.

Definition at line 64 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper._partial_match (   self,
  namespaces1,
  namespaces2 
)
private

Definition at line 388 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper._py_args_names (   self,
  args_list 
)
private
Set the argument names in Pybind11 format.

Definition at line 44 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper._wrap_method (   self,
  method,
  cpp_class,
  prefix,
  suffix,
  method_suffix = "" 
)
private

Definition at line 92 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap (   self)
Wrap the code in the interface file.

Definition at line 487 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_ctors (   self,
  my_class 
)
Wrap the constructors.

Definition at line 75 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_enum (   self,
  enum,
  class_name = '',
  module = None,
  prefix = ' ' * 4 
)
Wrap an enum.

Args:
    enum: The parsed enum to wrap.
    class_name: The class under which the enum is defined.
    prefix: The amount of indentation.

Definition at line 264 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_enums (   self,
  enums,
  instantiated_class,
  prefix = ' ' * 4 
)
Wrap multiple enums defined in a class.

Definition at line 289 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_instantiated_class (   self,
  instantiated_class 
)

Definition at line 304 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_methods (   self,
  methods,
  cpp_class,
  prefix = '\n' + ' ' * 8,
  suffix = '' 
)
Wrap all the methods in the `cpp_class`.

This function is also used to wrap global functions.

Definition at line 181 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_namespace (   self,
  namespace 
)
Wrap the complete `namespace`.

Definition at line 408 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_operators (   self,
  operators,
  cpp_class,
  prefix = '\n' + ' ' * 8 
)
Wrap all the overloaded operators in the `cpp_class`.

Definition at line 246 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_properties (   self,
  properties,
  cpp_class,
  prefix = '\n' + ' ' * 8 
)
Wrap all the properties in the `cpp_class`.

Definition at line 232 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_stl_class (   self,
  stl_class 
)
Wrap STL containers.

Definition at line 359 of file pybind_wrapper.py.

def gtwrap.pybind_wrapper.PybindWrapper.wrap_variable (   self,
  namespace,
  module_var,
  variable,
  prefix = '\n' + ' ' * 8 
)
Wrap a variable that's not part of a class (i.e. global)

Definition at line 216 of file pybind_wrapper.py.

Member Data Documentation

gtwrap.pybind_wrapper.PybindWrapper._serializing_classes
private

Definition at line 37 of file pybind_wrapper.py.

gtwrap.pybind_wrapper.PybindWrapper.ignore_classes

Definition at line 36 of file pybind_wrapper.py.

gtwrap.pybind_wrapper.PybindWrapper.method_indent

Definition at line 42 of file pybind_wrapper.py.

gtwrap.pybind_wrapper.PybindWrapper.module

Definition at line 32 of file pybind_wrapper.py.

gtwrap.pybind_wrapper.PybindWrapper.module_name

Definition at line 33 of file pybind_wrapper.py.

gtwrap.pybind_wrapper.PybindWrapper.module_template

Definition at line 38 of file pybind_wrapper.py.

gtwrap.pybind_wrapper.PybindWrapper.python_keywords

Definition at line 39 of file pybind_wrapper.py.

gtwrap.pybind_wrapper.PybindWrapper.top_module_namespaces

Definition at line 34 of file pybind_wrapper.py.

gtwrap.pybind_wrapper.PybindWrapper.use_boost

Definition at line 35 of file pybind_wrapper.py.


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:59:10