SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TSOut Class Referenceabstract

#include <fl.h>

Inheritance diagram for TSOut:
Collaboration diagram for TSOut:

Public Member Functions

 TSOut ()
 
 TSOut (const TStr &Str)
 
virtual ~TSOut ()
 
void EnableLnTrunc (const int &_MxLnLen)
 
void DisableLnTrunc ()
 
virtual int PutCh (const char &Ch)=0
 
virtual int PutBf (const void *LBf, const TSize &LBfL)=0
 
virtual void Flush ()=0
 
virtual TFileId GetFileId () const
 
int PutMem (const TMem &Mem)
 
int PutCh (const char &Ch, const int &Chs)
 
int PutBool (const bool &Bool)
 
int PutInt (const int &Int)
 
int PutInt (const int &Int, const char *FmtStr)
 
int PutUInt (const uint &Int)
 
int PutUInt (const uint &Int, const char *FmtStr)
 
int PutFlt (const double &Flt)
 
int PutFlt (const double &Flt, const char *FmtStr)
 
int PutStr (const char *CStr)
 
int PutStr (const TChA &ChA)
 
int PutStr (const TStr &Str, const char *FmtStr)
 
int PutStr (const TStr &Str, const bool &ForceInLn=false)
 
int PutStrLn (const TStr &Str, const bool &ForceInLn=false)
 
int PutStrFmt (const char *FmtStr,...)
 
int PutStrFmtLn (const char *FmtStr,...)
 
int PutIndent (const int &IndentLev=1)
 
int PutLn (const int &Lns=1)
 
int PutDosLn (const int &Lns=1)
 
int PutSep (const int &NextStrLen=0)
 
int PutSepLn (const int &Lns=0)
 
void SaveCs ()
 
void SaveBf (const void *Bf, const TSize &BfL)
 
void Save (const bool &Bool)
 
void Save (const char &Ch)
 
void Save (const uchar &UCh)
 
void Save (const short &Short)
 
void Save (const ushort &UShort)
 
void Save (const int &Int)
 
void Save (const uint &UInt)
 
void Save (const int64 &Int)
 
void Save (const uint64 &UInt)
 
void Save (const double &Flt)
 
void Save (const sdouble &SFlt)
 
void Save (const ldouble &LFlt)
 
void Save (const char *CStr, const TSize &CStrLen)
 
void Save (const char *CStr)
 
void Save (TSIn &SIn, const TSize &BfL=-1)
 
void Save (const PSIn &SIn, const TSize &BfL=-1)
 
void Save (const void *Bf, const TSize &BfL)
 
TSOutoperator<< (const bool &Bool)
 
TSOutoperator<< (const uchar &UCh)
 
TSOutoperator<< (const char &Ch)
 
TSOutoperator<< (const short &Sh)
 
TSOutoperator<< (const ushort &USh)
 
TSOutoperator<< (const int &Int)
 
TSOutoperator<< (const uint &Int)
 
TSOutoperator<< (const int64 &Int)
 
TSOutoperator<< (const uint64 &UInt)
 
TSOutoperator<< (const float &Flt)
 
TSOutoperator<< (const double &Double)
 
TSOutoperator<< (const long double &LDouble)
 
TSOutoperator<< (const TSOutMnp &Mnp)
 
TSOutoperator<< (TSOut &(*FuncPt)(TSOut &))
 
TSOutoperator<< (TSIn &SIn)
 
TSOutoperator<< (PSIn &SIn)
 
- Public Member Functions inherited from TSBase
 TSBase (const TSStr &Nm)
 
virtual ~TSBase ()
 
virtual TStr GetSNm () const
 

Static Public Attributes

static const TPt< TSOutStdOut =PSOut(new TStdOut())
 

Private Member Functions

int UpdateLnLen (const int &StrLen, const bool &ForceInLn=false)
 
 TSOut (const TSIn &)
 
TSOutoperator= (const TSOut &)
 

Private Attributes

int MxLnLen
 
int LnLen
 

Friends

class TPt< TSOut >
 

Additional Inherited Members

- Protected Attributes inherited from TSBase
TCRef CRef
 
TSStr SNm
 
TCs Cs
 

Detailed Description

Definition at line 128 of file fl.h.

Constructor & Destructor Documentation

TSOut::TSOut ( const TSIn )
private
TSOut::TSOut ( )
inline

Definition at line 136 of file fl.h.

