summaryrefslogtreecommitdiff
path: root/src/event.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-08-12 13:57:16 -0600
committerJared Adams <jaxad0127@gmail.com>2010-08-12 14:00:20 -0600
commit2507a15f8cf8728e8006aec7cdef30e484612162 (patch)
treeee2edf1afca72ac2501dae701f2cc489f3afe301 /src/event.h
parentbdc14e11430b6c6538e6a2c721d22dabe83487e3 (diff)
downloadMana-2507a15f8cf8728e8006aec7cdef30e484612162.tar.gz
Mana-2507a15f8cf8728e8006aec7cdef30e484612162.tar.bz2
Mana-2507a15f8cf8728e8006aec7cdef30e484612162.tar.xz
Mana-2507a15f8cf8728e8006aec7cdef30e484612162.zip
Fix some issues in the Event class
Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/event.h')
-rw-r--r--src/event.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/event.h b/src/event.h
index 7acd2190..b27b9c33 100644
--- a/src/event.h
+++ b/src/event.h
@@ -74,7 +74,7 @@ public:
/**
* Returns true if the given variable exists and is an integer.
*/
- bool hasInt(const std::string &key);
+ bool hasInt(const std::string &key) const;
/**
* Sets the given variable to the given string, if it isn't already set.
@@ -90,14 +90,14 @@ public:
* Returns the given variable if it is set and a string, returning the
* given default otherwise.
*/
- inline const std::string &getString(const std::string &key,
- const std::string &defaultValue) const
+ inline std::string getString(const std::string &key,
+ const std::string &defaultValue) const
{ try { return getString(key); } catch (BadEvent) { return defaultValue; }}
/**
* Returns true if the given variable exists and is a string.
*/
- bool hasString(const std::string &key);
+ bool hasString(const std::string &key) const;
/**
* Sets the given variable to the given floating-point, if it isn't already
@@ -120,7 +120,7 @@ public:
/**
* Returns true if the given variable exists and is a floating-point.
*/
- bool hasFloat(const std::string &key);
+ bool hasFloat(const std::string &key) const;
/**
* Sets the given variable to the given boolean, if it isn't already set.
@@ -142,7 +142,7 @@ public:
/**
* Returns true if the given variable exists and is a boolean.
*/
- bool hasBool(const std::string &key);
+ bool hasBool(const std::string &key) const;
private:
std::string mEventName;