
interface IProcessor;
interface IController;

class BufferWChar;

class CLKFComm 
{
protected:
	
	BufferWChar *pInBuffer;
	BufferWChar *pCmdBuffer;
	BufferWChar *pOutBuffer;
	BufferWChar *pWarningBuffer;
	BufferWChar *pErrorBuffer;

	IProcessor *pProcessor;
	IController *pController;
	int first_c, first_p;

	int server_status;

	void TransferBuffersToServer();
	void DoScoring ();
	void DoIntScoring ();
	BufferWChar *GetWarningBuffer();
	BufferWChar *GetErrorBuffer();
	BufferWChar *GetOutputBuffer();

	void FillBuffer(BufferWChar *, long buflen);
	void ResetOutput ();

public:
	CLKFComm ();
	~CLKFComm ();
	void AddLineToInputBuffer (const wchar_t *s);
	void AddBatchCmd (const wchar_t *s);

	IProcessor *Processor();
	IController *Controller ();
	void ReleaseProcessor ();
	void ReleaseController ();

} ;