136 : TSBase("Output-Stream"), MxLnLen(-1), LnLen(0){}
TSBase(const TSStr &Nm)
Definition: fl.h:50
int LnLen
Definition: fl.h:130
int MxLnLen
Definition: fl.h:130
TSOut::TSOut ( const TStr Str)

Definition at line 67 of file fl.cpp.

67  :
68  TSBase(Str.CStr()), MxLnLen(-1), LnLen(0){}
TSBase(const TSStr &Nm)
Definition: fl.h:50
int LnLen
Definition: fl.h:130
int MxLnLen
Definition: fl.h:130
char * CStr()
Definition: dt.h:479
virtual TSOut::~TSOut ( )
inlinevirtual

Definition at line 138 of file fl.h.

138 {}

Member Function Documentation

void TSOut::DisableLnTrunc ( )
inline

Definition at line 141 of file fl.h.

141 {MxLnLen=-1;}
int MxLnLen
Definition: fl.h:130
void TSOut::EnableLnTrunc ( const int &  _MxLnLen)
inline

Definition at line 140 of file fl.h.

140 {MxLnLen=_MxLnLen;}
int MxLnLen
Definition: fl.h:130
virtual TFileId TSOut::GetFileId ( ) const
inlinevirtual

Reimplemented in TFInOut, and TFOut.

Definition at line 146 of file fl.h.

Referenced by THtmlDoc::SaveHtmlToXml().

146 {return NULL;}

Here is the caller graph for this function:

TSOut& TSOut::operator<< ( const bool &  Bool)
inline

Definition at line 191 of file fl.h.

References TSBase::Cs, and PutBf().

