NLPACS::CGlobalRetriever::CLrLoader Class Reference

#include <global_retriever.h>

Inheritance diagram for NLPACS::CGlobalRetriever::CLrLoader:

NLMISC::IRunnablePos NLMISC::IRunnable

Public Member Functions

 CLrLoader (const NLMISC::CVector &position)
void getName (std::string &result) const
void run ()

Data Fields

NLMISC::CMemStream _Buffer
 Loading buffer.

volatile bool Finished
 Finished task.

std::string LoadFile
 Lr to load.

uint LrId
 Lr Id.

NLMISC::CVector Position
volatile bool Successful
 Finished successfully.


Constructor & Destructor Documentation

NLPACS::CGlobalRetriever::CLrLoader::CLrLoader const NLMISC::CVector position  )  [inline]
 

Definition at line 135 of file global_retriever.h.

References Finished.

00135                                                          : Finished(true) 
00136                 {
00137                         Position = position;
00138                 }


Member Function Documentation

void NLPACS::CGlobalRetriever::CLrLoader::getName std::string &  result  )  const [virtual]
 

Reimplemented from NLMISC::IRunnable.

Definition at line 2648 of file global_retriever.cpp.

References LoadFile.

02649 {
02650         result = "LoadLR(" + LoadFile + ")";
02651 }

void NLPACS::CGlobalRetriever::CLrLoader::run  )  [virtual]
 

Implements NLMISC::IRunnable.

Definition at line 2623 of file global_retriever.cpp.

References _Buffer, buffer, NLMISC::CMemStream::bufferToFill(), NLMISC::CMemStream::clear(), Finished, NLMISC::CMemStream::invert(), NLMISC::IStream::isReading(), LoadFile, nlwarning, Successful, and uint8.

02624 {
02625         CIFile          f;
02626 
02627         Successful = false;
02628 
02629         if (!f.open(CPath::lookup(LoadFile, false)))
02630         {
02631                 nlwarning("Couldn't find file '%s' to load, retriever loading aborted", LoadFile.c_str());
02632                 _Buffer.clear();
02633                 Finished = true;
02634                 return;
02635         }
02636 
02637         if (!_Buffer.isReading())
02638                 _Buffer.invert();
02639 
02640         uint8   *buffer = _Buffer.bufferToFill(f.getFileSize());
02641         f.serialBuffer(buffer, f.getFileSize());
02642 
02643         Successful = true;
02644         Finished = true;
02645 }


Field Documentation

NLMISC::CMemStream NLPACS::CGlobalRetriever::CLrLoader::_Buffer
 

Loading buffer.

Definition at line 128 of file global_retriever.h.

Referenced by run().

volatile bool NLPACS::CGlobalRetriever::CLrLoader::Finished
 

Finished task.

Definition at line 119 of file global_retriever.h.

Referenced by CLrLoader(), NLPACS::CGlobalRetriever::refreshLrAround(), and run().

std::string NLPACS::CGlobalRetriever::CLrLoader::LoadFile
 

Lr to load.

Definition at line 125 of file global_retriever.h.

Referenced by getName(), NLPACS::CGlobalRetriever::refreshLrAround(), and run().

uint NLPACS::CGlobalRetriever::CLrLoader::LrId
 

Lr Id.

Definition at line 123 of file global_retriever.h.

Referenced by NLPACS::CGlobalRetriever::refreshLrAround().

NLMISC::CVector NLMISC::IRunnablePos::Position [inherited]
 

Definition at line 46 of file task_manager.h.

volatile bool NLPACS::CGlobalRetriever::CLrLoader::Successful
 

Finished successfully.

Definition at line 121 of file global_retriever.h.

Referenced by run().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 14:14:39 2004 for NeL by doxygen 1.3.6