Fresco/Berlin/include/Berlin Console.hh,1.29,1.30
Neil John Pilgrim <[email protected]>
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Berlin/include/Berlin
In directory purcel:/tmp/cvs-serv11810/Berlin/include/Berlin
Modified Files:
Console.hh
Log Message:
- Tidy comments
- Add -C/--list-available-consoles option to server (towards bug129)
- Implement support in the console for the new option
- Refactor Console::open to use the new support functions
Index: Console.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/include/Berlin/Console.hh,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- Console.hh 12 Jan 2003 02:25:08 -0000 1.29
+++ Console.hh 8 Feb 2003 20:45:16 -0000 1.30
@@ -32,6 +32,7 @@
#include <stdexcept>
#include <iosfwd>
#include <vector>
+#include <map>
//. This is an abstraction of the underlying graphics libraries Berlin uses.
//. The DrawingKits call the methods of this object.
@@ -79,11 +80,17 @@
};
+ //. List available consoles (modules)
+ static void list_available(ostream &);
+
+ //. Check whether a particular console (module) is avilable
+ static bool is_available(std::string const &console);
//. Sets up the graphics library. It gets passed the commandline arguments
- //. of the server (argc and argv), checks them for any console-related options and
- //. afterwards passes them on to the graphic's library. Finally you need to pass
- //. the POA to this method.
+ //. of the server (argc and argv), checks them for any console-related
+ //. options and afterwards passes them on to the graphic's library.
+ //. Finally you need to pass the POA to this method.
+ // FIXME: argc/argv are unused? are we still aiming for cascading GetOpt?
static int open(const std::string &, int argc, char **argv,
PortableServer::POA_ptr,
Fresco::PixelCoord x, Fresco::PixelCoord y)
@@ -103,7 +110,8 @@
Fresco::PixelCoord, //.< Requested y size.
Fresco::PixelCoord) = 0; //.< Requested color depth.
- //. Activates a given drawable: After activation it can recieve requests via CORBA.
+ //. Activates a given drawable: After activation it can recieve requests
+ //. via CORBA.
Fresco::Drawable_ptr activate_drawable(Drawable *);
//. FIXME: Missing documentation!
PortableServer::Servant reference_to_servant(Fresco::Drawable_ptr);
@@ -148,6 +156,11 @@
static Console *_console;
static Reaper _reaper;
elist_t _extensions;
+
+ typedef std::map<std::string, std::string> console_list_t;
+ static console_list_t my_available_consoles;
+ //. Attempt to load all consoles, and cache their name/location
+ static void cache_available_consoles();
};
//. This is a chunk of (video-) memory that is used to store raster data.