C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Set of object properties. Internal use only. More...

#include <mb_property.h>

+ Inheritance diagram for MbProperties:
+ Collaboration diagram for MbProperties:

Public Member Functions

 MbProperties ()
 Constructor.
 
MbePromptSetName ()
 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...
 
MbPropertyFindByPrompt (MbePrompt p, uint type) const
 Find property. More...
 
size_t FindByPrompt (uint type, MbePrompt p) const
 Find index of property in array. More...
 
- Public Member Functions inherited from PArray< MbProperty >
 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.
 
MbPropertyRemoveObj (MbProperty *delObject, DelType=defDelete)
 Delete an element from array.
 
virtual MbPropertyRemoveInd (size_t delIndex, DelType del=defDelete)
 Delete an element from array.
 
virtual void clear ()
 Set the number of elements to null.
 
- Public Member Functions inherited from RPArray< Type >
 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.
 
void emplace_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 TPtrbegin () const
 Get the pointer to the first array element.
 
TPtrbegin ()
 Get the pointer to the first array element.
 
const TPtrend () const
 Get the pointer to the piece of memory after the array.
 
TPtrend ()
 Get the pointer to the piece of memory after the array.

 
const TPtrcbegin () const
 Get the pointer to the first array element.
 
const TPtrcend () 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

- Public Types inherited from RPArray< Type >
typedef Type * TPtr
 A name of the pointer to the object.
 
typedef int(* CompFunc) (const Type **, const Type **)
 A template of sorting function.
 
- Protected Member Functions inherited from RPArray< Type >
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.
 
- Protected Attributes inherited from PArray< MbProperty >
bool owns
 A flag of ownership of elements of an array (elements can be deleted)
 
MbPropertynowDeletedElem
 Deleted element.
 
- Protected Attributes inherited from RPArray< Type >
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.
 

Detailed Description

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.

Member Function Documentation

◆ SetName() [1/2]

void MbProperties::SetName ( MbePrompt  s)
inline

Set name of the object.

Set name of the object.

Parameters
[in]s- Number of hint string.

◆ SetName() [2/2]

void MbProperties::SetName ( size_t  s)
inline

Set name of the object.

Set name of the object.

Parameters
[in]s- Number of hint string.

◆ FindByPrompt() [1/2]

MbProperty* MbProperties::FindByPrompt ( MbePrompt  p,
uint  type 
) const

Find property.

Find property by name and type.

Parameters
[in]p- Number of hint string.
[in]type- Property type.

◆ FindByPrompt() [2/2]

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.

Parameters
[in]type- Property type.
[in]p- Number of hint string.

The documentation for this class was generated from the following file: