My Project
|
#include <TransactionManager.h>
Classes | |
struct | Device |
class | Device_eq |
struct | Location |
class | Location_eq |
struct | SerialNumber |
class | SerialNumber_eq |
Public Member Functions | |
TransactionManager () | |
virtual | ~TransactionManager () |
void | readCatalog (std::string dir, std::string file) |
void | printDevices () |
void | printLocations () |
void | printSerialNumbers () |
void | printAll () |
void | clearCatalog () |
Device * | findDevice (std::string name) |
bool | isValidDevice (std::string name) |
bool | isValidSerialNumber (std::string device, std::string serial) |
bool | isValidLocation (std::string device, std::string location) |
Device * | addDevice (std::string name) |
Location * | addLocation (std::string name) |
SerialNumber * | addSerialNumber (std::string name) |
Static Public Member Functions | |
static int | notSeparatorChar (int c) |
A class for managing transactions
TransactionManager::TransactionManager | ( | ) |
Constructor.
....................................................................... Constructor.
|
virtual |
Destructor.
....................................................................... Destructor.
TransactionManager::Device * TransactionManager::addDevice | ( | std::string | name | ) |
....................................................................... Add a device to the list of known devices
TransactionManager::Location * TransactionManager::addLocation | ( | std::string | name | ) |
....................................................................... Add a location to the list of known locations
TransactionManager::SerialNumber * TransactionManager::addSerialNumber | ( | std::string | name | ) |
....................................................................... Add a serial number to the list of known serialNumbers
void TransactionManager::clearCatalog | ( | ) |
Clear the catalog
....................................................................... Clear the transaction catalog
TransactionManager::Device * TransactionManager::findDevice | ( | std::string | name | ) |
....................................................................... Find a device in the list of known devices
bool TransactionManager::isValidDevice | ( | std::string | name | ) |
....................................................................... Return true if this is a valid device
bool TransactionManager::isValidLocation | ( | std::string | deviceName, |
std::string | locationName | ||
) |
....................................................................... Return true if this is a valid location number/device pair
bool TransactionManager::isValidSerialNumber | ( | std::string | deviceName, |
std::string | serialName | ||
) |
....................................................................... Return true if this is a valid serial number/device pair
void TransactionManager::printAll | ( | ) |
Print the tree of device->location/serialNumbers
....................................................................... Print known devices
void TransactionManager::printDevices | ( | ) |
Print known devices
....................................................................... Print known devices
void TransactionManager::printLocations | ( | ) |
Print known locations
....................................................................... Print known locations for a device
void TransactionManager::printSerialNumbers | ( | ) |
Print known serialNumbers
....................................................................... Print known serial numbers
void TransactionManager::readCatalog | ( | std::string | dir, |
std::string | file | ||
) |
Read a transaction catalog
....................................................................... Read a transaction catalog from the input stream