⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 except.cpp

📁 表达式计算expression evaluate expression evaluate expression evaluate
💻 CPP
字号:
/******************************************************************************
文件名          :Except.cpp
版本号          : 1.0
作者            : Amos Peng
生成日期        :2008-07-08
最近修改        :
功能描述        :常量
函数列表        :

*******************************************************************************/
using namespace ExprEval;


// Default/unknown ExprEval exception
//------------------------------------------------------------------------------
CException::CException() :
        m_start((::std::string::size_type)-1),
        m_end((::std::string::size_type)-1)
{
    m_type = Type_Exception;
}

CException::~CException() throw()
{
}

CException::Type CException::GetType() const
{
    return m_type;
}

const ::std::string& CException::GetValue() const
{
    return m_value;
}

void CException::SetStart(::std::string::size_type start)
{
    m_start = start;
}

void CException::SetEnd(::std::string::size_type end)
{
    m_end = end;
}

::std::string::size_type CException::GetStart() const
{
    return m_start;
}

::std::string::size_type CException::GetEnd() const
{
    return m_end;
}

// Not found exception
//------------------------------------------------------------------------------
CNotFoundException::CNotFoundException(const ::std::string &name)
{
    m_type = Type_NotFoundException;
    m_value = name;
}

// Already exists exception
//------------------------------------------------------------------------------
CAlreadyExistsException::CAlreadyExistsException(const ::std::string &name)
{
    m_type = Type_AlreadyExistsException;
    m_value = name;
}

// Null pointer exception
//------------------------------------------------------------------------------
CNullPointerException::CNullPointerException(const ::std::string &method)
{
    m_type = Type_NullPointerException;
    m_value = method;
}

// Math error exception
//------------------------------------------------------------------------------
CMathException::CMathException(const ::std::string &function)
{
    m_type = Type_MathException;
    m_value = function;
}

// Divide by zero
//------------------------------------------------------------------------------
CDivideByZeroException::CDivideByZeroException()
{
    m_type = Type_DivideByZeroException;
}

// No value list found during parsing
//------------------------------------------------------------------------------
CNoValueListException::CNoValueListException()
{
    m_type = Type_NoValueListException;
}

// No function list found during parsing
//------------------------------------------------------------------------------
CNoFunctionListException::CNoFunctionListException()
{
    m_type = Type_NoFunctionListException;
}

// Expression abort
//------------------------------------------------------------------------------
CAbortException::CAbortException()
{
    m_type = Type_AbortException;
}

// Empty expression
//------------------------------------------------------------------------------
CEmptyExpressionException::CEmptyExpressionException()
{
    m_type = Type_EmptyExpressionException;
}

// Unknown token found during parsing
//------------------------------------------------------------------------------
CUnknownTokenException::CUnknownTokenException()
{
    m_type = Type_UnknownTokenException;
}

// Invalid argument count
//------------------------------------------------------------------------------
CInvalidArgumentCountException::CInvalidArgumentCountException(const ::std::string &function)
{
    m_type = Type_InvalidArgumentCountException;
    m_value = function;
}

// Assign to constant
//------------------------------------------------------------------------------
CConstantAssignException::CConstantAssignException(const ::std::string &value)
{
    m_type = Type_ConstantAssignException;
    m_value = value;
}

// Pass constant by reference
//------------------------------------------------------------------------------
CConstantReferenceException::CConstantReferenceException(const ::std::string &value)
{
    m_type = Type_ConstantReferenceException;
    m_value = value;
}

// Syntax error exception
//------------------------------------------------------------------------------
CSyntaxException::CSyntaxException()
{
    m_type = Type_SyntaxException;
}

// Unmatched parenthesis
//------------------------------------------------------------------------------
CUnmatchedParenthesisException::CUnmatchedParenthesisException()
{
    m_type = Type_UnmatchedParenthesisException;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -