// RoutineDesinDoc.cpp : implementation of the CRoutineDesinDoc class // #include "stdafx.h" #include "resource.h" #include "RoutineDesinDoc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CRoutineDesinDoc IMPLEMENT_SERIAL(CAbstractClass, CObject, 0) CAbstractClass::CAbstractClass() { } CAbstractClass::~CAbstractClass() { } void CAbstractClass::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << Name; ar << Parent; } else { ar >> Name; ar >> Parent; } } IMPLEMENT_SERIAL(CSpecialist, CAbstractClass, 0) CSpecialist::CSpecialist() { } CSpecialist::~CSpecialist() { } void CSpecialist::Serialize(CArchive& ar) { if (ar.IsStoring()) { } else { } } IMPLEMENT_SERIAL(CSponsor, CObject, 0) CSponsor::CSponsor() { } CSponsor::~CSponsor() { } void CSponsor::Serialize(CArchive& ar) { if (ar.IsStoring()) { Rows.Serialize(ar); ar << Result; } else { Rows.Serialize(ar); ar >> Result; } } IMPLEMENT_SERIAL(CPlan, CAbstractClass, 0) CPlan::CPlan() { pSponsor = new CSponsor; } CPlan::~CPlan() { } void CPlan::Serialize(CArchive& ar) { if (ar.IsStoring()) { pSponsor->Serialize(ar); AttList.Serialize(ar); ar << PlanType; } else { pSponsor = new CSponsor; pSponsor->Serialize(ar); AttList.Serialize(ar); ar >> PlanType; } } IMPLEMENT_SERIAL(CTask, CAbstractClass, 0) CTask::CTask() { } CTask::~CTask() { } void CTask::Serialize(CArchive& ar) { if (ar.IsStoring()) { } else { } } IMPLEMENT_SERIAL(CExp, CObject, 0) CExp::CExp() { } CExp::~CExp() { } void CExp::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << Type; ar << op; ar << VarVal; ar << Value; } else { ar >> Type; ar >> op; ar >> VarVal; ar >> Value; } } IMPLEMENT_SERIAL(CColumn, CObject, 0) CColumn::CColumn() { } CColumn::~CColumn() { } void CColumn::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << Operator; ar << Attribute; ar << Value; } else { ar >> Operator; ar >> Attribute; ar >> Value; } } IMPLEMENT_SERIAL(CRow, CObject, 0) CRow::CRow() { } CRow::~CRow() { } void CRow::Serialize(CArchive& ar) { if (ar.IsStoring()) { Columns.Serialize(ar); ExpList.Serialize(ar); ar << Result; } else { Columns.Serialize(ar); ExpList.Serialize(ar); ar >> Result; } } IMPLEMENT_SERIAL(CEvaluationAgent, CObject, 0) CEvaluationAgent::CEvaluationAgent() { } CEvaluationAgent::~CEvaluationAgent() { } void CEvaluationAgent::Serialize(CArchive& ar) { if (ar.IsStoring()) { Rows.Serialize(ar); } else { Rows.Serialize(ar); } } IMPLEMENT_SERIAL(CStep, CObject, 0) CStep::CStep() { pEvaluationAgent = new CEvaluationAgent; } CStep::~CStep() { } void CStep::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << AttributeName; pEvaluationAgent->Serialize(ar); AttList.Serialize(ar); } else { ar >> AttributeName; pEvaluationAgent = new CEvaluationAgent; pEvaluationAgent->Serialize(ar); AttList.Serialize(ar); } } IMPLEMENT_SERIAL(CPSAndSpec, CObject, 0) CPSAndSpec::CPSAndSpec() { } CPSAndSpec::~CPSAndSpec() { } void CPSAndSpec::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << PS; ar << TopSpec; } else { ar >> PS; ar >> TopSpec; } } IMPLEMENT_SERIAL(CPSAndTask, CObject, 0) CPSAndTask::CPSAndTask() { } CPSAndTask::~CPSAndTask() { } void CPSAndTask::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << PS; ar << Task; } else { ar >> PS; ar >> Task; } OpList.Serialize(ar);//M-Yehia } IMPLEMENT_SERIAL(CAgent, CObject, 0) CAgent::CAgent() { } CAgent::~CAgent() { } void CAgent::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << Name; ar << AgentType; ar << Parent; } else { ar >> Name; ar >> AgentType; ar >> Parent; } } IMPLEMENT_SERIAL(CAttribute, CObject, 0) CAttribute::CAttribute() { HasNoInput = TRUE; } CAttribute::~CAttribute() { } void CAttribute::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << Name; ar << ClassType; ar << input; ar << output; ar << intermediate; ar << both; ar << Group; LegalValue.Serialize(ar); ar << Question; ar << Comment; // Value } else { ar >> Name; ar >> ClassType; ar >> input; ar >> output; ar >> intermediate; ar >> both; ar >> Group; LegalValue.Serialize(ar); ar >> Question; ar >> Comment; // Value } } CNodeOfStack::CNodeOfStack() { } CNodeOfStack::~CNodeOfStack() { } CNode::CNode() { } CNode::~CNode() { } CHItem::CHItem() { } CHItem::~CHItem() { } CInt::CInt() { } CInt::~CInt() { } CNodeTree::CNodeTree() { } CNodeTree::~CNodeTree() { } CCase::CCase() { } CCase::~CCase() { } void CCase::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << Case; } else { ar >> Case; } VarList.Serialize(ar); } IMPLEMENT_SERIAL(COp, CObject, 0) COp::COp() { } COp::~COp() { } void COp::Serialize(CArchive& ar) { if (ar.IsStoring()) { } else { } AttList.Serialize(ar); } IMPLEMENT_SERIAL(CConstraint, CObject, 0) CConstraint::CConstraint() { } CConstraint::~CConstraint() { } void CConstraint::Serialize(CArchive& ar) { if (ar.IsStoring()) { ar << Name; ar << FirstAttribute; ar << SecondAttribute; ar << LogicalOperator; } else { ar >> Name; ar >> FirstAttribute; ar >> SecondAttribute; ar >> LogicalOperator; } } CAgent * CObList1::Lookup(CString str) { POSITION posCol = GetHeadPosition(); CAgent * pAgent; while (posCol != NULL) { pAgent = (CAgent *) new CAgent; pAgent = (CAgent *)GetAt(posCol); if (pAgent->Name == str) return pAgent; GetNext(posCol); } return NULL; } IMPLEMENT_DYNCREATE(CRoutineDesinDoc, CDocument) BEGIN_MESSAGE_MAP(CRoutineDesinDoc, CDocument) //{{AFX_MSG_MAP(CRoutineDesinDoc) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CRoutineDesinDoc construction/destruction CRoutineDesinDoc::CRoutineDesinDoc() { // TODO: add one-time construction code here } CRoutineDesinDoc::~CRoutineDesinDoc() { } BOOL CRoutineDesinDoc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; // TODO: add reinitialization code here // (SDI documents will reuse this document) return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CRoutineDesinDoc serialization void CRoutineDesinDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // CaseList.Serialize(ar); } else { // TODO: add loading code here } PSStringList.Serialize(ar); TaskPSList.Serialize(ar); SpecList.Serialize(ar); PlanList.Serialize(ar); TaskList.Serialize(ar); StepList.Serialize(ar); VarList.Serialize(ar); PSAndSpecList.Serialize(ar); CollectionList.Serialize(ar); } ///////////////////////////////////////////////////////////////////////////// // CRoutineDesinDoc diagnostics #ifdef _DEBUG void CRoutineDesinDoc::AssertValid() const { CDocument::AssertValid(); } void CRoutineDesinDoc::Dump(CDumpContext& dc) const { CDocument::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CRoutineDesinDoc commands