Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/magnus/back_end/SessionManager/include/InformationCenter.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: InformationCenter.h,v 1.1 2000/03/03 01:35:10 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 1998 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Declaration of class InformationCenter
00009 //
00010 // Principal Author: Dmitry Pechkin
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 
00017 #ifndef _INFORMATION_CENTER_H_
00018 #define _INFORMATION_CENTER_H_
00019 
00020 #include "Property.h"
00021 
00022 class InformationCenter {
00023 public:
00024   InformationCenter() {}
00025 
00026   Trichotomy haveProperty ( const PropertyType ptype  ) const;
00027   void  putProperty       ( const GenericProperty& property, Trichotomy have );
00028   Chars getDescription    ( const PropertyType ptype  ) const;
00029   void  setUnknownProperty( const PropertyType ptype  );
00030   void  setHaveNotProperty( const PropertyType ptype, const Chars& expl );
00031   void  setKnownProperty  ( const GenericProperty& property );
00032   void  getKnownProperty  ( GenericProperty& property ) const;
00033   const GenericProperty* getKnownProperty( const PropertyType ptype ) const;
00034         GenericProperty* getKnownProperty( const PropertyType ptype );
00035   
00036   void read ( istream& istr, bool extraDetails );
00037   void write( ostream& ostr, bool extraDetails );
00038 
00039 private:
00040   // Disable copying of Information Center.
00041   InformationCenter( const InformationCenter& );
00042   InformationCenter& operator=( const InformationCenter& );
00043 
00044   // Data members:
00045   PropertiesCollection theProperties;
00046 };
00047 
00048 inline 
00049 Trichotomy InformationCenter::haveProperty ( const PropertyType ptype ) const
00050 {
00051   return theProperties.haveProperty( ptype );
00052 }
00053 
00054 inline 
00055 void InformationCenter::putProperty ( const GenericProperty& property,
00056                                             Trichotomy       have )
00057 {
00058   theProperties.putProperty( property, have );
00059 }
00060 
00061 inline
00062 Chars InformationCenter::getDescription ( const PropertyType ptype ) const
00063 {
00064   return theProperties.getDescription( ptype );
00065 }
00066 
00067 inline 
00068 void InformationCenter::setUnknownProperty( const PropertyType ptype )
00069 {
00070   theProperties.setUnknownProperty( ptype );
00071 }
00072 
00073 inline 
00074 void InformationCenter::setHaveNotProperty( const PropertyType ptype, 
00075                                             const Chars& expl )
00076 {
00077   theProperties.setHaveNotProperty( ptype, expl );
00078 }
00079 
00080 inline
00081 void InformationCenter::setKnownProperty  ( const GenericProperty& property )
00082 {
00083   theProperties.setKnownProperty( property );
00084 }
00085 
00086 inline 
00087 void InformationCenter::getKnownProperty  ( GenericProperty& property) const
00088 {
00089   theProperties.getKnownProperty( property );
00090 }
00091 
00092 inline 
00093 const GenericProperty* InformationCenter::getKnownProperty(
00094    const PropertyType ptype  ) const
00095 {
00096   return theProperties.getKnownProperty(ptype);
00097 }
00098 
00099 inline 
00100 GenericProperty* InformationCenter::getKnownProperty(const PropertyType ptype) 
00101 {
00102   return theProperties.getKnownProperty(ptype);
00103 }
00104 
00105 inline 
00106 void InformationCenter::read ( istream& istr, bool extraDetails )
00107 {
00108   theProperties.read( istr, extraDetails );
00109 }
00110 
00111 inline 
00112 void InformationCenter::write( ostream& ostr, bool extraDetails )
00113 {
00114   theProperties.write( ostr, extraDetails );
00115 }
00116 
00117 #endif

Generated at Tue Jun 19 09:49:38 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001