A rather simple text file reader and writer.
TNString | The string-type. This may also be a type derived from NString which contains further fields available with each line of the file. |
TAllocator | The allocator type to use, as prototyped with Allocator. |
Definition at line 25 of file textfile.hpp.
#include <textfile.hpp>
Public Type Index: | |
using | AllocatorType = TAllocator |
Type definition publishing template parameter TAllocator. | |
using | StoredType = TNString |
using | Vector = StdVectorMono<TNString> |
Type definition publishing the base container type. | |
Public Type Index: inherited from AllocatorMember< MonoAllocator > | |
using | AllocatorType |
Exposes the allocator type. | |
Public Method Index: | |
TTextFile (MonoAllocator &ma) | |
lang::system::SystemErrors | Read (const CString &filePath) |
lang::system::SystemErrors | Read (files::File file) |
ALIB_API lang::system::SystemErrors | Write (const String &filePath) |
Public Method Index: inherited from AllocatorMember< MonoAllocator > | |
AllocatorMember ()=delete | |
Deleted default constructor. (The allocator has to be given with construction) | |
AllocatorMember (MonoAllocator &pAllocator) noexcept | |
AllocatorInterface< MonoAllocator > | AI () const noexcept |
MonoAllocator & | GetAllocator () const noexcept |
Protected Field Index: | |
MonoAllocator & | allocator |
The given allocator. | |
Protected Field Index: inherited from AllocatorMember< MonoAllocator > | |
MonoAllocator & | allocator |
A reference to the allocator. | |
using AllocatorType = TAllocator |
Type definition publishing template parameter TAllocator.
Definition at line 34 of file textfile.hpp.
using StoredType = TNString |
Type definition publishing the type in the std::vector
that this type is derived of. (As is defined with template parameter TNString.)
Definition at line 39 of file textfile.hpp.
using Vector = StdVectorMono<TNString> |
Type definition publishing the base container type.
Definition at line 42 of file textfile.hpp.
|
protected |
The given allocator.
Definition at line 30 of file textfile.hpp.
|
inline |
|
inline |
Reads the file into this vector of lines.
filePath | The path of the file. |
Definition at line 56 of file textfile.hpp.
|
inline |
Reads the file into this vector of lines.
file | The file to read. |
Definition at line 87 of file textfile.hpp.
|
inline |
Writes this text file to the given filePath.
filePath | The path of the file. |
Definition at line 99 of file textfile.hpp.