00001
00002
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00021
00030
00031
00032
00033
00034
00035
00036 #include "AIDA_MarkerStyle.h"
00037 #include "GracePlotter/MarkerStyle.h"
00038
00039 #include <iostream>
00040
00041
00042 namespace Anaphe {
00043 namespace AIDA_Plotter_Grace {
00044
00045
00046
00048
00049
00050
00052
00053 AIDA_MarkerStyle::AIDA_MarkerStyle()
00054 : rep (0),
00055 ownRep(false)
00056 {
00057
00058 }
00059
00060
00061
00062
00063 AIDA_MarkerStyle::AIDA_MarkerStyle(MarkerStyle* x, bool b)
00064 : rep (x),
00065 ownRep(b)
00066 {
00067
00068 }
00069
00070
00071
00072
00073 AIDA_MarkerStyle::~AIDA_MarkerStyle()
00074 {
00075 if (ownRep) delete rep;
00076 }
00077
00078
00079
00080
00081
00083
00084
00085
00087
00088 void AIDA_MarkerStyle::reset()
00089 {
00090 if (!rep) {
00091 crisis();
00092 return;
00093 }
00094 rep->reset();
00095 }
00096
00097
00098
00099
00100 bool AIDA_MarkerStyle::setParameter(const std::string& paramName,
00101 const std::string& options)
00102 {
00103 if (!rep) {
00104 crisis();
00105 return false;
00106 }
00107 return rep->setParameter(paramName,options);
00108 }
00109
00110
00111
00112
00113 std::vector<std::string> AIDA_MarkerStyle::availableParameters() const
00114 {
00115 if (!rep) {
00116 crisis();
00117 return std::vector<std::string>();
00118 }
00119 return rep->availableParameters();
00120 }
00121
00122
00123
00124
00125 std::string AIDA_MarkerStyle::parameterValue(const std::string& param) const
00126 {
00127 if (!rep) {
00128 crisis();
00129 return "";
00130 }
00131 return rep->parameterValue(param);
00132 }
00133
00134
00135
00136
00137 std::vector<std::string>
00138 AIDA_MarkerStyle::availableParameterOptions(const std::string& paramName) const
00139 {
00140 if (!rep) {
00141 crisis();
00142 return std::vector<std::string>();
00143 }
00144 return rep->availableOptions(paramName);
00145 }
00146
00147
00148
00149
00150 std::vector<std::string> AIDA_MarkerStyle::availableColors() const
00151 {
00152 if (!rep) {
00153 crisis();
00154 return std::vector<std::string>();
00155 }
00156 return rep->availableColors();
00157 }
00158
00159
00160
00161
00162 std::string AIDA_MarkerStyle::color() const
00163 {
00164 if (!rep) {
00165 crisis();
00166 return "";
00167 }
00168 return rep->color();
00169 }
00170
00171
00172
00173
00174 double AIDA_MarkerStyle::opacity() const
00175 {
00176 if (!rep) {
00177 crisis();
00178 return -1.0;
00179 }
00180 return rep->opacity();
00181 }
00182
00183
00184
00185
00186 bool AIDA_MarkerStyle::setColor(const std::string & newColor)
00187 {
00188 if (!rep) {
00189 crisis();
00190 return false;
00191 }
00192 return rep->setColor(newColor);
00193 }
00194
00195
00196
00197
00198 bool AIDA_MarkerStyle::setOpacity(double newOpacity)
00199 {
00200 if (!rep) {
00201 crisis();
00202 return false;
00203 }
00204 return rep->setOpacity(newOpacity);
00205 }
00206
00207
00208
00209
00210 std::vector<std::string> AIDA_MarkerStyle::availableShapes() const
00211 {
00212 if (!rep) {
00213 crisis();
00214 return std::vector<std::string>();
00215 }
00216 return rep->availableShapes();
00217 }
00218
00219
00220
00221
00222 std::string AIDA_MarkerStyle::shape() const
00223 {
00224 if (!rep) {
00225 crisis();
00226 return "";
00227 }
00228 return rep->shape();
00229 }
00230
00231
00232
00233
00234 bool AIDA_MarkerStyle::setShape(const std::string& shape)
00235 {
00236 if (!rep) {
00237 crisis();
00238 return false;
00239 }
00240 return rep->setShape(shape);
00241 }
00242
00243
00244
00245
00246 void AIDA_MarkerStyle::setRep(MarkerStyle& s, bool ownership)
00247 {
00248 if (ownRep) delete rep;
00249 rep = &s;
00250 ownRep = ownership;
00251 }
00252
00253
00254
00255
00256 MarkerStyle* AIDA_MarkerStyle::theRep()
00257 {
00258 return rep;
00259 }
00260
00261
00262
00263
00264
00265
00266
00267 void AIDA_MarkerStyle::crisis() const
00268 {
00269 std::cout << "*** AIDA_Plotter_Grace SEVERE ERROR: proxy failure in AIDA_MarkerStyle" << std::endl;
00270 }
00271
00272
00273
00274 }
00275 }
00276