SNAP Library, Developer Reference  2012-10-15 15:06:59
SNAP, a general purpose network analysis and graph mining library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
xfl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TDir
class  TFPathNotify

Functions

 TFFileDesc ()
static PFFileDesc New ()
 ~TFFileDesc ()
 TFFileDesc (TSIn &)
static PFFileDesc Load (TSIn &SIn)
void Save (TSOut &)
TFFileDescoperator= (const TFFileDesc &)
TStr GetFBase () const
bool IsDir () const
 UndefDefaultCopyAssign (TFFile)
 TFFile (const TStr &_FNmWc, const bool &_RecurseP=false)
 TFFile (const TStr &_FPath, const TStr &_FExt, const bool &_RecurseP=false)
 TFFile (const TStrV &_FPathV, const TStrV &_FExtV, const TStr &_FBaseWc, const bool &_RecurseP)
static PFFile New (const TStr &FNmWc, const bool &RecurseP)
static PFFile New (const TStrV &FPathV, const TStrV &FExtV, const TStr FBaseWc, const bool &RecurseP)
static PFFile New (const TStr &FPath, const TStr &FExt, const bool &RecurseP)
 ~TFFile ()
 TFFile (TSIn &)
bool Next (TStr &FNm)
bool Next ()
TStr GetFNm () const
int GetFNmN () const
static void GetFNmV (const TStr &FPath, const TStrV &FExtV, const bool &RecurseP, TStrV &FNmV)

Variables

ClassTP(TFFileDesc, PFFileDesc)
public dirent * 
DirEnt
ClassTP(TFFile, PFFile)
private TStr 
FBaseWc
bool CsImpP
bool RecurseP
int FPathN
PFFileDesc FFileDesc
PFFile SubFFile
TStr CurFNm
int CurFNmN

Function Documentation

TStr GetFBase ( ) const
TStr GetFNm ( ) const

Definition at line 59 of file xfl.h.

References CurFNm.

{return CurFNm;}
int GetFNmN ( ) const

Definition at line 60 of file xfl.h.

References CurFNmN.

{return CurFNmN;}
void TFFile::GetFNmV ( const TStr FPath,
const TStrV FExtV,
const bool &  RecurseP,
TStrV FNmV 
) [static]

Definition at line 215 of file xfl.cpp.

References TVec< TVal >::Add(), TVec< TVal >::Clr(), FNm, and TFFile().

                                                                          {
  // prepare file-directory traversal
  TStrV FPathV; FPathV.Add(FPath);
  TFFile FFile(FPathV, FExtV, "", RecurseP); TStr FNm;
  // traverse directory
  FNmV.Clr();
  while (FFile.Next(FNm)){
    FNmV.Add(FNm);
  }
}

Here is the call graph for this function:

static PFFile Load ( TSIn SIn) [static]

Definition at line 17 of file xfl.h.

References TFFileDesc().

{return new TFFileDesc(SIn);}

Here is the call graph for this function:

static PFFileDesc New ( ) [static]

Definition at line 14 of file xfl.h.

References TFFileDesc().

{return PFFileDesc(new TFFileDesc());}

Here is the call graph for this function:

static PFFile New ( const TStr FNmWc,
const bool &  RecurseP 
) [static]

Definition at line 45 of file xfl.h.

References TFFile().

                                                            {
    return PFFile(new TFFile(FNmWc, RecurseP));}

Here is the call graph for this function:

static PFFile New ( const TStrV FPathV,
const TStrV FExtV,
const TStr  FBaseWc,
const bool &  RecurseP 
) [static]

Definition at line 47 of file xfl.h.

References TFFile().

                                            {
    return PFFile(new TFFile(FPathV, FExtV, FBaseWc, RecurseP));}

Here is the call graph for this function:

static PFFile New ( const TStr FPath,
const TStr FExt,
const bool &  RecurseP 
) [static]

Definition at line 50 of file xfl.h.

References TFFile().

                                                                              {
    return PFFile(new TFFile(FPath, FExt, RecurseP));}

Here is the call graph for this function:

bool Next ( TStr FNm)
bool Next ( )

Definition at line 58 of file xfl.h.

References FNm, and Next().

Referenced by TBreathFS< PGraph >::GetRndPath(), Next(), TVec< TVal >::NextPerm(), TVec< TVal >::PrevPerm(), and THash< TKey, TDat, THashFunc >::Sort().

{TStr FNm; return Next(FNm);}

Here is the call graph for this function:

Here is the caller graph for this function:

TFFileDesc& operator= ( const TFFileDesc )

