Cfunction

Inheritance diagram of ccg.Cfunction.CFunction
class ccg.Cfunction.CFunction(name, return_type=<ccg.Ctypes.CGenericType object>, arguments=None, content=None, in_space=None, static=False, doc=None)

Bases: ccg.Ctypes.CGenericType, ccg.Ctypes.CItemDefinable

Parameters
Argument

alias of ccg.Cfunction.CFunctionArgument

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

doc_render(style)
Parameters

style (Style) –

Return type

str

definition(style=<ccg.style.Style object>, from_space=None, doc=False)
Parameters
  • style (Style) –

  • from_space (CSpace) –

  • doc (bool) –

Return type

str

declare()
Return type

ccg.Cstatement.CDeclaration

property bit_size: int
check_value(value)

Checks that a value is correct for the type

Parameters

value (Any) – value to check

Returns

boolean indicating if value fits type (True) or not

Return type

bool

define()
Return type

ccg.Cstatement.CDeclaration

property full_space_list: List[ccg.Cnamespace.CSpace]
space_def(from_space=None)
Parameters

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

Return type

str

style_checks(style)
Parameters

style (Style) –

Return type

None

type(name)
Parameters

name (str) –

Return type

ccg.Ctypes.CGenericType

typedef(doc=None)
Parameters

doc (Optional[Doc]) –

Return type

ccg.Cstatement.CStatement

typedef_render(style=<ccg.style.Style object>, from_space=None, doc=None)
Parameters
  • style (Style) –

  • from_space (CSpace) –

  • doc (Optional[Doc]) –

Return type

str

Inheritance diagram of ccg.Cfunction.CFunctionArgument
class ccg.Cfunction.CFunctionArgument(name, c_type, default=None, auto_hungarize=False, doc=None)

Bases: ccg.Cvariable.CVariable

Parameters
  • name (str) –

  • c_type (CGenericType) –

  • default (Any) –

  • auto_hungarize (bool) –

  • doc (Optional[Doc]) –

property bit_size: int
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

declare()
Return type

ccg.Cstatement.CStatement

doc_render(style)
Parameters

style (Style) –

Return type

str

property full_space_list: List[ccg.Cnamespace.CSpace]
space_def(from_space=None)
Parameters

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

Return type

str

style_checks(style)
Parameters

style (Style) –

Return type

None