Products Downloads


French version


 

Along with your Adelia quality manager expansion plugin, you can provide a program used to compute the metrics and verify the rules described by this plugin. This program must be a Visual Adelia Batch or Adelia Server program implementing a certain number of predefined entry points in the form of public procedures (subsequently referred to as "expansion points") that conform to the interface described below.


Expansion point implementation is optional: the expansion program is valid if it implements at least one expansion point.


The analysis program loads the program into memory at the start of the analysis process, then calls the "BEGIN" expansion point to enable the programmer to initialize the work context. The analysis program then iteratively calls the appropriate expansion points for each program analyzed. At the end of the analysis, the "END" expansion point is called and the expansion program is unloaded from memory.


The expansion program communicates with the CASE tool via the QualMgrToolBx DLL functions to access the configuration data (rule activation and parameters), execution data (current values of certain metrics) and to save its own metrics and violations.


The different expansion points are as follows:

Note: In the KLBADEL example environment, you can find an example expansion program in the TOOLS application area.


VERSION expansion point

This expansion point is called by the analysis program when loading a plugin, if a DLL version number is specified in the plugin description file. In this case, the entry point must exist and the version returned by this expansion point must match that specified by the plugin.


Parameters

Name

Type

I/O

Description

Dllversion

NUM_BIN_4

O

DLL version.


BEGIN expansion point

This expansion point is called by the analysis program during project analysis initialization. The programmer can perform general initializations at this point.


Parameters

Name

Type

I/O

Description

EnvName

ALPHA(128)

I

Name of the environment.

ProjectName

ALPHA(128)

I

Project name.

GenMode

ALPHA(6)

I

Analysis mode (full, delta or none).

creatObj

BOOL

I

Compilation job creation.

sonar

BOOL

I

SONAR type analysis.


BEGIN_PGM expansion point

This expansion point is called by the analysis program during program analysis initialization. The programmer can initialize specific data at this point.


Parameters

Name

Type.

I/O

Description

ProgramName

ALPHA(15)

I

Name of the program.

ProgramType

ALPHA(4)

I

Program type.

AD_I

Adelia (ADELIA) interactive program

AD_B

Adelia (ADELIA) batch program

VA_I

Visual Adelia (VADELIA) interactive program

VA_B

Visual Adelia (VADELIA) batch program

SA_B

Adelia Server (SADELIA) batch program

WA_I

Adelia Web (WADELIA) interactive program

WA_B

Adelia Web (WADELIA) batch program


DECLARATION expansion point

This expansion point is called by the analysis program when analyzing an object declaration.


Parameters

Name

Type

I/O

Description

ProgramName

ALPHA(15)

I

Name of the program.

ProgramType

ALPHA(4)

I

Program type.

AD_I

Adelia (ADELIA) interactive program

AD_B

Adelia (ADELIA) batch program

VA_I

Visual Adelia (VADELIA) interactive program

VA_B

Visual Adelia (VADELIA) batch program

SA_B

Adelia Server (SADELIA) batch program

WA_I

Adelia Web (WADELIA) interactive program

WA_B

Adelia Web (WADELIA) batch program

ExpLineNo

NUM_BIN_4

I

Line number in the expanded source, or zero.

LineNo

NUM_BIN_4

I

Line number in the program source code, or zero.

RuleName

ALPHA(15)

I

Name of the management rule, or blank.

MruLineNo

NUM_BIN_4

I

Line number in the management rule, or zero.

ItemName

ALPHA(128)

I

Name of the item in the data environment.

ItemType

ALPHA(15)

I

Item type (VAR, OBJ, PROC, etc.)
Possible values:

LAYOUT_FIELD

Layout field

VARIABLE

User variable

CONSTANT User constant

VAR_ASSOC

Associated variable

WINDOW

Window or page

OBJECT

Graphical object

VIEW

View

BREAK

Break

PROCEDURE

Procedure

DS

DS, DSE, DSI

LIST

List

LIST_INDEX List index

CURSOR

Cursor

LOADING

Loading

