TexGen
ShinyNodePool.h
Go to the documentation of this file.
1/*
2The zlib/libpng License
3
4Copyright (c) 2007 Aidin Abedi (www.*)
5
6This software is provided 'as-is', without any express or implied warranty. In no event will
7the authors be held liable for any damages arising from the use of this software.
8
9Permission is granted to anyone to use this software for any purpose, including commercial
10applications, and to alter it and redistribute it freely, subject to the following
11restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not claim that
14 you wrote the original software. If you use this software in a product,
15 an acknowledgment in the product documentation would be appreciated but is
16 not required.
17
18 2. Altered source versions must be plainly marked as such, and must not be
19 misrepresented as being the original software.
20
21 3. This notice may not be removed or altered from any source distribution.
22*/
23
24#ifndef SHINY_NODE_POOL_H
25#define SHINY_NODE_POOL_H
26
27#include "ShinyNode.h"
28
29#if SHINY_PROFILER == TRUE
30namespace Shiny {
31
32
33//-----------------------------------------------------------------------------
34
36
37 typedef ProfileNode T;
38
40
43
45
46
47 T* firstItem(void) { return &_items[0]; }
48 T* newItem(void) { return _nextItem++; }
49 const T* unusedItem(void) const { return _nextItem; }
50
51 static ProfileNodePool* createNodePool(uint32_t a_items);
52
53 uint32_t memoryUsageChain(void);
54 void destroy(void);
55 };
56
57} // namespace Shiny
58#endif // if SHINY_PROFILER == TRUE
59
60#endif // ifndef SHINY_*_H
ProfileNodePool * nextPool
Definition: ShinyNodePool.h:39
const T * unusedItem(void) const
Definition: ShinyNodePool.h:49
static ProfileNodePool * createNodePool(uint32_t a_items)
uint32_t memoryUsageChain(void)