start adding support for Models objects from Ezc
This commit is contained in:
@@ -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);
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "functionbase.h"
|
||||
|
||||
|
||||
namespace Winix
|
||||
{
|
||||
|
||||
@@ -52,6 +53,12 @@ public:
|
||||
Cat();
|
||||
void MakeGet();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Item foo1;
|
||||
Item foo2;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user