Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

lispform.cpp

Go to the documentation of this file.
00001 // +-------------------------------------------------------------------------+
00002 // |               I__n__t__e__L__i__b           0.6.10 development          |
00003 // | Copyright (c) Andrey Vikt. Stolyarov <crocodil_AT_croco.net> 2000-2007. |
00004 // |                                                                         |
00005 // | This is free software. The library part is available under              |
00006 // |                               GNU LESSER GENERAL PUBLIC LICENSE v.2.1.  |
00007 // | GNU LGPL v2.1 is found in docs/gnu_gpl2.txt,  or at  http://www.gnu.org |
00008 // |     Please see also docs/readme.txt and visit http://www.intelib.org    |
00009 // |                                                                         |
00010 // | !!! THERE IS NO WARRANTY OF ANY KIND, NEITHER EXPRESSED NOR IMPLIED !!! |
00011 // +-------------------------------------------------------------------------+
00012 
00013 
00014 
00015 
00016 #include "../sexpress/sstring.hpp"
00017 #include "lispform.hpp"
00018 
00019 IntelibTypeId SExpressionFunction::TypeId(&SExpression::TypeId);
00020 IntelibTypeId SExpressionForm::TypeId(&SExpression::TypeId);
00021 
00023 
00024 void SExpressionFunction::Apply(int paramc, const SReference *paramv,
00025                                 IntelibContinuation &cont) const
00026 {
00027     if(min_param != -1 && paramc < min_param)
00028         throw IntelibX_too_few_params(this);
00029     if(max_param != -1 && paramc > max_param)
00030         throw IntelibX_too_many_params(this);
00031     DoApply(paramc, paramv, cont);
00032 }
00033 
00035 
00036 
00037 IntelibX_too_few_params::
00038 IntelibX_too_few_params(SReference a_param) 
00039     : IntelibX("to few params", a_param) {}
00040 
00041 IntelibX_too_many_params::
00042 IntelibX_too_many_params(SReference a_param) 
00043     : IntelibX("to many params", a_param) {}
00044 

Generated on Tue Dec 18 00:39:43 2007 for InteLib by  doxygen 1.4.1