|
TrioCFD 1.9.9_beta
TrioCFD documentation
|
: This class is an OWN_PTR but the pointed object is shared among multiple More...
#include <MD_Vector.h>
Public Member Functions | |
| MD_Vector () | |
| MD_Vector (const MD_Vector &) | |
| Copy constructor, attaches the pointer to the same object as the source. | |
| MD_Vector & | operator= (const MD_Vector &) |
| Same as attach(src). | |
| void | attach (const MD_Vector &) |
| Detaches the pointer and attaches to the same object as src. | |
| void | detach () |
| Detaches the pointer from the pointed object. | |
| int | non_nul () const |
| operator bool () const noexcept | |
| void | copy (const MD_Vector_base &) |
| Constructs an MD_Vector object by copying an existing object. | |
| const MD_Vector_base & | valeur () const |
| const MD_Vector_base * | operator-> () const |
| int | operator== (const MD_Vector &) const |
| Returns 1 if the structures are identical, 0 otherwise. | |
| int | operator!= (const MD_Vector &) const |
| Inverse of ==. | |
: This class is an OWN_PTR but the pointed object is shared among multiple
instances of this class. The pointed object can only be accessed as "const" and is only accessible through MD_Vector instances. Therefore there is no way to access it as "non-const" other than with a cast. The attach() method and the copy constructor attach the pointer to an existing instance already attached to a pointer. The attach_detach() method takes ownership of the object pointed to by the OWN_PTR and detaches the object from the OWN_PTR. This is the only way to "construct" MD_Vector objects (avoids a copy and ensures that the MD_Vect can no longer be modified once it has been attached to an MD_Vector). WARNING: the safety of this method relies on the fact that the instance pointed to by MD_Vector is accessible nowhere else but through MD_Vector objects. DO NOT ADD a method attach(const MD_Vector_base &), as this breaks the class safety!!! (B.Mathieu) As many methods as possible are inlined to avoid penalising non-distributed arrays, while avoiding including MD_Vector_base.h.
Definition at line 47 of file MD_Vector.h.
|
inline |
Definition at line 50 of file MD_Vector.h.
|
inline |
Copy constructor, attaches the pointer to the same object as the source.
Definition at line 95 of file MD_Vector.h.
|
inline |
Detaches the pointer and attaches to the same object as src.
Definition at line 111 of file MD_Vector.h.
| void MD_Vector::copy | ( | const MD_Vector_base & | src | ) |
Constructs an MD_Vector object by copying an existing object.
This is the recommended method for creating an MD_Vector object (other than by copying another MD_Vector).
Definition at line 26 of file MD_Vector.cpp.
|
inline |
Detaches the pointer from the pointed object.
Definition at line 102 of file MD_Vector.h.
|
inline |
Definition at line 56 of file MD_Vector.h.
|
inlineexplicitnoexcept |
Definition at line 65 of file MD_Vector.h.
| int MD_Vector::operator!= | ( | const MD_Vector & | md | ) | const |
Inverse of ==.
Definition at line 50 of file MD_Vector.cpp.
|
inline |
Definition at line 83 of file MD_Vector.h.
Same as attach(src).
Definition at line 122 of file MD_Vector.h.
| int MD_Vector::operator== | ( | const MD_Vector & | md | ) | const |
Returns 1 if the structures are identical, 0 otherwise.
Definition at line 37 of file MD_Vector.cpp.
|
inline |
Definition at line 77 of file MD_Vector.h.