|
yast2-core
|
00001 /*------------------------------------------------------------*- c++ -*-\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \-----------------------------------------------------------------------/ 00012 00013 File: Y2Function.h 00014 a generic interface for calling a function from a namespace 00015 00016 Author: Stanislav Visnovsky <visnov@suse.cz> 00017 Maintainer: Stanislav Visnovsky <visnov@suse.cz> 00018 00019 /-*/ 00020 00021 #ifndef Y2Function_h 00022 #define Y2Function_h 00023 00024 #include <string> 00025 using std::string; 00026 00027 #include "ycp/YCPValue.h" 00028 #include "ycp/Type.h" 00029 00071 class Y2Function { 00072 00073 public: 00078 virtual ~Y2Function () {}; 00079 00084 virtual bool attachParameter (const YCPValue& arg, const int position) = 0; 00085 00092 virtual constTypePtr wantedParameterType () const = 0; 00093 00098 virtual bool appendParameter (const YCPValue& arg) = 0; 00099 00104 virtual bool finishParameters () = 0; 00105 00109 virtual YCPValue evaluateCall () = 0; 00110 00115 virtual bool reset () = 0; 00116 00117 virtual string name () const = 0; 00118 }; 00119 00120 #endif // Y2Function_h
1.7.3