1 #ifndef CORE_OutputFile_H
2 #define CORE_OutputFile_H
28 std::unique_ptr<std::ofstream>
mFile;
90 if (
mFile.get()!=
null) {
95 mFile=std::make_unique<std::ofstream>(fileName.c_str(),std::ios::out);
96 if (
mFile.get()==
null)
return false;
97 if (!(*
mFile.get()))
return false;
108 if (
mFile.get()!=
null) {
112 mFile=std::make_unique<std::ofstream>(fileName.c_str(),std::ios::app);
113 if (
mFile.get()==
null)
return false;
114 if (!(*
mFile.get()))
return false;
126 if (
mFile.get()!=
null) {
144 if (index>=
mLength)
return false;
145 if (
mFile.get()!=
null) {
this class describes the file system IO by default write on standart output
Definition: CORE_IO.h:20
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:94
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:259
this class describes a writing file
Definition: CORE_OutputFile.h:16
tULInt mLength
Definition: CORE_OutputFile.h:25
CORE_OutputFile & operator<<(const T &obj)
writing operator
Definition: CORE_OutputFile.h:172
void close()
close the file
Definition: CORE_OutputFile.h:125
tBoolean open(const tString &fileName)
open file fileName for writing
Definition: CORE_OutputFile.h:89
virtual tMemSize getMemorySize() const override
return the memory size of the class
Definition: CORE_OutputFile.h:74
tBoolean append(const tString &fileName)
open file fileName for appending
Definition: CORE_OutputFile.h:107
static CORE_UniquePointer< CORE_OutputFile > New()
create a new instance of CORE_OutputFile class
Definition: CORE_OutputFile.h:58
tBoolean moveTo(const tULInt &index)
move the current index position of the file to index
Definition: CORE_OutputFile.h:143
CORE_OutputFile()
build a CORE_OutputClass object
Definition: CORE_OutputFile.h:37
void setPrecision(const tUSInt &p)
set precision
Definition: CORE_OutputFile.h:81
tBoolean isEndOfFile() const
test if the cursor is at the end of file
Definition: CORE_OutputFile.h:165
std::unique_ptr< std::ofstream > mFile
Definition: CORE_OutputFile.h:28
tULInt getCurrentIndex() const
get the current index of the file
Definition: CORE_OutputFile.h:134
virtual ~CORE_OutputFile(void)
destroy a CORE_OutputClass object
Definition: CORE_OutputFile.h:49
tBoolean translate(const tLInt &dx)
translate the current index position of the file
Definition: CORE_OutputFile.h:157
#define ASSERT_IN(a)
Definition: functions.h:601
typename std::unique_ptr< T, CORE_Object::Delete > CORE_UniquePointer
Definition: sp.h:8
#define tLInt
Definition: types.h:55
#define tUSInt
Definition: types.h:38
#define tString
Definition: types.h:147
#define tMemSize
Definition: types.h:166
#define tBoolean
Definition: types.h:151
#define tULInt
Definition: types.h:51