Listing 4: Partial listing of CommandLine class implementation

CommandLine::CommandLine(int argc, char* argv[]) 
    throw (std::string)
    : mnParameterCount(0)
{
    ParseCommandLine(argc, argv);

    if (Exists("settings_file"))
    {
        std::string strInput = 
            LoadSettingsFile(GetByName("settings_file"));
        ParseSettings(strInput);
    }
}

CommandLine::CommandLine(int argc, char* argv[], 
    const std::string& strFileName) throw (std::string)
    : mnParameterCount(0)
{
    ParseCommandLine(argc, argv);

    std::string strInput = LoadSettingsFile(strFileName);
    ParseSettings(strInput);
}

CommandLine::CommandLine(const std::string& strFileName) 
    throw (std::string) : mnParameterCount(0)
{
    std::string strInput = LoadSettingsFile(strFileName);
    ParseSettings(strInput);
}




— End of Listing —