Definition at line 20 of file xfl.h.

References Fail.

{Fail; return *this;}
void Save ( TSOut )

Definition at line 18 of file xfl.h.

References Fail.

{Fail;}
TFFile::TFFile ( const TStr _FNmWc,
const bool &  _RecurseP = false 
)

Definition at line 37 of file xfl.cpp.

References CsImpP, FBaseWc, TStr::GetFBase(), TStr::GetFPath(), TStr::GetNrFPath(), and TStr::ToUc().

Referenced by TFile::DelWc(), GetFNmV(), New(), and TNcpGraphsBase::TNcpGraphsBase().

                                                      :
  FPathV(), FExtV(), FBaseWc(),
  CsImpP(false), RecurseP(_RecurseP), FPathN(0-1),
  FFileDesc(TFFileDesc::New()), SubFFile(), CurFNm(), CurFNmN(0-1){
  // prepare file-base-name wild-card
  FBaseWc=FNmWc.GetFBase(); if (!CsImpP){FBaseWc.ToUc();}
  // get & assign file-name
  TStr FPath=FNmWc.GetFPath();
  FPathV.Add(TStr::GetNrFPath(FPath));
}

Here is the call graph for this function:

Here is the caller graph for this function:

TFFile::TFFile ( const TStr _FPath,
const TStr _FExt,
const bool &  _RecurseP = false 
)

Definition at line 48 of file xfl.cpp.

References CsImpP, TStr::Empty(), TStr::GetNrFExt(), and TStr::GetNrFPath().

                                                                          :
  FPathV(), FExtV(), FBaseWc(),
  CsImpP(false), RecurseP(_RecurseP), FPathN(0-1),
  FFileDesc(TFFileDesc::New()), SubFFile(), CurFNm(), CurFNmN(0-1){
  FPathV.Add(TStr::GetNrFPath(_FPath));
  if (!_FExt.Empty()){
    FExtV.Add(TStr::GetNrFExt(_FExt));
    if (!CsImpP){FExtV.Last().ToUc();}
  }
}

Here is the call graph for this function:

TFFile::TFFile ( const TStrV _FPathV,
const TStrV _FExtV,
const TStr _FBaseWc,
const bool &  _RecurseP 
)

Definition at line 59 of file xfl.cpp.

References CsImpP, FBaseWc, FPathN, TStr::GetNrFExt(), TStr::GetNrFPath(), and TStr::ToUc().

                       :
  FPathV(_FPathV), FExtV(_FExtV), FBaseWc(_FBaseWc),
  CsImpP(false), RecurseP(_RecurseP), FPathN(0-1),
  FFileDesc(TFFileDesc::New()), SubFFile(), CurFNm(), CurFNmN(0-1){
  // prepare file-paths
  for (int FPathN=0; FPathN<FPathV.Len(); FPathN++){
    FPathV[FPathN]=TStr::GetNrFPath(FPathV[FPathN]);}
  // prepare file-extensions
  for (int FExtN=0; FExtN<FExtV.Len(); FExtN++){
    FExtV[FExtN]=TStr::GetNrFExt(FExtV[FExtN]);
    if (!CsImpP){FExtV[FExtN].ToUc();}
  }
  // prepare file-base wild-card
  if (!CsImpP){FBaseWc.ToUc();}
}

Here is the call graph for this function:

TFFile ( TSIn )

Definition at line 53 of file xfl.h.

References Fail.

{Fail;}

Referenced by Load(), and New().

Here is the caller graph for this function:

TFFileDesc ( TSIn )

Definition at line 16 of file xfl.h.

References Fail.

{Fail;}
~TFFile ( )
~TFFileDesc ( )

Variable Documentation

bool CsImpP

Definition at line 32 of file xfl.h.

Referenced by TFFile().

Definition at line 37 of file xfl.h.

Referenced by GetFNm().

int CurFNmN

Definition at line 38 of file xfl.h.

Referenced by GetFNmN().

ClassTP (TFFileDesc, PFFileDesc) public dirent* DirEnt

Definition at line 3 of file xfl.h.

ClassTP (TFFile, PFFile) private TStr FBaseWc

Definition at line 28 of file xfl.h.

Referenced by TFFile().

PFFileDesc FFileDesc

Definition at line 35 of file xfl.h.

Referenced by IsDir().

int FPathN

Definition at line 34 of file xfl.h.

Referenced by TFFile().

bool RecurseP

Definition at line 33 of file xfl.h.

PFFile SubFFile

Definition at line 36 of file xfl.h.