Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / examples / Persistent_Grid / Grid.idl
blobbf3eaf0dc4915d4a4b56134344fcf6f090a8697e
1 // -*- C++ -*-
2 interface Grid
4 // = TITLE
5 // Create a <Grid> of type <name>
7 attribute short height;
8 // Height of the grid.
10 attribute short width;
11 // Width of the grid.
13 exception RANGE_ERROR
15 // = TITLE
16 // The range of parameter values do not fall in the expected
17 // range.
20 // = Constants for LOCATIONS and VALUE.
21 const short DEFAULT_SIZE = 10;
22 const short DEFAULT_VALUE = 1;
24 void set (in short n, in short m, in long value)
25 raises (RANGE_ERROR);
26 // Set the element [n,m] of the grid, to value.
28 long get (in short n, in short m)
29 raises (RANGE_ERROR);
30 // Return element [n,m] of the grid.
32 void destroy ();
33 // Destroy the grid.
36 interface Grid_Factory
38 // = TITLE
39 // Factory that creates a <Grid>
41 // = Default height and width for a <Grid>.
42 const short DEFAULT_HEIGHT = 10;
43 const short DEFAULT_WIDTH = 10;
45 Grid make_grid (in short height, in short width);
46 // Returns a new <Grid> instance.
48 void shutdown ();
49 // Shutdown the application.
51 void cleanup ();
52 // Unbind from persistent memory