xc
GroupActionWrapper.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // xc utils library; general purpose classes and functions.
4 //
5 // Copyright (C) Luis C. PĂ©rez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //GroupActionWrapper.hxx
22 //Representative values of an action.
23 
24 #ifndef GROUPACTIONWRAPPER_H
25 #define GROUPACTIONWRAPPER_H
26 
27 #include "ActionWrapper.h"
28 #include "ActionRepresentativeValues.h"
29 
30 namespace cmb_acc{
31 
35  {
36  typedef std::deque<ActionRepresentativeValues> action_container;
37  typedef action_container::iterator iterator;
38  typedef action_container::const_iterator const_iterator;
39  friend class ActionWrapperList;
40  protected:
41  action_container actions;
43  GroupActionWrapper(const std::vector<std::string> &names={""}, const std::vector<std::string> &descriptions={""}, ActionWrapperList *list= nullptr);
44  GroupActionWrapper(const std::vector<Action> &, ActionWrapperList *list= nullptr,const std::vector<std::string> &combination_factors_names= {""}, const std::string &nmb_partial_safety_factors= "");
45  virtual std::string getName(void) const;
46  public:
47  std::vector<const Action *> getWrappedActions(void) const;
48  const Action *getAction(const size_t &) const;
49  virtual Action getRepresentativeValue(const LeadingActionInfo &) const;
50  const ActionRelationships &getRelaciones(void) const;
51  bool notDeterminant(void) const;
52  };
53 
54 } //fin namespace nmb_acc.
55 
56 #endif
List of representative values of actions (ActionWrapper objects).
Definition: ActionWrapperList.h:42
Routines to generate combinations of actions.
Wrapper for a group action.
Definition: GroupActionWrapper.h:34
std::vector< const Action * > getWrappedActions(void) const
Return pointers to the actions wrapped in this object.
Definition: GroupActionWrapper.cc:62
Action or linear combination of actions.
Definition: Action.h:44
GroupActionWrapper(const std::vector< std::string > &names={""}, const std::vector< std::string > &descriptions={""}, ActionWrapperList *list=nullptr)
Default constructor.
Definition: GroupActionWrapper.cc:27
virtual Action getRepresentativeValue(const LeadingActionInfo &) const
Get the representative value of the action in the contest being pased as parameter.
Definition: GroupActionWrapper.cc:85
Information about the leading action.
Definition: LeadingActionInfo.h:35
Base class for action design values and action groups.
Definition: ActionWrapper.h:42
Relationship of an action with the other ones.
Definition: ActionRelationships.h:37
Definition: __init__.py:1
bool notDeterminant(void) const
Return true if the none of the actions can be determinant.
Definition: GroupActionWrapper.cc:113
virtual std::string getName(void) const
Return the action name.
Definition: GroupActionWrapper.cc:53
const Action * getAction(const size_t &) const
Return the action corresponding to the given index.
Definition: GroupActionWrapper.cc:73
const ActionRelationships & getRelaciones(void) const
Return the relatioships with the other actions.
Definition: GroupActionWrapper.cc:106