Go to Overview over all GrAL packages.
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

IO/istream-control-device.h

Go to the documentation of this file.
00001 #ifndef NMWR_GB_ISTREAM_CONTROL_DEVICE_H
00002 #define NMWR_GB_ISTREAM_CONTROL_DEVICE_H
00003 
00004 
00005 
00006 // $LICENSE
00007 
00008 
00009 #include <iostream.h>
00010 #include <list>  // STL
00011 #include <string>
00012 
00013 #include "IO/control-device.h"
00014 #include "IO/read-parameters.h"
00015 
00016 class istream_control_device_impl : public control_device_impl {
00017   typedef istream_control_device_impl self;
00018 public:
00019   istream_control_device_impl(std::istream* i,
00020                               std::string const& nm, 
00021                               std::string const& ind = "");
00022 
00023   control_device_impl* get_sub_device(std::string const& nm);
00024 
00025   virtual std::string name() const;
00026 
00027   virtual void update();
00028   
00029   virtual void add(const std::string& name,Mutator* value);
00030 
00031   virtual void register_at(ControlDevice& Ctrl);
00032   virtual void register_at(ControlDevice& Ctrl, const std::string& prefix);
00033 
00034   virtual void attach_to(std::istream& in_new);
00035   virtual void print_values(std::ostream& out) const;
00036   virtual void print_values(std::ostream& out, std::string const& ind) const; 
00037 
00038   virtual void read(std::istream& in);
00039   virtual void print(std::ostream& out) const;
00040   virtual void print_unrecognized(std::ostream& out) const;
00041   virtual void print_unrecognized(std::ostream& out, std::string const& prefix) const;
00042 
00043   friend std::istream& operator>>(std::istream& in,  self& rhs) 
00044     { rhs.read(in);   return in;}
00045   friend std::ostream& operator<<(std::ostream& out, const self& rhs) 
00046     { rhs.print(out); return out;}
00047 
00048 protected:
00049   std::istream* in;
00050   std::string name_;
00051   std::string indent_;
00052   MutableVars MV;
00053   std::list<self*> sub_devices_;
00054 };
00055 
00056 
00057 
00058 #endif

Copyright (c) Guntram Berti 1997-2002. See the GrAL Homepage for up-to-date information.

Generated at Tue Feb 26 15:57:06 2002 for External control by doxygen 1.2.11-20011104 written by Dimitri van Heesch, © 1997-2000