uMenuItemStringWithHistory::history_t Class Reference

handles loading and saving the contents of the history to a file More...

#include <uMenu.h>

List of all members.

Public Member Functions

 history_t (char const *filename)
 this will load the history from the file
 ~history_t ()
 this will save the history to the file

Private Attributes

char const * m_filename


Detailed Description

handles loading and saving the contents of the history to a file

Definition at line 439 of file uMenu.h.


Constructor & Destructor Documentation

uMenuItemStringWithHistory::history_t::history_t ( char const *  filename  ) 

this will load the history from the file

Parameters:
filename the name of the file (in var/) to be loaded and saved to

Definition at line 1179 of file uMenu.cpp.

References tTextFileRecorder::EndOfFile(), tTextFileRecorder::GetLine(), m_filename, and tDirectories::Var().

01181                                                                    : std::deque<tString>(), m_filename(filename) {
01182     tTextFileRecorder the_file ( tDirectories::Var(), m_filename );
01183     while(!the_file.EndOfFile()) {
01184         push_front(the_file.GetLine());

Here is the call graph for this function:

uMenuItemStringWithHistory::history_t::~history_t (  ) 

this will save the history to the file

Definition at line 1186 of file uMenu.cpp.

01188                                                 {
01189     std::ofstream the_file;
01190     if(tDirectories::Var().Open( the_file, m_filename)) {
01191         for(reverse_iterator i = rbegin(); i != rend(); ++i) {
01192             the_file << *i << "\n";
01193         }


Member Data Documentation

char const* uMenuItemStringWithHistory::history_t::m_filename [private]

Definition at line 440 of file uMenu.h.

Referenced by history_t().


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:01:20 2008 for Armagetron Advanced by  doxygen 1.5.4