Ctypes¶

- class ccg.types.Ctypes.CGenericItem(name, in_space=None, doc=None)¶
Bases:
ccg.Cnamespace.CSpace,abc.ABCGeneric Item
Object that can be declared: Function, Class, Variable, Struct…
- declare(from_space=None)¶
- Parameters
from_space (Optional[ccg.Cnamespace.CSpace]) –
- Return type
- abstract declaration(style=<ccg.style.Style object>, semicolon=True, doc=True, from_space=None)¶
- property full_space_list: List[ccg.Cnamespace.CSpace]¶
- space_def(from_space=None)¶
- Parameters
from_space (Optional[ccg.Cnamespace.CSpace]) –
- Return type
str

- class ccg.types.Ctypes.CGenericType(name, bit_size=None, hungarian_prefixes=None, derived_from=None, in_space=None, doc=None)¶
Bases:
ccg.types.Ctypes.CGenericItemItem that is or generates a type
- Parameters
name (str) –
bit_size (Optional[int]) –
hungarian_prefixes (Optional[List[str]]) –
derived_from (Optional[CGenericType]) –
in_space (Optional[CSpace]) –
doc (Optional[Doc]) –
- property bit_size: int¶
- declaration(style=<ccg.style.Style object>, semicolon=True, doc=True, from_space=None, without_arguments=False, for_variable=False)¶
Type declaration
- Parameters
- Return type
str
Returns:
- 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
- type(name)¶
Create a copy of the type with a new name
- Parameters
name (str) –
- Return type
- typedef_render(style=<ccg.style.Style object>, from_space=None, doc=None)¶
- declare(from_space=None)¶
- Parameters
from_space (Optional[ccg.Cnamespace.CSpace]) –
- Return type
- property full_space_list: List[ccg.Cnamespace.CSpace]¶
- space_def(from_space=None)¶
- Parameters
from_space (Optional[ccg.Cnamespace.CSpace]) –
- Return type
str