Next Previous Up Top Contents Index

A.4.10 Mapping for attribute

A.4.10.2 normal attribute

Attributes that are not declaredreadonly are mapped to a pair of methods that follow the convention used for default slot accessors generated bydefclass. Specifically, a reader-method is defined whose name follows the convention forreadonly attributes. A writer is defined whose name is (setf name) wherename is the name of the definedreader-method.

For example, in IDL:

module example{   
  interface attributes {     
    attribute string attr1;    
    readonly attribute long attr2;};} 

And in use:

;; Assume x is bound to an object of class example:attributes
(attr2 x)
> 40001

(attr1 x) > "Sample"

(setf (attr1 x) "New value") > "New value"

(attr1 x) > "New value"


Developing Component Software with CORBA - 22 Jan 1999

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker