diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-10-19 22:22:08 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-10-26 14:21:48 -0700 |
commit | 6800761863dd45b6055768febc6ace6a20120dc7 (patch) | |
tree | 73b416ca6507d9bb4f950252d55ead8e8cda34b5 /src/mmo/extract.hpp | |
parent | 0edf563dfc14a2b9db33a92f0eced28950bdf1aa (diff) | |
download | tmwa-6800761863dd45b6055768febc6ace6a20120dc7.tar.gz tmwa-6800761863dd45b6055768febc6ace6a20120dc7.tar.bz2 tmwa-6800761863dd45b6055768febc6ace6a20120dc7.tar.xz tmwa-6800761863dd45b6055768febc6ace6a20120dc7.zip |
New ast module for for npc parsing
Will eventually put most/all parsers there.
Diffstat (limited to 'src/mmo/extract.hpp')
-rw-r--r-- | src/mmo/extract.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mmo/extract.hpp b/src/mmo/extract.hpp index ed2eb78..152d1b7 100644 --- a/src/mmo/extract.hpp +++ b/src/mmo/extract.hpp @@ -24,6 +24,7 @@ #include <cstdlib> #include <algorithm> +#include <chrono> #include <vector> #include "../ints/wrap.hpp" @@ -93,7 +94,7 @@ bool extract_as_int(XString str, T *iv) } bool extract(XString str, XString *rv); - +bool extract(XString str, RString *rv); bool extract(XString str, AString *rv); template<uint8_t N> @@ -228,4 +229,12 @@ bool extract(XString str, Wrapped<R> *w) { return extract(str, &w->_value); } + +bool extract(XString str, std::chrono::nanoseconds *ns); +bool extract(XString str, std::chrono::microseconds *us); +bool extract(XString str, std::chrono::milliseconds *ms); +bool extract(XString str, std::chrono::seconds *s); +bool extract(XString str, std::chrono::minutes *min); +bool extract(XString str, std::chrono::hours *h); +bool extract(XString str, std::chrono::duration<int, std::ratio<60*60*24>> *d); } // namespace tmwa |