DEV IN PROGRESS

Module pychrysalide.analysis.types

Documentation

Python module for Chrysalide.analysis.types

Classes

Class ArrayType

PyChrysalide array type

The object can produce an "informal" string representation of itself with a call to str().

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.DataType
           ╰── pychrysalide.analysis.types.ArrayType

Implements: pychrysalide.analysis.storage.SerializableObject

Attributes

dimension

ide the array dimension.

dimension_expression

access to the array dimension as expression.

dimension_number

access to the array dimension as number.

members

ide the type of each members of the array.

numbered

if the dimension of the array is a number.

Class BasicType

The BasicType class handles all the primary types of data, such as integers, characters or floating numbers.

Instances can be created using the following constructor:

    BasicType(base)

Where base is one of the BaseType values, except BaseType.INVALID.

The object can produce an "informal" string representation of itself with a call to str().

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.DataType
           ╰── pychrysalide.analysis.types.BasicType

Implements: pychrysalide.analysis.storage.SerializableObject

Attributes

base

Provide the internal identifier of the basic type.

This property provides a BaseType value.

Constants

BaseType

Identifiers for basic data types.

0= 0
1= 1
2= 2
3= 3
4= 4
5= 5
6= 6
7= 7
8= 8
9= 9
10= 10
11= 11
12= 12
13= 13
14= 14
15= 15
16= 16
17= 17
18= 18
19= 19
20= 20
21= 21
22= 22
23= 23
24= 24
25= 25
26= 26
27= 27
28= 28
29= 29
30= 30

Class ClassEnumType

The ClassEnumType class handles types embedding other types, such as classes, structures or enumerations.

Instances can be created using the following constructor:

    ClassEnumType(kind, name=None)

Where kind is one of the ClassEnumKind values, except ClassEnumKind.COUNT, and name is an optional string.

The object can produce an "informal" string representation of itself with a call to str().

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.DataType
           ╰── pychrysalide.analysis.types.ClassEnumType

Implements: pychrysalide.analysis.storage.SerializableObject

Attributes

kind

Provide the internal identifier for the kind of the type.

This property provides a ClassEnumKind value.

name

Provide the name registered for the type.

This property provides a string or None if no value is defined.

Constants

ClassEnumKind

Kind of types such as classes, structures and enumerations.

0= 0
1= 1
2= 2
3= 3
4= 4
5= 5
6= 6
7= 7

Class EncapsulatedType

PyChrysalide encapsulated type

The object can produce an "informal" string representation of itself with a call to str().

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.DataType
           ╰── pychrysalide.analysis.types.EncapsulatedType

Implements: pychrysalide.analysis.storage.SerializableObject

Attributes

etype

ide the encapsultion type.

item

ide the encapsulted type.

Constants

EncapsulationType

Identifiers for basic data types.

0= 0
1= 1
2= 2
3= 3
4= 4
5= 5
6= 6

Class ExprType

The ExprType class handles raw expressions defined for some types.

Instances can be created using the following constructor:

    ExprType(value)

The value expression can be any string value, which is not further processed.

The object can produce an "informal" string representation of itself with a call to str().

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.DataType
           ╰── pychrysalide.analysis.types.ExprType

Implements: pychrysalide.analysis.storage.SerializableObject

Attributes

value

Value of the expression type.

This value can be any string.

Class LiteralType

PyChrysalide literal type

The object can produce an "informal" string representation of itself with a call to str().

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.DataType
           ╰── pychrysalide.analysis.types.LiteralType

Implements: pychrysalide.analysis.storage.SerializableObject

Class OverrideType

PyChrysalide override type

The object can produce an "informal" string representation of itself with a call to str().

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.DataType
           ╰── pychrysalide.analysis.types.OverrideType

Implements: pychrysalide.analysis.storage.SerializableObject

Attributes

base

ide the base of the override type.

offsets

ide the offsets of the override type.

Class ProtoType

The ProtoType class defines an empty prototype of function.

Instances can be created using the following constructor:

    ProtoType()

The arguments and return types have then to be filled in the created prototype with the relevant methods or properties.

The object can produce an "informal" string representation of itself with a call to str().

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.DataType
           ╰── pychrysalide.analysis.types.ProtoType

Implements: pychrysalide.analysis.storage.SerializableObject

Methods

add_arg(self, arg)

Add an extra argument to the prototype.

This extra argument has to be a DataType instance.

Attributes

args

List of all arguments for the prototype.

The returned value is a tuple of DataType instances.

return_type

Type of the prototype return value.

This type is a DataType instance, or None if no return type has been defined for the prototype.

Class TemplateType

The TemplateType class declares an empty template type.

Instances can be created using the following constructor:

    TemplateType()

Name and template parameters have then to be filled in the created declaration with the relevant methods or properties.

The object can produce an "informal" string representation of itself with a call to str().

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.DataType
           ╰── pychrysalide.analysis.types.TemplateType

Implements: pychrysalide.analysis.storage.SerializableObject

Methods

add_param(self, param)

Add an extra parameter to the template type.

This extra parameter has to be a DataType instance.

Attributes

name

Name of the template type.

This property is a simple string, or None is the template type has no name.

params

List of all parameters of the template type.

The returned value is a tuple of DataType instances.