예제 #1
0
        //---------------------------------------------------------------------------

        /*  Add a callback object to the parser.
         *      \param a_pFunc Pointer to the intance of a parser callback object
         *      representing the function.
         *      \sa GetFunDef, functions
         *
         *      The parser takes ownership over the callback object.
         */
        public void DefineFun(ICallback fun)
        {
            if (IsFunDefined(fun.GetIdent()))
            {
                throw new ParserError(new ErrorContext(EErrorCodes.ecFUNOPRT_DEFINED, 0, fun.GetIdent()));
            }
            fun.SetParent(this);
            m_FunDef[fun.GetIdent()] = fun;
        }