00001 /*------------------------------------------------------------*- c++ -*-\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \-----------------------------------------------------------------------/ 00012 00013 File: Y2SystemNamespace.h 00014 a wrapper interface for accessing a LiMaL namespace 00015 (configurable via SCROpen/SCRClose) 00016 00017 Author: Stanislav Visnovsky <visnov@suse.cz> 00018 Maintainer: Stanislav Visnovsky <visnov@suse.cz> 00019 00020 /-*/ 00021 00022 #ifndef Y2SystemNamespace_h 00023 #define Y2SystemNamespace_h 00024 00025 #include <y2/Y2Namespace.h> 00026 #include <y2/Y2Function.h> 00027 00028 class Y2ProgramComponent; 00029 class Y2SystemFunction; 00030 00031 class Y2SystemNamespace : public Y2Namespace { 00032 00033 Y2Namespace* m_local_ns; 00034 Y2ProgramComponent* m_remote_sender; 00035 bool m_use_remote; 00036 00037 vector<Y2SystemFunction*> m_functions; 00038 00039 string m_name; 00040 00041 friend class Y2SystemFunction; 00042 00043 public: 00044 Y2SystemNamespace (Y2Namespace* local_ns); 00045 00046 virtual ~Y2SystemNamespace(); 00047 00049 virtual const string name () const; 00050 00051 virtual const string filename () const; 00052 00053 virtual YCPValue evaluate(bool); 00054 00064 virtual Y2Function* createFunctionCall (const string name, constFunctionTypePtr type); 00065 00066 void useRemote (Y2ProgramComponent* sender); 00067 00068 void useLocal (); 00069 }; 00070 00071 00072 #endif // Y2SystemNamespace_h