xc
BeamIntegratorHandler.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 //BeamIntegratorHandler.h
29 
30 #ifndef BEAMINTEGRATORLOADER_H
31 #define BEAMINTEGRATORLOADER_H
32 
33 #include "PrepHandler.h"
34 #include <map>
35 
36 namespace XC {
37 class BeamIntegration;
38 
43  {
44  public:
45  typedef std::map<std::string,BeamIntegration *> map_beam_integrators;
46  typedef map_beam_integrators::const_iterator const_iterator;
47  typedef map_beam_integrators::iterator iterator;
48  private:
49  map_beam_integrators beam_integrators;
50  void free_mem(void);
52  BeamIntegratorHandler &operator=(const BeamIntegratorHandler &);
53  protected:
54  friend class ElementHandler;
55  public:
57  const map_beam_integrators &Map(void) const;
58  const_iterator begin(void) const;
59  const_iterator end(void) const;
60  iterator begin(void);
61  iterator end(void);
62  const_iterator find(const std::string &str) const;
63  iterator find(const std::string &str);
64  BeamIntegration *find_ptr(const std::string &str);
65  const BeamIntegration *find_ptr(const std::string &nmb) const;
66 
67  inline size_t size(void) const
68  { return beam_integrators.size(); }
69 
70  bool exists(const std::string &nmb) const;
71  BeamIntegration *newBI(const std::string &,const std::string &);
72  BeamIntegration &get(const std::string &);
73 
74  ~BeamIntegratorHandler(void);
75  inline void clearAll(void)
76  { free_mem(); }
77  };
78 
79 } // end of XC namespace
80 
81 #endif
const_iterator begin(void) const
Returns an iterator which points to principio de la lista.
Definition: BeamIntegratorHandler.cc:92
Finite element model generation tools.
Definition: Preprocessor.h:59
const_iterator find(const std::string &str) const
Si encuentra el BeamIntegrator which name is being passed as parameter returns an iterator which poin...
Definition: BeamIntegratorHandler.cc:105
Element creation manager.
Definition: ElementHandler.h:40
Base class for the preprocessor objects that create model entities: nodes, elements, loads, etc.
Definition: PrepHandler.h:47
BeamIntegration * find_ptr(const std::string &str)
Si encuentra el BeamIntegrator which name is being passed as parameter returns a pointer al mismo...
Definition: BeamIntegratorHandler.cc:114
Base class for integration on beam elements.
Definition: BeamIntegration.h:80
const map_beam_integrators & Map(void) const
Returns a reference to the beam integrator container.
Definition: BeamIntegratorHandler.cc:88
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
bool exists(const std::string &nmb) const
True if integrator named nmb exists.
Definition: BeamIntegratorHandler.cc:196
Beam integrators handler.
Definition: BeamIntegratorHandler.h:42
BeamIntegration * newBI(const std::string &, const std::string &)
Defines a new beam integrator framework.
Definition: BeamIntegratorHandler.cc:173
const_iterator end(void) const
Returns an iterator apuntando después del final de la lista.
Definition: BeamIntegratorHandler.cc:95