You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.2 KiB
84 lines
2.2 KiB
//----------------------------------------------------------------------------
|
|
// Dr.Frucht Systems Ltd.
|
|
// Copyright © 2000-2016. All Rights Reserved.
|
|
// Version 2.0 3/31/2016
|
|
// Last modification: 3/31/2016
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: basicNCursesEngine.h
|
|
// AUTHOR: gagua
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of basicNCursesEngine.h
|
|
//----------------------------------------------------------------------------
|
|
//
|
|
|
|
#ifndef __BASICNCURSESENGINE_H_INCL__
|
|
#define __BASICNCURSESENGINE_H_INCL__
|
|
|
|
#include "../../cli/cliClass.h"
|
|
#include "basicThread.h"
|
|
|
|
typedef std::vector<WindowCLI *> WIN_POOL;
|
|
typedef std::vector<WindowCLI *>::iterator WIN_ITERATOR;
|
|
|
|
/**
|
|
* TODO: Add class description
|
|
*
|
|
* @author gagua
|
|
*/
|
|
class basicNCursesEngine : public basicThread
|
|
{
|
|
public:
|
|
|
|
// Method to fetch singleton instance.
|
|
static basicNCursesEngine * getInstance();
|
|
|
|
// Destructor
|
|
~basicNCursesEngine();
|
|
bool attachWindow(WindowCLI * wnd);
|
|
|
|
protected:
|
|
|
|
// Constructor - protected so users cannot call it.
|
|
basicNCursesEngine();
|
|
void m_fThreadProc(void);
|
|
|
|
private:
|
|
|
|
// private static member referencing the single instance of the object
|
|
// TODO: Replace basicNCursesEngine with the type of object you want to
|
|
// return the single instance of
|
|
WIN_POOL m_vWindowPool;
|
|
static basicNCursesEngine * _instance;
|
|
WINDOW * m_pCursesWin;
|
|
CDKSCREEN * m_pCDKScreen;
|
|
// Copy constructor
|
|
// Declared but not defined to prevent auto-generated
|
|
// copy constructor. Refer to "Effective C++" by Meyers
|
|
// basicNCursesEngine(const basicNCursesEngine& src);
|
|
// Assignment operator
|
|
// Declared but not defined to prevent auto-generated
|
|
// assignment operator. Refer to "Effective C++" by Meyers
|
|
// basicNCursesEngine& operator=(const basicNCursesEngine& src);
|
|
};
|
|
|
|
// TODO: Uncomment the copy constructor when you need it.
|
|
// inline basicNCursesEngine::basicNCursesEngine(const basicNCursesEngine& src)
|
|
//{
|
|
// // TODO: copy
|
|
//}
|
|
|
|
// TODO: Uncomment the assignment operator when you need it.
|
|
// inline basicNCursesEngine& basicNCursesEngine::operator=(const basicNCursesEngine& rhs)
|
|
//{
|
|
// if (this == &rhs) {
|
|
// return *this;
|
|
// }
|
|
//
|
|
// // TODO: assignment
|
|
//
|
|
// return *this;
|
|
//}
|
|
|
|
#endif // __BASICNCURSESENGINE_H_INCL__
|