3 //=============================================================================
7 * This class is an implementation of the Nestea Bookshelf interface.
9 * @author Darrell Brunsch <brunsch@cs.wustl.edu>
11 //=============================================================================
14 #if !defined (NESTEA_I_H)
19 // Forward declarations.
23 typedef Nestea_i
*Nestea_i_ptr
;
24 typedef Nestea_i_ptr Nestea_i_ref
;
29 * @brief Nestea Bookshelf Implementation
31 * Implements the Nestea Bookshelf server, which keeps track of the
32 * number of nestea cans in a bookshelf. You can drink Nestea to add
33 * it to the bookshelf or crush the cans to remove them.
35 class Nestea_i
: public POA_Nestea_Bookshelf
39 Nestea_i (CORBA::ORB_ptr orb
, const ACE_TCHAR
*filename
= ACE_TEXT("nestea.dat"));
44 /// Add <cans> number of cans to the bookshelf.
45 virtual void drink (CORBA::Long cans
);
47 /// Removes <cans> number of cans from the bookshelf.
48 virtual void crush (CORBA::Long cans
);
50 /// Returns the number of cans in the bookshelf.
51 virtual CORBA::Long
bookshelf_size ();
53 /// Returns comments about your collection.
54 virtual char *get_praise ();
56 virtual void shutdown();
58 /// Saves bookshelf data to a file.
61 /// Loads bookshelf data from a file.
64 /// The name of the file to store the data in.
65 ACE_TCHAR
*data_filename_
;
67 /// Number of cans in the bookshelf.
73 #endif /* NESTEA_I_H */