📄 valuesplitter.cpp
字号:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================
#include <stdafx.h> // Precompiled headers.
#include <copyright.h>
#include <kernel/algorithms/valuesplitter.h>
#include <kernel/algorithms/keyword.h>
#include <kernel/structures/decisiontable.h>
#include <kernel/structures/decisiontables.h>
#include <kernel/utilities/creator.h>
#include <kernel/basic/message.h>
//-------------------------------------------------------------------
// Methods for class ValueSplitter.
//===================================================================
//-------------------------------------------------------------------
// Constructors/destructor.
//===================================================================
ValueSplitter::ValueSplitter() {
SetAttribute(0);
}
ValueSplitter::~ValueSplitter() {
}
//-------------------------------------------------------------------
// Methods inherited from Identifier.
//===================================================================
IMPLEMENTIDMETHODS(ValueSplitter, VALUESPLITTER, Splitter)
//-------------------------------------------------------------------
// Methods inherited from Algorithm.
//===================================================================
//-------------------------------------------------------------------
// Method........: GetParameters
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================
String
ValueSplitter::GetParameters() const {
String parameters;
parameters += Keyword::Attribute();
parameters += Keyword::Assignment();
parameters += String::Format(GetAttribute());
parameters += Keyword::Separator();
parameters += Splitter::GetParameters();
return parameters;
}
//-------------------------------------------------------------------
// Method........: SetParameter
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================
bool
ValueSplitter::SetParameter(const String &keyword, const String &value) {
if (keyword == Keyword::Attribute() && value.IsInteger())
return SetAttribute(value.GetInteger());
return Splitter::SetParameter(keyword, value);
}
//-------------------------------------------------------------------
// Method........: Apply
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Takes a decision table as input and splits it
// into several subtables.
//
// If specified, the resulting subtables are appended
// to the input table as children, and the input table
// itself is returned. Alternatively, the subtables are
// not appended as children, but are instead returned as
// a decision table set.
//
// Comments......: Assumes that library clients use handles.
// Revisions.....: A
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -