diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-01 05:25:14 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-01 05:25:14 +0000 |
commit | 6b94d489977c1cb2eeddded3ee329fe6b9605d5c (patch) | |
tree | f51d8b2373102cb6c8ac9fc0e051b6f1227a414c /cpp/sca/modules/eval/read.hpp | |
parent | 9f187b46ae761e8275362d6c1533e9fe79028c7b (diff) |
Minor refactoring of read/write functions and primitive procs. Added functions to help store data in memcached. Fixes to HTTP support and more tests.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@831640 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | cpp/sca/modules/eval/io.hpp (renamed from cpp/sca/modules/eval/read.hpp) | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/cpp/sca/modules/eval/read.hpp b/cpp/sca/modules/eval/io.hpp index 994462f145..2a55e67bbf 100644 --- a/cpp/sca/modules/eval/read.hpp +++ b/cpp/sca/modules/eval/io.hpp @@ -19,11 +19,11 @@ /* $Rev$ $Date$ */ -#ifndef tuscany_eval_read_hpp -#define tuscany_eval_read_hpp +#ifndef tuscany_eval_io_hpp +#define tuscany_eval_io_hpp /** - * Script evaluator read functions. + * Script evaluator IO functions. */ #include <iostream> @@ -96,7 +96,7 @@ const value readQuoted(std::istream& in); const value readIdentifier(const char chr, std::istream& in); const value readString(const char chr, std::istream& in); const value readNumber(const char chr, std::istream& in); -const value read(std::istream& in); +const value readValue(std::istream& in); const value readToken(std::istream& in) { const char firstChar = readChar(in); @@ -121,7 +121,7 @@ const value readToken(std::istream& in) { } const value readQuoted(std::istream& in) { - return mklist(quoteSymbol, read(in)); + return mklist(quoteSymbol, readValue(in)); } const list<value> readList(const list<value>& listSoFar, std::istream& in) { @@ -172,13 +172,17 @@ const value readNumber(const char chr, std::istream& in) { return stringToNumber(listToString(readNumberHelper(mklist(chr), in))); } -const value read(std::istream& in) { +const value readValue(std::istream& in) { const value nextToken = readToken(in); if(isLeftParenthesis(nextToken)) return readList(list<value> (), in); return nextToken; } +const bool writeValue(const value& val, std::ostream& out) { + out << val; +} + } } -#endif /* tuscany_eval_read_hpp */ +#endif /* tuscany_eval_io_hpp */ |