readonly).
The yield method involves the server manipulating the wafer's
data to compute a non-attribute value.
#include "GenericDataTypes.idl"
module Wafer {
interface Wafers {
attribute GenericDataTypes::character modes;
attribute GenericDataTypes::list coordinates;
attribute GenericDataTypes::list values;
GenericDataTypes::numeric yield();
};
};
So the alternative without attributes is the longer
#include "GenericDataTypes.idl"
module Wafer {
interface Wafers {
// we could attain the same more interestingly with
// attributes (either readonly or read and writable).
// This would allow us to dynamically determine the basic
// fields of a Wafer object from the Interface repository.
// The IDL compiler will generate the methods for querying and
// setting the attributes we declare.
// However, doing it this way allows us to avoid the thorny
// issue of what types the attributes should have.
GenericDataTypes::character modes();
GenericDataTypes::list coordinates();
GenericDataTypes::list values();
void setModes(in GenericDataTypes::character data);
void setCoordinates(in GenericDataTypes::integer x,
in GenericDataTypes::integer y);
void setValues(in GenericDataTypes::list data);
GenericDataTypes::numeric yield();
};
};
We used this because we didn't want to identify the attributes
for encapsulation purposes and also we didn't want to identify
the types they had. But one ends up doing this anyway when creating
the get and set methods.