From 0a7d7958abe99f84ac9b81fbae888573b4c98f33 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Sat, 20 Jun 2009 20:26:47 +0000 Subject: [PATCH] Add boot strapping of string parsing for pod types --- dispatchkit/bootstrap.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dispatchkit/bootstrap.hpp b/dispatchkit/bootstrap.hpp index d6dcbdd..5d75bce 100644 --- a/dispatchkit/bootstrap.hpp +++ b/dispatchkit/bootstrap.hpp @@ -391,6 +391,14 @@ namespace dispatchkit } } + template + Input parse_string(const std::string &i) + { + return boost::lexical_cast(i); + } + + + template void bootstrap_pod_type(Dispatch_Engine &s, const std::string &name) { @@ -401,6 +409,7 @@ namespace dispatchkit add_opers_arithmetic(s); add_opers_arithmetic_modify_pod(s); register_function(s, &to_string, "to_string"); + register_function(s, &parse_string, "to_" + name); } struct Bootstrap