proxygen
cpp.ast.Class Class Reference
Inheritance diagram for cpp.ast.Class:
cpp.ast._GenericDeclaration cpp.ast._GenericDeclaration cpp.ast._GenericDeclaration cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Struct cpp.ast.Struct cpp.ast.Struct

Public Member Functions

def __init__ (self, start, end, name, bases, templated_types, body, namespace)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (self)
 
def Requires (self, node)
 
def __str__ (self)
 
def __init__ (self, start, end, name, bases, templated_types, body, namespace)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (self)
 
def Requires (self, node)
 
def __str__ (self)
 
def __init__ (self, start, end, name, bases, templated_types, body, namespace)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (self)
 
def Requires (self, node)
 
def __str__ (self)
 
- Public Member Functions inherited from cpp.ast._GenericDeclaration
def __init__ (self, start, end, name, namespace)
 
def FullName (self)
 
def __init__ (self, start, end, name, namespace)
 
def FullName (self)
 
def __init__ (self, start, end, name, namespace)
 
def FullName (self)
 
- Public Member Functions inherited from cpp.ast.Node
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)
 
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)
 
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)
 

Public Attributes

 bases
 
 body
 
 templated_types
 
- Public Attributes inherited from cpp.ast._GenericDeclaration
 name
 
 namespace
 
- Public Attributes inherited from cpp.ast.Node
 start
 
 end
 

Detailed Description

Definition at line 321 of file ast.py.

Constructor & Destructor Documentation

def cpp.ast.Class.__init__ (   self,
  start,
  end,
  name,
  bases,
  templated_types,
  body,
  namespace 
)

Definition at line 322 of file ast.py.

Referenced by cpp.ast.Class.__init__().

322  def __init__(self, start, end, name, bases, templated_types, body, namespace):
323  _GenericDeclaration.__init__(self, start, end, name, namespace)
324  self.bases = bases
325  self.body = body
326  self.templated_types = templated_types
327 
def __init__(self, start, end, name, bases, templated_types, body, namespace)
Definition: ast.py:322
templated_types
Definition: ast.py:326
def cpp.ast.Class.__init__ (   self,
  start,
  end,
  name,
  bases,
  templated_types,
  body,
  namespace 
)

Definition at line 322 of file ast.py.

References cpp.ast.Class.__init__(), cpp.ast.Class.bases, message.body, cpp.ast.Class.body, and cpp.ast.Class.templated_types.

322  def __init__(self, start, end, name, bases, templated_types, body, namespace):
323  _GenericDeclaration.__init__(self, start, end, name, namespace)
324  self.bases = bases
325  self.body = body
326  self.templated_types = templated_types
327 
def __init__(self, start, end, name, bases, templated_types, body, namespace)
Definition: ast.py:322
templated_types
Definition: ast.py:326
def cpp.ast.Class.__init__ (   self,
  start,
  end,
  name,
  bases,
  templated_types,
  body,
  namespace 
)

Definition at line 322 of file ast.py.

References cpp.ast.Class.__init__(), cpp.ast.Class.bases, message.body, cpp.ast.Class.body, and cpp.ast.Class.templated_types.

322  def __init__(self, start, end, name, bases, templated_types, body, namespace):
323  _GenericDeclaration.__init__(self, start, end, name, namespace)
324  self.bases = bases
325  self.body = body
326  self.templated_types = templated_types
327 
def __init__(self, start, end, name, bases, templated_types, body, namespace)
Definition: ast.py:322
templated_types
Definition: ast.py:326

Member Function Documentation

def cpp.ast.Class.__str__ (   self)

Definition at line 348 of file ast.py.

References cpp.ast._GenericDeclaration._TypeStringHelper(), cpp.ast.Class.bases, message.body, cpp.ast.Class.body, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, and cpp.ast.Class.templated_types.

Referenced by cpp.ast.Class.__str__().

348  def __str__(self):
349  name = self.name
350  if self.templated_types:
351  name += '<%s>' % self.templated_types
352  suffix = '%s, %s, %s' % (name, self.bases, self.body)
353  return self._TypeStringHelper(suffix)
354 
355 
def __str__(self)
Definition: ast.py:348
def _TypeStringHelper(self, suffix)
Definition: ast.py:244
templated_types
Definition: ast.py:326
def cpp.ast.Class.__str__ (   self)

Definition at line 348 of file ast.py.

References cpp.ast.Class.__str__(), cpp.ast._GenericDeclaration._TypeStringHelper(), cpp.ast.Class.bases, message.body, cpp.ast.Class.body, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, and cpp.ast.Class.templated_types.

348  def __str__(self):
349  name = self.name
350  if self.templated_types:
351  name += '<%s>' % self.templated_types
352  suffix = '%s, %s, %s' % (name, self.bases, self.body)
353  return self._TypeStringHelper(suffix)
354 
355 
def __str__(self)
Definition: ast.py:348
def _TypeStringHelper(self, suffix)
Definition: ast.py:244
templated_types
Definition: ast.py:326
def cpp.ast.Class.__str__ (   self)

Definition at line 348 of file ast.py.

References cpp.ast.Class.__str__(), cpp.ast._GenericDeclaration._TypeStringHelper(), cpp.ast.Class.bases, message.body, cpp.ast.Class.body, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, and cpp.ast.Class.templated_types.

