mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-10 16:37:43 +01:00
- VS2012: build/tests
- JSON: style and exceptions catch by ref fix - NumberParser: case-insensitive hex parsing - Dynamic::Var: const std::string& cast operator specialization (coaxing std::string ctor) - LocalDateTime: strftime fix (buffer too small for full tz string, use %Z instead of %z - makes no difference on windows but is more portable) - small buildwin.cmd vsvars32.bat call fix
This commit is contained in:
@@ -45,13 +45,12 @@
|
||||
#include "Poco/Path.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/Logger.h"
|
||||
|
||||
#include "Poco/JSON/Template.h"
|
||||
|
||||
namespace Poco
|
||||
{
|
||||
namespace JSON
|
||||
{
|
||||
|
||||
namespace Poco {
|
||||
namespace JSON {
|
||||
|
||||
|
||||
class JSON_API TemplateCache
|
||||
/// Use to cache parsed templates. Templates are
|
||||
@@ -66,16 +65,13 @@ public:
|
||||
/// Constructor. The cache must be created
|
||||
/// and not destroyed as long as it is used.
|
||||
|
||||
|
||||
virtual ~TemplateCache();
|
||||
/// Destructor
|
||||
|
||||
|
||||
void addPath(const Path& path);
|
||||
/// Add a path for resolving template paths.
|
||||
/// The order of check is FIFO.
|
||||
|
||||
|
||||
Template::Ptr getTemplate(const Path& path);
|
||||
/// Returns a template from the cache.
|
||||
/// When the template file is not yet loaded
|
||||
@@ -85,32 +81,20 @@ public:
|
||||
/// even when the template isn't stored anymore in
|
||||
/// the cache.
|
||||
|
||||
|
||||
static TemplateCache* instance();
|
||||
/// Returns the only instance of this cache
|
||||
|
||||
|
||||
void setLogger(Logger& logger);
|
||||
/// Sets the logger for the cache.
|
||||
|
||||
|
||||
private:
|
||||
|
||||
static TemplateCache* _instance;
|
||||
|
||||
|
||||
std::vector<Path> _includePaths;
|
||||
|
||||
|
||||
static TemplateCache* _instance;
|
||||
std::vector<Path> _includePaths;
|
||||
std::map<std::string, Template::Ptr> _cache;
|
||||
|
||||
|
||||
Logger* _logger;
|
||||
|
||||
|
||||
Logger* _logger;
|
||||
|
||||
void setup();
|
||||
|
||||
|
||||
Path resolvePath(const Path& path) const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user