lib

Kross::Api::Callable Class Reference

#include <callable.h>

Inheritance diagram for Kross::Api::Callable:

Kross::Api::Object Kross::Api::Event< T > Kross::Api::Event< EventAction > Kross::Api::Event< EventScript > Kross::Api::Event< EventSignal > Kross::Api::Event< EventSlot > Kross::Api::Event< Module > Kross::Api::Event< QtObject > Kross::Api::Class< T > Kross::Api::EventAction Kross::Api::EventScript Kross::Api::EventSignal Kross::Api::EventSlot Kross::Api::Class< Module > Kross::Api::Class< QtObject > Kross::Api::Module Kross::Api::QtObject Kross::Api::MainModule Kross::Api::Manager Kross::Api::ScriptContainer Kross::Api::ScriptAction List of all members.

Detailed Description

Base class for callable objects.

Classes like Event or Class are inherited from this class and implement the Object::call() method to handle the call.

Definition at line 41 of file callable.h.


Public Types

typedef KSharedPtr< CallablePtr

Public Member Functions

 Callable (const QString &name, Object::Ptr parent, const ArgumentList &arglist)
virtual ~Callable ()
virtual const QString getClassName () const
virtual Object::Ptr call (const QString &name, List::Ptr arguments)
Object::Ptr hasChild (List::Ptr args)
Object::Ptr getChild (List::Ptr args)
Object::Ptr getChildrenList (List::Ptr args)
Object::Ptr getChildrenDict (List::Ptr args)
Object::Ptr callChild (List::Ptr args)

Protected Attributes

ArgumentList m_arglist

Member Typedef Documentation

typedef KSharedPtr<Callable> Kross::Api::Callable::Ptr
 

Shared pointer to implement reference-counting.

Reimplemented from Kross::Api::Object.

Reimplemented in Kross::Api::EventAction, Kross::Api::EventScript, Kross::Api::EventSignal, Kross::Api::EventSlot, Kross::Api::Module, Kross::Api::QtObject, Kross::Api::MainModule, Kross::Api::ScriptAction, and Kross::Api::ScriptContainer.

Definition at line 48 of file callable.h.


Constructor & Destructor Documentation

Callable::Callable const QString &  name,
Object::Ptr  parent,
const ArgumentList arglist
 

Constructor.

Parameters:
name The name this callable object has and it is reachable as via Object::getChild() .
parent The parent Object this instance is child of.
arglist A list of arguments the callable object expects if it got called.

Definition at line 28 of file callable.cpp.

Callable::~Callable  )  [virtual]
 

Destructor.

Definition at line 34 of file callable.cpp.


Member Function Documentation

Object::Ptr Callable::call const QString &  name,
List::Ptr  arguments
[virtual]
 

Call the object.

Reimplemented in Kross::Api::Event< T >, Kross::Api::Event< EventSignal >, Kross::Api::Event< Module >, Kross::Api::Event< EventSlot >, Kross::Api::Event< EventAction >, Kross::Api::Event< EventScript >, and Kross::Api::Event< QtObject >.

Definition at line 43 of file callable.cpp.

Object::Ptr Callable::callChild List::Ptr  args  ) 
 

Wrapper for the Kross::Api::Object::call() method to call a children.

Definition at line 172 of file callable.cpp.

Object::Ptr Callable::getChild List::Ptr  args  ) 
 

Wrapper for the Kross::Api::Object::getChild() method to return a children this object has.

Definition at line 146 of file callable.cpp.

Object::Ptr Callable::getChildrenDict List::Ptr  args  ) 
 

Wrapper for the Kross::Api::Object::getChild() method to return a dictonary of children this object has.

Returns:
a Dict filled with the children.

Definition at line 166 of file callable.cpp.

Object::Ptr Callable::getChildrenList List::Ptr  args  ) 
 

Wrapper for the Kross::Api::Object::getChildren() method to return a list of childrennames this object has.

Returns:
a List filled with a list of names of the children this object has.

Definition at line 156 of file callable.cpp.

const QString Callable::getClassName  )  const [virtual]
 

Return the class name.

This could be something like "Kross::Api::Callable" for this object. The value is mainly used for display purposes.

Returns:
The name of this class.

Implements Kross::Api::Object.

Reimplemented in Kross::Api::EventAction, Kross::Api::EventScript, Kross::Api::EventSignal, Kross::Api::EventSlot, Kross::Api::QtObject, and Kross::Api::MainModule.

Definition at line 38 of file callable.cpp.

Object::Ptr Callable::hasChild List::Ptr  args  ) 
 

Wrapper for the Kross::Api::Object::hasChild() method to check if this object has children.

Definition at line 139 of file callable.cpp.


Member Data Documentation

ArgumentList Kross::Api::Callable::m_arglist [protected]
 

List of arguments this callable object supports.

Definition at line 123 of file callable.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys