libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
moConnectors.h
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  moConnectors.h
4 
5  ****************************************************************************
6  * *
7  * This source is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This code is distributed in the hope that it will be useful, but *
13  * WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15  * General Public License for more details. *
16  * *
17  * A copy of the GNU General Public License is available on the World *
18  * Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
19  * obtain it by writing to the Free Software Foundation, *
20  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  * *
22  ****************************************************************************
23 
24  Copyright(C) 2006 Fabricio Costa
25 
26  Authors:
27  Fabricio Costa
28 
29 *******************************************************************************/
30 
31 #ifndef __MO_CONNECTORS_H__
32 #define __MO_CONNECTORS_H__
33 
34 #include "moTypes.h"
35 #include "moText.h"
36 #include "moAbstract.h"
37 #include "moEventList.h"
38 #include "moConfig.h"
39 #include "moArray.h"
40 
42 
58 
59  public:
63  moConnector();
64 
68  virtual ~moConnector();
69 
73  virtual MOboolean Init();
74 
78  virtual MOboolean Finish();
79 
86  virtual MOboolean Init( moText p_ConnectorLabelName, MOint ConnectorId, moDataType p_datatype );
87 
94  virtual MOboolean Init( moText p_ConnectorLabelName, MOint ConnectorId, moText t_datatype );
95 
102  virtual MOboolean Init( moText p_ConnectorLabelName, MOint ConnectorId, moData* p_data );
103 
110  virtual MOboolean Init( moText p_ConnectorLabelName, MOint ConnectorId, moParam* p_param );
111 
121  virtual MOboolean Init( moText p_ConnectorLabelName, MOint ConnectorId, moParamType p_paramtype );
122 
123 
128  MOint GetConnectorId() const;
129 
134  moText GetMoldeoLabelName() const;
135 
140  void SetMoldeoLabelName( moText p_MoldeoLabelName );
141 
146  MOint GetMoldeoId() const;
147 
152  void SetMoldeoId( MOint p_moldeoid );
153 
158  virtual const moText& GetConnectorLabelName() const;
159 
164  void SetType( moDataType p_datatype );
165 
170  moDataType GetType() const;
171 
176  void SetData( moData* p_data );
177 
182  moData* GetData();
183  moData* GetInternalData();
184 
188  void NewData();
189 
194  void AddData( const moData& data );
195 
200  void AddMessage( const moDataMessage& datamessage );
201 
206  moDataMessages& GetMessages();
207 
208 
213  MOboolean Updated() const;
214 
218  void Update( bool force = true );
219 
224  bool IsIndependent() {
225  return (m_pParam==NULL);
226  }
227 
233  return (m_pParam!=NULL);
234  }
235 
236  protected:
237  //Type and Data, it may be a pointer to the plugins data...:-D
242 
246  moDataMessages m_DataMessages;//historical data for streaming
247 
254 
259 
261 
262 };
263 
266 
268 
281 
282  public:
286  moConnection();
287 
295  moConnection( moText p_DestinationMoldeoLabelName, moText p_DestinationConnectorLabelName, MOint p_DestinationMoldeoId = -1, MOint p_DestinationConnectorId = -1 );
296 
300  virtual ~moConnection();
301 
305  MOint GetDestinationMoldeoId();
306 
310  moText GetDestinationMoldeoLabelName();
311 
315  MOint GetDestinationConnectorId();
316 
320  moText GetDestinationConnectorLabelName();
321 
325  void SetDestinationMoldeoId( MOint p_DestinationMoldeoId );
326 
330  void SetDestinationMoldeoLabelName( moText p_DestinationMoldeoLabelName );
331 
335  void SetDestinationConnectorId( MOint p_DestinationConnectorId );
336 
340  void SetDestinationConnectorLabelName( moText p_DestinationConnectorLabelName );
341  /*
342  virtual void Send();//ask to connector to receive data...
343  virtual void OnSend();
344  */
345  protected:
346  //SOURCE: not really necessary
351 
352  //DESTINATION
357 
358 };
359 
362 
363 
365 
375 
376  public:
380  moInlet();
381 
385  virtual ~moInlet();
386 
387  MOboolean Init( moText p_ConnectorLabelName, MOint ConnectorId, moParam* p_param );
388 
389 };
390 
392 
393 
395 
411 
412  public:
413 
417  moOutlet();
418 
422  virtual ~moOutlet();
423 
427  virtual MOboolean Finish();
428 
432  virtual bool Connect( moInlet* p_connector );
433 
437  virtual void Disconnect( moInlet* p_connector );
438 
440 
443  moConnections* GetConnections();
444 
445  private:
446 
450  moConnections m_Connections;
451 
452 };
453 
454 
456 
457 #endif
458 
459 
moData * m_pData
Definition: moConnectors.h:241
moText m_SourceConnectorLabelName
Definition: moConnectors.h:349
moDataType
Definition: moValue.h:98
moText m_MoldeoLabelName
Definition: moConnectors.h:256
moParamType
Definition: moParam.h:40
Conector Inlet, conector que recibe datos.
Definition: moConnectors.h:374
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
Definition: moAbstract.cpp:147
moDeclareExportedDynamicArray(moConnector *, moConnectors)
moText m_DestinationMoldeoLabelName
Definition: moConnectors.h:353
moDatas moDataMessage
Definition: moValue.h:149
#define MOboolean
Definition: moTypes.h:385
MOint m_MoldeoId
Definition: moConnectors.h:255
Conector Outlet, conector que envía datos.
Definition: moConnectors.h:410
bool IsParameterDependent()
Definition: moConnectors.h:232
Clase base abstracta de donde deben derivar los objetos [virtual pura].
Definition: moAbstract.h:191
virtual MOboolean Init()
Inicializa el objeto.
Definition: moAbstract.cpp:141
bool IsIndependent()
Definition: moConnectors.h:224
MOint m_DestinationConnectorId
Definition: moConnectors.h:356
MOboolean m_bUpdated
Definition: moConnectors.h:260
#define LIBMOLDEO_API
Definition: moTypes.h:180
clase de para manejar textos
Definition: moText.h:75
MOint m_ConnectorId
Definition: moConnectors.h:257
moConnection * moConnectionPtr
Definition: moConnectors.h:360
moDataMessages m_DataMessages
Definition: moConnectors.h:246
MOint m_SourceMoldeoId
Definition: moConnectors.h:348
#define MOint
Definition: moTypes.h:388
virtual MOboolean Finish()
moText m_ConnectorLabelName
Definition: moConnectors.h:258
virtual MOboolean Init()
MOint m_DestinationMoldeoId
Definition: moConnectors.h:354
moConnector * moConnectorPtr
Definition: moConnectors.h:264
Conector para vincular objetos con datos.
Definition: moConnectors.h:57
moText m_SourceMoldeoLabelName
Definition: moConnectors.h:347
moText m_DestinationConnectorLabelName
Definition: moConnectors.h:355
moParam * m_pParam
Definition: moConnectors.h:253
MOint m_SourceConnectorId
Definition: moConnectors.h:350
Conección, vínculo entre dos objetos.
Definition: moConnectors.h:280