Cclass

Inheritance diagram of ccg.Cclass.CClass
class ccg.Cclass.CClass(name, inherit_from=None, members=None, doc=None)

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

Parameters
  • name (str) –

  • inherit_from (Optional[Union[CClassInheritance, List[CClassInheritance]]]) –

  • members (List[ccg.Cclass.CClassMember]) –

  • doc (Optional[Doc]) –

Access

alias of ccg.Cclass.CClassAccess

Attribute

alias of ccg.Cclass.CClassAttribute

Method

alias of ccg.Cclass.CClassMethod

Constructor

alias of ccg.Cclass.CClassConstructor

TypeMember

alias of ccg.Cclass.ClassTypeMember

Using

alias of ccg.Cclass.CClassUsing

Inherit

alias of ccg.Cclass.CClassInheritance

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
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

declare()
Return type

ccg.Cstatement.CStatement

define()
Return type

ccg.Cstatement.CStatement

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

  • from_space (CSpace) –

  • doc (bool) –

Return type

str

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

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

all_members_definition()
Return type

ccg.Cstatement.CStatements

style_checks(style)
Parameters

style (ccg.style.Style) –

Return type

None

property constructor
class ccg.Cclass.CClassAccess(value)

Bases: enum.Enum

An enumeration.

public = 0
protected = 1
private = 2
Inheritance diagram of ccg.Cclass.CClassAttribute
class ccg.Cclass.CClassAttribute(name, c_type, initial_value=None, access=<CClassAccess.private: 2>, static=False, const=False, constexpr=False, auto_hungarize=False, doc=None)

Bases: ccg.Cvariable.CVariable, ccg.Cclass.CClassMember

Parameters
  • name (str) –

  • c_type (CGenericType) –

  • initial_value (Any) –

  • access (ccg.Cclass.CClassAccess) –

  • static (bool) –

  • const (bool) –

  • constexpr (bool) –

  • 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)

All Class Members should inherit from a CGenericItem that contains a Declaration

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)

All Class members should have a doc_render method

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

Inheritance diagram of ccg.Cclass.CClassMethod
class ccg.Cclass.CClassMethod(name, return_type=<ccg.Ctypes.CGenericType object>, arguments=None, content=None, access=<CClassAccess.private: 2>, static=False, doc=None)

Bases: ccg.Cfunction.CFunction, ccg.Cclass.CClassMember

Parameters
Argument

alias of ccg.Cfunction.CFunctionArgument

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

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

All Class Members should inherit from a CGenericItem that contains a Declaration

Parameters
  • style (Style) –

  • semicolon (bool) –

  • doc (bool) –

  • from_space (CSpace) –

  • without_arguments (bool) –

Return type

str

declare()
Return type

ccg.Cstatement.CDeclaration

define()
Return type

ccg.Cstatement.CDeclaration

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

  • from_space (CSpace) –

  • doc (bool) –

Return type

str

doc_render(style)

All Class members should have a doc_render method

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

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.Cclass.CClassConstructor
class ccg.Cclass.CClassConstructor(arguments=None, content=None, access=<CClassAccess.private: 2>)

Bases: ccg.Cclass.CClassMethod

Parameters
Argument

alias of ccg.Cfunction.CFunctionArgument

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

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

All Class Members should inherit from a CGenericItem that contains a Declaration

Parameters
  • style (Style) –

  • semicolon (bool) –

  • doc (bool) –

  • from_space (CSpace) –

  • without_arguments (bool) –

Return type

str

declare()
Return type

ccg.Cstatement.CDeclaration

define()
Return type

ccg.Cstatement.CDeclaration

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

  • from_space (CSpace) –

  • doc (bool) –

Return type

str

doc_render(style)

All Class members should have a doc_render method

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

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