348  def __str__(self):
349  name = self.name
350  if self.templated_types:
351  name += '<%s>' % self.templated_types
352  suffix = '%s, %s, %s' % (name, self.bases, self.body)
353  return self._TypeStringHelper(suffix)
354 
355 
def __str__(self)
Definition: ast.py:348
def _TypeStringHelper(self, suffix)
Definition: ast.py:244
templated_types
Definition: ast.py:326
def cpp.ast.Class.IsDeclaration (   self)

Definition at line 328 of file ast.py.

References cpp.ast.Class.bases, message.body, and cpp.ast.Class.body.

Referenced by cpp.ast.Class.IsDeclaration().

328  def IsDeclaration(self):
329  return self.bases is None and self.body is None
330 
def IsDeclaration(self)
Definition: ast.py:328
def cpp.ast.Class.IsDeclaration (   self)

Definition at line 328 of file ast.py.

References cpp.ast.Class.bases, message.body, cpp.ast.Class.body, and cpp.ast.Class.IsDeclaration().

328  def IsDeclaration(self):
329  return self.bases is None and self.body is None
330 
def IsDeclaration(self)
Definition: ast.py:328
def cpp.ast.Class.IsDeclaration (   self)

Definition at line 328 of file ast.py.

References cpp.ast.Class.bases, message.body, cpp.ast.Class.body, and cpp.ast.Class.IsDeclaration().

328  def IsDeclaration(self):
329  return self.bases is None and self.body is None
330 
def IsDeclaration(self)
Definition: ast.py:328
def cpp.ast.Class.IsDefinition (   self)

Definition at line 331 of file ast.py.

References cpp.ast.Node.IsDeclaration().

Referenced by cpp.ast.Class.IsDefinition().

331  def IsDefinition(self):
332  return not self.IsDeclaration()
333 
def IsDeclaration(self)
Definition: ast.py:116
def IsDefinition(self)
Definition: ast.py:331
def cpp.ast.Class.IsDefinition (   self)

Definition at line 331 of file ast.py.

References cpp.ast.Node.IsDeclaration(), and cpp.ast.Class.IsDefinition().

331  def IsDefinition(self):
332  return not self.IsDeclaration()
333 
def IsDeclaration(self)
Definition: ast.py:116
def IsDefinition(self)
Definition: ast.py:331
def cpp.ast.Class.IsDefinition (   self)

Definition at line 331 of file ast.py.

References cpp.ast.Node.IsDeclaration(), and cpp.ast.Class.IsDefinition().

331  def IsDefinition(self):
332  return not self.IsDeclaration()
333 
def IsDeclaration(self)
Definition: ast.py:116
def IsDefinition(self)
Definition: ast.py:331
def cpp.ast.Class.IsExportable (   self)

Definition at line 334 of file ast.py.

References cpp.ast.Node.IsDeclaration(), and cpp.ast.Class.IsExportable().

334  def IsExportable(self):
335  return not self.IsDeclaration()
336 
def IsDeclaration(self)
Definition: ast.py:116
def IsExportable(self)
Definition: ast.py:334
def cpp.ast.Class.IsExportable (   self)

Definition at line 334 of file ast.py.

References cpp.ast.Node.IsDeclaration(), and cpp.ast.Class.IsExportable().

334  def IsExportable(self):
335  return not self.IsDeclaration()
336 
def IsDeclaration(self)
Definition: ast.py:116
def IsExportable(self)
Definition: ast.py:334
def cpp.ast.Class.IsExportable (   self)

Definition at line 334 of file ast.py.

References cpp.ast.Node.IsDeclaration().

Referenced by cpp.ast.Class.IsExportable().

334  def IsExportable(self):
335  return not self.IsDeclaration()
336 
def IsDeclaration(self)
Definition: ast.py:116
def IsExportable(self)
Definition: ast.py:334
def cpp.ast.Class.Requires (   self,
  node 
)

Definition at line 337 of file ast.py.

References cpp.ast.Class.bases, and cpp.ast.Class.Requires().

337  def Requires(self, node):
338  # TODO(nnorwitz): handle namespaces, etc.
339  if self.bases:
340  for token_list in self.bases:
341  # TODO(nnorwitz): bases are tokens, do name comparision.
342  for token in token_list:
343  if token.name == node.name:
344  return True
345  # TODO(nnorwitz): search in body too.
346  return False
347 
def Requires(self, node)
Definition: ast.py:337
def cpp.ast.Class.Requires (   self,
  node 
)

Definition at line 337 of file ast.py.

References cpp.ast.Class.bases, and cpp.ast.Class.Requires().

337  def Requires(self, node):
338  # TODO(nnorwitz): handle namespaces, etc.
339  if self.bases:
340  for token_list in self.bases:
341  # TODO(nnorwitz): bases are tokens, do name comparision.
342  for token in token_list:
343  if token.name == node.name:
344  return True
345  # TODO(nnorwitz): search in body too.
346  return False
347 
def Requires(self, node)
Definition: ast.py:337
def cpp.ast.Class.Requires (   self,
  node 
)

Definition at line 337 of file ast.py.

References cpp.ast.Class.bases.

Referenced by cpp.ast.Class.Requires().

337  def Requires(self, node):
338  # TODO(nnorwitz): handle namespaces, etc.
339  if self.bases:
340  for token_list in self.bases:
341  # TODO(nnorwitz): bases are tokens, do name comparision.
342  for token in token_list:
343  if token.name == node.name:
344  return True
345  # TODO(nnorwitz): search in body too.
346  return False
347 
def Requires(self, node)
Definition: ast.py:337

Member Data Documentation

cpp.ast.Class.bases
cpp.ast.Class.templated_types

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