Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

Y2ScriptComponent Class Reference

#include <Y2ScriptComponent.h>

Inheritance diagram for Y2ScriptComponent:

Y2Component List of all members.

Public Member Functions

 Y2ScriptComponent ()
void setupComponent (string client_name, string fullname, const YCPValue &script)
 ~Y2ScriptComponent ()
virtual string name () const
virtual YCPValue evaluate (const YCPValue &command)
virtual YCPValue doActualWork (const YCPList &arglist, Y2Component *user_interface)
virtual Y2Namespaceimport (const char *name_space)

Static Public Member Functions

Y2ScriptComponentinstance ()

Private Member Functions

Y2Componentwfm_instance ()

Private Attributes

YCPValue script
string client_name
string fullname
Y2Componentm_wfm

Static Private Attributes

Y2ScriptComponentm_instance = NULL

Constructor & Destructor Documentation

Y2ScriptComponent::Y2ScriptComponent  ) 
 

Y2ScriptComponent::~Y2ScriptComponent  ) 
 

Cleans up


Member Function Documentation

YCPValue Y2ScriptComponent::doActualWork const YCPList arglist,
Y2Component user_interface
[virtual]
 

Implements the communication with the server component. It delegates it to the workflowmanager component.

Reimplemented from Y2Component.

YCPValue Y2ScriptComponent::evaluate const YCPValue command  )  [virtual]
 

Only used for callbacks.

Reimplemented from Y2Component.

Y2Namespace * Y2ScriptComponent::import const char *  name_space  )  [virtual]
 

Try to import a given namespace. This method is used for transparent handling of namespaces (YCP modules) through whole YaST. NOTICE: there is no reverse operation to import. Semantics of YCP modules is there is a single instance and it is available from the first import until the end of YaST run.

Parameters:
name_space the name of the required namespace
Returns:
on errors, NULL should be returned. The error reporting must be done by the component itself (typically using y2log). On success, the method should return a proper instance of the imported namespace ready to be used. The returned instance is still owned by the component, any other part of YaST will try to free it. Thus, it's possible to share the instance.

Reimplemented from Y2Component.

Y2ScriptComponent * Y2ScriptComponent::instance  )  [static]
 

string Y2ScriptComponent::name  )  const [virtual]
 

Returns the name of the component the script implements.

Implements Y2Component.

void Y2ScriptComponent::setupComponent string  client_name,
string  fullname,
const YCPValue script
 

Setups this script component.

Parameters:
the name of the component that is realized be the script.
script the script. This component clones it, so you can destroy the script after the constructor call.

Y2Component * Y2ScriptComponent::wfm_instance  )  [private]
 


Member Data Documentation

string Y2ScriptComponent::client_name [private]
 

The name of the client that is implemented by the script.

string Y2ScriptComponent::fullname [private]
 

The fullname of the script file.

Y2ScriptComponent * Y2ScriptComponent::m_instance = NULL [static, private]
 

Y2Component* Y2ScriptComponent::m_wfm [private]
 

YCPValue Y2ScriptComponent::script [private]
 

The script that implements the component.


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 18:15:24 2007 for yast2-core by doxygen 1.3.6