Files
winix/functions/functionbase.h
Tomasz Sowa a589e5a090 added: TextStream a class similar to std::ostringstream
but with a Clear() method
       the dynamic allocated buffer can be easily reused
added: DbTextStream a special version of a stream
       used to create a database string query
       everything is escaped by default
added: DbBase a base class with some basic methods for communicating
       with the database
added: DbConn a class for managing connection to the database
changed: some refactoring in Db class       



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@655 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-09-18 00:51:12 +00:00

70 lines
1.2 KiB
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecmslucontentfunctionbase
#define headerfilecmslucontentfunctionbase
#include <string>
#include <vector>
#include "core/item.h"
#include "db/db.h"
#include "core/request.h"
#include "core/config.h"
#include "core/system.h"
#include "core/notify.h"
#include "ezc.h"
class Functions;
class Templates;
class FunctionBase
{
public:
// function id
// it is set automatically when you add the function to functions list
// is used to load a template (in templates)
long id;
FunctionBase();
// user, group, permissions, url (function name)
Item fun;
virtual bool HasAccess();
virtual void Clear();
virtual void MakePost();
virtual void MakeGet();
void SetConfig(Config * pconfig);
void SetRequest(Request * prequest);
void SetDb(Db * pdb);
void SetSystem(System * psystem);
void SetFunctions(Functions * pfunctions);
void SetTemplates(Templates * ptemplates);
void SetNotify(Notify * pnotify);
protected:
Config * config;
Request * request;
Db * db;
System * system;
Functions * functions;
Templates * templates;
Notify * notify;
};
#endif