start adding support for Models objects from Ezc

This commit is contained in:
2021-05-31 18:59:20 +02:00
parent 22de3322ae
commit 6e4f8f5191
9 changed files with 62 additions and 3 deletions

View File

@@ -34,7 +34,6 @@
#include "cat.h"
namespace Winix
{
@@ -68,6 +67,23 @@ void Cat::MakeGet()
}
cur->request->send_as_attachment = cur->request->IsParam(L"attachment");
// temporary for tests
////////////////////////////////////////////////////////////
foo1.subject = L"subject <h2>from</h2> foo1";
foo2.subject = L"subject <strong>from</strong> foo2";
foo1.item_content.content_raw = L"raw content from foo1";
foo2.item_content.content_raw = L"raw content from foo2";
foo1.set_connector(model_connector);
foo2.set_connector(model_connector);
return_model(L"foo1", foo1);
return_model(L"foo2", foo2);
////////////////////////////////////////////////////////////
}

View File

@@ -37,6 +37,7 @@
#include "functionbase.h"
namespace Winix
{
@@ -52,6 +53,12 @@ public:
Cat();
void MakeGet();
private:
Item foo1;
Item foo2;
};

View File

@@ -34,6 +34,7 @@
#include "functionbase.h"
#include "functions.h"
#include "templates/templates.h"
namespace Winix
@@ -148,6 +149,18 @@ void FunctionBase::MakeDelete()
void FunctionBase::return_model(const wchar_t * name, morm::Model & model)
{
TemplatesFunctions::ezc_models.Add(name, model);
}
void FunctionBase::return_model(const wchar_t * name, morm::Model * model)
{
TemplatesFunctions::ezc_models.Add(name, model);
}
} // namespace Winix

View File

@@ -101,6 +101,10 @@ public:
//void SetSynchro(Synchro * psynchro);
//void SetSessionManager(SessionManager * pmanager);
virtual void return_model(const wchar_t * name, morm::Model & model);
virtual void return_model(const wchar_t * name, morm::Model * model);
protected:
//Config * config;