xc
MapModelWrapper.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 //MapModelWrapper.h
29 
30 #ifndef MAPMODELWRAPPER_H
31 #define MAPMODELWRAPPER_H
32 
33 #include "utility/kernel/CommandEntity.h"
34 #include "ModelWrapper.h"
35 
36 namespace XC {
37 
38 class SolutionProcedureControl;
39 class ModelWrapper;
40 class Domain;
41 
46  {
47  public:
48  typedef std::map<std::string,ModelWrapper> map_model_wrapper;
49  typedef map_model_wrapper::iterator iterator;
50  typedef map_model_wrapper::const_iterator const_iterator;
51 
52  private:
53  map_model_wrapper solu_models;
54  protected:
55 
56  public:
58 
59  inline iterator begin()
60  { return solu_models.begin(); }
61  inline iterator end()
62  { return solu_models.end(); }
63  inline const_iterator begin() const
64  { return solu_models.begin(); }
65  inline const_iterator end() const
66  { return solu_models.end(); }
67 
68  inline bool empty(void) const
69  { return solu_models.empty(); }
70  inline size_t size(void) const
71  { return solu_models.size(); }
72 
73  bool existeModelWrapper(const std::string &) const;
74  ModelWrapper &creaModelWrapper(const std::string &);
75  const ModelWrapper *getModelWrapper(const std::string &) const;
76  ModelWrapper *getModelWrapper(const std::string &);
77  const std::string &getModelWrapperName(const ModelWrapper *) const;
78 
79  void clearAll(void);
80  };
81 
82 } // end of XC namespace
83 
84 #endif
const std::string & getModelWrapperName(const ModelWrapper *) const
Return the name of a model wrapper.
Definition: MapModelWrapper.cc:71
void clearAll(void)
Clears all.
Definition: MapModelWrapper.cc:110
const ModelWrapper * getModelWrapper(const std::string &) const
Return a const pointer to the solution method.
Definition: MapModelWrapper.cc:61
bool existeModelWrapper(const std::string &) const
Return true if the method whose name is passed as parameter exists.
Definition: MapModelWrapper.cc:44
Wrapper for the finite element model "as seen" from the solver.
Definition: ModelWrapper.h:59
Objet that can execute python scripts.
Definition: CommandEntity.h:40
Container for the objects that control the solution procedure.
Definition: SolutionProcedureControl.h:45
ModelWrapper & creaModelWrapper(const std::string &)
Creates a new solution method with the identifier being passed as parameter (if already exists...
Definition: MapModelWrapper.cc:96
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Finite element model wrappers container.
Definition: MapModelWrapper.h:45
MapModelWrapper(SolutionProcedureControl *owr)
Default constructor.
Definition: MapModelWrapper.cc:39