check whether extensions are cylinder-coords approved or not...

pull/1/head
Thorsten Liebig 2010-05-03 22:37:29 +02:00
parent fe483946d2
commit ca8d2f8833
4 changed files with 20 additions and 0 deletions

View File

@ -16,6 +16,7 @@
*/
#include "operator_cylinder.h"
#include "operator_extension.h"
Operator_Cylinder* Operator_Cylinder::New()
{
@ -408,3 +409,10 @@ bool Operator_Cylinder::Calc_EffMatPos(int /*n*/, unsigned int* /*pos*/, double*
return false;
}
void Operator_Cylinder::AddExtension(Operator_Extension* op_ext)
{
if (op_ext->IsCylinderCoordsSave())
m_Op_exts.push_back(op_ext);
else
cerr << "Operator_Cylinder::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylinder-coords!! skipping...!" << endl;
}

View File

@ -44,6 +44,8 @@ public:
bool GetClosedAlpha() const {return CC_closedAlpha;}
bool GetR0Included() const {return CC_R0_included;}
virtual void AddExtension(Operator_Extension* op_ext);
protected:
Operator_Cylinder();
virtual void Init();

View File

@ -35,6 +35,10 @@ public:
virtual Engine_Extension* CreateEngineExtention();
virtual bool IsCylinderCoordsSave() {return false;} //not yet save to use with cylinder-coords
virtual string GetExtensionName() {return string("Mur ABC extension");}
protected:
int m_ny;
int m_nyP,m_nyPP;

View File

@ -18,6 +18,8 @@
#ifndef OPERATOR_EXTENSION_H
#define OPERATOR_EXTENSION_H
#include <string>
class Operator;
class Engine_Extension;
@ -30,6 +32,10 @@ public:
virtual Engine_Extension* CreateEngineExtention() {return 0;}
virtual bool IsCylinderCoordsSave() {return false;}
virtual std::string GetExtensionName() {return std::string("Abstract Operator Extension Base Class");}
protected:
Operator_Extension(Operator* op);
Operator* m_Op;