|
Geogram Version 1.9.7
A programming library of geometric algorithms
|
Concrete implementation of LifeCycle. More...
#include <geogram/basic/life_cycle.h>
Public Member Functions | |
| GenericLifeCycle () | |
| GenericLifeCycle constructor. | |
| void | construct (Memory::pointer address) override |
| Calls the constructor of an object. | |
| void | copy_construct (Memory::pointer lhs, Memory::pointer rhs) override |
| Copy-Constructs an object at a given address. | |
| void | destroy (Memory::pointer address) override |
| Calls the destructor of an object. | |
| void | assign (Memory::pointer lhs, Memory::pointer rhs) override |
| Calls the assignment operator. | |
| void | reset (Memory::pointer address) override |
| Resets an object to its default value. | |
| void | swap (Memory::pointer a, Memory::pointer b) override |
| Swaps the objects at two addresses. | |
| void | construct_array (Memory::pointer address, index_t nb) override |
| Calls the constructor of objects in an array. | |
| void | copy_construct_array (Memory::pointer lhs, Memory::pointer rhs, index_t nb) override |
| Copy-Constructs an array of object at a given address. | |
| void | destroy_array (Memory::pointer address, index_t nb) override |
| Destroys an array of object at a given address. | |
| void | assign_array (Memory::pointer lhs, Memory::pointer rhs, index_t nb) override |
| Copies an array of object at a given address. | |
| void | reset_array (Memory::pointer address, index_t nb) override |
| Resets all objects in an array to their default value. | |
| Memory::pointer | new_object () override |
| Dynamically allocates a new object. | |
| Memory::pointer | new_object (Memory::pointer rhs) override |
| Dynamically allocates a new object. | |
| void | delete_object (Memory::pointer address) override |
| Deletes an object. | |
| Memory::pointer | new_array (index_t nb) override |
| Dynamically allocates an array of objects. | |
| void | delete_array (Memory::pointer address) override |
| Deletes an array of objects. | |
Public Member Functions inherited from GEO::LifeCycle | |
| LifeCycle (size_t object_size, bool is_pod=false) | |
| LifeCycle constructor. | |
| ~LifeCycle () override | |
| LifeCycle destructor. | |
| size_t | object_size () const |
| Gets the size of an object. | |
| bool | is_pod () const |
| Tests whether object is pod (plain ordinary datatype). | |
Public Member Functions inherited from GEO::Counted | |
| void | ref () const |
| Increments the reference count. | |
| void | unref () const |
| Decrements the reference count. | |
| bool | is_shared () const |
| Check if the object is shared. | |
| int | nb_refs () const |
| Gets the number of references that point to this object. | |
Additional Inherited Members | |
Static Public Member Functions inherited from GEO::Counted | |
| static void | ref (const Counted *counted) |
| Increments the reference count. | |
| static void | unref (const Counted *counted) |
| Decrements the reference count. | |
Protected Member Functions inherited from GEO::Counted | |
| Counted () | |
| Creates a reference counted object. | |
| virtual | ~Counted () |
| Destroys a reference counted object. | |
Concrete implementation of LifeCycle.
Definition at line 252 of file life_cycle.h.
|
inline |
GenericLifeCycle constructor.
Definition at line 258 of file life_cycle.h.
|
inlineoverridevirtual |
Calls the assignment operator.
| [in] | lhs | the address of the left hand side. |
| [in] | rhs | the address of the right hand side. |
Implements GEO::LifeCycle.
Definition at line 286 of file life_cycle.h.
|
inlineoverridevirtual |
Copies an array of object at a given address.
| [in] | lhs | the address of the left-hand-side objects |
| [in] | rhs | the address of the right-hand-side objects to be copied. |
| [in] | nb | number of objects |
No memory allocation is done.
Implements GEO::LifeCycle.
Definition at line 340 of file life_cycle.h.
|
inlineoverridevirtual |
Calls the constructor of an object.
| [in] | address | the address of the object to be constructed. |
No memory allocation is done.
Implements GEO::LifeCycle.
Definition at line 264 of file life_cycle.h.
|
inlineoverridevirtual |
Calls the constructor of objects in an array.
| [in] | address | the address of the object array to be constructed. |
| [in] | nb | number of objects. |
No memory allocation is done.
Implements GEO::LifeCycle.
Definition at line 306 of file life_cycle.h.
|
inlineoverridevirtual |
Copy-Constructs an object at a given address.
| [in] | lhs | the address where the object should be constructed. |
| [in] | rhs | the address of the right-hand-side object to be copied. |
No memory allocation is done.
Implements GEO::LifeCycle.
Definition at line 271 of file life_cycle.h.
|
inlineoverridevirtual |
Copy-Constructs an array of object at a given address.
| [in] | lhs | the address of the objects to be constructed. |
| [in] | rhs | the address of the right-hand-side objects to be copied. |
| [in] | nb | number of objects |
No memory allocation is done.
Implements GEO::LifeCycle.
Definition at line 316 of file life_cycle.h.
|
inlineoverridevirtual |
Deletes an array of objects.
| [in] | address | the address of the object array to be deleted. |
Implements GEO::LifeCycle.
Definition at line 392 of file life_cycle.h.
|
inlineoverridevirtual |
Deletes an object.
| [in] | address | the address of the object. |
Implements GEO::LifeCycle.
Definition at line 378 of file life_cycle.h.
|
inlineoverridevirtual |
Calls the destructor of an object.
| [in] | address | the address of the object to be destructed. |
No memory deallocation is done.
Implements GEO::LifeCycle.
Definition at line 278 of file life_cycle.h.
|
inlineoverridevirtual |
Destroys an array of object at a given address.
| [in] | address | the address of the objects to be destroyed. |
| [in] | nb | number of objects |
No memory deallocation is done.
Implements GEO::LifeCycle.
Definition at line 329 of file life_cycle.h.
|
inlineoverridevirtual |
Dynamically allocates an array of objects.
| [in] | nb | number of objects. |
Implements GEO::LifeCycle.
Definition at line 385 of file life_cycle.h.
|
inlineoverridevirtual |
Dynamically allocates a new object.
Implements GEO::LifeCycle.
Definition at line 364 of file life_cycle.h.
|
inlineoverridevirtual |
Dynamically allocates a new object.
Implements GEO::LifeCycle.
Definition at line 371 of file life_cycle.h.
|
inlineoverridevirtual |
Resets an object to its default value.
Creates a new object with the default constructor and assigns it to the object at address.
| [in] | address | the address of an already initialized object. |
Implements GEO::LifeCycle.
Definition at line 293 of file life_cycle.h.
|
inlineoverridevirtual |
Resets all objects in an array to their default value.
creates an object with the default value and assigns it to the element for each element in the array.
| [in] | address | the address of the object array to be reset. |
| [in] | nb | number of objects. |
Implements GEO::LifeCycle.
Definition at line 353 of file life_cycle.h.
|
inlineoverridevirtual |
Swaps the objects at two addresses.
| [in] | a,b | pointers to the two objects to be swapped |
Implements GEO::LifeCycle.
Definition at line 299 of file life_cycle.h.