| 1 |
< |
#include "ZconsVisitor.hpp" |
| 1 |
> |
#include "visitors/ZconsVisitor.hpp" |
| 2 |
|
#include <cmath> |
| 3 |
|
|
| 4 |
+ |
namespace oopse { |
| 5 |
+ |
|
| 6 |
|
ZConsVisitor::ZConsVisitor(SimInfo* info) : BaseVisitor(), zconsReader(NULL){ |
| 7 |
|
GenericData* data; |
| 8 |
< |
DoubleData* tolerance; |
| 8 |
> |
DoubleGenericData* tolerance; |
| 9 |
|
ZConsParaData* zConsParaData; |
| 10 |
< |
StringData* filename; |
| 11 |
< |
DoubleData* sampleTime; |
| 10 |
> |
StringGenericData* filename; |
| 11 |
> |
DoubleGenericData* sampleTime; |
| 12 |
|
vector<ZConsParaItem>* parameters; |
| 13 |
|
|
| 14 |
|
this->info = info; |
| 23 |
|
return; |
| 24 |
|
} |
| 25 |
|
else{ |
| 26 |
< |
tolerance = dynamic_cast<DoubleData*>(data); |
| 26 |
> |
tolerance = dynamic_cast<DoubleGenericData*>(data); |
| 27 |
|
|
| 28 |
|
if (!tolerance){ |
| 29 |
|
cerr << "Can not get zconstraint tolerance from SimInfo" << endl; |
| 44 |
|
return; |
| 45 |
|
} |
| 46 |
|
else{ |
| 47 |
< |
sampleTime = dynamic_cast<DoubleData*>(data); |
| 47 |
> |
sampleTime = dynamic_cast<DoubleGenericData*>(data); |
| 48 |
|
|
| 49 |
|
if (!sampleTime){ |
| 50 |
|
cerr << "Can not get zcons time from SimInfo" << endl; |
| 102 |
|
return; |
| 103 |
|
} |
| 104 |
|
else{ |
| 105 |
< |
filename = dynamic_cast<StringData*>(data); |
| 105 |
> |
filename = dynamic_cast<StringGenericData*>(data); |
| 106 |
|
|
| 107 |
|
if (!filename){ |
| 108 |
|
cerr << "Can not get filename of z-constraint output from SimInfo" << endl; |
| 278 |
|
|
| 279 |
|
return result; |
| 280 |
|
} |
| 281 |
+ |
|
| 282 |
+ |
|
| 283 |
+ |
}//namespace oopse |