17 std::string &algorithmName)
20 return STATUS_CODE_NOT_ALLOWED;
23 pXmlElement = pXmlElement->NextSiblingElement(
"algorithm"))
25 if (description.empty())
30 const char *
const pAttribute(pXmlElement->Attribute(
"description"));
33 return STATUS_CODE_NOT_FOUND;
35 if (description == std::string(pAttribute))
43 return STATUS_CODE_NOT_FOUND;
52 return STATUS_CODE_NOT_ALLOWED;
57 pXmlElement = pXmlElement->NextSiblingElement(
"algorithm"))
59 std::string algorithmName;
61 algorithmNames.push_back(algorithmName);
64 return STATUS_CODE_SUCCESS;
73 return STATUS_CODE_NOT_ALLOWED;
76 pXmlElement = pXmlElement->NextSiblingElement(
"tool"))
78 if (description.empty())
83 const char *
const pAttribute(pXmlElement->Attribute(
"description"));
86 return STATUS_CODE_NOT_FOUND;
88 if (description == std::string(pAttribute))
96 return STATUS_CODE_NOT_FOUND;
105 return STATUS_CODE_NOT_ALLOWED;
110 pXmlElement = pXmlElement->NextSiblingElement(
"tool"))
114 algorithmToolVector.push_back(pAlgorithmTool);
117 return STATUS_CODE_SUCCESS;
124 std::string::size_type lastPos = inputString.find_first_not_of(delimiter, 0);
125 std::string::size_type pos = inputString.find_first_of(delimiter, lastPos);
127 while ((std::string::npos != pos) || (std::string::npos != lastPos))
129 tokens.push_back(inputString.substr(lastPos, pos - lastPos));
130 lastPos = inputString.find_first_not_of(delimiter, pos);
131 pos = inputString.find_first_of(delimiter, lastPos);
Header file for the pandora content api class.
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
Header file for the xml helper class.
static pandora::StatusCode CreateDaughterAlgorithm(const pandora::Algorithm &algorithm, pandora::TiXmlElement *const pXmlElement, std::string &daughterAlgorithmName)
Create an algorithm instance, via one of the algorithm factories registered with pandora....
static pandora::StatusCode CreateAlgorithmTool(const pandora::Algorithm &algorithm, pandora::TiXmlElement *const pXmlElement, pandora::AlgorithmTool *&pAlgorithmTool)
Create an algorithm tool instance, via one of the algorithm tool factories registered with pandora....
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
TiXmlElement * Element() const
TiXmlHandle FirstChild() const
Return a handle to the first child node.
TiXmlNode * ToNode() const
const std::string & ValueStr() const
static StatusCode ProcessAlgorithm(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &description, std::string &algorithmName)
Process an algorithm described in an xml element with a matching "description = .....
static void TokenizeString(const std::string &inputString, StringVector &tokens, const std::string &delimiter=" ")
Tokenize a string.
static StatusCode ProcessAlgorithmToolList(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &listName, AlgorithmToolVector &algorithmToolVector)
Process a list of algorithms tools in an xml file.
static StatusCode ProcessAlgorithmTool(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &description, AlgorithmTool *&pAlgorithmTool)
Process an algorithm tool described in an xml element with a matching "description = ....
static StatusCode ProcessAlgorithmList(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &listName, StringVector &algorithmNames)
Process a list of daughter algorithms in an xml file.
std::vector< std::string > StringVector
std::vector< AlgorithmTool * > AlgorithmToolVector
StatusCode
The StatusCode enum.