decisiontables.cpp

来自「粗糙集应用软件」· C++ 代码 · 共 78 行

CPP
78
字号
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

#include <stdafx.h> // Precompiled headers.
#include <copyright.h>

#include <kernel/structures/decisiontables.h>

//-------------------------------------------------------------------
// Methods for class DecisionTables.
//===================================================================

//-------------------------------------------------------------------
// Constructors/destructor.
//===================================================================

DecisionTables::DecisionTables(const DecisionTables &in) : Structures(in) {
}

DecisionTables::DecisionTables() {
}

DecisionTables::~DecisionTables() {
}

//-------------------------------------------------------------------
// Methods inherited from Identifier.
//===================================================================

IMPLEMENTIDMETHODS(DecisionTables, DECISIONTABLES, Structures)

//-------------------------------------------------------------------
// Methods inherited from Structure.
//===================================================================

Structure *
DecisionTables::Duplicate() const {
	return new DecisionTables(*this);
}

//-------------------------------------------------------------------
// Methods inherited from Structures.
//===================================================================

//------------------------------------------------------------------
// Method........: InsertStructure
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Overloaded to check for consistency/homogenity.
//                 Ensures that only decision tables are inserted.
// Comments......: AppendStructure is not necessary to overload, since
//                 Structures::AppendStructure is implemented via the
//                 InsertStructure method.
// Revisions.....:
//===================================================================

bool
DecisionTables::InsertStructure(Structure *structure, int i) {

	if (structure == NULL) {
		Message::Error("Cannot insert a NULL decision table.");
		return false;
	}

	if (!structure->IsA(DECISIONTABLE)) {
		Message::Error("Cannot insert a non-decision table into a decision table set.");
		return false;
	}

	return Structures::InsertStructure(structure, i);

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?