Cvariable

Inheritance diagram of ccg.Cvariable.CVariable
class ccg.Cvariable.CVariable(name, c_type, initial_value=None, static=False, const=False, constexpr=False, auto_hungarize=False, doc=None)

Bases: ccg.types.Ctypes.CGenericItem, ccg.expressions.Cexpression.CExpression

Variable

Parameters
  • name (str) –

  • c_type (CGenericType) –

  • initial_value (CExpression) –

  • static (bool) –

  • const (bool) –

  • constexpr (bool) –

  • auto_hungarize (bool) –

  • doc (Optional[Doc]) –

style_checks(style)
Parameters

style (Style) –

Return type

None

declaration(style=<ccg.style.Style object>, semicolon=True, doc=True, from_space=None, without_arguments=False)
Parameters
  • style (Style) –

  • semicolon (bool) –

  • doc (bool) –

  • from_space (CSpace) –

  • without_arguments (bool) –

Return type

str

property bit_size: int
declare(from_space=None)
Parameters

from_space (Optional[ccg.Cnamespace.CSpace]) –

Return type

ccg.statements.Cstatement.CDeclaration

doc_render(style)
Parameters

style (Style) –

Return type

str

property full_space_list: List[ccg.Cnamespace.CSpace]
render(style=<ccg.style.Style object>)
Parameters

style (Style) –

Return type

str

space_def(from_space=None)
Parameters

from_space (Optional[ccg.Cnamespace.CSpace]) –

Return type

str