openTRI 0.1
triRefcount.h
1/*
2 * triRefcount.h: Header for refcounting ressources
3 * This file is part of the "tri Engine".
4 *
5 * Copyright (C) 2007 tri
6 * Copyright (C) 2007 Alexander Berl 'Raphael' <raphael@fx-world.org>
7 *
8 * $Id: $
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25
26#ifndef __TRIREFCOUNT_H__
27#define __TRIREFCOUNT_H__
28
29
30#include "triTypes.h"
31
32
42triVoid triRefcountCreate( const triChar* id, triVoid* data );
43
44
50triVoid* triRefcountRetain( const triChar* id );
51
57triVoid* triRefcountRetainPtr( const triVoid* ptr );
58
64triS32 triRefcountRelease( const triVoid* data );
65
66
69#endif
triS32 triRefcountRelease(const triVoid *data)
Release a refcount.
triVoid * triRefcountRetainPtr(const triVoid *ptr)
Retain a refcounted pointer.
triVoid * triRefcountRetain(const triChar *id)
Retain a refcount.
triVoid triRefcountCreate(const triChar *id, triVoid *data)
Create a new refcount.