Go to the documentation of this file.
13 #ifndef MODIFIEDASSETSMANAGER_H
14 #define MODIFIEDASSETSMANAGER_H
29 const std::map<std::string, std::set<const T*> >&
origins()
const {
return myOrigins; }
31 std::vector<std::string>
files()
const {
32 std::vector<std::string>
files;
34 files.push_back(origin.first);
41 if (
file.second.count(asset) > 0) {
50 it.second.erase(asset);
60 if (
file.second.count(
a) > 0) {
76 std::vector<T *> assets;
77 std::copy_if(
myDirty.cbegin(),
myDirty.cend(), std::back_inserter(assets), [
this] (
const auto &dirty) {
78 return this->originOf(dirty).empty();
86 for (
auto asset = assets.begin(); asset != assets.end(); asset++) {
94 out.open(QIODevice::WriteOnly);
size_t stringbuffer_length(StringBuffer *sb)
ModifiedAssetsManager(AssetWriter< T > *writer)
StringBuffer * stringbuffer_new(void)
virtual ~ModifiedAssetsManager()
const std::map< std::string, std::set< const T * > > & origins() const
std::string originOf(const T *asset) const
char * stringbuffer_finish(StringBuffer *sb)
void assetDefined(const T *asset, const std::string &filename)
void write(const std::string &filename, std::set< const T * > assets)
std::vector< T * > dirtyAssetsWithNoOrigin() const
std::vector< std::string > files() const
void assetModified(T *asset)
bool hasPendingChanges() const
AssetWriter< T > * myWriter
Magical Runes Runes are magical inscriptions on the dungeon which cast a spell or detonate when something steps on them Flying objects don t detonate runes Beware ! Runes are invisible most of the time They are only visible occasionally ! There are several runes which are there are some special runes which may only be called with the invoke and people may apply it to read it Maybe useful for mazes ! This rune will not nor is it ordinarily invisible Partial Visibility of they ll be visible only part of the time They have a(your level/2) chance of being visible in any given round
void saveModifiedAssets()
std::map< std::string, std::set< const T * > > myOrigins