summaryrefslogtreecommitdiff
path: root/src/core/pool_type.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-22 09:53:15 +0000
committerrubidium <rubidium@openttd.org>2011-01-22 09:53:15 +0000
commiteb299736c1bcb277da1862afe95c11cb897effcf (patch)
tree3bb6bff78f066da770a367e078c569dbe8ce319a /src/core/pool_type.hpp
parent0cdb1c78cdbfce4d426441c21ef7066f1cfecf6f (diff)
downloadopenttd-eb299736c1bcb277da1862afe95c11cb897effcf.tar.xz
(svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n].
Diffstat (limited to 'src/core/pool_type.hpp')
-rw-r--r--src/core/pool_type.hpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/core/pool_type.hpp b/src/core/pool_type.hpp
index 9c32a81df..49876976f 100644
--- a/src/core/pool_type.hpp
+++ b/src/core/pool_type.hpp
@@ -37,9 +37,7 @@ struct Pool {
Titem **data; ///< Pointer to array of pointers to Titem
- /** Constructor */
Pool(const char *name);
- /** Destroys all items in the pool and resets all member variables */
void CleanPool();
/**
@@ -238,52 +236,13 @@ private:
/** Cache of freed pointers */
AllocCache *alloc_cache;
- /**
- * Makes given index valid
- * @param size size of item
- * @param index index of item
- * @pre index < this->size
- * @pre this->Get(index) == NULL
- */
void *AllocateItem(size_t size, size_t index);
-
- /**
- * Resizes the pool so 'index' can be addressed
- * @param index index we will allocate later
- * @pre index >= this->size
- * @pre index < Tmax_size
- */
void ResizeFor(size_t index);
-
- /**
- * Searches for first free index
- * @return first free index, NO_FREE_ITEM on failure
- */
size_t FindFirstFree();
- /**
- * Allocates new item
- * @param size size of item
- * @return pointer to allocated item
- * @note error() on failure! (no free item)
- */
void *GetNew(size_t size);
-
- /**
- * Allocates new item with given index
- * @param size size of item
- * @param index index of item
- * @return pointer to allocated item
- * @note usererror() on failure! (index out of range or already used)
- */
void *GetNew(size_t size, size_t index);
- /**
- * Deallocates memory used by this index and marks item as free
- * @param index item to deallocate
- * @pre unit is allocated (non-NULL)
- * @note 'delete NULL' doesn't cause call of this function, so it is safe
- */
void FreeItem(size_t index);
};