Files
redAcore/FunctionCore.h
Charl Wentzel dcfbd85efa Major Update:
- Merged SelectCore and PortCore into new SelectableCore
  Single well integrated Class
- Rename SelectCore.h to SelectableCore.h
- Create new TFileHandle structure for Ports/Sockets
- Moved buffer and Input Timeout from FunctionCore to TFileHandle
- Moved Read, Write and ProcessBuffer from FunctionCore to TFileHandle
Bug Fixes:
- malloc correct size for names
- Calculate MaxFD correctly when closing FDs
2016-05-23 14:35:15 +02:00

45 lines
1.0 KiB
C++

/*
* FunctionCore.h
*
* Created on: 18 May 2016
* Author: wentzelc
*/
#ifndef REDACORE_FUNCTIONCORE_H_
#define REDACORE_FUNCTIONCORE_H_
// redA Libraries
#include "BufferCore.h"
// Standard C/C++ Libraries
#include <sys/time.h>
//---------------------------------------------------------------------------
class CFunctionCore
{
protected:
// Function Definition
char * Name;
CFunctionCore * OutFunction;
public:
// Life cycle
CFunctionCore( const char * ObjectName );
virtual ~CFunctionCore();
// Manual Data Input/Output
virtual int Input( int InputID, const char * Buffer, int MaxLen );
virtual int Output( int OutputID, const char * Buffer, int Len );
// Automated Data Input/Output
virtual bool AddInput( int InputID, CFunctionCore * OutFunction, int OutputID );
virtual bool AddOutput( int OutputID, CFunctionCore * InFunction, int InputID );
virtual bool Process() = 0;
};
//---------------------------------------------------------------------------
#endif /* REDACORE_FUNCTIONCORE_H_ */