summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2012-02-14 01:10:19 +0000
committerrandomdan <randomdan@localhost>2012-02-14 01:10:19 +0000
commite0a82f75a24ee7087a807fa6bcd663bd3654d554 (patch)
treed2fe276ed443af411bb0c9b6efddd193a282512a
parentPersist the CGI Environment over many iterations of the app engine, reloading... (diff)
downloadproject2-e0a82f75a24ee7087a807fa6bcd663bd3654d554.tar.bz2
project2-e0a82f75a24ee7087a807fa6bcd663bd3654d554.tar.xz
project2-e0a82f75a24ee7087a807fa6bcd663bd3654d554.zip
Optimize and tweak
-rw-r--r--project2/common/environment.h4
-rw-r--r--project2/common/functions/dates.cpp14
-rw-r--r--project2/common/functions/strings.cpp3
-rw-r--r--project2/xml/xmlScriptParser.cpp2
4 files changed, 9 insertions, 14 deletions
diff --git a/project2/common/environment.h b/project2/common/environment.h
index 894b2f8..944010a 100644
--- a/project2/common/environment.h
+++ b/project2/common/environment.h
@@ -43,8 +43,8 @@ class Environment {
public:
std::string datasourceRoot;
- Glib::ustring scriptNamespace;
- Glib::ustring scriptNamespacePrefix;
+ std::string scriptNamespace;
+ std::string scriptNamespacePrefix;
time_t sessionTimeOut;
};
diff --git a/project2/common/functions/dates.cpp b/project2/common/functions/dates.cpp
index 7ace436..43878c6 100644
--- a/project2/common/functions/dates.cpp
+++ b/project2/common/functions/dates.cpp
@@ -9,10 +9,9 @@
SimpleMessage2Exception(DateParseError);
/// Variable implementation to access platform configuration values
-class ParseDate : public VariableImplDyn {
+class ParseDate : public VariableImpl {
public:
ParseDate(ScriptNodePtr e) :
- VariableImplDyn(e),
string(e, "string"),
format(e, "format")
{
@@ -38,10 +37,9 @@ class ParseDate : public VariableImplDyn {
};
DECLARE_COMPONENT_LOADER("parsedate", ParseDate, VariableLoader);
-class FormatDate : public VariableImplDyn {
+class FormatDate : public VariableImpl {
public:
FormatDate(ScriptNodePtr e) :
- VariableImplDyn(e),
date(e, "date"),
format(e, "format")
{
@@ -61,10 +59,9 @@ class FormatDate : public VariableImplDyn {
};
DECLARE_COMPONENT_LOADER("formatdate", FormatDate, VariableLoader);
-class AdjustDate : public VariableImplDyn {
+class AdjustDate : public VariableImpl {
public:
AdjustDate(ScriptNodePtr e) :
- VariableImplDyn(e),
date(e, "date"),
offset(e, "offset")
{
@@ -79,10 +76,9 @@ class AdjustDate : public VariableImplDyn {
};
DECLARE_COMPONENT_LOADER("adjustdate", AdjustDate, VariableLoader);
-class CurrentDate : public VariableImplDyn {
+class CurrentDate : public VariableImpl {
public:
- CurrentDate(ScriptNodePtr e) :
- VariableImplDyn(e)
+ CurrentDate(ScriptNodePtr)
{
}
VariableType value() const
diff --git a/project2/common/functions/strings.cpp b/project2/common/functions/strings.cpp
index 507aafc..7d3d2b1 100644
--- a/project2/common/functions/strings.cpp
+++ b/project2/common/functions/strings.cpp
@@ -4,10 +4,9 @@
#include "../scriptStorage.h"
/// Variable implementation to access platform configuration values
-class Trim : public VariableImplDyn {
+class Trim : public VariableImpl {
public:
Trim(ScriptNodePtr e) :
- VariableImplDyn(e),
string(e, "string")
{
}
diff --git a/project2/xml/xmlScriptParser.cpp b/project2/xml/xmlScriptParser.cpp
index 62cedcb..47db20f 100644
--- a/project2/xml/xmlScriptParser.cpp
+++ b/project2/xml/xmlScriptParser.cpp
@@ -72,7 +72,7 @@ XmlScriptNode::xmlElement() const
bool
XmlScriptNode::componentNamespace() const
{
- return element->get_namespace_uri () == Environment::getCurrent()->scriptNamespace;
+ return element->get_namespace_uri().raw() == Environment::getCurrent()->scriptNamespace;
}
std::string