00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef AMLUtilities_hpp
00027 #define AMLUtilities_hpp 1
00028
00029
00030 #include "UAP/UAPNode.hpp"
00031 #include "AML/Twig.hpp"
00032
00033 class AMLUtilities {
00034
00035 public:
00036
00037 AMLUtilities();
00038
00044 static bool inAMLNameSpace (const std::string& name);
00045
00051 static bool inAMLNameSpace (UAPNode* node);
00052
00058 void controllerBookkeeper (UAPNode* expand_root);
00059
00065 bool getSectorArgList (UAPNode* sector, StrList& arg_list);
00066
00071 bool validAttribute (const std::string& attribute);
00072
00082 bool splitElement (UAPNode* machine_root, double s_split,
00083 NodeVecIter& iter, double tol = 1e-6);
00084
00090 void transferLordSlaveLinks (UAPNode* old_node, UAPNode* new_node);
00091
00103 double getAMLAttributeNumericValue (UAPNode* root, std::string attrib_name, bool& ok);
00104
00114 std::string getAMLAttributeString (UAPNode* root, std::string attrib_name, bool& ok);
00115
00120 void form_super_slave_names (UAPNode* ele);
00121
00122 private:
00123
00124 PrintInfoStruct info_out;
00125 StrList valid_attributes;
00126 StrList wild_attributes;
00127
00128 void init_valid_attributes ();
00129 void add_valid_attribute (std::string attrib_str);
00130
00131 };
00132
00133 #endif