summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 03:01:54 -0400
committerAdam <Adam@anope.org>2013-05-05 03:04:01 -0400
commita118946e657b8a137502ff60c1f21c608cb44495 (patch)
tree41753aa8999a8932b8157a808f466f0a8b625f58 /include/config.h
parentee2dcf11b8ff6cad5af4895738f7fe17e3baa9ee (diff)
Fix Windows
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/include/config.h b/include/config.h
index 6fb1c244f..5d9005f63 100644
--- a/include/config.h
+++ b/include/config.h
@@ -21,9 +21,9 @@
namespace Configuration
{
- class Block
+ class CoreExport Block
{
- friend class Conf;
+ friend struct Conf;
public:
typedef Anope::map<Anope::string> item_map;
@@ -40,7 +40,14 @@ namespace Configuration
int CountBlock(const Anope::string &name);
Block* GetBlock(const Anope::string &name, int num = 0);
- template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
+ template<typename T> inline T Get(const Anope::string &tag)
+ {
+ return this->Get<T>(tag, "");
+ }
+ /* VS 2008 has an issue with having a default argument here (def = ""), which is why the above
+ * function exists.
+ */
+ template<typename T> T Get(const Anope::string &tag, const Anope::string &def) const
{
const Anope::string &value = this->Get<const Anope::string &>(tag, def);
try
@@ -57,10 +64,10 @@ namespace Configuration
const item_map* GetItems() const;
};
- template<> const Anope::string& Block::Get(const Anope::string &tag, const Anope::string& def) const;
- template<> time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
- template<> const char* Block::Get(const Anope::string &tag, const Anope::string &def) const;
- template<> bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
+ template<> CoreExport const Anope::string& Block::Get(const Anope::string &tag, const Anope::string& def) const;
+ template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
+ template<> CoreExport const char* Block::Get(const Anope::string &tag, const Anope::string &def) const;
+ template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
/** Represents a configuration file
*/
@@ -83,7 +90,7 @@ namespace Configuration
struct Uplink;
- struct Conf : Block
+ struct CoreExport Conf : Block
{
/* options:readtimeout */
time_t ReadTimeout;