|
degate 0.1.1
|
#include <Configuration.h>

Public Member Functions | |
| std::string | get_temp_directory () const |
| Get the temp directory for degate. | |
| size_t | get_max_tile_cache_size () const |
| Get the cache size for image tiles in MB. | |
| std::string | get_servers_uri_pattern () const |
| Get the URI address pattern for the collaboration server. | |
Private Member Functions | |
| Configuration () | |
Friends | |
| class | SingletonBase< Configuration > |
Definition at line 39 of file Configuration.h.
| Configuration::Configuration | ( | ) | [private] |
Definition at line 34 of file Configuration.cc.
{
}
| size_t Configuration::get_max_tile_cache_size | ( | ) | const |
Get the cache size for image tiles in MB.
Definition at line 43 of file Configuration.cc.
Referenced by degate::GlobalTileCache::GlobalTileCache().
{
char * cs = getenv("DEGATE_CACHE_SIZE");
if(cs == NULL) return 256;
return boost::lexical_cast<size_t>(cs);
}

| std::string Configuration::get_servers_uri_pattern | ( | ) | const |
Get the URI address pattern for the collaboration server.
It is a pattern, because it holds a placeholder for the channel ID. This channel ID identifies a shared project. The pattern is a format string for boost::format.
Definition at line 49 of file Configuration.cc.
{
char * uri_pattern = getenv("DEGATE_SERVER_URI_PATTERN");
if(uri_pattern == NULL) return "http://localhost/cgi-bin/test.pl?channel=%1%";
return uri_pattern;
}
| std::string Configuration::get_temp_directory | ( | ) | const |
Get the temp directory for degate.
Definition at line 37 of file Configuration.cc.
References degate::get_realpath().
Referenced by degate::get_temp_directory().
{
char * td = getenv("DEGATE_TEMP_DIR");
if(td == NULL) return get_realpath(std::string("/tmp"));
return get_realpath(std::string(td));
}


friend class SingletonBase< Configuration > [friend] |
Definition at line 41 of file Configuration.h.
1.7.4