22 #include "intrusive_ptr/intrusive_ptr.hpp"
35 template<
typename C,
typename...Args>
37 return intrusive_ptr<C>(
new C(std::forward<Args>(
args)...));
39 template<
typename C,
typename...Args>
41 return std::make_shared<C>(std::forward<Args>(
args)...);
44 template<
typename C,
typename...Args>
46 return std::make_unique<C>(std::forward<Args>(
args)...);
53 rOStream << *rData.lock().get();
55 rOStream <<
" expired weak_ptr ";
61 std::ostream&
operator <<(std::ostream& rOStream,
const Kratos::intrusive_ptr<T>& rData) {
62 rOStream << *rData.get();
69 #define KRATOS_CLASS_POINTER_DEFINITION(a) typedef Kratos::shared_ptr<a > Pointer; \
70 typedef Kratos::shared_ptr<a > SharedPointer; \
71 typedef Kratos::weak_ptr<a > WeakPointer; \
72 typedef Kratos::unique_ptr<a > UniquePointer
75 template<
class T >
class GlobalPointer;
78 #define KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(a) typedef typename Kratos::intrusive_ptr<a > Pointer; \
79 typedef Kratos::GlobalPointer<a > WeakPointer; \
80 typedef Kratos::unique_ptr<a > UniquePointer; \
81 typename a::Pointer shared_from_this(){ return a::Pointer(this); }
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
intrusive_ptr< C > make_intrusive(Args &&...args)
Definition: smart_pointers.h:36
std::weak_ptr< T > weak_ptr
Definition: smart_pointers.h:30
std::shared_ptr< T > shared_ptr
Definition: smart_pointers.h:27
std::unique_ptr< T > unique_ptr
Definition: smart_pointers.h:33
unique_ptr< C > make_unique(Args &&...args)
Definition: smart_pointers.h:45
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
shared_ptr< C > make_shared(Args &&...args)
Definition: smart_pointers.h:40
args
Definition: generate_gid_list_file.py:37
int C
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:27