00001
00002 #ifndef INTERFACES_IANNOTATION_H
00003 #define INTERFACES_IANNOTATION_H 1
00004
00005
00006 #include <list>
00007 #include <string>
00008
00009 #if (defined __sun && __SUNPRO_CC > 0x500)
00010 # include <utility>
00011 #else
00012 # include <pair.h>
00013 #endif
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 #ifndef ANAPHE_NO_NAMESPACE
00051 namespace Anaphe {
00052 #endif
00053
00054 class IAnnotation {
00055
00056 public:
00057 virtual ~IAnnotation() { }
00058
00059 public:
00061 virtual int size() const = 0;
00062
00063 #ifdef AIDA_DONT_USE_STD
00064
00066 virtual bool add(string key, string value, bool visibility = true) = 0;
00067
00069 virtual string find(string key) const = 0;
00070
00072 virtual bool visibilityFlag(string key) const = 0;
00073
00074 virtual void setVisibility(string key, bool value) = 0;
00075
00078
00082 virtual string key (int index) const = 0;
00083 virtual string value (int index) const = 0;
00084 virtual bool visibilityFlag (int index) const = 0;
00085
00087 virtual ostream& toAscii (ostream &os) const = 0;
00088 virtual istream& fromAscii (istream &is) = 0;
00089
00090 #else
00091
00093 virtual bool add(std::string key, std::string value, bool visibility = true) = 0;
00094
00096 virtual std::string find(std::string key) const = 0;
00097
00099 virtual bool visibilityFlag(std::string key) const = 0;
00100
00101 virtual void setVisibility(std::string key, bool value) = 0;
00102
00105
00109 virtual std::string key (int index) const = 0;
00110 virtual std::string value (int index) const = 0;
00111 virtual bool visibilityFlag (int index) const = 0;
00112
00114 virtual std::ostream& toAscii (std::ostream &os) const = 0;
00115 virtual std::istream& fromAscii (std::istream &is) = 0;
00116
00117 #endif // dont use std
00118
00119 virtual void reset() = 0;
00120
00121 };
00122
00123 #ifndef SWIG
00124
00125 #ifdef AIDA_DONT_USE_STD
00126 ostream & operator << (ostream &os, const IAnnotation& ann);
00127 istream & operator >> (istream &is, IAnnotation& ann);
00128 #else
00129 std::ostream & operator << (std::ostream &os, const IAnnotation& ann);
00130 std::istream & operator >> (std::istream &is, IAnnotation& ann);
00131 #endif // dont use std
00132
00133 #endif // ndef swig
00134
00135 #ifndef ANAPHE_NO_NAMESPACE
00136 };
00137 #endif
00138
00139 #endif // INTERFACES_IANNOTATION_H