scriptFunctionData.h
Go to the documentation of this file.
1 // Copyright 2006-2016 Coppelia Robotics GmbH. All rights reserved.
2 // marc@coppeliarobotics.com
3 // www.coppeliarobotics.com
4 //
5 // -------------------------------------------------------------------
6 // THIS FILE IS DISTRIBUTED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
7 // WARRANTY. THE USER WILL USE IT AT HIS/HER OWN RISK. THE ORIGINAL
8 // AUTHORS AND COPPELIA ROBOTICS GMBH WILL NOT BE LIABLE FOR DATA LOSS,
9 // DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR
10 // MISUSING THIS SOFTWARE.
11 //
12 // You are free to use/modify/distribute this file for whatever purpose!
13 // -------------------------------------------------------------------
14 //
15 // This file was automatically created for V-REP release V3.3.2 on August 29th 2016
16 
17 #pragma once
18 
19 #include "scriptFunctionDataItem.h"
20 #include "v_repLib.h"
21 
22 #define SIM_SCRIPT_ARG_NULL_ALLOWED (65536)
23 
25 {
26 public:
28  virtual ~CScriptFunctionData();
29 
30  //------------------------
31  // Use following to read args coming from a script call to this plugin, and to return args back to a script
32  bool readDataFromStack(int stackHandle,const int* expectedArguments,int requiredArgumentCount,const char* functionName);
33  std::vector<CScriptFunctionDataItem>* getInDataPtr();
34  void pushOutData(const CScriptFunctionDataItem& dataItem);
35  void writeDataToStack(int stackHandle);
36  //------------------------
37 
38 
39  //------------------------
40  // Use following to write args for a script function call, and to read the return values from that script function call
42  void writeDataToStack_scriptFunctionCall(int stackHandle);
43  bool readDataFromStack_scriptFunctionCall(int stackHandle,const int* expectedArguments,int requiredArgumentCount,const char* functionName);
44  std::vector<CScriptFunctionDataItem>* getOutDataPtr_scriptFunctionCall();
45  //------------------------
46 
47 protected:
48  bool _readData(int stack,const int* expectedArguments,int requiredArgumentCount,const char* functionName,const char* argumentText1,const char* argumentText2,std::vector<CScriptFunctionDataItem>& inOutData);
49  void _writeData(int stack,std::vector<CScriptFunctionDataItem>& inOutData);
50 
51  std::vector<CScriptFunctionDataItem> _inData;
52  std::vector<CScriptFunctionDataItem> _outData;
53 };
std::vector< CScriptFunctionDataItem > _outData
void _writeData(int stack, std::vector< CScriptFunctionDataItem > &inOutData)
bool readDataFromStack_scriptFunctionCall(int stackHandle, const int *expectedArguments, int requiredArgumentCount, const char *functionName)
std::vector< CScriptFunctionDataItem > * getInDataPtr()
std::vector< CScriptFunctionDataItem > * getOutDataPtr_scriptFunctionCall()
void writeDataToStack_scriptFunctionCall(int stackHandle)
void pushOutData_scriptFunctionCall(const CScriptFunctionDataItem &dataItem)
bool _readData(int stack, const int *expectedArguments, int requiredArgumentCount, const char *functionName, const char *argumentText1, const char *argumentText2, std::vector< CScriptFunctionDataItem > &inOutData)
std::vector< CScriptFunctionDataItem > _inData
bool readDataFromStack(int stackHandle, const int *expectedArguments, int requiredArgumentCount, const char *functionName)
void pushOutData(const CScriptFunctionDataItem &dataItem)
void writeDataToStack(int stackHandle)