Vladimír Vondruš
d688cf2efc
ResourceManager: new Loading and NotFound data states.
...
Updated, cleaned up and extended unit tests.
14 years ago
Vladimír Vondruš
ca9828de64
ResourceManager: various cleanup.
...
Using proper cast in ResourceDataState enum.
14 years ago
Vladimír Vondruš
510755ea6e
ResourceManager: privately inherit Implementation::ResourceManagerData.
...
Protected inheritance has no sense, as there shouldn't be any subclasses
touching internals in Implementation namespace.
14 years ago
Vladimír Vondruš
4bdb248e76
ResourceManager: public accessor for fallback resource.
14 years ago
Vladimír Vondruš
9623229ec0
Reorganized ResourceManager.h / Resource.h files.
...
Moved #include where it belongs, moved ResourceManager-only enums to
ResourceManager.h, moved debug operator for ResourceKey to Resource.h.
14 years ago
Vladimír Vondruš
9c007114ac
ResourceManager: make internal functions private.
...
Even if this is internal implementation class, the functions should be
accessible only from Resource itself.
14 years ago
Vladimír Vondruš
b7e3871cde
Split Resource and ResourceManager to two files.
...
They still include each other, but at least it is now possible to scroll
through the files.
14 years ago
Vladimír Vondruš
d3385b54c6
Default constructor of ResourceKey creates zero key.
...
When resource access later fails on not loaded data, zero key in
assertion message might hint that the Resource instance was
default-constructed and thus not loaded at all.
14 years ago
Vladimír Vondruš
1809107ff2
Resource: assert when accessing not loaded data.
14 years ago
Vladimír Vondruš
8f83485653
Forward declarations for Magnum namespace in Magnum.h header.
14 years ago
Vladimír Vondruš
b2a5f535d7
ResourceManager: allow users to instantiate internalInstance() only once.
...
It is cumbersome, but otherwise the linking (on mingw) fails with
multiple definition errors.
14 years ago
Vladimír Vondruš
124b5b73b6
ResourceManager: wrap global instance pointer in a function.
...
This way only single function can be marked with "extern template" to
avoid nasty issues with multiple definition errors.
14 years ago
Vladimír Vondruš
d1e6ff1490
ResourceManager: assertions on global instance pointer.
...
Better be sure than crash somewhere deep in STL code.
14 years ago
Vladimír Vondruš
e7539b6fbd
Improved template implementation files documentation.
...
* ResourceManager won't have template implementation file, as it would
add too much work on the user.
* Color won't have either, as some internal functions are impossible to
explicitly instantiate.
14 years ago
Vladimír Vondruš
b2f42f234e
Documentation fixes and updates.
14 years ago
Vladimír Vondruš
45f349644f
Ability to easily get pointer to data from Resource.
...
Neither operator*() nor operator->() can be used to pass plain pointer
to function or store it in variable. Now it should be converted
automatically.
14 years ago
Vladimír Vondruš
0145343d59
Pedantic: using std::size_t instead of size_t from C compat headers.
14 years ago
Vladimír Vondruš
934d04a76b
Added method for getting key of given Resource.
14 years ago
Vladimír Vondruš
30a584741e
Fixed compilation with Clang.
14 years ago
Vladimír Vondruš
0f0b7a8d17
Move constructor and move assignment for Resource.
...
Saves unnecessary manager access.
14 years ago
Vladimír Vondruš
871c2a4f90
Forgot to initialize some variables in private Resource constructor.
...
Thankfully catched in tests using gcc 4.6 (passed with 4.7).
14 years ago
Vladimír Vondruš
6895611f9b
Fixed ResourceManager example.
14 years ago
Vladimír Vondruš
f637106727
Initial version of resource manager.
14 years ago