32#ifndef _QORE_FILELINEITERATOR_H
33#define _QORE_FILELINEITERATOR_H
38#include "qore/intern/FileInputStream.h"
39#include "qore/intern/InputStreamLineIterator.h"
47 const QoreStringNode* n_eol = 0,
bool n_trim =
true,
int flags = 0) :
48 eol(n_eol ? n_eol->stringRefSelf() :
nullptr),
58 encoding(old.encoding),
69 bool validp = src->next(xsink);
76 DLLLOCAL
int64 index() {
81 return src->getValue();
84 DLLLOCAL
bool valid() {
89 return src->checkValid(xsink);
99 return src->getEncoding();
107 return fis->getFile().
stat(xsink);
111 return fis->getFile().
hstat(xsink);
114 DLLLOCAL
bool isTty() {
115 return fis->getFile().
isTty();
123 DLLLOCAL
virtual const char* getName()
const {
return "FileLineIterator"; }
125 DLLLOCAL
virtual const QoreTypeInfo* getElementType()
const {
126 return stringTypeInfo;
DLLEXPORT const QoreEncoding * QCS_DEFAULT
the default encoding for the Qore library
DLLEXPORT const QoreEncoding * QCS_UTF8
UTF-8 multi-byte encoding (only UTF-8 and UTF-16 are multi-byte encodings)
Definition: QoreEncoding.h:247
DLLLOCAL void ref() const
increments the reference count of the object
Definition: AbstractPrivateData.h:51
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:50
Private data for the Qore::FileLineIterator class.
Definition: FileLineIterator.h:44
virtual DLLLOCAL void deref()
decrements the reference count of the object without the possibility of throwing a Qore-language exce...
Definition: FileLineIterator.h:118
defines string encoding functions in Qore
Definition: QoreEncoding.h:83
DLLEXPORT bool isAsciiCompat() const
returns true if the character encoding is backwards-compatible with ASCII
DLLEXPORT QoreHashNode * hstat(ExceptionSink *xsink) const
returns a QoreHashNode with file status information
DLLEXPORT QoreListNode * stat(ExceptionSink *xsink) const
returns a QoreListNode with file status information
DLLEXPORT bool isTty() const
returns true if the file is a tty
This is the hash or associative list container type in Qore, dynamically allocated only,...
Definition: QoreHashNode.h:50
abstract base class for iterator private data
Definition: QoreIteratorBase.h:68
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
DLLEXPORT bool ROdereference() const
atomically decrements the reference count
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:50
DLLEXPORT QoreStringNode * stringRefSelf() const
references the object and returns a non-const pointer to "this"
manages a reference count of a pointer to a class that takes a simple "deref()" call with no argument...
Definition: ReferenceHolder.h:127
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition: common.h:260