MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / cDbDataSourceIter

Method cDbDataSourceIter

src/tw/dbdatasource.cpp:52–72  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// ctor //////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

50// ctor
51///////////////////////////////////////////////////////////////////////////////
52cDbDataSourceIter::cDbDataSourceIter(cHierDatabase* pDb, int genreNum)
53 : iFCODataSourceIter(), mDbIter(pDb), mFlags(0), mpErrorBucket(0)
54{
55 //
56 // remember the fco creation function...
57 // TODO -- Note that this couples this file with cGenreSwitcher; perhaps this should take the fco creation
58 // function instead...
59 //
60 if (genreNum == -1)
61 genreNum = cGenreSwitcher::GetInstance()->CurrentGenre();
62 mFCOCreateFunc = cGenreSwitcher::GetInstance()->GetFactoryForGenre((cGenre::Genre)genreNum)->GetCreateFunc();
63
64#ifdef DEBUG
65 //
66 // make some assertions about the current genre's name info
67 //
68 iFCONameInfo* pNameInfo = cGenreSwitcher::GetInstance()->GetFactoryForGenre((cGenre::Genre)genreNum)->GetNameInfo();
69 ASSERT(pDb->IsCaseSensitive() == pNameInfo->IsCaseSensitive());
70 ASSERT(pDb->GetDelimitingChar() == pNameInfo->GetDelimitingChar());
71#endif //#ifdef DEBUG
72}
73
74///////////////////////////////////////////////////////////////////////////////
75// cDbDataSourceIter

Callers

nothing calls this directly

Calls 6

CurrentGenreMethod · 0.80
GetCreateFuncMethod · 0.80
GetFactoryForGenreMethod · 0.80
GetNameInfoMethod · 0.80
IsCaseSensitiveMethod · 0.45
GetDelimitingCharMethod · 0.45

Tested by

no test coverage detected