26 #include "utility/kernel/CommandEntity.h" 33 class LoadCombinationVector;
42 typedef std::set<std::string> set_string;
44 typedef std::deque<std::string> dq_string;
46 static std::string
limpia(
const std::string &str);
50 set_string incompatibles;
51 dq_string main_actions;
54 template<
typename InputIterator>
55 std::string names(InputIterator, InputIterator)
const;
56 void concat_incompatibles(
const set_string &);
57 void concat_main_actions(
const dq_string &);
58 bool match(
const std::string &,
const dq_string &)
const;
59 bool match_any(
const set_string &,
const dq_string &)
const;
60 bool match_all(
const set_string &,
const dq_string &)
const;
67 { incompatibles.insert(str); }
70 { main_actions.push_back(str); }
75 bool esclavaDe(
const std::string &)
const;
76 bool esEsclava(
void)
const 77 {
return !main_actions.empty(); }
78 bool tieneHuerfanas(
void)
const 79 {
return !main_actions.empty(); }
82 inline void setContieneIncomp(
bool b)
83 { contiene_incomp= b; }
87 {
return contiene_incomp; }
91 boost::python::dict
getPyDict(
void)
const;
92 void setPyDict(
const boost::python::dict &);
94 std::string incompatibleNames(
void)
const;
95 std::string masterNames(
void)
const;
96 void Print(std::ostream &os)
const;
107 template<
typename InputIterator>
108 std::string cmb_acc::ActionRelationships::names(InputIterator begin, InputIterator end)
const 113 InputIterator i= begin;
bool incompatible(const std::string &) const
Return true if the action which name is being passed as parameter is not compatible with this one...
Definition: ActionRelationships.cc:134
static std::string limpia(const std::string &str)
Elimina el factor que multiplica a la acción en la cadena de la forma "1.35*A" que se pasa como parám...
Definition: ActionRelationships.cc:32
bool esclavaDe(const std::string &) const
Return true if the action which name is being passed as parameter is a master of this one...
Definition: ActionRelationships.cc:145
Routines to generate combinations of actions.
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: ActionRelationships.cc:192
static std::deque< std::string > get_combination_addends(const std::string &str)
Return los sumandos de la text string que se pasa como parámetro.
Definition: ActionRelationships.cc:41
bool contieneIncomp(void) const
Return true if this combination contains incompatible actions.
Definition: ActionRelationships.h:86
void appendIncompatible(const std::string &str)
Append the regular expression argument to the list of incompatible actions.
Definition: ActionRelationships.h:66
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: ActionRelationships.cc:208
static std::deque< std::string > get_combination_actions_names(const std::string &str)
Return the names of the actions of the combinations.
Definition: ActionRelationships.cc:56
ActionRelationships(void)
Default constructor.
Definition: ActionRelationships.cc:65
Objet that can execute python scripts.
Definition: CommandEntity.h:40
bool matchIncompatibles(const dq_string &) const
Return verdadero si la text strings que se pasan como parámetro verifica alguna de las expresiones de...
Definition: ActionRelationships.cc:128
const LoadCombinationVector & get_compatibles(const LoadCombinationVector &)
Return the combinations filtering those that contain incompatible actions.
Definition: ActionRelationships.cc:233
void appendMain(const std::string &str)
Append the regular expression argument to the list of main actions.
Definition: ActionRelationships.h:69
void updateMainActions(const std::string &nmb)
Remove from the masters lists those which names match with the argument name.
Definition: ActionRelationships.cc:159
Combination container.
Definition: LoadCombinationVector.h:38
Relationship of an action with the other ones.
Definition: ActionRelationships.h:39
const LoadCombinationVector & filtraCombsEsclavasHuerfanas(const LoadCombinationVector &)
Filters the combinations where an slave actions appears without its master.
Definition: ActionRelationships.cc:258
Family of actions (permanent, variable, accidental,...)
Definition: ActionsFamily.h:44