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  int beam_int_tag;
50  map_beam_integrators beam_integrators;
51  void free_mem(void);
53  BeamIntegratorHandler &operator=(const BeamIntegratorHandler &);
54  protected:
55  friend class ElementHandler;
56  public:
58  const map_beam_integrators &Map(void) const;
59  const_iterator begin(void) const;
60  const_iterator end(void) const;
61  iterator begin(void);
62  iterator end(void);
63 
64  std::string getName(const int &tag) const;
65  const_iterator find(const std::string &str) const;
66  iterator find(const std::string &str);
67  BeamIntegration *find_ptr(const std::string &str);
68  const BeamIntegration *find_ptr(const std::string &nmb) const;
69 
70  inline size_t size(void) const
71  { return beam_integrators.size(); }
72 
73  bool exists(const std::string &nmb) const;
74  BeamIntegration *newBI(const std::string &,const std::string &);
75  BeamIntegration &get(const std::string &);
76 
77  ~BeamIntegratorHandler(void);
78  inline void clearAll(void)
79  { free_mem(); }
80  };
81 
82 } // end of XC namespace
83 
84 #endif
const_iterator begin(void) const
Returns an iterator which points to principio de la lista.
Definition: BeamIntegratorHandler.cc:93
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:120
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:129
Base class for integration on beam elements.
Definition: BeamIntegration.h:81
const map_beam_integrators & Map(void) const
Returns a reference to the beam integrator container.
Definition: BeamIntegratorHandler.cc:89
std::string getName(const int &tag) const
Returns the name that corresponds to the given tag.
Definition: BeamIntegratorHandler.cc:106
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:212
Beam integrators handler.
Definition: BeamIntegratorHandler.h:42
BeamIntegration * newBI(const std::string &, const std::string &)
Defines a new beam integrator framework.
Definition: BeamIntegratorHandler.cc:188
const_iterator end(void) const
Returns an iterator apuntando después del final de la lista.
Definition: BeamIntegratorHandler.cc:96