OpenBarnyard
 
Loading...
Searching...
No Matches
TFileManager::TSysPathIter Class Reference

#include <TFile.h>

Public Member Functions

 TSysPathIter (const TString8 &str)
 
 TSysPathIter (const TSysPathIter &other)
 
TBOOL First (TString8 &path)
 
TBOOL Next (TString8 &path)
 

Detailed Description

Definition at line 236 of file TFile.h.

Constructor & Destructor Documentation

◆ TSysPathIter() [1/2]

TFileManager::TSysPathIter::TSysPathIter ( const TString8 & str)

Definition at line 216 of file TFileManager.cpp.

217 : m_String( str ), m_Position( -1 )
218{
219}

◆ TSysPathIter() [2/2]

TFileManager::TSysPathIter::TSysPathIter ( const TSysPathIter & other)

Definition at line 221 of file TFileManager.cpp.

222 : m_String( other.m_String ), m_Position( other.m_Position )
223{
224}

Member Function Documentation

◆ First()

TBOOL TFileManager::TSysPathIter::First ( TString8 & path)

Definition at line 226 of file TFileManager.cpp.

227{
228 if ( m_String.Length() > 0 )
229 {
230 m_Position = m_String.Find( ';', 0 );
231 path.Copy( m_String, m_Position );
232
233 return TTRUE;
234 }
235 else
236 {
237 m_Position = -1;
238 return TFALSE;
239 }
240}
#define TFALSE
Definition Typedefs.h:24
#define TTRUE
Definition Typedefs.h:25
void Copy(const TString8 &src, TINT size=-1)
Definition TString8.h:32

◆ Next()

TBOOL TFileManager::TSysPathIter::Next ( TString8 & path)

Definition at line 242 of file TFileManager.cpp.

243{
244 if ( m_Position >= 0 )
245 {
246 TINT strStart = m_Position + 1;
247 m_Position = m_String.Find( ';', strStart );
248
249 path.Copy(
250 m_String.GetString( strStart ),
251 ( m_Position >= 0 ) ? ( m_Position - strStart ) : -1
252 );
253
254 return TTRUE;
255 }
256 else
257 {
258 return TFALSE;
259 }
260}
int TINT
Definition Typedefs.h:7

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