Go to the documentation of this file.
12 #ifndef __ICECONTAINER_H__
13 #define __ICECONTAINER_H__
15 #define CONTAINER_STATS
50 if(mCurNbEntries==mMaxNbEntries) Resize();
53 mEntries[mCurNbEntries++] = entry;
60 if(mCurNbEntries+nb>mMaxNbEntries) Resize(nb);
84 if(mCurNbEntries==mMaxNbEntries) Resize();
87 mEntries[mCurNbEntries++] =
IR(entry);
94 if(mCurNbEntries+nb>mMaxNbEntries) Resize(nb);
105 if(!Contains(entry)) Add(entry);
129 if(mCurNbEntries) mCurNbEntries = 0;
135 mCurNbEntries =
size;
158 bool Delete(
udword entry);
160 bool DeleteKeepingOrder(
udword entry);
170 inline_ udword GetNbEntries()
const {
return mCurNbEntries; }
178 inline_ float GetGrowthFactor()
const {
return mGrowthFactor; }
179 inline_ void SetGrowthFactor(
float growth) { mGrowthFactor = growth; }
180 inline_ bool IsFull()
const {
return mCurNbEntries==mMaxNbEntries; }
181 inline_ BOOL IsNotEmpty()
const {
return mCurNbEntries; }
189 udword GetUsedRam()
const;
194 #ifdef CONTAINER_STATS
204 bool Resize(
udword needed=1);
212 #endif // __ICECONTAINER_H__
png_infop int int location
inline_ udword GetNbContainers() const
Operator for "Container A = Container B".
png_infop png_sPLT_tpp entries
inline_ Container & AddUnique(udword entry)
Add unique [slow].
inline_ void ForceSize(udword size)
udword mMaxNbEntries
Maximum possible number of entries.
inline_ udword GetTotalBytes() const
static udword mUsedRam
Amount of bytes used by containers in the system.
unsigned int udword
sizeof(udword) must be 4
int BOOL
Another boolean type.
inline_ Container & Add(const float *entries, udword nb)
inline_ udword & operator[](udword i)
Write-access as an array.
inline_ void DeleteIndex(udword index)
Deletes the entry whose index is given.
inline_ void CopyMemory(void *dest, const void *src, udword size)
#define IR(x)
Integer representation of a floating-point value.
inline_ udword operator[](udword i) const
Read-access as an array.
static udword mNbContainers
Number of containers around.
float mGrowthFactor
Resize: new number of entries = old number * mGrowthFactor.
inline_ udword GetFirst() const
inline_ Container & Add(const udword *entries, udword nb)
udword mCurNbEntries
Current number of entries.
udword * mEntries
List of entries.
inline_ void DeleteLastEntry()
Deletes the very last entry.
inline_ udword GetLast() const
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:03