# eric4.Utilities.ClassBrowsers.ClbrBaseClasses

Module implementing base classes used by the various class browsers.

### Global Attributes

None

### Classes

Attribute | Class to represent an attribute.
Class | Class to represent a class.
ClbrBase | Class implementing the base of all complex class browser objects.
ClbrVisibilityMixinBase | Class implementing the base class of all visibility mixins.
Coding | Class to represent a source coding.
Function | Class to represent a function or method.
Module | Class to represent a module.
_ClbrBase | Class implementing the base of all class browser objects.

### Functions

None

## Attribute

Class to represent an attribute.

### Derived from

_ClbrBase

### Class Attributes

None

### Class Methods

None

### Methods

Attribute | Constructor

### Static Methods

None

#### Attribute (Constructor)

Attribute(module, name, file, lineno)

Constructor

module
  name of the module containing this class
name
  name of this class
file
  filename containing this attribute
lineno
  linenumber of the class definition

Up

## Class

Class to represent a class.

### Derived from

ClbrBase

### Class Attributes

None

### Class Methods

None

### Methods

Class | Constructor

### Static Methods

None

#### Class (Constructor)

Class(module, name, super, file, lineno)

Constructor

module
  name of the module containing this class
name
  name of this class
super
  list of class names this class is inherited from
file
  filename containing this class
lineno
  linenumber of the class definition

Up

## ClbrBase

Class implementing the base of all complex class browser objects.

### Derived from

_ClbrBase

### Class Attributes

None

### Class Methods

None

### Methods

ClbrBase | Constructor
_addattribute | Protected method to add information about attributes.
_addclass | Protected method method to add a nested class to this class.
_addglobal | Protected method to add information about global variables.
_addmethod | Protected method to add information about a method.
_getattribute | Protected method to retrieve an attribute by name.
_getglobal | Protected method to retrieve a global variable by name.
_getmethod | Protected method to retrieve a method by name.

### Static Methods

None

#### ClbrBase (Constructor)

ClbrBase(module, name, file, lineno)

Constructor

module
  name of the module containing this class
name
  name of this class
file
  filename containing this object
lineno
  linenumber of the class definition

#### ClbrBase._addattribute

_addattribute(attr)

Protected method to add information about attributes.

attr
  Attribute object to be added (Attribute)

#### ClbrBase._addclass

_addclass(name, _class)

Protected method method to add a nested class to this class.

name
  name of the class
_class
  Class object to be added (Class)

#### ClbrBase._addglobal

_addglobal(attr)

Protected method to add information about global variables.

attr
  Attribute object to be added (Attribute)

#### ClbrBase._addmethod

_addmethod(name, function)

Protected method to add information about a method.

name
  name of method to be added (string)
function
  Function object to be added

#### ClbrBase._getattribute

_getattribute(name)

Protected method to retrieve an attribute by name.

name
  name of the attribute (string)

Returns:
  the named attribute or None

#### ClbrBase._getglobal

_getglobal(name)

Protected method to retrieve a global variable by name.

name
  name of the global variable (string)

Returns:
  the named global variable or None

#### ClbrBase._getmethod

_getmethod(name)

Protected method to retrieve a method by name.

name
  name of the method (string)

Returns:
  the named method or None

Up

## ClbrVisibilityMixinBase

Class implementing the base class of all visibility mixins.

### Derived from

object

### Class Attributes

None

### Class Methods

None

### Methods

isPrivate | Public method to check, if the visibility is Private.
isProtected | Public method to check, if the visibility is Protected.
isPublic | Public method to check, if the visibility is Public.
setPrivate | Public method to set the visibility to Private.
setProtected | Public method to set the visibility to Protected.
setPublic | Public method to set the visibility to Public.

### Static Methods

None

#### ClbrVisibilityMixinBase.isPrivate

isPrivate()

Public method to check, if the visibility is Private.

Returns:
  flag indicating Private visibility (boolean)

#### ClbrVisibilityMixinBase.isProtected

isProtected()

Public method to check, if the visibility is Protected.

Returns:
  flag indicating Protected visibility (boolean)

#### ClbrVisibilityMixinBase.isPublic

isPublic()

Public method to check, if the visibility is Public.

Returns:
  flag indicating Public visibility (boolean)

#### ClbrVisibilityMixinBase.setPrivate

setPrivate()

Public method to set the visibility to Private.

#### ClbrVisibilityMixinBase.setProtected

setProtected()

Public method to set the visibility to Protected.

#### ClbrVisibilityMixinBase.setPublic

setPublic()

Public method to set the visibility to Public.

Up

## Coding

Class to represent a source coding.

### Derived from

ClbrBase

### Class Attributes

None

### Class Methods

None

### Methods

Coding | Constructor

### Static Methods

None

#### Coding (Constructor)

Coding(module, file, lineno, coding)

Constructor

module
  name of the module containing this module
file
  filename containing this module
lineno
  linenumber of the module definition
coding
  character coding of the source file

Up

## Function

Class to represent a function or method.

### Derived from

ClbrBase

### Class Attributes

Class
General
Static

### Class Methods

None

### Methods

Function | Constructor

### Static Methods

None

#### Function (Constructor)

Function(module, name, file, lineno, signature = '', separator = ', ', modifierType=General)

Constructor

module
  name of the module containing this function
name
  name of this function
file
  filename containing this class
lineno
  linenumber of the class definition
signature
  parameterlist of the method
separator
  string separating the parameters
modifierType
  type of the function

Up

## Module

Class to represent a module.

### Derived from

ClbrBase

### Class Attributes

None

### Class Methods

None

### Methods

Module | Constructor

### Static Methods

None

#### Module (Constructor)

Module(module, name, file, lineno)

Constructor

module
  name of the module containing this module
name
  name of this module
file
  filename containing this module
lineno
  linenumber of the module definition

Up

## _ClbrBase

Class implementing the base of all class browser objects.

### Derived from

object

### Class Attributes

None

### Class Methods

None

### Methods

_ClbrBase | Constructor

### Static Methods

None

#### _ClbrBase (Constructor)

_ClbrBase(module, name, file, lineno)

Constructor

module
  name of the module containing this class
name
  name of this class
file
  filename containing this object
lineno
  linenumber of the class definition

Up