Package pygccxml :: Package declarations :: Module class_declaration :: Class class_t |

# type class_t

source code

                   object --+
                            |
    declaration.declaration_t --+
                                |
              scopedef.scopedef_t --+
                                    |
                                   class_t

describes class definition

Nested Classes
Inherited from `scopedef.scopedef_t`: `declaration_not_found_t`, `multiple_declarations_found_t`

Instance Methods
__init__(self, name=`'````'`, class_type=`'``class``'`, is_abstract=False) creates class that describes C++ class definition | source code
__str__(self) Default __str__ method. | source code
__eq__(self, other) function will return true, if both declarations refers to the same object. | source code
get_members(self, access=None) returns list of members according to access type | source code
adopt_declaration(self, decl, access) adds new declaration to the class | source code
remove_declaration(self, decl) removes decl from members list | source code
find_out_member_access_type(self, member) returns member access type | source code
i_depend_on_them(self, recursive=True) return list of all types and declarations the declaration depends on | source code
find_copy_constructor(self) | source code
find_trivial_constructor(self) | source code
find_noncopyable_vars(self) returns list of all noncopyable variables | source code
Inherited from `scopedef.scopedef_t`: `__getitem__`, `calldef`, `calldefs`, `casting_operator`, `casting_operators`, `class_`, `classes`, `clear_optimizer`, `constructor`, `constructors`, `decl`, `decls`, `enum`, `enumeration`, `enumerations`, `enums`, `init_optimizer`, `mem_fun`, `mem_funs`, `mem_oper`, `mem_opers`, `member_function`, `member_functions`, `member_operator`, `member_operators`, `operator`, `operators`, `typedef`, `typedefs`, `var`, `variable`, `variables`, `vars` Inherited from `declaration.declaration_t`: `__lt__`, `__ne__`, `create_decl_string`

Class Variables
| USE_DEMANGLED_AS_NAME = `True`
Inherited from `scopedef.scopedef_t`: `ALLOW_EMPTY_MDECL_WRAPPER`, `RECURSIVE_DEFAULT`

Properties
| class_type describes class type
| bases list of base classes
| recursive_bases list of all base classes
| derived list of derived classes
| recursive_derived list of all derive classes
| is_abstract describes whether class abstract or not
| public_members list of all public members
| private_members list of all private members
| protected_members list of all protected members
| aliases List of aliases to this instance
| byte_size Size of this class in bytes @type: int
| byte_align Alignment of this class in bytes @type: int
| container_traits reference to `container traits` or None
Inherited from `scopedef.scopedef_t`: `declarations` Inherited from `declaration.declaration_t`: `attributes`, `cache`, `compiler`, `decl_string`, `demangled`, `is_artificial`, `location`, `mangled`, `name`, `parent`, `partial_decl_string`, `partial_name`, `top_parent`

Method Details

### __init__(self, name=`'````'`, class_type=`'``class``'`, is_abstract=False) (Constructor) | source code
creates class that describes C++ class definition Overrides: declaration.declaration_t.__init__

### __str__(self) (Informal representation operator) | source code
Default __str__ method. This version just returns the decl_string and the class. Derived classes may override this method to provide more detailed information. A __str__ method for a declaration should always provide enough information so that it uniquely identifies the declaration and the user is able to find the declaration in his source code. Overrides: declaration.declaration_t.__str__ (inherited documentation)

### __eq__(self, other) (Equality operator) | source code
function will return true, if both declarations refers to the same object. This function could be implemented in terms of _get__cmp__data, but in this case it will downgrade performance. self.mangled property is not compared, because it could be chaned from one compilation time to an other. Overrides: declaration.declaration_t.__eq__ (inherited documentation)

### get_members(self, access=None) | source code
returns list of members according to access type If access equals to None, then returned list will contain all members. You should not modify the list content, otherwise different optimization data will stop work and may to give you wrong results. Parameters: `access` (ACCESS_TYPES) - describes desired members Returns: [ members ]

### adopt_declaration(self, decl, access) | source code
adds new declaration to the class Parameters: `decl` - reference to a declaration `access` (ACCESS_TYPES) - member access type

### remove_declaration(self, decl) | source code
removes decl from members list Parameters: `decl` (declaration_t) - declaration to be removed Overrides: scopedef.scopedef_t.remove_declaration

### find_out_member_access_type(self, member) | source code
returns member access type Parameters: `member` (declaration_t) - member of the class Returns: ACCESS_TYPES

### i_depend_on_them(self, recursive=True) | source code
return list of all types and declarations the declaration depends on Overrides: declaration.declaration_t.i_depend_on_them (inherited documentation)

Property Details

### class_type describes class type Get Method: _get_class_type(self) Set Method: _set_class_type(self, new_class_type)

### bases list of base classes Get Method: _get_bases(self) Set Method: _set_bases(self, new_bases)

### recursive_bases list of all base classes

### derived list of derived classes Get Method: _get_derived(self) Set Method: _set_derived(self, new_derived)

### recursive_derived list of all derive classes

### is_abstract describes whether class abstract or not Get Method: _get_is_abstract(self) Set Method: _set_is_abstract(self, is_abstract)

### public_members list of all public members Get Method: _get_public_members(self) Set Method: _set_public_members(self, new_public_members)

### private_members list of all private members Get Method: _get_private_members(self) Set Method: _set_private_members(self, new_private_members)

### protected_members list of all protected members Get Method: _get_protected_members(self) Set Method: _set_protected_members(self, new_protected_members)

### aliases List of aliases to this instance Get Method: _get_aliases(self) Set Method: _set_aliases(self, new_aliases)

### byte_size Size of this class in bytes @type: int Get Method: _get_byte_size(self) Set Method: _set_byte_size(self, new_byte_size)

### byte_align Alignment of this class in bytes @type: int Get Method: _get_byte_align(self) Set Method: _set_byte_align(self, new_byte_align)

### container_traits reference to `container traits` or None