/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2010-2011, Tomasz Sowa * All rights reserved. * */ #ifndef headerfile_winix_templates_indexpatterns #define headerfile_winix_templates_indexpatterns #include #include #include #include "ezc.h" #include "patterns.h" class IndexPatterns { public: void SetPatterns(Patterns * ppatterns); /* adding a new pattern if such a pattern exists the method only unmarks the pattern from deleting */ void Add(const std::wstring & file); /* returning a pattern can return null pointer if there is not such a pattern */ Ezc::Pattern * Get(const std::wstring & file, size_t lang); /* marking all patterns as ready to delete */ void MarkAllToDelete(); /* delete marked patterns if you have called Add(pattern_name) then such a pattern is not deleted */ void DeleteMarked(); private: Patterns * patterns; struct Template { bool to_delete; size_t index; }; typedef std::map Tab; Tab tab; }; #endif