C3D Toolkit
Kernel - 117969, Vision - 2.8.1.4
|
Set of object properties. Internal use only. More...
#include <mb_property.h>
Public Member Functions | |
MbProperties () | |
Constructor. | |
MbePrompt & | SetName () |
Get name of object. | |
size_t | GetName () const |
Get name of object. | |
MbePrompt | Name () const |
Get name of object. | |
void | SetName (MbePrompt s) |
Set name of the object. More... | |
void | SetName (size_t s) |
Set name of the object. More... | |
MbProperty * | FindByPrompt (MbePrompt p, uint type) const |
Find property. More... | |
size_t | FindByPrompt (uint type, MbePrompt p) const |
Find index of property in array. More... | |
![]() | |
PArray () | |
Constructor. | |
PArray (size_t i_upper, uint16 i_delta=1, bool shouldDelete=true) | |
Constructor. | |
virtual | ~PArray () |
Destructor. | |
bool | OwnsElem () const |
Are the elements owned? | |
void | OwnsElem (bool ownsEl) |
Set the flag of elements ownership. | |
bool | SetSize (size_t newSize, bool clear) |
Functions that allocate potentially large memory, return an operation result (success/error). More... | |
void | Flush (DelType=defDelete) |
Delete all elements. | |
void | HardFlush (DelType shdl=defDelete) |
Free the whole memory. | |
void | RemoveAll (DelType shdl=defDelete) |
Delete all elements and set the number of elements to null. | |
MbProperty * | RemoveObj (MbProperty *delObject, DelType=defDelete) |
Delete an element from array. | |
virtual MbProperty * | RemoveInd (size_t delIndex, DelType del=defDelete) |
Delete an element from array. | |
virtual void | clear () |
Set the number of elements to null. | |
![]() | |
RPArray () | |
Constructor. | |
RPArray (size_t i_upper, uint16 i_delta=1) | |
Constructor. | |
virtual | ~RPArray () |
Destructor. | |
uint16 | Delta () const |
Get the increment by the number of elements while the allocation of additional memory. | |
size_t | Upper () const |
The number of elements the memory is allocated for. | |
void | Delta (uint16 newDelta) |
Set the increment by the number of elements while the allocation of additional memory (1 - autoincrement). | |
void | SetMaxDelta (uint16 newDelta) |
Set the maximum increment. | |
bool | SetSize (size_t newSize) |
Functions that allocate potentially large memory, return an operation result (success/error). More... | |
bool | Reserve (size_t n, bool addAdditionalSpace=true) |
Reserve space for a given number of elements. | |
bool | Add (Type *) |
Add an element to the end of the array. | |
bool | AddAt (Type *e, size_t index) |
Insert an element to the given position. | |
bool | AddAfter (Type *e, size_t index) |
Add an element after the specified one. | |
bool | Insert (size_t index, Type *) |
Insert an element before the specified one. | |
bool | AddArray (const RPArray< Type > &) |
Add array. | |
bool | AddCArray (const Type **, size_t count) |
Add C-array. | |
bool | InsertArray (const RPArray< Type > &, size_t index) |
Add an array to the position. | |
void | DetachAll () |
Delete all elements and set the number of elements to null. | |
void | Adjust () |
Free the unnecessary memory. | |
Type * | DetachInd (size_t delIndex) |
Detach an element from the array. | |
bool | DetachObj (const Type *delObject) |
Detach an element from the array. | |
void | Swap (RPArray &arr) |
Swap data of arrays. | |
size_t | FindIt (const Type *) const |
Find an element by a pointer. | |
bool | IsExist (const Type *) const |
Whether an element belongs the array. | |
size_t | Count () const |
Get the number of array elements. | |
ptrdiff_t | MaxIndex () const |
Get the index of the last element in the array. | |
void | Sort (CompFunc comp) |
Sort the array. | |
Type *& | operator[] (size_t loc) const |
Access by index operator. | |
Type * | GetLast () const |
Get the address of the last element in the array. | |
size_t | size () const |
Get the number of elements in array. | |
bool | reserve (size_t n) |
Reserve space for a given number of elements. | |
size_t | capacity () const |
What is the number of elements the memory is allocated for? | |
void | push_back (const Type *e) |
Add an element to the end of the array. | |
template<class Iterator > | |
void | insert (Iterator pos, const Type *e) |
Insert an element before the specified one. | |
template<class Iterator > | |
void | erase (Iterator pos) |
Delete an element from array by the index. | |
template<class Iterator > | |
void | erase (Iterator first, Iterator last) |
Delete elements from the array from first to last-1 inclusively. | |
void | shrink_to_fit () |
Free the unnecessary memory (Reduce capacity). | |
const TPtr * | begin () const |
Get the pointer to the first array element. | |
TPtr * | begin () |
Get the pointer to the first array element. | |
const TPtr * | end () const |
Get the pointer to the piece of memory after the array. | |
TPtr * | end () |
Get the pointer to the piece of memory after the array. | |
const TPtr * | cbegin () const |
Get the pointer to the first array element. | |
const TPtr * | cend () const |
Get the pointer to the piece of memory after the array. | |
RPArray (RPArray< Type > &&) | |
Constructor of an array moving. | |
RPArray< Type > & | operator= (RPArray< Type > &&) |
Operator of an array moving. | |
Additional Inherited Members | |
![]() | |
typedef Type * | TPtr |
A name of the pointer to the object. | |
typedef int(* | CompFunc) (const Type **, const Type **) |
A template of sorting function. | |
![]() | |
const Type ** | GetAddr () const |
Get the pointer to the first array element. | |
const TPtr * | _Begin () const |
Get the pointer to the first array element. | |
TPtr * | _Begin () |
Get the pointer to the first array element. | |
const TPtr * | _End () const |
Get the pointer to the piece of memory after the array. | |
bool | CatchMemory () |
Catch memory. | |
bool | AddMemory (size_t n) |
Provide memory for n elements, independently from AutoDelta. | |
size_t | AutoDelta () const |
Calculate autoincrement. | |
![]() | |
bool | owns |
A flag of ownership of elements of an array (elements can be deleted) | |
MbProperty * | nowDeletedElem |
Deleted element. | |
![]() | |
size_t | count |
The number of elements in array. | |
size_t | upper |
The number of elements the memory is allocated for. | |
uint16 | delta |
Increment by the number of elements while the allocation of additional memory. | |
Set of object properties. Internal use only.
Set of object properties is container that calls destructor of its elements.
To store the user data of an object, we recommend using attributes, objects of classes that inherit MbAttribute, already available in the kernel or user-defined.
Set name of the object.
Set name of the object.
[in] | s | - Number of hint string. |
|
inline |
Set name of the object.
Set name of the object.
[in] | s | - Number of hint string. |
MbProperty* MbProperties::FindByPrompt | ( | MbePrompt | p, |
uint | type | ||
) | const |
Find property.
Find property by name and type.
[in] | p | - Number of hint string. |
[in] | type | - Property type. |
size_t MbProperties::FindByPrompt | ( | uint | type, |
MbePrompt | p | ||
) | const |
Find index of property in array.
Find index of property in array by name and type.
[in] | type | - Property type. |
[in] | p | - Number of hint string. |