BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Private Member Functions | Private Attributes
BDSMySQLWrapper Class Reference

Wrapper for mysql file handling. More...

#include <BDSMySQLWrapper.hh>

Collaboration diagram for BDSMySQLWrapper:
Collaboration graph

Public Member Functions

 BDSMySQLWrapper (const G4String &SQLFileName)
 
std::vector< BDSMySQLTable * > ConstructTable ()
 
G4int GetComponentN ()
 

Data Fields

std::vector< BDSMySQLTable * > table
 

Private Member Functions

void ReadLine ()
 
void RemoveCommentsFromLine (std::string &value)
 
void RemoveQuotesFromLine (std::string &value)
 
void RemoveWhitespace (std::string &)
 
void RemoveWhitespace (G4String &)
 
void TokenizeLine ()
 
void BeginTokens ()
 
bool NextToken ()
 
bool NextInputToken ()
 
bool EndTokens ()
 
std::string Token ()
 
bool EndOfLine ()
 
bool EmptyToken ()
 
void ProceedToEndOfLine ()
 
G4int ParseComponent ()
 
void Create ()
 
void CreateDatabase ()
 
void CreateTable ()
 
void Insert ()
 
void InsertInto ()
 
void Values ()
 

Private Attributes

std::ifstream ifs
 
G4String CurrentTableName
 
G4String InsertTableName
 
G4int ComponentN
 
G4int tableN
 
std::vector< std::string > _tokens
 
std::vector< std::string >::iterator _tokens_iter
 
std::string _currentLine
 
bool _startOfFile
 

Detailed Description

Wrapper for mysql file handling.

Author
John Carter

Definition at line 49 of file BDSMySQLWrapper.hh.

Constructor & Destructor Documentation

◆ BDSMySQLWrapper()

BDSMySQLWrapper::BDSMySQLWrapper ( const G4String &  SQLFileName)
explicit

Definition at line 39 of file BDSMySQLWrapper.cc.

◆ ~BDSMySQLWrapper()

BDSMySQLWrapper::~BDSMySQLWrapper ( )

Definition at line 57 of file BDSMySQLWrapper.cc.

Member Function Documentation

◆ BeginTokens()

void BDSMySQLWrapper::BeginTokens ( )
private

Definition at line 250 of file BDSMySQLWrapper.cc.

◆ ConstructTable()

std::vector< BDSMySQLTable * > BDSMySQLWrapper::ConstructTable ( )

Definition at line 60 of file BDSMySQLWrapper.cc.

◆ Create()

void BDSMySQLWrapper::Create ( )
private

Definition at line 196 of file BDSMySQLWrapper.cc.

◆ CreateDatabase()

void BDSMySQLWrapper::CreateDatabase ( )
private

Definition at line 151 of file BDSMySQLWrapper.cc.

◆ CreateTable()

void BDSMySQLWrapper::CreateTable ( )
private

Definition at line 154 of file BDSMySQLWrapper.cc.

◆ EmptyToken()

bool BDSMySQLWrapper::EmptyToken ( )
private

Definition at line 276 of file BDSMySQLWrapper.cc.

◆ EndOfLine()

bool BDSMySQLWrapper::EndOfLine ( )
private

Definition at line 271 of file BDSMySQLWrapper.cc.

◆ EndTokens()

bool BDSMySQLWrapper::EndTokens ( )
private

Definition at line 266 of file BDSMySQLWrapper.cc.

◆ GetComponentN()

G4int BDSMySQLWrapper::GetComponentN ( )
inline

Definition at line 57 of file BDSMySQLWrapper.hh.

◆ Insert()

void BDSMySQLWrapper::Insert ( )
private

Definition at line 206 of file BDSMySQLWrapper.cc.

◆ InsertInto()

void BDSMySQLWrapper::InsertInto ( )
private

Definition at line 214 of file BDSMySQLWrapper.cc.

◆ NextInputToken()

bool BDSMySQLWrapper::NextInputToken ( )
private

Definition at line 254 of file BDSMySQLWrapper.cc.

◆ NextToken()

bool BDSMySQLWrapper::NextToken ( )
private

Definition at line 114 of file BDSMySQLWrapper.cc.

◆ ParseComponent()

G4int BDSMySQLWrapper::ParseComponent ( )
private

Definition at line 137 of file BDSMySQLWrapper.cc.

◆ ProceedToEndOfLine()

void BDSMySQLWrapper::ProceedToEndOfLine ( )
private

Definition at line 286 of file BDSMySQLWrapper.cc.

◆ ReadLine()

void BDSMySQLWrapper::ReadLine ( )
private

Definition at line 299 of file BDSMySQLWrapper.cc.

◆ RemoveCommentsFromLine()

void BDSMySQLWrapper::RemoveCommentsFromLine ( std::string &  value)
private

Definition at line 315 of file BDSMySQLWrapper.cc.

◆ RemoveQuotesFromLine()

void BDSMySQLWrapper::RemoveQuotesFromLine ( std::string &  value)
private

Definition at line 322 of file BDSMySQLWrapper.cc.

◆ RemoveWhitespace() [1/2]

void BDSMySQLWrapper::RemoveWhitespace ( G4String &  val)
private

Definition at line 328 of file BDSMySQLWrapper.cc.

◆ RemoveWhitespace() [2/2]

void BDSMySQLWrapper::RemoveWhitespace ( std::string &  val)
private

Definition at line 334 of file BDSMySQLWrapper.cc.

◆ Token()

std::string BDSMySQLWrapper::Token ( )
private

Definition at line 281 of file BDSMySQLWrapper.cc.

◆ TokenizeLine()

void BDSMySQLWrapper::TokenizeLine ( )
private

Definition at line 69 of file BDSMySQLWrapper.cc.

◆ Values()

void BDSMySQLWrapper::Values ( )
private

Definition at line 221 of file BDSMySQLWrapper.cc.

Field Documentation

◆ _currentLine

std::string BDSMySQLWrapper::_currentLine
private

Definition at line 99 of file BDSMySQLWrapper.hh.

◆ _startOfFile

bool BDSMySQLWrapper::_startOfFile
private

Definition at line 100 of file BDSMySQLWrapper.hh.

◆ _tokens

std::vector<std::string> BDSMySQLWrapper::_tokens
private

Definition at line 79 of file BDSMySQLWrapper.hh.

◆ _tokens_iter

std::vector<std::string>::iterator BDSMySQLWrapper::_tokens_iter
private

Definition at line 80 of file BDSMySQLWrapper.hh.

◆ ComponentN

G4int BDSMySQLWrapper::ComponentN
private

Definition at line 69 of file BDSMySQLWrapper.hh.

◆ CurrentTableName

G4String BDSMySQLWrapper::CurrentTableName
private

Definition at line 67 of file BDSMySQLWrapper.hh.

◆ ifs

std::ifstream BDSMySQLWrapper::ifs
private

Definition at line 65 of file BDSMySQLWrapper.hh.

◆ InsertTableName

G4String BDSMySQLWrapper::InsertTableName
private

Definition at line 68 of file BDSMySQLWrapper.hh.

◆ table

std::vector<BDSMySQLTable*> BDSMySQLWrapper::table

Definition at line 59 of file BDSMySQLWrapper.hh.

◆ tableN

G4int BDSMySQLWrapper::tableN
private

Definition at line 71 of file BDSMySQLWrapper.hh.


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