LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sc::datastreams::ReaderThread Class Reference
Inheritance diagram for sc::datastreams::ReaderThread:
[legend]
Collaboration diagram for sc::datastreams::ReaderThread:
[legend]

Public Member Functions

 ReaderThread (std::unique_ptr< SvStream > pData, size_t nColCount)
 
bool isTerminateRequested ()
 
void requestTerminate ()
 
void endThread ()
 
void waitForNewLines ()
 
DataStream::LinesType popNewLines ()
 
void resumeReadStream ()
 
bool hasNewLines () const
 
void pushUsedLines (DataStream::LinesType pLines)
 
std::mutexgetLinesMutex ()
 
- Public Member Functions inherited from salhelper::Thread
 Thread (char const *name)
 
void launch ()
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Member Functions

virtual void execute () override
 

Private Attributes

std::unique_ptr< SvStreammpStream
 
size_t mnColCount
 
std::atomic< bool > mbTerminate
 
std::queue< DataStream::LinesTypemaPendingLines
 
std::queue< DataStream::LinesTypemaUsedLines
 
std::mutex maMtxLines
 
osl::Condition maCondReadStream
 
osl::Condition maCondConsume
 
orcus::csv::parser_config maConfig
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::Thread
static void * operator new (std::size_t size)
 
static void operator delete (void *pointer)
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Member Functions inherited from salhelper::Thread
virtual ~Thread () SAL_OVERRIDE
 
virtual void execute ()=0
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Definition at line 96 of file datastream.cxx.

Constructor & Destructor Documentation

◆ ReaderThread()

sc::datastreams::ReaderThread::ReaderThread ( std::unique_ptr< SvStream pData,
size_t  nColCount 
)
inline

Definition at line 113 of file datastream.cxx.

References maConfig, and pData.

Member Function Documentation

◆ endThread()

void sc::datastreams::ReaderThread::endThread ( )
inline

Definition at line 133 of file datastream.cxx.

References maCondReadStream, and requestTerminate().

◆ execute()

virtual void sc::datastreams::ReaderThread::execute ( )
inlineoverrideprivatevirtual

◆ getLinesMutex()

std::mutex & sc::datastreams::ReaderThread::getLinesMutex ( )
inline

Definition at line 168 of file datastream.cxx.

References maMtxLines.

◆ hasNewLines()

bool sc::datastreams::ReaderThread::hasNewLines ( ) const
inline

Definition at line 158 of file datastream.cxx.

References maPendingLines.

◆ isTerminateRequested()

bool sc::datastreams::ReaderThread::isTerminateRequested ( )
inline

Definition at line 123 of file datastream.cxx.

References mbTerminate.

Referenced by execute().

◆ popNewLines()

DataStream::LinesType sc::datastreams::ReaderThread::popNewLines ( )
inline

Definition at line 145 of file datastream.cxx.

References maPendingLines.

◆ pushUsedLines()

void sc::datastreams::ReaderThread::pushUsedLines ( DataStream::LinesType  pLines)
inline

Definition at line 163 of file datastream.cxx.

References maUsedLines.

◆ requestTerminate()

void sc::datastreams::ReaderThread::requestTerminate ( )
inline

Definition at line 128 of file datastream.cxx.

References mbTerminate.

Referenced by endThread(), and execute().

◆ resumeReadStream()

void sc::datastreams::ReaderThread::resumeReadStream ( )
inline

Definition at line 152 of file datastream.cxx.

References maCondReadStream, and maPendingLines.

◆ waitForNewLines()

void sc::datastreams::ReaderThread::waitForNewLines ( )
inline

Definition at line 139 of file datastream.cxx.

References maCondConsume.

Member Data Documentation

◆ maCondConsume

osl::Condition sc::datastreams::ReaderThread::maCondConsume
private

Definition at line 107 of file datastream.cxx.

Referenced by execute(), and waitForNewLines().

◆ maCondReadStream

osl::Condition sc::datastreams::ReaderThread::maCondReadStream
private

Definition at line 106 of file datastream.cxx.

Referenced by endThread(), execute(), and resumeReadStream().

◆ maConfig

orcus::csv::parser_config sc::datastreams::ReaderThread::maConfig
private

Definition at line 109 of file datastream.cxx.

Referenced by execute(), and ReaderThread().

◆ maMtxLines

std::mutex sc::datastreams::ReaderThread::maMtxLines
private

Definition at line 104 of file datastream.cxx.

Referenced by execute(), and getLinesMutex().

◆ maPendingLines

std::queue<DataStream::LinesType> sc::datastreams::ReaderThread::maPendingLines
private

Definition at line 102 of file datastream.cxx.

Referenced by execute(), hasNewLines(), popNewLines(), and resumeReadStream().

◆ maUsedLines

std::queue<DataStream::LinesType> sc::datastreams::ReaderThread::maUsedLines
private

Definition at line 103 of file datastream.cxx.

Referenced by execute(), and pushUsedLines().

◆ mbTerminate

std::atomic<bool> sc::datastreams::ReaderThread::mbTerminate
private

Definition at line 100 of file datastream.cxx.

Referenced by isTerminateRequested(), and requestTerminate().

◆ mnColCount

size_t sc::datastreams::ReaderThread::mnColCount
private

Definition at line 99 of file datastream.cxx.

Referenced by execute().

◆ mpStream

std::unique_ptr<SvStream> sc::datastreams::ReaderThread::mpStream
private

Definition at line 98 of file datastream.cxx.

Referenced by execute().


The documentation for this class was generated from the following file: