fix logic
[personal-kdelibs.git] / kjs / api / kjsarguments.h
blob1d5d85e3419454b3ddb76bc513a7aab4817fbdb5
1 /*
2 * This file is part of the KDE libraries
3 * Copyright (C) 2008 Harri Porten (porten@kde.org)
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
22 #ifndef KJSARGUMENTS_H
23 #define KJSARGUMENTS_H
25 #include "kjsapi_export.h"
26 #include "kjsobject.h"
28 class KJSArgumentsHandle;
29 class KJSCustomFunction;
31 /**
32 * A class representing a list of JavaScript arguments.
34 * @short Argument list
36 class KJSAPI_EXPORT KJSArguments
38 friend class KJSCustomFunction;
39 public:
40 /**
41 * Returns the number of arguments.
43 int count() const;
44 /**
45 * Returns the argument at the specified index. Accessing an
46 * argument outside of the valid range will return an object of
47 * type "undefined".
49 KJSObject at(int idx) const;
50 private:
51 KJSArguments(const KJSArguments&); // undefined
52 KJSArguments& operator=(const KJSArguments&); // undefined
54 KJSArguments(const KJSArgumentsHandle* h) : hnd(h) { }
55 const KJSArgumentsHandle* hnd;
58 #endif