Update of /cvsroot/objecthandler/ObjectHandler/Examples/xl
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18276/Examples/xl
Modified Files:
account.cpp account.hpp addindynamic1.cpp addindynamic2.cpp
addinstatic.cpp
Log Message:
instanceName -> objectID
Index: addindynamic1.cpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/addindynamic1.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** addindynamic1.cpp 20 Sep 2006 20:17:07 -0000 1.8
--- addindynamic1.cpp 4 Oct 2006 09:37:43 -0000 1.9
***************
*** 38,42 ****
TempStrNoSize("\x05""CCNC#"), // parameter codes
TempStrNoSize("\x13""addin1CreateAccount"), // function display name
! TempStrNoSize("\x26""instanceName,accountNumber,accountType"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
--- 38,42 ----
TempStrNoSize("\x05""CCNC#"), // parameter codes
TempStrNoSize("\x13""addin1CreateAccount"), // function display name
! TempStrNoSize("\x22""objectID,accountNumber,accountType"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
***************
*** 46,50 ****
TempStrNoSize("\x03""LCN"), // parameter codes
TempStrNoSize("\x10""addin1SetBalance"),// function display name
! TempStrNoSize("\x14""instanceName,balance"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
--- 46,50 ----
TempStrNoSize("\x03""LCN"), // parameter codes
TempStrNoSize("\x10""addin1SetBalance"),// function display name
! TempStrNoSize("\x10""objectID,balance"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
***************
*** 65,69 ****
DLLEXPORT char* addin1CreateAccount(
! char *instanceName,
long *accountNumber,
char *accountType) {
--- 65,69 ----
DLLEXPORT char* addin1CreateAccount(
! char *objectID,
long *accountNumber,
char *accountType) {
***************
*** 78,85 ****
objectPointer->setProperties(
boost::shared_ptr<ObjHandler::ValueObject>(
! new AccountValueObject(instanceName, *accountNumber, accountType)));
const std::string returnValue =
! ObjHandler::ObjectHandler::instance().storeObject(instanceName, objectPointer);
static char ret[XL_MAX_STR_LEN];
--- 78,85 ----
objectPointer->setProperties(
boost::shared_ptr<ObjHandler::ValueObject>(
! new AccountValueObject(objectID, *accountNumber, accountType)));
const std::string returnValue =
! ObjHandler::ObjectHandler::instance().storeObject(objectID, objectPointer);
static char ret[XL_MAX_STR_LEN];
***************
*** 96,100 ****
}
! DLLEXPORT short int *addin1SetBalance(char *instanceName, long *balance) {
boost::shared_ptr < ObjHandler::FunctionCall > functionCall;
try {
--- 96,100 ----
}
! DLLEXPORT short int *addin1SetBalance(char *objectID, long *balance) {
boost::shared_ptr < ObjHandler::FunctionCall > functionCall;
try {
***************
*** 102,106 ****
( new ObjHandler::FunctionCall("addin1SetBalance") );
! OH_GET_OBJECT(accountObject, instanceName, AccountObject)
accountObject->setBalance(*balance);
--- 102,106 ----
( new ObjHandler::FunctionCall("addin1SetBalance") );
! OH_GET_OBJECT(accountObject, objectID, AccountObject)
accountObject->setBalance(*balance);
Index: account.hpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/account.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** account.hpp 9 Jun 2006 18:58:27 -0000 1.2
--- account.hpp 4 Oct 2006 09:37:43 -0000 1.3
***************
*** 54,66 ****
public:
AccountValueObject(
! const std::string &instanceName,
const int &accountNumber,
const std::string &accountType)
! : instanceName_(instanceName), accountNumber_(accountNumber), accountType_(accountType) {}
std::vector<std::string> getPropertyNames() const;
boost::any getProperty(const std::string& name) const;
protected:
static const char* mPropertyNames[];
! std::string instanceName_;
int accountNumber_;
std::string accountType_;
--- 54,66 ----
public:
AccountValueObject(
! const std::string &objectID,
const int &accountNumber,
const std::string &accountType)
! : objectID_(objectID), accountNumber_(accountNumber), accountType_(accountType) {}
std::vector<std::string> getPropertyNames() const;
boost::any getProperty(const std::string& name) const;
protected:
static const char* mPropertyNames[];
! std::string objectID_;
int accountNumber_;
std::string accountType_;
Index: account.cpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/account.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** account.cpp 9 Jun 2006 18:58:27 -0000 1.3
--- account.cpp 4 Oct 2006 09:37:43 -0000 1.4
***************
*** 35,39 ****
const char* AccountValueObject::mPropertyNames[] = {
! "instanceName",
"accountNumber",
"accountType"};
--- 35,39 ----
const char* AccountValueObject::mPropertyNames[] = {
! "objectID",
"accountNumber",
"accountType"};
***************
*** 45,49 ****
boost::any AccountValueObject::getProperty(const std::string& name) const {
! if(name == "instanceName") return instanceName_;
else if(name == "accountNumber") return accountNumber_;
else if(name == "accountType") return accountType_;
--- 45,49 ----
boost::any AccountValueObject::getProperty(const std::string& name) const {
! if(name == "objectID") return objectID_;
else if(name == "accountNumber") return accountNumber_;
else if(name == "accountType") return accountType_;
Index: addinstatic.cpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/addinstatic.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** addinstatic.cpp 3 Oct 2006 12:59:24 -0000 1.14
--- addinstatic.cpp 4 Oct 2006 09:37:43 -0000 1.15
***************
*** 45,49 ****
TempStrNoSize("\x06""CCNCP#"), // parameter codes
TempStrNoSize("\x0D""createAccount"), // function display name
! TempStrNoSize("\x26""instanceName,accountNumber,accountType"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
--- 45,49 ----
TempStrNoSize("\x06""CCNCP#"), // parameter codes
TempStrNoSize("\x0D""createAccount"), // function display name
! TempStrNoSize("\x22""objectID,accountNumber,accountType"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
***************
*** 53,57 ****
TempStrNoSize("\x03""LCN"), // parameter codes
TempStrNoSize("\x0A""setBalance"), // function display name
! TempStrNoSize("\x14""instanceName,balance"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
--- 53,57 ----
TempStrNoSize("\x03""LCN"), // parameter codes
TempStrNoSize("\x0A""setBalance"), // function display name
! TempStrNoSize("\x10""objectID,balance"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
***************
*** 61,65 ****
TempStrNoSize("\x03""NCP"), // parameter codes
TempStrNoSize("\x0A""getBalance"), // function display name
! TempStrNoSize("\x14""instanceName,trigger"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
--- 61,65 ----
TempStrNoSize("\x03""NCP"), // parameter codes
TempStrNoSize("\x0A""getBalance"), // function display name
! TempStrNoSize("\x10""objectID,trigger"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
***************
*** 80,84 ****
DLLEXPORT char *createAccount(
! char *instanceName,
long *accountNumber,
char *accountType,
--- 80,84 ----
DLLEXPORT char *createAccount(
! char *objectID,
long *accountNumber,
char *accountType,
***************
*** 98,106 ****
objectPointer->setProperties(
boost::shared_ptr<ObjHandler::ValueObject>(
! new AccountValueObject(instanceName, *accountNumber, accountType)));
objectPointer->setPermanent();
const std::string returnValue =
! ObjHandler::ObjectHandler::instance().storeObject(instanceName, objectPointer);
static char ret[XL_MAX_STR_LEN];
--- 98,106 ----
objectPointer->setProperties(
boost::shared_ptr<ObjHandler::ValueObject>(
! new AccountValueObject(objectID, *accountNumber, accountType)));
objectPointer->setPermanent();
const std::string returnValue =
! ObjHandler::ObjectHandler::instance().storeObject(objectID, objectPointer);
static char ret[XL_MAX_STR_LEN];
***************
*** 117,121 ****
}
! DLLEXPORT short int *setBalance(char *instanceName, long *balance) {
boost::shared_ptr < ObjHandler::FunctionCall > functionCall;
try {
--- 117,121 ----
}
! DLLEXPORT short int *setBalance(char *objectID, long *balance) {
boost::shared_ptr < ObjHandler::FunctionCall > functionCall;
try {
***************
*** 123,127 ****
( new ObjHandler::FunctionCall("createAccount") );
! OH_GET_OBJECT(accountObject, instanceName, AccountObject)
accountObject->setBalance(*balance);
--- 123,127 ----
( new ObjHandler::FunctionCall("createAccount") );
! OH_GET_OBJECT(accountObject, objectID, AccountObject)
accountObject->setBalance(*balance);
***************
*** 138,142 ****
}
! DLLEXPORT long *getBalance(char *instanceName, OPER *trigger) {
boost::shared_ptr < ObjHandler::FunctionCall > functionCall;
try {
--- 138,142 ----
}
! DLLEXPORT long *getBalance(char *objectID, OPER *trigger) {
boost::shared_ptr < ObjHandler::FunctionCall > functionCall;
try {
***************
*** 144,148 ****
( new ObjHandler::FunctionCall("createAccount") );
! OH_GET_OBJECT(accountObject, instanceName, AccountObject)
static long ret;
--- 144,148 ----
( new ObjHandler::FunctionCall("createAccount") );
! OH_GET_OBJECT(accountObject, objectID, AccountObject)
static long ret;
Index: addindynamic2.cpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/addindynamic2.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** addindynamic2.cpp 9 Jun 2006 18:58:27 -0000 1.6
--- addindynamic2.cpp 4 Oct 2006 09:37:43 -0000 1.7
***************
*** 38,42 ****
TempStrNoSize("\x03""NCP"), // parameter codes
TempStrNoSize("\x10""addin2GetBalance"),// function display name
! TempStrNoSize("\x14""instanceName,trigger"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
--- 38,42 ----
TempStrNoSize("\x03""NCP"), // parameter codes
TempStrNoSize("\x10""addin2GetBalance"),// function display name
! TempStrNoSize("\x10""objectID,trigger"), // comma-delimited list of parameters
TempStrNoSize("\x01""1"), // function type (0 = hidden function, 1 = worksheet function, 2 = command macro)
TempStrNoSize("\x07""Example")); // function category
***************
*** 56,60 ****
}
! DLLEXPORT long *addin2GetBalance(char *instanceName, OPER *trigger) {
boost::shared_ptr < ObjHandler::FunctionCall > functionCall;
try {
--- 56,60 ----
}
! DLLEXPORT long *addin2GetBalance(char *objectID, OPER *trigger) {
boost::shared_ptr < ObjHandler::FunctionCall > functionCall;
try {
***************
*** 62,66 ****
( new ObjHandler::FunctionCall("addin2GetBalance") );
! OH_GET_OBJECT(accountObject, instanceName, AccountObject)
static long ret;
--- 62,66 ----
( new ObjHandler::FunctionCall("addin2GetBalance") );
! OH_GET_OBJECT(accountObject, objectID, AccountObject)
static long ret;
|