Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gtwrap.interface_parser.enum.Enum Class Reference

Public Member Functions

def __init__ (self, name, enumerators, parent='')
 
def __repr__ (self)
 
def cpp_typename (self)
 
list namespaces (self)
 

Public Attributes

 enumerators
 
 name
 
 parent
 

Static Public Attributes

tuple rule
 

Detailed Description

Rule to parse enums defined in the interface file.

E.g.
```
enum Kind {
    Dog,
    Cat
};
```

Definition at line 34 of file enum.py.

Constructor & Destructor Documentation

◆ __init__()

def gtwrap.interface_parser.enum.Enum.__init__ (   self,
  name,
  enumerators,
  parent = '' 
)

Definition at line 51 of file enum.py.

Member Function Documentation

◆ __repr__()

def gtwrap.interface_parser.enum.Enum.__repr__ (   self)

Definition at line 69 of file enum.py.

◆ cpp_typename()

def gtwrap.interface_parser.enum.Enum.cpp_typename (   self)
Return a Typename with the namespaces and cpp name of this
class.

Definition at line 60 of file enum.py.

◆ namespaces()

list gtwrap.interface_parser.enum.Enum.namespaces (   self)
Get the namespaces which this class is nested under as a list.

Definition at line 56 of file enum.py.

Member Data Documentation

◆ enumerators

gtwrap.interface_parser.enum.Enum.enumerators

Definition at line 53 of file enum.py.

◆ name

gtwrap.interface_parser.enum.Enum.name

Definition at line 52 of file enum.py.

◆ parent

gtwrap.interface_parser.enum.Enum.parent

Definition at line 54 of file enum.py.

◆ rule

tuple gtwrap.interface_parser.enum.Enum.rule
static
Initial value:
= (ENUM + IDENT("name") + LBRACE +
delimitedList(Enumerator.rule)("enumerators") + RBRACE +
SEMI_COLON).setParseAction(lambda t: Enum(t.name, t.enumerators))

Definition at line 47 of file enum.py.


The documentation for this class was generated from the following file:
gtwrap.interface_parser.tokens.IDENT
IDENT
Definition: tokens.py:19


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:25:00