nd-view.i 4.74 KB
/*
 nd_view.i
 03 January 2012, Version: 0.1
 SWIG interface file

 Copyright: See COPYING file that comes with this distribution
*/

%module nd_view
%include "stl.i"
using namespace std;
%{

#include "nd-view.h"

%}

namespace NDViewSpace
{
    class NDView:
      public GtkElement,
      public ConnectingInterface,
      public NamingInterface
    {
        public:

            //PUBLIC INPUT PORTS
            enum InputPorts
            {
                DEFAULT_INPUT_PORTS=0,
                ROBOT_CONFIG=DEFAULT_INPUT_PORTS,
                ND_DATA,
                INPUT_PORTS
            };
            //PUBLIC OUTPUT PORTS
            enum OutputPorts
            {
                DEFAULT_OUTPUT_PORTS=0,
                OUTPUT_PORTS=DEFAULT_OUTPUT_PORTS
            };


            enum
            {
                INVALID_TCP_PORT=0
            };

            NDView(

                // USER FILL IN SECTION:BEGIN
                long refreshingPeriod = _DEFAULT_REFRESHING_PERIOD_,
                // USER FILL IN SECTION:END
                unsigned short tcpPort = INVALID_TCP_PORT
            );

            ~NDView();

            OBox* getOBox(int port);

            IBoxInterface* getIBox(int port);

            IConnection* getConnection(int inputPort);

            IConnection* getConnection(int inputPort, int inputIndex);

            IConnection* connect(int oPort, IConnection* pConnection);

            IConnection* connect(int oPort, int oIndex, IConnection* pConnection);

            IConnection* connect(int oPort,IBoxInterface* pIBox,int iPort);

            IConnection* connect(
              int oPort,
              IBoxInterface* pIBox,
              int iPort,
              int iIndex
            );

            IConnection* connect(
              int oPort,
              int oIndex,
              IBoxInterface* pIBox,
              int iPort,
              int iIndex
            );

            void disconnect(int oPort,IConnection* pConnection);

            void disconnect(int oPort,IConnection* pConnection,int index);

            void disconnectAll();

            bool connect(
                int oPort,
                char *remoteComponentTCPAddress,
                unsigned short remoteComponentTCPPort,
                int iPort
            );

            bool disconnect(
                int oPort,
                ACE_TCHAR *remoteComponentTCPAddress,
                unsigned short remoteComponentTCPPort,
                int iPort
            );

            bool connect(
                int oPort,
                int oIndex,
                ACE_TCHAR *remoteComponentTCPAddress,
                unsigned short remoteComponentTCPPort,
                int iPort
            );

            bool disconnect(
                int oPort,
                int oIndex,
                ACE_TCHAR *remoteComponentTCPAddress,
                unsigned short remoteComponentTCPPort,
                int iPort
            );

            bool connect(
                int oPort,
                ACE_TCHAR *remoteComponentTCPAddress,
                unsigned short remoteComponentTCPPort,
                int iPort,
                int iIndex
            );

            bool disconnect(
                int oPort,
                ACE_TCHAR *remoteComponentTCPAddress,
                unsigned short remoteComponentTCPPort,
                int iPort,
                int iIndex
            );

            bool connect(
                int oPort,
                int oIndex,
                ACE_TCHAR *remoteComponentTCPAddress,
                unsigned short remoteComponentTCPPort,
                int iPort,
                int iIndex
            );

            bool disconnect(
                int oPort,
                int oIndex,
                ACE_TCHAR *remoteComponentTCPAddress,
                unsigned short remoteComponentTCPPort,
                int iPort,
                int iIndex
            );

            bool connectAllSlots(
              int oPort,
              ACE_TCHAR *remoteComponentTCPAddress,
              unsigned short remoteComponentTCPPort,
              int iPort
            );

            bool disconnectAllSlots(
              int oPort,
              ACE_TCHAR *remoteComponentTCPAddress,
              unsigned short remoteComponentTCPPort,
              int iPort
            );

            bool disconnectAllPorts();

            const char* name() const { return "NDView"; }

            bool widgetCreation(
              GtkWidget* pVBox,
              GtkWidget* pNotebook,
              const char* pName = NULL
            );

            void deleteEvent();

            // PUBLIC USER SECTION: BEGIN

            // PUBLIC USER SECTION: END

    }; // NDView class

}

// Initialize the module when imported.
%init %{
  //TODO
%}