NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This class is the management class for the different clusters, which are currently available in memory. More...
#include <cluster.hpp>
Public Member Functions | |
ClusterManager () | |
~ClusterManager () | |
bool | containsClusters (const std::string &sCmdLine) const |
This member function detects, whether any cluster is used in the current expression. More... | |
bool | isCluster (StringView sCluster) const |
This member function returns true, if the passed cluster identifier can be found in the internal map. More... | |
bool | isCluster (const std::string &sCluster) const |
This member function returns true, if the passed cluster identifier can be found in the internal map. More... | |
Cluster & | getCluster (StringView sCluster) |
This member function returns a reference to the cluster indicated by the passed cluster identifier. More... | |
Cluster & | getCluster (const std::string &sCluster) |
This member function returns a reference to the cluster indicated by the passed cluster identifier. More... | |
const Cluster & | getCluster (const std::string &sCluster) const |
This member function returns a const reference to the cluster indicated by the passed cluster identifier. Used in context when this object is passed as const reference. More... | |
Cluster & | newCluster (const std::string &sCluster) |
This member function creates a new cluster from the passed cluster identifier and returns a reference to this new object. More... | |
void | appendCluster (const std::string &sCluster, const Cluster &cluster) |
This member function appends the passed cluster to the internal cluster map using the passed string as the identifier. More... | |
void | removeCluster (const std::string &sCluster) |
This member function removes the cluster from memory, which corresponds to the passed cluster identifier. More... | |
std::string | createTemporaryCluster (const std::string &suffix="") |
This member function creates a temporary cluster with a unique name and returns this name to the calling function. More... | |
void | removeTemporaryClusters () |
This member function returns all temporary clusters from the internal map. Temporary clusters are indicated by their name. More... | |
void | clearAllClusters () |
Clear all clusters currently in memory. More... | |
bool | updateClusterSizeVariables (StringView sCluster) |
This member function updates the dimension variable reserved for cluster accesses with the size of the current accessed cluster. More... | |
const std::map< std::string, Cluster > & | getClusterMap () const |
Public Attributes | |
mu::value_type | dClusterElementsCount |
Private Member Functions | |
std::string | validateClusterName (const std::string &sCluster) |
This member function creates a valid cluster identifier name, which can be used to create or append a new cluster. More... | |
std::map< std::string, Cluster >::iterator | mapStringViewFind (StringView view) |
This private member function returns an iterator to the referenced cluster or std::map::end(). More... | |
std::map< std::string, Cluster >::const_iterator | mapStringViewFind (StringView view) const |
This private member function returns an iterator to the referenced cluster or std::map::end(). More... | |
Private Attributes | |
std::map< std::string, Cluster > | mClusterMap |
This class is the management class for the different clusters, which are currently available in memory.
Definition at line 446 of file cluster.hpp.
|
inline |
Definition at line 456 of file cluster.hpp.
References dClusterElementsCount.
|
inline |
Definition at line 457 of file cluster.hpp.
void NumeRe::ClusterManager::appendCluster | ( | const std::string & | sCluster, |
const Cluster & | cluster | ||
) |
This member function appends the passed cluster to the internal cluster map using the passed string as the identifier.
sCluster | const std::string& |
cluster | const Cluster& |
Definition at line 2158 of file cluster.cpp.
References mClusterMap, and validateClusterName().
void NumeRe::ClusterManager::clearAllClusters | ( | ) |
Clear all clusters currently in memory.
Definition at line 2229 of file cluster.cpp.
References mClusterMap.
Referenced by cmd_clear().
bool NumeRe::ClusterManager::containsClusters | ( | const std::string & | sCmdLine | ) | const |
This member function detects, whether any cluster is used in the current expression.
sCmdLine | const std::string& |
Definition at line 1989 of file cluster.cpp.
References mClusterMap.
Referenced by NumeRe::StringFuncHandler::argumentParser(), cmd_pack(), MemoryManager::containsTablesOrClusters(), and resolveTablesAndClusters().
std::string NumeRe::ClusterManager::createTemporaryCluster | ( | const std::string & | suffix = "" | ) |
This member function creates a temporary cluster with a unique name and returns this name to the calling function.
suffix | const std::string& |
Definition at line 2191 of file cluster.cpp.
References mClusterMap, and toString().
Referenced by ProcedureVarFactory::createLocalInlineStrings(), ProcedureVarFactory::createLocalInlineVars(), ProcedureVarFactory::evaluateProcedureArguments(), Procedure::getInlined(), and FlowCtrl::range_based_for_loop().
Cluster & NumeRe::ClusterManager::getCluster | ( | const std::string & | sCluster | ) |
This member function returns a reference to the cluster indicated by the passed cluster identifier.
sCluster | const std::string& |
Definition at line 2097 of file cluster.cpp.
References SyntaxError::CLUSTER_DOESNT_EXIST, and mClusterMap.
const Cluster & NumeRe::ClusterManager::getCluster | ( | const std::string & | sCluster | ) | const |
This member function returns a const reference to the cluster indicated by the passed cluster identifier. Used in context when this object is passed as const reference.
sCluster | const std::string& |
Definition at line 2119 of file cluster.cpp.
References SyntaxError::CLUSTER_DOESNT_EXIST, and mClusterMap.
Cluster & NumeRe::ClusterManager::getCluster | ( | StringView | sCluster | ) |
This member function returns a reference to the cluster indicated by the passed cluster identifier.
sCluster | StringView |
Definition at line 2077 of file cluster.cpp.
References SyntaxError::CLUSTER_DOESNT_EXIST, StringViewBase::find(), mapStringViewFind(), mClusterMap, StringView::subview(), and StringViewBase::to_string().
Referenced by NumeRe::StringFuncHandler::applySpecialStringFuncs(), FlowCtrl::calc(), cmd_show(), FlowCtrl::compile(), ProcedureVarFactory::createLocalClusters(), ProcedureVarFactory::createLocalInlineStrings(), ProcedureVarFactory::createLocalInlineVars(), NumeReDebugger::decodeType(), DataAccessParser::evalIndices(), ProcedureVarFactory::evaluateProcedureArguments(), Plot::extractDataValues(), NumeReDebugger::gatherLoopBasedInformations(), NumeReKernel::getAns(), getDataForFit(), getDataFromObject(), NumeReKernel::getStringTable(), handleCachedDataAccess(), NumeReKernel::MainLoop(), performMatrixOperation(), Procedure::ProcCalc(), FlowCtrl::range_based_for_loop(), replaceDataEntities(), replaceEntityOccurence(), searchAndDeleteCluster(), sortClusters(), NumeRe::StringParser::storeStringToDataObjects(), updateClusterSizeVariables(), and FlowCtrl::updateTestStats().
|
inline |
Definition at line 475 of file cluster.hpp.
References mClusterMap.
Referenced by containsStringClusters(), NumeReKernel::evalDebuggerBreakPoint(), evalMatOp(), NumeRe::StringParser::getDataForString(), NumeReDebugger::getGlobals(), NumeReKernel::getVariableList(), NumeRe::StringParser::isStringExpression(), listDeclaredVariables(), resolveTablesAndClusters(), and searchAndDeleteCluster().
bool NumeRe::ClusterManager::isCluster | ( | const std::string & | sCluster | ) | const |
This member function returns true, if the passed cluster identifier can be found in the internal map.
sCluster | const std::string& |
Definition at line 2059 of file cluster.cpp.
References mClusterMap.
bool NumeRe::ClusterManager::isCluster | ( | StringView | sCluster | ) | const |
This member function returns true, if the passed cluster identifier can be found in the internal map.
sCluster | StringView |
Definition at line 2041 of file cluster.cpp.
References StringViewBase::find(), mapStringViewFind(), mClusterMap, and StringView::subview().
Referenced by NumeRe::StringFuncHandler::applySpecialStringFuncs(), ProcedureVarFactory::createLocalClusters(), DataAccessParser::DataAccessParser(), NumeReDebugger::decodeType(), deleteCacheEntry(), ProcedureVarFactory::evaluateProcedureArguments(), NumeReKernel::getStringTable(), isClusterCandidate(), isCompleteCluster(), performMatrixOperation(), Plot::separateFunctionsAndData(), and updateClusterSizeVariables().
|
private |
This private member function returns an iterator to the referenced cluster or std::map::end().
view | StringView |
Definition at line 1967 of file cluster.cpp.
References mClusterMap.
Referenced by getCluster(), and isCluster().
|
private |
This private member function returns an iterator to the referenced cluster or std::map::end().
view | StringView |
Definition at line 1945 of file cluster.cpp.
References mClusterMap.
Cluster & NumeRe::ClusterManager::newCluster | ( | const std::string & | sCluster | ) |
This member function creates a new cluster from the passed cluster identifier and returns a reference to this new object.
sCluster | const std::string& |
Definition at line 2139 of file cluster.cpp.
References mClusterMap, and validateClusterName().
Referenced by cmd_clear(), ProcedureVarFactory::createLocalClusters(), ProcedureVarFactory::createTestStatsCluster(), ProcedureVarFactory::evaluateProcedureArguments(), isClusterCandidate(), performMatrixOperation(), and NumeReKernel::StartUp().
void NumeRe::ClusterManager::removeCluster | ( | const std::string & | sCluster | ) |
This member function removes the cluster from memory, which corresponds to the passed cluster identifier.
sCluster | const std::string& |
Definition at line 2173 of file cluster.cpp.
References mClusterMap.
Referenced by ProcedureVarFactory::createLocalClusters(), ProcedureVarFactory::evaluateProcedureArguments(), FlowCtrl::reset(), and ProcedureVarFactory::reset().
void NumeRe::ClusterManager::removeTemporaryClusters | ( | ) |
This member function returns all temporary clusters from the internal map. Temporary clusters are indicated by their name.
Definition at line 2209 of file cluster.cpp.
References mClusterMap.
Referenced by NumeReKernel::MainLoop().
bool NumeRe::ClusterManager::updateClusterSizeVariables | ( | StringView | sCluster | ) |
This member function updates the dimension variable reserved for cluster accesses with the size of the current accessed cluster.
sCluster | StringView |
Definition at line 2245 of file cluster.cpp.
References dClusterElementsCount, StringViewBase::find(), getCluster(), isCluster(), NumeRe::Cluster::size(), and StringView::subview().
Referenced by getIndices().
|
private |
This member function creates a valid cluster identifier name, which can be used to create or append a new cluster.
sCluster | const std::string& |
Definition at line 1924 of file cluster.cpp.
References SyntaxError::INVALID_CLUSTER_NAME, and SyntaxError::invalid_position.
Referenced by appendCluster(), and newCluster().
mu::value_type NumeRe::ClusterManager::dClusterElementsCount |
Definition at line 459 of file cluster.hpp.
Referenced by ClusterManager(), NumeReKernel::StartUp(), and updateClusterSizeVariables().
|
private |
Definition at line 449 of file cluster.hpp.
Referenced by appendCluster(), clearAllClusters(), containsClusters(), createTemporaryCluster(), getCluster(), getClusterMap(), isCluster(), mapStringViewFind(), newCluster(), removeCluster(), and removeTemporaryClusters().