blob: e857b7f92385cdda5b9dbdf38ef1093e237f0e52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// -*- C++ -*-
// $Id$
interface Grid
{
// = TITLE
// Create a <Grid> of type <name>
attribute short height;
// Height of the grid.
attribute short width;
// Width of the grid.
exception RANGE_ERROR
{
// = TITLE
// The range of parameter values do not fall in the expected
// range.
};
// = Constants for LOCATIONS and VALUE.
const short DEFAULT_LOCATION = 1;
const short DEFAULT_VALUE = 100;
void set (in short n, in short m, in long value)
raises (RANGE_ERROR);
// Set the element [n,m] of the grid, to value.
long get (in short n, in short m)
raises (RANGE_ERROR);
// Return element [n,m] of the grid.
void destroy ();
// Destroy the grid.
};
interface Grid_Factory
{
// = TITLE
// Factory that creates a <Grid>
// = Default height and width for a <Grid>.
const short DEFAULT_HEIGHT = 10;
const short DEFAULT_WIDTH = 10;
Grid make_grid (in short height, in short width);
// Returns a new <Grid> instance.
void shutdown ();
// Shutdown the application.
};
|