Пример #1
0
std::string Path::toString(Style style) const
{
    switch (style)
    {
    case PATH_UNIX:
        return buildUnix();
    case PATH_WINDOWS:
        return buildWindows();
    case PATH_NATIVE:
    case PATH_GUESS:
        return toString();
    default:
        throw BadParameterException();
    }
    return std::string();
}
Пример #2
0
Path& Path::assign(const std::string& sPath, Style style)
{
    switch (style)
    {
    case PATH_UNIX:
        parseUnix(sPath);
        break;
    case PATH_WINDOWS:
        parseWindows(sPath);
        break;
    case PATH_NATIVE:
        assign(sPath);
        break;
    case PATH_GUESS:
        parseGuess(sPath);
        break;
    default:
        throw BadParameterException();
    }
    return *this;
}
Пример #3
0
void    Instruction::AInstruction::addParameter(const std::string &param)
{
  throw BadParameterException(param + " - this instruction does not need parameter");
}