Files
BlitzUtility/Utility/IndexerV2.h
T

66 lines
3.0 KiB
C++
Raw Normal View History

2015-06-20 15:52:40 +02:00
// BlitzUtility - Expanding the normal Blitz functionality.
2016-02-06 00:18:01 +01:00
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
2015-06-20 15:52:40 +02:00
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
2016-02-06 00:18:01 +01:00
#include "BlitzUtility.h"
#include <vector>
class IndexerV2 {
public:
IndexerV2();
~IndexerV2();
2015-06-20 15:52:40 +02:00
void mark(uint32_t index, bool used);
bool is(uint32_t index, bool used);
uint32_t get();
uint32_t count(bool used);
private:
struct IndexerV2Range {
uint32_t min, max;
IndexerV2Range(uint32_t pmin, uint32_t pmax);
};
std::vector<IndexerV2Range> range;
};
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(IndexerV2*) BU_IndexerV2_Create();
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_Create=_BU_IndexerV2_Create@0")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(void) BU_IndexerV2_Destroy(IndexerV2* indexer);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_Destroy=_BU_IndexerV2_Destroy@4")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(void) BU_IndexerV2_Mark(IndexerV2* indexer, uint32_t used, uint32_t index);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_Mark=_BU_IndexerV2_Mark@12")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(void) BU_IndexerV2_MarkFree(IndexerV2* indexer, uint32_t index);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_MarkFree=_BU_IndexerV2_MarkFree@8")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(void) BU_IndexerV2_MarkUsed(IndexerV2* indexer, uint32_t index);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_MarkUsed=_BU_IndexerV2_MarkUsed@8")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(uint32_t) BU_IndexerV2_Is(IndexerV2* indexer, uint32_t index, uint32_t used);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_Is=_BU_IndexerV2_Is@12")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(uint32_t) BU_IndexerV2_IsFree(IndexerV2* indexer, uint32_t index);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_IsFree=_BU_IndexerV2_IsFree@8")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(uint32_t) BU_IndexerV2_IsUsed(IndexerV2* indexer, uint32_t index);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_IsUsed=_BU_IndexerV2_IsUsed@8")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(uint32_t) BU_IndexerV2_Get(IndexerV2* indexer);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_Get=_BU_IndexerV2_Get@4")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(uint32_t) BU_IndexerV2_Count(IndexerV2* indexer, uint32_t used);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_Count=_BU_IndexerV2_Count@8")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(uint32_t) BU_IndexerV2_CountFree(IndexerV2* indexer);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_CountFree=_BU_IndexerV2_CountFree@4")
2016-02-06 00:18:01 +01:00
DLL_FUNCTION(uint32_t) BU_IndexerV2_CountUsed(IndexerV2* indexer);
2015-06-20 15:52:40 +02:00
#pragma comment(linker, "/EXPORT:BU_IndexerV2_CountUsed=_BU_IndexerV2_CountUsed@4")