summaryrefslogtreecommitdiff
path: root/maximus/functioncall/src/FunctionCallManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'maximus/functioncall/src/FunctionCallManager.cpp')
-rw-r--r--maximus/functioncall/src/FunctionCallManager.cpp119
1 files changed, 78 insertions, 41 deletions
diff --git a/maximus/functioncall/src/FunctionCallManager.cpp b/maximus/functioncall/src/FunctionCallManager.cpp
index c41318947f..d8b73afbab 100644
--- a/maximus/functioncall/src/FunctionCallManager.cpp
+++ b/maximus/functioncall/src/FunctionCallManager.cpp
@@ -30,89 +30,126 @@ The original location of this file is /home/buret/eclipse/maximus/functioncall/s
#include "FunctionCallManager.h"
#include "FunctionSciMsg.h"
+#include "SciServer.h"
+
+// For 'cout'
+//
+#include <iostream>
+using namespace std;
+
// Constructors/Destructors
//
-FunctionCallManager::FunctionCallManager ( )
+
+FunctionCallManager::FunctionCallManager ( ):
+mpFunctionSciMsg(NULL),
+mpCallback(NULL),
+mpSciServer(NULL)
{
initAttributes();
}
-FunctionCallManager::~FunctionCallManager ( )
+
+FunctionCallManager::FunctionCallManager ( SciServer * sci_server )
{
- delete (mpFunctionSciMsgList);
-// delete (mpCallbackList);
+ if (NULL != sci_server)
+ {
+ mpSciServer = sci_server;
+ }
+ initAttributes();
}
-//
-// Methods
-//
-
-
-// Accessor methods
-//
-
-// public static attribute accessor methods
-//
+void FunctionCallManager::initAttributes ( )
+{
+ cout << "FunctionCallManager::initAttributes" << endl;
+
+ if (NULL != mpSciServer)
+ {
+ mpSciServer->registerSpecializedSciMsg(MAXIMUS_SCI_MSG_TYPE_FUNCTION_CALL, new FunctionSciMsg( ));
+ }
+}
-// public attribute accessor methods
-//
+FunctionCallManager::~FunctionCallManager ( )
+{
+ cout << "FunctionCallManager::~FunctionCallManager" << endl;
+
+ if (NULL != mpSciServer)
+ {
+ delete (mpSciServer);
+ mpSciServer = NULL;
+ }
+ if (NULL != mpFunctionSciMsg)
+ {
+ delete (mpFunctionSciMsg);
+ mpFunctionSciMsg = NULL;
+ }
+ if (NULL != mpCallback)
+ {
+ mpCallback = NULL;
+ }
+}
-// protected static attribute accessor methods
//
-
-
-// protected attribute accessor methods
+// Methods
//
-// private static attribute accessor methods
+// Other methods
//
-// private attribute accessor methods
+// public methods
//
-void FunctionCallManager::setFunctionSciMsgList ( FunctionSciMsg * p_function_sci_msg_list )
+bool FunctionCallManager::createMsg ( Station * station, char * function_name, FunctionSciMsg * function_sci_msg )
{
- mpFunctionSciMsgList = p_function_sci_msg_list;
+ return false;
}
-FunctionSciMsg * FunctionCallManager::getFunctionSciMsgList ( )
-{
- return mpFunctionSciMsgList;
-}
-void FunctionCallManager::setCallbackList ( void * callback_list )
+bool FunctionCallManager::registerCallback ( FunctionSciMsg * function_sci_msg, void * callback_address )
{
- mpCallbackList = callback_list;
+ return false;
}
-void * FunctionCallManager::getCallbackList ( )
+
+bool FunctionCallManager::sendMsg ( FunctionSciMsg * function_sci_msg )
{
- return mpCallbackList;
+ return false;
}
+
-// Other methods
+// private methods
//
-/**
- * @return bool
- * @param function_sci_msg
- */
-bool FunctionCallManager::identifyCallback (FunctionSciMsg * function_sci_msg )
+bool FunctionCallManager::identifyCallback ( FunctionSciMsg * function_sci_msg )
{
return false;
}
-void FunctionCallManager::initAttributes ( )
-{
-}
+// protected methods
+//
+
+
+// Accessor methods
+//
+
+
+// public attribute accessor methods
+//
+
+
+// private attribute accessor methods
+//
+
+
+// protected attribute accessor methods
+//