mFrame
載入中...
搜尋中...
無符合項目
mframe::util::Pool 結構 參考文件abstract
類別mframe::util::Pool的繼承圖:
mframe::util::Collection< E > mframe::lang::Iterable< E > mframe::lang::Interface

公開方法(Public Methods)

virtual uint32 elementSize (void) const override
 Returns this pool element size of byte.
 
virtual uint32 capacity (void) const override
 Returns this pool's capacity.
 
virtual void * alloc (void) override
 Alloc memory from pool.
 
virtual mframe::lang::Memory allocMemory (void) override
 
virtual void * add (const void *elenemt) override
 Alloc memory from pool and copy element.
 
virtual bool remove (void *element) override
 Free this element memory.
 
- 公開方法(Public Methods) 繼承自 mframe::util::Collection< E >
virtual void clear (void) override
 從此集合中刪除所有元素(可選操作)。此方法返回後,集合將為空。
 
virtual bool isEmpty (void) const override
 如果此集合不包含元素,則返回true。
 
virtual int size (void) const override
 返回此集合中的元素數。
 
- 公開方法(Public Methods) 繼承自 mframe::lang::Iterable< E >
virtual void forEach (mframe::func::Consumer< E & > &action) override
 對Iterable的每個元素執行給定的操作,直到處理完所有元素或該操作引發異常。 如果指定了迭代順序,則操作會按迭代順序執行。
 
- 公開方法(Public Methods) 繼承自 mframe::lang::Interface
virtual ~Interface (void)=default
 Destroy the struct object.
 
virtual mframe::lang::ObjectgetObject (void) override
 取得類Object
 

函式成員說明文件

◆ add()

virtual void * mframe::util::Pool::add ( const void * elenemt)
pure virtual

Alloc memory from pool and copy element.

參數
elenemtElement pointer.
傳回值
void* element pointer if pool not full, otherwise null pointer.

◆ alloc()

virtual void * mframe::util::Pool::alloc ( void )
pure virtual

Alloc memory from pool.

傳回值
void* element pointer if pool not full, otherwise null pointer.

◆ allocMemory()

virtual mframe::lang::Memory mframe::util::Pool::allocMemory ( void )
pure virtual

◆ capacity()

virtual uint32 mframe::util::Pool::capacity ( void ) const
pure virtual

Returns this pool's capacity.

傳回值
uint32 The capacity of this pool.

◆ elementSize()

virtual uint32 mframe::util::Pool::elementSize ( void ) const
pure virtual

Returns this pool element size of byte.

傳回值
uint32 element size of byte.

◆ remove()

virtual bool mframe::util::Pool::remove ( void * element)
pure virtual

Free this element memory.

參數
elementElement pointer.
傳回值
true this poll found element and remove.
false element not found in this pool.

此結構(structure) 文件是由下列檔案中產生: