1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
// Copyright (C) 1998 The New York Group Theory Cooperative
// See magnus/doc/COPYRIGHT for the full notice.
// Contents: Declaration of class InformationCenter
//
// Principal Author: Dmitry Pechkin
//
// Status: in progress
//
// Revision History:
//
#ifndef _INFORMATION_CENTER_H_
#define _INFORMATION_CENTER_H_
#include "Property.h"
class InformationCenter {
public:
InformationCenter() {}
Trichotomy haveProperty ( const PropertyType ptype ) const;
void putProperty ( const GenericProperty& property, Trichotomy have );
Chars getDescription ( const PropertyType ptype ) const;
void setUnknownProperty( const PropertyType ptype );
void setHaveNotProperty( const PropertyType ptype, const Chars& expl );
void setKnownProperty ( const GenericProperty& property );
void getKnownProperty ( GenericProperty& property ) const;
const GenericProperty* getKnownProperty( const PropertyType ptype ) const;
GenericProperty* getKnownProperty( const PropertyType ptype );
void read ( istream& istr, bool extraDetails );
void write( ostream& ostr, bool extraDetails );
private:
// Disable copying of Information Center.
InformationCenter( const InformationCenter& );
InformationCenter& operator=( const InformationCenter& );
// Data members:
PropertiesCollection theProperties;
};
inline
Trichotomy InformationCenter::haveProperty ( const PropertyType ptype ) const
{
return theProperties.haveProperty( ptype );
}
inline
void InformationCenter::putProperty ( const GenericProperty& property,
Trichotomy have )
{
theProperties.putProperty( property, have );
}
inline
Chars InformationCenter::getDescription ( const PropertyType ptype ) const
{
return theProperties.getDescription( ptype );
}
inline
void InformationCenter::setUnknownProperty( const PropertyType ptype )
{
theProperties.setUnknownProperty( ptype );
}
inline
void InformationCenter::setHaveNotProperty( const PropertyType ptype,
const Chars& expl )
{
theProperties.setHaveNotProperty( ptype, expl );
}
inline
void InformationCenter::setKnownProperty ( const GenericProperty& property )
{
theProperties.setKnownProperty( property );
}
inline
void InformationCenter::getKnownProperty ( GenericProperty& property) const
{
theProperties.getKnownProperty( property );
}
inline
const GenericProperty* InformationCenter::getKnownProperty(
const PropertyType ptype ) const
{
return theProperties.getKnownProperty(ptype);
}
inline
GenericProperty* InformationCenter::getKnownProperty(const PropertyType ptype)
{
return theProperties.getKnownProperty(ptype);
}
inline
void InformationCenter::read ( istream& istr, bool extraDetails )
{
theProperties.read( istr, extraDetails );
}
inline
void InformationCenter::write( ostream& ostr, bool extraDetails )
{
theProperties.write( ostr, extraDetails );
}
#endif
|