XML_ID XML identifier
SQL_STATEMENT SQL statement

AdeliaType

ALPHA(2)

I

Adelia type
Possible values:

A

Alphanumeric

NE

Extended numeric

NP

Packed numeric

B

Boolean

T

Time

D

Date

TS

Timestamp

I

IMAGE

I2

NUM_BIN_2

I4

NUM_BIN_4

I8

NUM_BIN_8

BI

Binary

IN

Integer

UN

Unsigned integer

PR

Pointer

GO

GRAPHICAL_OBJECT

CL

Class

length

NUM_BIN_4

I

Length.

In a "CONSTANT" object, a zero length means that the user constant is untyped.

nbDecimals

NUM_BIN_2

I

Decimals.

dim1

NUM_BIN_2

I

Dimension 1 if array, or zero.

dim2

NUM_BIN_2

I

Dimension 2 if array, or zero.

ObjectName

ALPHA(15)

I

Name of the graphical object.

parameter

BOOL

I

Program or procedure parameter.

DSField

BOOL

I

DS field.

ListField

BOOL

I

List field.

local

BOOL

I

Local visibility.

AdditionalInfo

ALPHA(50)

I

Additional information according to context:


PROCEDURE context:

Positions 1 to 15

blank

Client procedure

<logical server name>

Server procedure

*ALL

Common procedure

*SADELIA

SADELIA program procedure


Positions 16 to 25

blank

Normal procedure

PUBLIC

Public procedure

EXCEPTION

"Exception" procedure


BREAK context:

Positions 1 to 15

blank

Client break

<logical server name>

Server break

*ALL

Common break

*SADELIA

SADELIA program break



↑ Top of page


SOURCE expansion point

This expansion point is called by the analysis program at the end of program analysis.

The programmer can, for example, save the total program metrics here.


Parameters

Nom

Type.

I/O

Description

ProgramName

ALPHA(15)

I

Name of the program.

ProgramType

ALPHA(4)

I

Program type.

AD_I

Adelia (ADELIA) interactive program

AD_B

Adelia (ADELIA) batch program

VA_I

Visual Adelia (VADELIA) interactive program

VA_B

Visual Adelia (VADELIA) batch program

SA_B

Adelia Server (SADELIA) batch program

WA_I

Adelia Web (WADELIA) interactive program

WA_B

Adelia Web (WADELIA) batch program

ExpLineNo

NUM_BIN_4

I

Line number in the expanded source, or zero.

LineNo

NUM_BIN_4

I

Line number in the program source code, or zero.

RuleName

ALPHA(15)

I

Name of the management rule, or blank.

MruLineNo

NUM_BIN_4

I

Line number in the management rule, or zero.

server

ALPHA(15)

I

Logical server name.

source

ALPHA(5000)

I

Line source.


END_PGM expansion point

This expansion point is called by the analysis program at the end of program analysis.

The programmer can, for example, save the total program metrics here.


Parameters

Name

Type

I/O

Description

ProgramName

ALPHA(15)

I

Name of the program.

ProgramType

ALPHA(4)

I

Program type.

AD_I

Adelia (ADELIA) interactive program

AD_B

Adelia (ADELIA) batch program

VA_I

Visual Adelia (VADELIA) interactive program

VA_B

Visual Adelia (VADELIA) batch program

SA_B

Adelia Server (SADELIA) batch program

WA_I

Adelia Web (WADELIA) interactive program

WA_B

Adelia Web (WADELIA) batch program

FileName

ALPHA(250)

I

Name of the XML file containing the program source code.

VerifSuccess

BOOL

I

Program verification was successful.


END expansion point

Called by the analysis program at the end of project analysis.

The program computes the project-related metrics.


The functions QMQueryFirstProgram and QMQueryNextProgram of the QualToolBxMgr DLL are used to scroll through the programs to be included in total metrics.


Important note: As the analysis can be performed by delta, some programs may not have been processed during previous phases. Use the list of programs included in project analysis, not a total value calculated progressively.


Parameters

None.



↑ Top of page

  • Aucune étiquette