proxygen
cpp.ast.Type Class Reference
Inheritance diagram for cpp.ast.Type:
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

Public Member Functions

def __init__ (self, start, end, name, templated_types, modifiers, reference, pointer, array)
 
def __str__ (self)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (self)
 
def __init__ (self, start, end, name, templated_types, modifiers, reference, pointer, array)
 
def __str__ (self)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (self)
 
def __init__ (self, start, end, name, templated_types, modifiers, reference, pointer, array)
 
def __str__ (self)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (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

 templated_types
 
 name
 
 modifiers
 
 reference
 
 pointer
 
 array
 
- Public Attributes inherited from cpp.ast._GenericDeclaration
 name
 
 namespace
 
- Public Attributes inherited from cpp.ast.Node
 start
 
 end
 

Detailed Description

Type used for any variable (eg class, primitive, struct, etc).

Definition at line 409 of file ast.py.

Constructor & Destructor Documentation

def cpp.ast.Type.__init__ (   self,
  start,
  end,
  name,
  templated_types,
  modifiers,
  reference,
  pointer,
  array 
)
Args:
  name: str name of main type
  templated_types: [Class (Type?)] template type info between <>
  modifiers: [str] type modifiers (keywords) eg, const, mutable, etc.
  reference, pointer, array: bools

Definition at line 413 of file ast.py.

413  reference, pointer, array):
414  """
415  Args:
416  name: str name of main type
417  templated_types: [Class (Type?)] template type info between <>
418  modifiers: [str] type modifiers (keywords) eg, const, mutable, etc.
419  reference, pointer, array: bools
420  """
421  _GenericDeclaration.__init__(self, start, end, name, [])
422  self.templated_types = templated_types
423  if not name and modifiers:
424  self.name = modifiers.pop()
425  self.modifiers = modifiers
426  self.reference = reference
427  self.pointer = pointer
428  self.array = array
429 
templated_types
Definition: ast.py:422
def cpp.ast.Type.__init__ (   self,
  start,
  end,
  name,
  templated_types,
  modifiers,
  reference,
  pointer,
  array 
)
Args:
  name: str name of main type
  templated_types: [Class (Type?)] template type info between <>
  modifiers: [str] type modifiers (keywords) eg, const, mutable, etc.
  reference, pointer, array: bools

Definition at line 413 of file ast.py.

References cpp.ast.Type.array, cpp.ast.Function.modifiers, cpp.ast.Type.modifiers, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, cpp.ast.Type.pointer, cpp.ast.Type.reference, cpp.ast.Class.templated_types, cpp.ast.Function.templated_types, and cpp.ast.Type.templated_types.

413  reference, pointer, array):
414  """
415  Args:
416  name: str name of main type
417  templated_types: [Class (Type?)] template type info between <>
418  modifiers: [str] type modifiers (keywords) eg, const, mutable, etc.
419  reference, pointer, array: bools
420  """
421  _GenericDeclaration.__init__(self, start, end, name, [])
422  self.templated_types = templated_types
423  if not name and modifiers:
424  self.name = modifiers.pop()
425  self.modifiers = modifiers
426  self.reference = reference
427  self.pointer = pointer
428  self.array = array
429 
templated_types
Definition: ast.py:422
def cpp.ast.Type.__init__ (   self,
  start,
  end,
  name,
  templated_types,
  modifiers,
  reference,
  pointer,
  array 
)
Args:
  name: str name of main type
  templated_types: [Class (Type?)] template type info between <>
  modifiers: [str] type modifiers (keywords) eg, const, mutable, etc.
  reference, pointer, array: bools

Definition at line 413 of file ast.py.

References cpp.ast.Type.array, cpp.ast.Function.modifiers, cpp.ast.Type.modifiers, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, cpp.ast.Type.pointer, cpp.ast.Type.reference, cpp.ast.Class.templated_types, cpp.ast.Function.templated_types, and cpp.ast.Type.templated_types.

413  reference, pointer, array):
414  """
415  Args:
416  name: str name of main type
417  templated_types: [Class (Type?)] template type info between <>
418  modifiers: [str] type modifiers (keywords) eg, const, mutable, etc.
419  reference, pointer, array: bools
420  """
421  _GenericDeclaration.__init__(self, start, end, name, [])
422  self.templated_types = templated_types
423  if not name and modifiers:
424  self.name = modifiers.pop()
425  self.modifiers = modifiers
426  self.reference = reference
427  self.pointer = pointer
428  self.array = array
429 
templated_types
Definition: ast.py:422

Member Function Documentation

def cpp.ast.Type.__str__ (   self)

Definition at line 430 of file ast.py.

References cpp.ast._GenericDeclaration._TypeStringHelper(), cpp.ast.Type.array, join, cpp.ast.Function.modifiers, cpp.ast.Type.modifiers, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, cpp.ast.Type.pointer, cpp.ast.Type.reference, cpp.ast.Class.templated_types, cpp.ast.Function.templated_types, and cpp.ast.Type.templated_types.

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

430  def __str__(self):
431  prefix = ''
432  if self.modifiers:
433  prefix = ' '.join(self.modifiers) + ' '
434  name = str(self.name)
435  if self.templated_types:
436  name += '<%s>' % self.templated_types
437  suffix = prefix + name
438  if self.reference:
439  suffix += '&'
440  if self.pointer:
441  suffix += '*'
442  if self.array:
443  suffix += '[]'
444  return self._TypeStringHelper(suffix)
445 
def __str__(self)
Definition: ast.py:430
templated_types
Definition: ast.py:422
def _TypeStringHelper(self, suffix)
Definition: ast.py:244
#define join
def cpp.ast.Type.__str__ (   self)

