KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
weak_pointer_vector_iterator.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Pooyan Dadvand
11 // Riccardo Rossi
12 //
13 //
14 
15 
16 #if !defined(KRATOS_WEAK_POINTER_VECTOR_ITERATOR_H_INCLUDED )
17 #define KRATOS_WEAK_POINTER_VECTOR_ITERATOR_H_INCLUDED
18 
19 
20 
21 // System includes
22 #include <string>
23 #include <iostream>
24 
25 
26 // External includes
27 #include <boost/iterator/iterator_adaptor.hpp>
28 
29 
30 // Project includes
31 #include "includes/define.h"
32 
33 
34 namespace Kratos
35 {
36 
39 
43 
47 
51 
55 
57 
59 template<class TIteratorType, class TDataType>
61  : public boost::iterator_adaptor<WeakPointerVectorIterator<TIteratorType, TDataType>,
62  TIteratorType, TDataType>
63 {
64 public:
67 
70 
71  typedef boost::iterator_adaptor<WeakPointerVectorIterator,
72  TIteratorType, TDataType> BaseType;
73 
77 
80 
81  WeakPointerVectorIterator(TIteratorType NewIterator) :BaseType(NewIterator) {}
82 
83  WeakPointerVectorIterator(WeakPointerVectorIterator const & NewIterator) :BaseType(NewIterator.base()) {}
84 
85  //template<class TOtherIteratorType>
86  //WeakPointerVectorIterator(WeakPointerVectorIterator<TIteratorType> const & NewIterator) :BaseType(NewIterator.base()) {}
87 
88 
92 
93 
97 
98 
102 
103 
107 
108 
112 
113 
117 
118 
120 
121 private:
125 
126 
130 
131 
132 
136 
137 
141 
142  typename BaseType::reference dereference() const
143  {
144  return *((this->base())->lock());
145  }
146 
150 
151 
155 
156 
160 
161 
163 
164 }; // Class WeakPointerVectorIterator
165 
167 
170 
171 
175 
176 
178 
179 
180 } // namespace Kratos.
181 
182 #endif // KRATOS_WEAK_POINTER_VECTOR_ITERATOR_H_INCLUDED defined
183 
184 
Short class definition.
Definition: weak_pointer_vector_iterator.h:63
WeakPointerVectorIterator()
Default constructor.
Definition: weak_pointer_vector_iterator.h:79
WeakPointerVectorIterator(TIteratorType NewIterator)
Definition: weak_pointer_vector_iterator.h:81
boost::iterator_adaptor< WeakPointerVectorIterator, TIteratorType, TDataType > BaseType
Definition: weak_pointer_vector_iterator.h:72
WeakPointerVectorIterator(WeakPointerVectorIterator const &NewIterator)
Definition: weak_pointer_vector_iterator.h:83
friend class boost::iterator_core_access
Definition: weak_pointer_vector_iterator.h:122
KRATOS_CLASS_POINTER_DEFINITION(WeakPointerVectorIterator)
Pointer definition of WeakPointerVectorIterator.
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21