zenilib
0.5.3.0
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
Resource.hxx
Go to the documentation of this file.
1
/* This file is part of the Zenipex Library (zenilib).
2
* Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3
*
4
* zenilib is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* zenilib is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef ZENI_RESOURCE_HXX
19
#define ZENI_RESOURCE_HXX
20
21
#include <
Zeni/Resource.h
>
22
23
namespace
Zeni {
24
25
unsigned
long
Resource::assign
() {
26
//Mutex::Lock lock(m_mutex);
27
28
unsigned
long
rv = ++m_current;
29
if
(!rv) {
30
--m_current;
31
throw
Resource_Init_Failure
();
32
}
33
return
rv;
34
}
35
36
}
37
38
#endif
Zeni::Resource_Init_Failure
Definition:
Resource.h:70
Zeni::Resource::assign
unsigned long assign()
Get a value, unique within this run of the program.
Definition:
Resource.hxx:25
Resource.h
zenilib
jni
external
zenilib
zeni
Zeni
Resource.hxx
Generated on Thu Oct 3 2013 19:56:43 for zenilib by
1.8.5