| # kjs Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# function_object.h

    00001 // -*- c-basic-offset: 2 -*-
    00002 /*
    00003  *  This file is part of the KDE libraries
    00004  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
    00005  *
    00006  *  This library is free software; you can redistribute it and/or
    00007  *  modify it under the terms of the GNU Lesser General Public
    00008  *  License as published by the Free Software Foundation; either
    00009  *  version 2 of the License, or (at your option) any later version.
    00010  *
    00011  *  This library is distributed in the hope that it will be useful,
    00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014  *  Lesser General Public License for more details.
    00015  *
    00016  *  You should have received a copy of the GNU Lesser General Public
    00017  *  License along with this library; if not, write to the Free Software
    00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00019  *
    00020  *  $Id: function_object.h,v 1.12.2.1 2003/05/17 11:19:24 mueller Exp $
    00021  */
    00022
    00023 #ifndef _FUNCTION_OBJECT_H_
    00024 #define _FUNCTION_OBJECT_H_
    00025
    00026 #include "internal.h"
    00027 #include "object_object.h"
    00028 #include "function.h"
    00029
    00030 namespace KJS {
    00031
    00038   class FunctionPrototypeImp : public InternalFunctionImp {
    00039   public:
    00040     FunctionPrototypeImp(ExecState *exec);
    00041     virtual ~FunctionPrototypeImp();
    00042
    00043     virtual bool implementsCall() const;
    00044     virtual Value call(ExecState *exec, Object &thisObj, const List &args);
    00045   };
    00046
    00053   class FunctionProtoFuncImp : public InternalFunctionImp {
    00054   public:
    00055     FunctionProtoFuncImp(ExecState *exec,
    00056                         FunctionPrototypeImp *funcProto, int i, int len);
    00057
    00058     virtual bool implementsCall() const;
    00059     virtual Value call(ExecState *exec, Object &thisObj, const List &args);
    00060
    00061     enum { ToString, Apply, Call };
    00062   private:
    00063     int id;
    00064   };
    00065
    00071   class FunctionObjectImp : public InternalFunctionImp {
    00072   public:
    00073     FunctionObjectImp(ExecState *exec, FunctionPrototypeImp *funcProto);
    00074     virtual ~FunctionObjectImp();
    00075
    00076     virtual bool implementsConstruct() const;
    00077     virtual Object construct(ExecState *exec, const List &args);
    00078     virtual bool implementsCall() const;
    00079     virtual Value call(ExecState *exec, Object &thisObj, const List &args);
    00080   };
    00081
    00082 } // namespace
    00083
    00084 #endif // _FUNCTION_OBJECT_H_

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:08:22 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001