File: MIC.h

package info (click to toggle)
magnus 20060324-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 19,404 kB
  • ctags: 20,466
  • sloc: cpp: 130,118; ansic: 37,076; tcl: 10,970; perl: 1,109; makefile: 963; sh: 403; yacc: 372; csh: 57; awk: 33; asm: 10
file content (140 lines) | stat: -rw-r--r-- 4,216 bytes parent folder | download | duplicates (3)
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// Copyright (C) 1996 The New York Group Theory Cooperative
// See magnus/doc/COPYRIGHT for the full notice.
//
// Contents: Declaration of class MIC (Map Information Center)
//
// Principal Author: Dmitry Bormotov
//
// Status: in progress
//
// Usage:
//
// For a given piece of info, there are up to four kinds of names needed:
// 1) The data member
// 2) The member function through which it is reported
// 3) The member function via which its existence is queried
// 4) The member function via which it is accessed
// 
// In an attempt at coherence, we try to use these conventions for a
// Trichotomy (resp. bool) <I>
// e.g., I == abelian, (resp. I == solvedWordProblem):
// 
// 1) <I>
// 2) putIs<I>  resp. putHave<I>
// 3) is<I>     resp. have<I>
// 
// and in other cases (e.g., I == confluentKBMachine):
// 
// 1) <I>
// 2) putHave<I>
// 3) have<I>
// 4) get<I>
//
// Revision History:
//


#ifndef _MIC_H_
#define _MIC_H_

#include "Trichotomy.h"
#include "Chars.h"
#include "FEData.h"
#include "InformationCenter.h"

#include "BaseProperties.h"

// Types stored by the MIC:

class HomIsMonoProperty : public NoDataProperty {
public:
  HomIsMonoProperty( ) : NoDataProperty() {}
  PropertyType actualType()   const { return type(); }
  static PropertyType type() { return theTypeID; }
  Chars propertyName() const { return "HomIsMono"; }
protected:
  GenericProperty* clone() const { return new HomIsMonoProperty(*this); }
private:
  static const PropertyType theTypeID;
};

class HomIsEpiProperty : public NoDataProperty {
public:
  HomIsEpiProperty( ) : NoDataProperty() {}
  PropertyType actualType()   const { return type(); }
  static PropertyType type() { return theTypeID; }
  Chars propertyName() const { return "HomIsEpi"; }
protected:
  GenericProperty* clone() const { return new HomIsEpiProperty(*this); }
private:
  static const PropertyType theTypeID;
};

class ExtendToHomProperty : public NoDataProperty {
public:
  ExtendToHomProperty( const Chars& descr ) : NoDataProperty(descr) {}
  PropertyType actualType()   const { return type(); }
  static PropertyType type() { return theTypeID; }
  Chars propertyName() const { return "ExtendToHom"; }
protected:
  GenericProperty* clone() const { return new ExtendToHomProperty(*this); }
private:
  static const PropertyType theTypeID;
};

//-------------------------------- MIC --------------------------------------//


class MIC : public InformationCenter, protected FEData
{  
public:
  
  /////////////////////////////////////////////////////////////////////////
  //                                                                     //
  // Constructors:                                                       //
  //                                                                     //
  /////////////////////////////////////////////////////////////////////////
  
  MIC( OID map_oid );

  ~MIC( );


  /////////////////////////////////////////////////////////////////////////
  //                                                                     //
  // Extend to Homomorphism:                                             //
  //                                                                     //
  /////////////////////////////////////////////////////////////////////////

  void putDoesExtendToHom( bool doesExtend = true, Chars explanation = "" );
  
  Trichotomy doesExtendToHom( ) const;

  Chars getExtendToHomExplanation( ) const;

  Chars getExtendToHomMessage( ) const;

  void putIsMono(bool ismono);
  void putIsEpi(bool isepi);

  Trichotomy isMono() const;
  Trichotomy isEpi() const;

  /////////////////////////////////////////////////////////////////////////
  //                                                                     //
  // Data Members:                                                       //
  //                                                                     //
  /////////////////////////////////////////////////////////////////////////

  OID mapOID;
  // Need this for composing messages about what has been found.
  
  //Trichotomy extendToHom;
  //Chars extendToHomExplanation;
  //Chars extendToHomMessage;
private:
  //Trichotomy homIsMono;
  //Trichotomy homIsEpi;
};

#endif