Definition at line 430 of file ast.py.

References cpp.ast.Type.__str__(), cpp.ast._GenericDeclaration._TypeStringHelper(), cpp.ast.Type.array, join, cpp.ast.Function.modifiers, cpp.ast.Type.modifiers, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, cpp.ast.Type.pointer, cpp.ast.Type.reference, cpp.ast.Class.templated_types, cpp.ast.Function.templated_types, and cpp.ast.Type.templated_types.

430  def __str__(self):
431  prefix = ''
432  if self.modifiers:
433  prefix = ' '.join(self.modifiers) + ' '
434  name = str(self.name)
435  if self.templated_types:
436  name += '<%s>' % self.templated_types
437  suffix = prefix + name
438  if self.reference:
439  suffix += '&'
440  if self.pointer:
441  suffix += '*'
442  if self.array:
443  suffix += '[]'
444  return self._TypeStringHelper(suffix)
445 
def __str__(self)
Definition: ast.py:430
templated_types
Definition: ast.py:422
def _TypeStringHelper(self, suffix)
Definition: ast.py:244
#define join
def cpp.ast.Type.__str__ (   self)

Definition at line 430 of file ast.py.

References cpp.ast.Type.__str__(), cpp.ast._GenericDeclaration._TypeStringHelper(), cpp.ast.Type.array, join, cpp.ast.Function.modifiers, cpp.ast.Type.modifiers, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, cpp.ast.Type.pointer, cpp.ast.Type.reference, cpp.ast.Class.templated_types, cpp.ast.Function.templated_types, and cpp.ast.Type.templated_types.

430  def __str__(self):
431  prefix = ''
432  if self.modifiers:
433  prefix = ' '.join(self.modifiers) + ' '
434  name = str(self.name)
435  if self.templated_types:
436  name += '<%s>' % self.templated_types
437  suffix = prefix + name
438  if self.reference:
439  suffix += '&'
440  if self.pointer:
441  suffix += '*'
442  if self.array:
443  suffix += '[]'
444  return self._TypeStringHelper(suffix)
445 
def __str__(self)
Definition: ast.py:430
templated_types
Definition: ast.py:422
def _TypeStringHelper(self, suffix)
Definition: ast.py:244
#define join
def cpp.ast.Type.IsDeclaration (   self)

Definition at line 448 of file ast.py.

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

448  def IsDeclaration(self):
449  return False
450 
def IsDeclaration(self)
Definition: ast.py:448
def cpp.ast.Type.IsDeclaration (   self)

Definition at line 448 of file ast.py.

References cpp.ast.Type.IsDeclaration().

448  def IsDeclaration(self):
449  return False
450 
def IsDeclaration(self)
Definition: ast.py:448
def cpp.ast.Type.IsDeclaration (   self)

Definition at line 448 of file ast.py.

References cpp.ast.Type.IsDeclaration().

448  def IsDeclaration(self):
449  return False
450 
def IsDeclaration(self)
Definition: ast.py:448
def cpp.ast.Type.IsDefinition (   self)

Definition at line 451 of file ast.py.

References cpp.ast.Type.IsDefinition().

451  def IsDefinition(self):
452  return False
453 
def IsDefinition(self)
Definition: ast.py:451
def cpp.ast.Type.IsDefinition (   self)

Definition at line 451 of file ast.py.

References cpp.ast.Type.IsDefinition().

451  def IsDefinition(self):
452  return False
453 
def IsDefinition(self)
Definition: ast.py:451
def cpp.ast.Type.IsDefinition (   self)

Definition at line 451 of file ast.py.

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

451  def IsDefinition(self):
452  return False
453 
def IsDefinition(self)
Definition: ast.py:451
def cpp.ast.Type.IsExportable (   self)

Definition at line 454 of file ast.py.

References cpp.ast.Type.IsExportable(), and object.

454  def IsExportable(self):
455  return False
456 
457 
def IsExportable(self)
Definition: ast.py:454
def cpp.ast.Type.IsExportable (   self)

Definition at line 454 of file ast.py.

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

454  def IsExportable(self):
455  return False
456 
457 
def IsExportable(self)
Definition: ast.py:454
def cpp.ast.Type.IsExportable (   self)

Definition at line 454 of file ast.py.

References cpp.ast.Type.IsExportable(), and object.

454  def IsExportable(self):
455  return False
456 
457 
def IsExportable(self)
Definition: ast.py:454

Member Data Documentation

cpp.ast.Type.array

Definition at line 428 of file ast.py.

Referenced by cpp.ast.Type.__init__(), and cpp.ast.Type.__str__().

cpp.ast.Type.modifiers

Definition at line 425 of file ast.py.

Referenced by cpp.ast.Type.__init__(), and cpp.ast.Type.__str__().

cpp.ast.Type.name

Definition at line 424 of file ast.py.

Referenced by cpp.tokenize.Token.__init__(), and cpp.tokenize.Token.__str__().

cpp.ast.Type.pointer

Definition at line 427 of file ast.py.

Referenced by cpp.ast.Type.__init__(), and cpp.ast.Type.__str__().

cpp.ast.Type.reference

Definition at line 426 of file ast.py.

Referenced by cpp.ast.Type.__init__(), and cpp.ast.Type.__str__().

cpp.ast.Type.templated_types

Definition at line 422 of file ast.py.

Referenced by cpp.ast.Type.__init__(), and cpp.ast.Type.__str__().


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