TOC PREV NEXT INDEX DOC LIST MASTER INDEX



Name Services (Package V_Names)

This chapter contains an overview describing this package. This overview section is followed by a detailed description of each subprogram in this package.

The following topics are covered in this section:


Package Overview

Description

V_Names provides name services. These services allow objects to be shared between programs or, in conjunction with V_Xtasking.Inter_Program_Call, allow a procedure to be called from another program. V_Names has been layered on the Ada Kernel name services.

Resolve_Object and Resolve_Procedure first attempt to find an already bound name that exactly matches the name parameter. For a match, they return immediately. Otherwise, according to a wait_time parameter, they wait indefinitely until the name is bound, return immediately and raise the Name_Resolve_Failed exception, or raise the Name_Resolve_Timed_Out exception if the name is not bound within Wait_Time.


Warning: For native, names are only known within a single program. Name binding and resolution services are more applicable to the cross-target environment.

Package Procedures And Functions

Table 17 lists the procedures and functions in package V_Names with a brief description of each subprogram.

Table 17 Procedures and Functions
Name
Description
procedure Bind_Object
Bind a name to the address of an object.
procedure Bind_Procedure
Bind a name to the program ID and address of a procedure.
procedure/function Resolve_Object
Resolve the name of an object into its address.
procedure Resolve_Procedure
Resolve the name of a procedure into its program ID and address.

Constants

Table 18 lists the exceptions in package V_Names.

Table 18 Constants
Name
Description
Wait_Forever
Used with the Resolve_Object or Resolve_Procedure services to specify to wait indefinitely for the name to be bound.
Do_Not_Wait
Used with the Resolve_Object or Resolve_Procedure services to specify not waiting at all for the name to be bound.

Exceptions

Table 19 lists the exceptions in package V_Names.

Table 19 Exceptions
Name
Description
No_Memory_For_Name
Raised if an attempt is made to bind a name and there is insufficient memory.
Name_Service_Not_Supported
Raised if name services are not supported by the underlying RTS.
Bad_Argument_For_Name_Service
Raised if name service is called with a null name.
Name_Already_Bound
Raised if an attempt is made to bind a name and the name has already been bound to another object or procedure.
Name_Resolve_Timed_Out
Raised by Resolve_Object or Resolve_Procedure if a timed wait is attempted and the name is not bound in the given time interval.
Name_Resolve_Failed
Raised by Resolve_Object or Resolve_Procedure if a nonwaited attempt is made to resolve a name, and the name is not already bound.

Package Specification


Procedures and Functions in Package V_Names

procedure Bind_Object

Syntax

Arguments

Description

Bind_Object binds a name to the address of an object.

Exceptions

procedure Bind_Procedure

Syntax

Arguments

Description

Bind_Procedure binds a name to the Program ID and address of a procedure. When the procedure_program parameter is omitted, it is set to the current program.

Exceptions

procedure/function Resolve_Object

Syntax

Arguments

Description

Resolve_Object resolves the name of an object into its address. Two versions are supplied: a procedure that returns the address as an out parameter or a function returning the object address.

Resolve_Object first attempts to find an already bound name that exactly matches the name parameter. For a match, it returns immediately. Otherwise, it returns according to the wait_time parameter.

Exceptions

procedure Resolve_Procedure

Syntax

Arguments

Description

Resolve_Procedure resolves the name of a procedure into its program_id and address. The program_id and address can be used to call the procedure with the V_Xtasking.Inter_Program_Call service.

Resolve_Procedure first attempts to find an already bound name that exactly matches the name parameter. For a match, it returns immediately. Otherwise, it returns according to the wait_time parameter.

Exceptions


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2003, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS