CMake/Source/CursesDialog/cmCursesForm.cxx

63 lines
1.3 KiB
C++
Raw Normal View History

2002-01-21 23:30:43 +03:00
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
2002-01-21 23:30:43 +03:00
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
2002-01-21 23:30:43 +03:00
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
2001-11-05 02:05:21 +03:00
#include "cmCursesForm.h"
2001-12-04 19:16:04 +03:00
std::ofstream cmCursesForm::DebugFile;
bool cmCursesForm::Debug = false;
2001-11-05 02:05:21 +03:00
cmCursesForm::cmCursesForm()
{
2006-03-16 18:44:55 +03:00
this->Form = 0;
2001-11-05 02:05:21 +03:00
}
cmCursesForm::~cmCursesForm()
{
2006-03-16 18:44:55 +03:00
if (this->Form)
2001-11-05 02:05:21 +03:00
{
2006-03-16 18:44:55 +03:00
unpost_form(this->Form);
free_form(this->Form);
this->Form = 0;
2001-11-05 02:05:21 +03:00
}
}
2001-12-04 19:16:04 +03:00
void cmCursesForm::DebugStart()
{
cmCursesForm::Debug = true;
cmCursesForm::DebugFile.open("ccmakelog.txt");
}
void cmCursesForm::DebugEnd()
{
if (!cmCursesForm::Debug)
{
return;
}
cmCursesForm::Debug = false;
cmCursesForm::DebugFile.close();
}
void cmCursesForm::LogMessage(const char* msg)
{
if (!cmCursesForm::Debug)
{
return;
}
cmCursesForm::DebugFile << msg << std::endl;
}