Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gtwrap.interface_parser.classes.Method Class Reference

Public Member Functions

def __init__ (self, Union[Template, Any] template, str name, ReturnType return_type, ArgumentList args, str is_const, Union["Class", Any] parent='')
 
str __repr__ (self)
 
str to_cpp (self)
 

Public Attributes

 args
 
 is_const
 
 name
 
 parent
 
 return_type
 
 template
 

Static Public Attributes

tuple rule
 

Detailed Description

Rule to parse a method in a class.

E.g.
```
class Hello {
    void sayHello() const;
};
```

Definition at line 28 of file interface_parser/classes.py.

Constructor & Destructor Documentation

◆ __init__()

def gtwrap.interface_parser.classes.Method.__init__ (   self,
Union[Template, Any]  template,
str  name,
ReturnType  return_type,
ArgumentList  args,
str  is_const,
Union["Class", Any]   parent = '' 
)

Definition at line 51 of file interface_parser/classes.py.

Member Function Documentation

◆ __repr__()

str gtwrap.interface_parser.classes.Method.__repr__ (   self)

Definition at line 70 of file interface_parser/classes.py.

◆ to_cpp()

str gtwrap.interface_parser.classes.Method.to_cpp (   self)
Generate the C++ code for wrapping.

Definition at line 66 of file interface_parser/classes.py.

Member Data Documentation

◆ args

gtwrap.interface_parser.classes.Method.args

Definition at line 55 of file interface_parser/classes.py.

◆ is_const

gtwrap.interface_parser.classes.Method.is_const

Definition at line 56 of file interface_parser/classes.py.

◆ name

gtwrap.interface_parser.classes.Method.name

Definition at line 53 of file interface_parser/classes.py.

◆ parent

gtwrap.interface_parser.classes.Method.parent

Definition at line 58 of file interface_parser/classes.py.

◆ return_type

gtwrap.interface_parser.classes.Method.return_type

Definition at line 54 of file interface_parser/classes.py.

◆ rule

tuple gtwrap.interface_parser.classes.Method.rule
static
Initial value:
= (
Optional(Template.rule("template")) #
+ ReturnType.rule("return_type") #
+ IDENT("name") #
+ LPAREN #
+ ArgumentList.rule("args_list") #
+ RPAREN #
+ Optional(CONST("is_const")) #
+ SEMI_COLON # BR
).setParseAction(lambda t: Method(t.template, t.name, t.return_type, t.
args_list, t.is_const))

Definition at line 39 of file interface_parser/classes.py.

◆ template

gtwrap.interface_parser.classes.Method.template

Definition at line 52 of file interface_parser/classes.py.


The documentation for this class was generated from the following file:
gtwrap.interface_parser.tokens.IDENT
IDENT
Definition: tokens.py:19
gtwrap.interface_parser.tokens.CONST
CONST
Definition: tokens.py:42
Optional
Definition: typing.h:78


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:53:08