|
def | __init__ (self, start, end, name, var_type, initial_value, namespace) |
|
def | Requires (self, node) |
|
def | ToString (self) |
|
def | __str__ (self) |
|
def | __init__ (self, start, end, name, namespace) |
|
def | FullName (self) |
|
def | __init__ (self, start, end) |
|
def | IsDeclaration (self) |
|
def | IsDefinition (self) |
|
def | IsExportable (self) |
|
def | Requires (self, node) |
|
def | XXX__str__ (self) |
|
def | __repr__ (self) |
|
Definition at line 250 of file ast.py.
◆ __init__()
def cpp.ast.VariableDeclaration.__init__ |
( |
|
self, |
|
|
|
start, |
|
|
|
end, |
|
|
|
name, |
|
|
|
var_type, |
|
|
|
initial_value, |
|
|
|
namespace |
|
) |
| |
Reimplemented from cpp.ast._GenericDeclaration.
Definition at line 251 of file ast.py.
251 def __init__(self, start, end, name, var_type, initial_value, namespace):
252 _GenericDeclaration.__init__(self, start, end, name, namespace)
253 self.type = var_type
254 self.initial_value = initial_value
255
◆ __str__()
def cpp.ast.VariableDeclaration.__str__ |
( |
|
self | ) |
|
Definition at line 267 of file ast.py.
267 def __str__(self):
268 return self._StringHelper(self.__class__.__name__, self.ToString())
269
270
◆ Requires()
def cpp.ast.VariableDeclaration.Requires |
( |
|
self, |
|
|
|
node |
|
) |
| |
Does this AST node require the definition of the node passed in?
Reimplemented from cpp.ast.Node.
Definition at line 256 of file ast.py.
256 def Requires(self, node):
257
258 return self.type.name == node.name
259
◆ ToString()
def cpp.ast.VariableDeclaration.ToString |
( |
|
self | ) |
|
Return a string that tries to reconstitute the variable decl.
Definition at line 260 of file ast.py.
260 def ToString(self):
261 """Return a string that tries to reconstitute the variable decl."""
262 suffix = '%s %s' % (self.type, self.name)
263 if self.initial_value:
264 suffix += ' = ' + self.initial_value
265 return suffix
266
◆ initial_value
cpp.ast.VariableDeclaration.initial_value |
◆ type
cpp.ast.VariableDeclaration.type |
The documentation for this class was generated from the following file:
- /media/home/debian/src/github/tesseract-ocr/tesseract/unittest/third_party/googletest/googlemock/scripts/generator/cpp/ast.py