191 {Cs+=PutBf(&Bool, sizeof(Bool)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const uchar UCh)
inline

Definition at line 192 of file fl.h.

References TSBase::Cs, and PutBf().

192 {Cs+=PutBf(&UCh, sizeof(UCh)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const char &  Ch)
inline

Definition at line 193 of file fl.h.

References TSBase::Cs, and PutBf().

193 {Cs+=PutBf(&Ch, sizeof(Ch)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const short &  Sh)
inline

Definition at line 194 of file fl.h.

References TSBase::Cs, and PutBf().

194 {Cs+=PutBf(&Sh, sizeof(Sh)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const ushort USh)
inline

Definition at line 195 of file fl.h.

References TSBase::Cs, and PutBf().

195 {Cs+=PutBf(&USh, sizeof(USh)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const int &  Int)
inline

Definition at line 196 of file fl.h.

References TSBase::Cs, and PutBf().

196 {Cs+=PutBf(&Int, sizeof(Int)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const uint Int)
inline

Definition at line 197 of file fl.h.

References TSBase::Cs, and PutBf().

197 {Cs+=PutBf(&Int, sizeof(Int)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const int64 Int)
inline

Definition at line 198 of file fl.h.

References TSBase::Cs, and PutBf().

198 {Cs+=PutBf(&Int, sizeof(Int)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const uint64 UInt)
inline

Definition at line 199 of file fl.h.

References TSBase::Cs, and PutBf().

199 {Cs+=PutBf(&UInt, sizeof(UInt)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const float &  Flt)
inline

Definition at line 200 of file fl.h.

References TSBase::Cs, and PutBf().

200 {Cs+=PutBf(&Flt, sizeof(Flt)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const double &  Double)
inline

Definition at line 201 of file fl.h.

References TSBase::Cs, and PutBf().

201 {Cs+=PutBf(&Double, sizeof(Double)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const long double &  LDouble)
inline

Definition at line 202 of file fl.h.

References TSBase::Cs, and PutBf().

202 {Cs+=PutBf(&LDouble, sizeof(LDouble)); return *this;}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

TSOut& TSOut::operator<< ( const TSOutMnp Mnp)
inline

Definition at line 203 of file fl.h.

203 {return Mnp(*this);}
TSOut& TSOut::operator<< ( TSOut &(*)(TSOut &)  FuncPt)
inline

Definition at line 204 of file fl.h.

204 {return FuncPt(*this);}
TSOut & TSOut::operator<< ( TSIn SIn)

Definition at line 205 of file fl.cpp.

References TSIn::Eof(), and TSIn::GetCh().

205  {
206  while (!SIn.Eof())
207  operator<<((char)SIn.GetCh());
208  return *this;
209 }
virtual bool Eof()=0
virtual char GetCh()=0

Here is the call graph for this function:

TSOut& TSOut::operator<< ( PSIn SIn)
inline

Definition at line 206 of file fl.h.

References operator<<().

Referenced by operator<<().

206 {return operator<<(*SIn);}
TSOut & operator<<(const bool &Bool)
Definition: fl.h:191

Here is the call graph for this function:

Here is the caller graph for this function:

TSOut& TSOut::operator= ( const TSOut )
private
virtual int TSOut::PutBf ( const void *  LBf,
const TSize LBfL 
)
pure virtual

Implemented in TMOut, TFInOut, TFOut, TStdOut, TMemOut, and TZipOut.

Referenced by operator<<(), PutMem(), PutStr(), Save(), SaveBf(), SaveCs(), and TInt::SaveFrugalIntV().

Here is the caller graph for this function:

int TSOut::PutBool ( const bool &  Bool)

Definition at line 89 of file fl.cpp.

References TBool::GetStr(), and PutStr().

89  {
90  return PutStr(TBool::GetStr(Bool));
91 }
int PutStr(const char *CStr)
Definition: fl.cpp:117
static TStr GetStr(const bool &Val)
Definition: dt.h:1011

Here is the call graph for this function:

int TSOut::PutCh ( const char &  Ch,
const int &  Chs 
)

Definition at line 83 of file fl.cpp.

References TSBase::Cs, and PutCh().

83  {
84  int Cs=0;
85  for (int ChN=0; ChN<Chs; ChN++){Cs+=PutCh(Ch);}
86  return Cs;
87 }
virtual int PutCh(const char &Ch)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

int TSOut::PutDosLn ( const int &  Lns = 1)

Definition at line 164 of file fl.cpp.

References TCh::CrCh, TSBase::Cs, TCh::LfCh, LnLen, and PutCh().

Referenced by TOLx::PutDosLn().

164  {
165  LnLen=0; int Cs=0;
166  for (int LnN=0; LnN<Lns; LnN++){Cs+=PutCh(TCh::CrCh)+PutCh(TCh::LfCh);}
167  return Cs;
168 }
virtual int PutCh(const char &Ch)=0
int LnLen
Definition: fl.h:130
static const char LfCh
Definition: dt.h:1038
static const char CrCh
Definition: dt.h:1039
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

int TSOut::PutFlt ( const double &  Flt)

Definition at line 109 of file fl.cpp.

References TFlt::GetStr(), and PutStr().

Referenced by TLAMisc::SaveCsvTFltV().

109  {
110  return PutStr(TFlt::GetStr(Flt));
111 }
int PutStr(const char *CStr)
Definition: fl.cpp:117
TStr GetStr() const
Definition: dt.h:1462

Here is the call graph for this function:

Here is the caller graph for this function:

int TSOut::PutFlt ( const double &  Flt,
const char *  FmtStr 
)

Definition at line 113 of file fl.cpp.

References TFlt::GetStr(), and PutStr().

113  {
114  return PutStr(TFlt::GetStr(Flt, FmtStr));
115 }
int PutStr(const char *CStr)
Definition: fl.cpp:117
TStr GetStr() const
Definition: dt.h:1462

Here is the call graph for this function:

int TSOut::PutIndent ( const int &  IndentLev = 1)

Definition at line 154 of file fl.cpp.

References PutCh().

154  {
155  return PutCh(' ', IndentLev*2);
156 }
virtual int PutCh(const char &Ch)=0

Here is the call graph for this function:

int TSOut::PutInt ( const int &  Int)

Definition at line 93 of file fl.cpp.

References TInt::GetStr(), and PutStr().

Referenced by TLAMisc::SaveMatlabTIntV().

93  {
94  return PutStr(TInt::GetStr(Int));
95 }
TStr GetStr() const
Definition: dt.h:1200
int PutStr(const char *CStr)
Definition: fl.cpp:117

Here is the call graph for this function:

Here is the caller graph for this function:

int TSOut::PutInt ( const int &  Int,
const char *  FmtStr 
)

Definition at line 97 of file fl.cpp.

References TInt::GetStr(), and PutStr().

97  {
98  return PutStr(TInt::GetStr(Int, FmtStr));
99 }
TStr GetStr() const
Definition: dt.h:1200
int PutStr(const char *CStr)
Definition: fl.cpp:117

Here is the call graph for this function:

int TSOut::PutLn ( const int &  Lns = 1)

Definition at line 158 of file fl.cpp.

References TSBase::Cs, LnLen, and PutCh().

Referenced by TOLx::PutLn(), PutSep(), PutSepLn(), PutStrFmtLn(), PutStrLn(), TLAMisc::SaveCsvTFltV(), THtmlDoc::SaveTxt(), and UpdateLnLen().

158  {
159  LnLen=0; int Cs=0;
160  for (int LnN=0; LnN<Lns; LnN++){Cs+=PutCh('\n');}
161  return Cs;
162 }
virtual int PutCh(const char &Ch)=0
int LnLen
Definition: fl.h:130
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

int TSOut::PutMem ( const TMem Mem)

Definition at line 79 of file fl.cpp.

References TMem::Len(), and PutBf().

79  {
80  return PutBf(Mem(), Mem.Len());
81 }
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
int Len() const
Definition: dt.h:134

Here is the call graph for this function:

int TSOut::PutSep ( const int &  NextStrLen = 0)

Definition at line 170 of file fl.cpp.

References TSBase::Cs, LnLen, MxLnLen, PutCh(), and PutLn().

170  {
171  int Cs=0;
172  if (MxLnLen==-1){
173  Cs+=PutCh(' ');
174  } else {
175  if (LnLen>0){
176  if (LnLen+1+NextStrLen>MxLnLen){Cs+=PutLn();} else {Cs+=PutCh(' ');}
177  }
178  }
179  return Cs;
180 }
virtual int PutCh(const char &Ch)=0
int LnLen
Definition: fl.h:130
int PutLn(const int &Lns=1)
Definition: fl.cpp:158
int MxLnLen
Definition: fl.h:130
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

int TSOut::PutSepLn ( const int &  Lns = 0)

Definition at line 182 of file fl.cpp.

References TSBase::Cs, LnLen, and PutLn().

182  {
183  int Cs=0;
184  if (LnLen>0){Cs+=PutLn();}
185  Cs+=PutLn(Lns);
186  return Cs;
187 }
int LnLen
Definition: fl.h:130
int PutLn(const int &Lns=1)
Definition: fl.cpp:158
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

int TSOut::PutStr ( const TChA ChA)

Definition at line 122 of file fl.cpp.

References TSBase::Cs, TChA::CStr(), TChA::Len(), PutBf(), and UpdateLnLen().

122  {
123  int Cs=UpdateLnLen(ChA.Len());
124  return Cs+PutBf(ChA.CStr(), ChA.Len());
125 }
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
int Len() const
Definition: dt.h:259
int UpdateLnLen(const int &StrLen, const bool &ForceInLn=false)
Definition: fl.cpp:70
char * CStr()
Definition: dt.h:255
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

int TSOut::PutStr ( const TStr Str,
const char *  FmtStr 
)

Definition at line 127 of file fl.cpp.

References TStr::GetStr(), and PutStr().

127  {
128  return PutStr(TStr::GetStr(Str, FmtStr));
129 }
TStr GetStr() const
Definition: dt.h:681
int PutStr(const char *CStr)
Definition: fl.cpp:117

Here is the call graph for this function:

int TSOut::PutStr ( const TStr Str,
const bool &  ForceInLn = false 
)

Definition at line 131 of file fl.cpp.

References TSBase::Cs, TStr::CStr(), TStr::Len(), PutBf(), and UpdateLnLen().

131  {
132  int Cs=UpdateLnLen(Str.Len(), ForceInLn);
133  return Cs+PutBf(Str.CStr(), Str.Len());
134 }
int Len() const
Definition: dt.h:490
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
int UpdateLnLen(const int &StrLen, const bool &ForceInLn=false)
Definition: fl.cpp:70
char * CStr()
Definition: dt.h:479
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

int TSOut::PutStrFmt ( const char *  FmtStr,
  ... 
)

Definition at line 136 of file fl.cpp.

References PutStr().

136  {
137  char Bf[10*1024];
138  va_list valist;
139  va_start(valist, FmtStr);
140  const int RetVal=vsnprintf(Bf, 10*1024-2, FmtStr, valist);
141  va_end(valist);
142  return RetVal!=-1 ? PutStr(TStr(Bf)) : 0;
143 }
Definition: dt.h:412
int PutStr(const char *CStr)
Definition: fl.cpp:117

Here is the call graph for this function:

int TSOut::PutStrFmtLn ( const char *  FmtStr,
  ... 
)

Definition at line 145 of file fl.cpp.

References PutLn(), and PutStrLn().

145  {
146  char Bf[10*1024];
147  va_list valist;
148  va_start(valist, FmtStr);
149  const int RetVal=vsnprintf(Bf, 10*1024-2, FmtStr, valist);
150  va_end(valist);
151  return RetVal!=-1 ? PutStrLn(TStr(Bf)) : PutLn();
152 }
int PutLn(const int &Lns=1)
Definition: fl.cpp:158
Definition: dt.h:412
int PutStrLn(const TStr &Str, const bool &ForceInLn=false)
Definition: fl.h:161

Here is the call graph for this function:

int TSOut::PutStrLn ( const TStr Str,
const bool &  ForceInLn = false 
)
inline

Definition at line 161 of file fl.h.

References TSBase::Cs, PutLn(), and PutStr().

Referenced by TFPathNotify::OnStatus(), PutStrFmtLn(), TLAMisc::SaveMatlabTFltIntKdV(), and THist::SaveStat().

161  {
162  int Cs=PutStr(Str,ForceInLn); Cs+=PutLn(); return Cs;}
int PutLn(const int &Lns=1)
Definition: fl.cpp:158
int PutStr(const char *CStr)
Definition: fl.cpp:117
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

int TSOut::PutUInt ( const uint Int)

Definition at line 101 of file fl.cpp.

References TUInt::GetStr(), and PutStr().

101  {
102  return PutStr(TUInt::GetStr(UInt));
103 }
TStr GetStr() const
Definition: dt.h:1282
int PutStr(const char *CStr)
Definition: fl.cpp:117

Here is the call graph for this function:

int TSOut::PutUInt ( const uint Int,
const char *  FmtStr 
)

Definition at line 105 of file fl.cpp.

References TUInt::GetStr(), and PutStr().

105  {
106  return PutStr(TUInt::GetStr(UInt, FmtStr));
107 }
TStr GetStr() const
Definition: dt.h:1282
int PutStr(const char *CStr)
Definition: fl.cpp:117

Here is the call graph for this function:

void TSOut::Save ( const char &  Ch)
inline

Definition at line 174 of file fl.h.

References TSBase::Cs, and PutBf().

174 {Cs+=PutBf(&Ch, sizeof(Ch));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const uchar UCh)
inline

Definition at line 175 of file fl.h.

References TSBase::Cs, and PutBf().

175 {Cs+=PutBf(&UCh, sizeof(UCh));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const short &  Short)
inline

Definition at line 176 of file fl.h.

References TSBase::Cs, and PutBf().

176 {Cs+=PutBf(&Short, sizeof(Short));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const ushort UShort)
inline

Definition at line 177 of file fl.h.

References TSBase::Cs, and PutBf().

177 {Cs+=PutBf(&UShort, sizeof(UShort));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const int &  Int)
inline

Definition at line 178 of file fl.h.

References TSBase::Cs, and PutBf().

178 {Cs+=PutBf(&Int, sizeof(Int));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const uint UInt)
inline

Definition at line 179 of file fl.h.

References TSBase::Cs, and PutBf().

179 {Cs+=PutBf(&UInt, sizeof(UInt));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const int64 Int)
inline

Definition at line 180 of file fl.h.

References TSBase::Cs, and PutBf().

180 {Cs+=PutBf(&Int, sizeof(Int));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const uint64 UInt)
inline

Definition at line 181 of file fl.h.

References TSBase::Cs, and PutBf().

181 {Cs+=PutBf(&UInt, sizeof(UInt));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const double &  Flt)
inline

Definition at line 182 of file fl.h.

References TSBase::Cs, and PutBf().

182 {Cs+=PutBf(&Flt, sizeof(Flt));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const sdouble SFlt)
inline

Definition at line 183 of file fl.h.

References TSBase::Cs, and PutBf().

183 {Cs+=PutBf(&SFlt, sizeof(SFlt));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const ldouble LFlt)
inline

Definition at line 184 of file fl.h.

References TSBase::Cs, and PutBf().

184 {Cs+=PutBf(&LFlt, sizeof(LFlt));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const char *  CStr,
const TSize CStrLen 
)
inline

Definition at line 185 of file fl.h.

References TSBase::Cs, and PutBf().

185 {Cs+=PutBf(CStr, CStrLen+1);}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( const char *  CStr)

Definition at line 189 of file fl.cpp.

References TSBase::Cs, EAssertR, TSBase::GetSNm(), PutBf(), and Save().

189  {
190  int CStrLen=int(strlen(CStr));
191  EAssertR(CStrLen<=127, "Error writting stream '"+GetSNm()+"'.");
192  Save(char(CStrLen));
193  if (CStrLen>0){Cs+=PutBf(CStr, CStrLen);}
194 }
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
void Save(const bool &Bool)
Definition: fl.h:173
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
virtual TStr GetSNm() const
Definition: fl.cpp:20
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::Save ( TSIn SIn,
const TSize BfL = -1 
)

Definition at line 196 of file fl.cpp.

References TSIn::Eof(), Fail, TSIn::GetCh(), and Save().

196  {
197  Fail;
198  if (BfL==0){ //J: used to be ==-1
199  while (!SIn.Eof()){Save(SIn.GetCh());}
200  } else {
201  for (TSize BfC=0; BfC<BfL; BfC++){Save(SIn.GetCh());}
202  }
203 }
#define Fail
Definition: bd.h:238
virtual bool Eof()=0
size_t TSize
Definition: bd.h:58
void Save(const bool &Bool)
Definition: fl.h:173
virtual char GetCh()=0

Here is the call graph for this function:

void TSOut::Save ( const PSIn SIn,
const TSize BfL = -1 
)
inline

Definition at line 188 of file fl.h.

References Save().

Referenced by Save().

188 {Save(*SIn, BfL);}
void Save(const bool &Bool)
Definition: fl.h:173

Here is the call graph for this function:

Here is the caller graph for this function:

void TSOut::Save ( const void *  Bf,
const TSize BfL 
)
inline

Definition at line 189 of file fl.h.

References TSBase::Cs, and PutBf().

189 {Cs+=PutBf(Bf, BfL);}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

void TSOut::SaveBf ( const void *  Bf,
const TSize BfL 
)
inline

Definition at line 172 of file fl.h.

References TSBase::Cs, and PutBf().

Referenced by TMem::GetSIn(), TSparseGroup< TVal, GroupSize >::Save(), TMd5Sig::Save(), TMem::Save(), TB8Set::Save(), TB32Set::Save(), TBSet::Save(), TBigStrPool::Save(), TStrPool::Save(), TPackVec< TVal >::Save(), TMem::SaveMem(), TUniChInfo::SaveSChar(), TChA::SaveTxt(), TStr::SaveTxt(), and TUniChInfo::SaveUShort().

172 {Cs+=PutBf(Bf, BfL);}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

void TSOut::SaveCs ( )
inline

Definition at line 171 of file fl.h.

References TSBase::Cs, and PutBf().

Referenced by THashMP< TInt, TEdge >::Save(), THash< TPair, THash >::Save(), TUniCaseFolding::Save(), TBigStrPool::Save(), TStrPool::Save(), TStrHash< TInt, TBigStrPool >::Save(), TStrPool64::Save(), THashSet< TInt >::Save(), and TUniChDb::Save().

171 {Cs+=PutBf(&Cs, sizeof(Cs));}
virtual int PutBf(const void *LBf, const TSize &LBfL)=0
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

int TSOut::UpdateLnLen ( const int &  StrLen,
const bool &  ForceInLn = false 
)
private

Definition at line 70 of file fl.cpp.

References TSBase::Cs, LnLen, MxLnLen, and PutLn().

Referenced by PutStr().

70  {
71  int Cs=0;
72  if (MxLnLen!=-1){
73  if ((!ForceInLn)&&(LnLen+StrLen>MxLnLen)){Cs+=PutLn();}
74  LnLen+=StrLen;
75  }
76  return Cs;
77 }
int LnLen
Definition: fl.h:130
int PutLn(const int &Lns=1)
Definition: fl.cpp:158
int MxLnLen
Definition: fl.h:130
TCs Cs
Definition: fl.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class TPt< TSOut >
friend

Definition at line 209 of file fl.h.

Member Data Documentation

int TSOut::LnLen
private

Definition at line 130 of file fl.h.

Referenced by PutDosLn(), PutLn(), PutSep(), PutSepLn(), and UpdateLnLen().

int TSOut::MxLnLen
private

Definition at line 130 of file fl.h.

Referenced by PutSep(), and UpdateLnLen().

const PSOut TSOut::StdOut =PSOut(new TStdOut())
static

Definition at line 208 of file fl.h.

Referenced by THtmlHldV::THtmlHldV().


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