C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | List of all members
CORE_OutputFile Class Reference

this class describes a writing file More...

#include <CORE_OutputFile.h>

Inheritance diagram for CORE_OutputFile:
Inheritance graph
[legend]
Collaboration diagram for CORE_OutputFile:
Collaboration graph
[legend]

Public Member Functions

 CORE_OutputFile ()
 build a CORE_OutputClass object
 
virtual ~CORE_OutputFile (void)
 destroy a CORE_OutputClass object
 
virtual tMemSize getMemorySize () const override
 return the memory size of the class More...
 
void setPrecision (const tUSInt &p)
 set precision More...
 
tBoolean open (const tString &fileName)
 open file fileName for writing More...
 
tBoolean append (const tString &fileName)
 open file fileName for appending More...
 
void close ()
 close the file
 
tULInt getCurrentIndex () const
 get the current index of the file More...
 
tBoolean moveTo (const tULInt &index)
 move the current index position of the file to index More...
 
tBoolean translate (const tLInt &dx)
 translate the current index position of the file More...
 
tBoolean isEndOfFile () const
 test if the cursor is at the end of file More...
 
template<class T >
CORE_OutputFileoperator<< (const T &obj)
 writing operator More...
 
- Public Member Functions inherited from CORE_IO
 CORE_IO ()
 build a CORE_IO
 
virtual ~CORE_IO (void)
 destroy a CORE_IO
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
virtual tMemSize getContentsMemorySize () const
 return nthe memory size of the included associations More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 
virtual tString toString () const
 return the string representation of the object node More...
 

Static Public Member Functions

static CORE_UniquePointer< CORE_OutputFileNew ()
 create a new instance of CORE_OutputFile class
 
- Static Public Member Functions inherited from CORE_IO
static tBoolean IsFile (const tString &f)
 return true if the file is a regular file More...
 
static tBoolean IsPath (const tString &p)
 return true if the path designed by p is a path More...
 
static tBoolean Exists (const tString &f)
 return true if the file or the path exists More...
 
static tBoolean CreatePath (const tString &path)
 create a path More...
 
static tBoolean Rename (const tString &file, const tString &newFile)
 
static tBoolean RemovePath (const tString &path, const tBoolean &force)
 remove a path More...
 
static tBoolean RemovePath (const tString &path)
 remove an empty path More...
 
static tBoolean RemoveFile (const tString &file)
 remove a file More...
 
static void RemoveAllFiles (const tString &path)
 remove all files within a path More...
 
static void RemoveAllFiles (const tString &path, const tString &exts)
 remove all files with extension within the path More...
 
static tString GetSystemPath (const tString &posix_path)
 get the system path corresponding to posix path More...
 
static void GetPaths (const tString &path, std::vector< tString > &paths)
 get all the paths within the directory More...
 
static tString GetPathName (const tString &aPath)
 get all the paths within the directory More...
 
static void GetFiles (const tString &path, std::vector< tString > &files)
 get all the files within the directory More...
 
static void GetFiles (const tString &path, const tString &exts, std::vector< tString > &files)
 get all the files within the directory with extension of the form .ext More...
 
static void GetFiles (const tString &path, const tString &prefix, const tString &exts, std::vector< tString > &files)
 get all the files within the directory with extension of the form .ext More...
 
static tBoolean CopyFiles (const tString &sourcePath, const tString &exts, const tString &destPath, const tBoolean &overwrite)
 copy all the files with extension within the directory to destination path More...
 
static tBoolean CopyFiles (const tString &sourcePath, const tString &destPath, const tBoolean &overwrite)
 copy all the files within the directory to destination path More...
 
static tBoolean CopyFile (const tString &source, const tString &dest, const tBoolean &overwrite)
 copy file More...
 
static tBoolean CopyFile (const tString &source, const tString &dest)
 copy file More...
 
static tBoolean CopyPath (const tString &sourcePath, const tString &destPath)
 copy path More...
 
static void GetContent (const tString &path, std::vector< tString > &content)
 get all the content files or paths within the directory More...
 
static tString GetCurrentPath ()
 get the current path More...
 
static tString GetAbsolutePath (const tString &path)
 get the absolute path of the path More...
 
static tString GetBaseName (const tString &file)
 get base name of the file More...
 
static tString GetExtension (const tString &file)
 get extension of the file More...
 
static tString GetPath (const tString &file)
 get path containing the file More...
 
static tString GetFileName (const tString &file)
 get path containing the file More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Additional Inherited Members

- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Detailed Description

this class describes a writing file

Member Function Documentation

◆ append()

tBoolean CORE_OutputFile::append ( const tString &  fileName)
inline

open file fileName for appending

Parameters
fileNamethe name of the file to write return false

◆ getCurrentIndex()

tULInt CORE_OutputFile::getCurrentIndex ( ) const
inline

get the current index of the file

Returns
the current index of the file

◆ getMemorySize()

virtual tMemSize CORE_OutputFile::getMemorySize ( ) const
inlineoverridevirtual

return the memory size of the class

Returns
the memory size of the class in bytes 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from CORE_IO.

◆ isEndOfFile()

tBoolean CORE_OutputFile::isEndOfFile ( ) const
inline

test if the cursor is at the end of file

Returns
true if the end of file is reached

◆ moveTo()

tBoolean CORE_OutputFile::moveTo ( const tULInt &  index)
inline

move the current index position of the file to index

Parameters
[in]indexnew index to go
Returns
true if he moving succeeds

◆ open()

tBoolean CORE_OutputFile::open ( const tString &  fileName)
inline

open file fileName for writing

Parameters
[in]fileNamethe name of the file to write return false if the file name can not be opened

◆ operator<<()

template<class T >
CORE_OutputFile& CORE_OutputFile::operator<< ( const T &  obj)
inline

writing operator

Parameters
[in]objthe object to write into file

◆ setPrecision()

void CORE_OutputFile::setPrecision ( const tUSInt &  p)
inline

set precision

Parameters
[in]p: precision for writting file

◆ translate()

tBoolean CORE_OutputFile::translate ( const tLInt &  dx)
inline

translate the current index position of the file

Parameters
dxtranslator index
Returns
true if the translating succeeds

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