summaryrefslogtreecommitdiff
path: root/server/src/widgetgenerator.h
diff options
context:
space:
mode:
authordeva <deva>2009-08-07 13:00:10 +0000
committerdeva <deva>2009-08-07 13:00:10 +0000
commit1e1217e49bcac9228e37c7b6868d63da900ab07f (patch)
treef963957dcbc8ffe313e6eb41fc6fbb8f939b2993 /server/src/widgetgenerator.h
parent83722ef5a1c46ee3e9a15d9c16daf227f06e56cb (diff)
Unit test and header documentation.
Diffstat (limited to 'server/src/widgetgenerator.h')
-rw-r--r--server/src/widgetgenerator.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/src/widgetgenerator.h b/server/src/widgetgenerator.h
index 6a27ab0..17160fc 100644
--- a/server/src/widgetgenerator.h
+++ b/server/src/widgetgenerator.h
@@ -34,6 +34,21 @@
#include "luaquerymapper.h"
#include "database.h"
+/**
+ * This prettyprints the Macro datastructure as XML.
+ * Furthermore it fills out the values of all the widgets, according to their value,
+ * and map attributes.
+ * If the value exists in the database it will be used if recent enough.
+ * If the map points to a value that is more recent than the one in the database (if
+ * there is one) it will be used.
+ * If no data is available from the database or the map (or they are too old), the
+ * value of the 'value' attribute will be used.
+ * @param cpr An std::string containing the patient id to use with the database lookup.
+ * @param macro The Macro to prettyprint.
+ * @param mapper The LUAQueryMapper to look for mappings in.
+ * @param db The Database to search for recent values.
+ * @return An std::srting containing the prettyprinted version of the Macro.
+ */
std::string widgetgenerator(std::string cpr,
Macro &macro,
LUAQueryMapper &mapper,