Go to the documentation of this file.
34 auto osPtr = makeUnique<oFstream>(path(), outFileBinary());
38 auto outPrecision = owner()->outFilePrecision();
39 osPtr->precision(
static_cast<int>(outPrecision));
47 auto osPtr = makeUnique<oFstream>(
CWD()+
word(
"dummyFile") , outFileBinary());
51 auto outPrecision = owner()->outFilePrecision();
52 osPtr->precision(
static_cast<int>(outPrecision));
69 f = owner()->
path()/localPath();
82 return owner()->outFileBinary();
89 return toUpper(fileFormat_) ==
"BINARY";
98 " the file "<< path() <<
" does not exist. \n";
105 if(
auto ptrIS = inStream(); ptrIS )
107 return readHeader( ptrIS(), silent );
113 "could not open file " << path() <<
endl;
123 if (isReadAlways())
return true;
124 return readIfPresent();
129 if( isExcluded( name() ) )
return false;
130 if( isIncluded( name() ) )
return true;
131 return isWriteAlways();
136 return path().exist();
141 return fileExist() && isReadIfPresent();
147 if( !this->readWriteHeader() )
return false;
148 if( !implyWrite() )
return false;
156 const word& typeName,
161 if(!forceWrite && !writeHeader())
return true;
173 fileFormat =
"Binary";
175 fileFormat =
"ASCII";
186 return writeHeader(os, objectType_, forceWrite);
191 if( !implyRead())
return false;
192 if( !this->readWriteHeader() )
return false;
199 if(!readHeader())
return true;
206 "cannot find/error in reading objectName in file " <<
217 "cannot find/error in reading objectType in file "<<
229 "cannot find/error in reading fileFormat in file "<<
241 "/* -------------------------------*- C++ -*---------------------------------- *\\ \n"<<
242 "| phasicFlow File | \n"<<
243 "| copyright: www.cemf.ir | \n"<<
244 "\\* ------------------------------------------------------------------------- */ \n \n";
252 "// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // \n \n";
virtual bool findTokenAndNextSilent(const word &w, word &nextW, int32 limitLine=100)
#define warningInFunction
Report a warning.
word toUpper(const word &inStr)
convert a word to all caps
iOstream & endl(iOstream &os)
Add newline and flush stream.
Manages file pathes, manupulate and combines them.
Interface class for any input stream
const pathType & path() const
Const access to path.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
virtual const word & name() const
Return the name of the stream.
fileSystem CWD()
Free function to reture current working directory.
Interface class for any output stream.
iOstream & writeWordEntry(const word &key, const T &value)
Write a keyword/value entry.