mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-12 06:12:46 -06:00
.Functions4U_Demo: Changed StaticPlugin demo classes names
git-svn-id: svn://ultimatepp.org/upp/trunk@3255 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
23af1b0b78
commit
fa56dbf819
5 changed files with 15 additions and 14 deletions
|
|
@ -4,12 +4,12 @@ using namespace Upp;
|
|||
|
||||
#include "Spreadsheet.h"
|
||||
|
||||
class ExcelSpreadsheet : public SpreadsheetPlugin {
|
||||
class ExcelSpreadsheet : public SpreadsheetAPI {
|
||||
private:
|
||||
String filename;
|
||||
|
||||
public:
|
||||
Spreadsheet_METHOD_LIST
|
||||
Spreadsheet_API
|
||||
ExcelSpreadsheet() {
|
||||
puts("ExcelSpreadsheet new");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ using namespace Upp;
|
|||
|
||||
#include "Spreadsheet.h"
|
||||
|
||||
class OpenSpreadsheet : public SpreadsheetPlugin {
|
||||
class OpenSpreadsheet : public SpreadsheetAPI {
|
||||
private:
|
||||
String filename;
|
||||
|
||||
public:
|
||||
Spreadsheet_METHOD_LIST
|
||||
Spreadsheet_API
|
||||
OpenSpreadsheet() {
|
||||
puts("OpenSpreadsheet new");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ using namespace Upp;
|
|||
#include "Spreadsheet.h"
|
||||
|
||||
|
||||
bool SpreadsheetPlugin::Open(const char *filename) {return false;};
|
||||
void SpreadsheetPlugin::SetData(int row, int col, Value val) {};
|
||||
bool SpreadsheetAPI::Open(const char *filename) {return false;};
|
||||
void SpreadsheetAPI::SetData(int row, int col, Value val) {};
|
||||
|
||||
|
||||
bool Spreadsheet::Open(const char *filename) {return (static_cast<SpreadsheetPlugin *>(GetData()))->Open(filename);}
|
||||
void Spreadsheet::SetData(int row, int col, Value val) {return (static_cast<SpreadsheetPlugin *>(GetData()))->SetData(row, col, val);}
|
||||
bool Spreadsheet::Open(const char *filename) {return (static_cast<SpreadsheetAPI *>(GetData()))->Open(filename);}
|
||||
void Spreadsheet::SetData(int row, int col, Value val) {return (static_cast<SpreadsheetAPI *>(GetData()))->SetData(row, col, val);}
|
||||
|
||||
|
||||
INITBLOCK {
|
||||
PluginRegister(Spreadsheet, SpreadsheetPlugin, "");
|
||||
PluginRegister(Spreadsheet, SpreadsheetAPI, "");
|
||||
}
|
||||
|
|
@ -3,20 +3,20 @@
|
|||
|
||||
#include <Functions4U/Functions4U.h>
|
||||
|
||||
#define Spreadsheet_METHOD_LIST \
|
||||
#define Spreadsheet_API \
|
||||
virtual bool Open(const char *filename); \
|
||||
virtual void SetData(int row, int col, Value val);
|
||||
|
||||
|
||||
class SpreadsheetPlugin {
|
||||
class SpreadsheetAPI {
|
||||
public:
|
||||
Spreadsheet_METHOD_LIST
|
||||
Spreadsheet_API
|
||||
};
|
||||
|
||||
|
||||
class Spreadsheet : public SpreadsheetPlugin, public StaticPlugin {
|
||||
class Spreadsheet : public SpreadsheetAPI, public StaticPlugin {
|
||||
public:
|
||||
Spreadsheet_METHOD_LIST
|
||||
Spreadsheet_API
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@
|
|||
#define _Functions4U_Demo_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#include "Functions4U/init"
|
||||
#include "OfficeAutomation/init"
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue