lib

module.h
1/***************************************************************************
2 * module.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program 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.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KROSS_API_MODULE_H
21#define KROSS_API_MODULE_H
22
23#include <tqstring.h>
24
25#include "class.h"
26
27namespace Kross { namespace Api {
28
34 class Module : public Class<Module>
35 {
36 public:
37
41 typedef TDESharedPtr<Module> Ptr;
42
51 explicit Module(const TQString& name)
52 : Class<Module>(name)
53 {
54 krossdebug( TQString("Kross::Api::Module %1 created").arg(name) );
55 }
56
60 virtual ~Module()
61 {
62 krossdebug( TQString("Kross::Api::Module %1 destroyed").arg(getName()) );
63 }
64
69 virtual Kross::Api::Object::Ptr get(const TQString& /*name*/, void* /*pointer*/ = 0)
70 {
71 return 0;
72 }
73
74 };
75
76
77}}
78
79#endif
80
const TQString getName() const
Definition callable.cpp:38
Class(const TQString &name)
Definition class.h:58
virtual ~Module()
Destructor.
Definition module.h:60
virtual Kross::Api::Object::Ptr get(const TQString &, void *=0)
Method to load from Kross::Api::Object inherited classes this module implements from within other mod...
Definition module.h:69
Module(const TQString &name)
Constructor.
Definition module.h:51
TDESharedPtr< Module > Ptr
Shared pointer to implement reference-counting.
Definition module.h:41
TDESharedPtr< Object > Ptr
Shared pointer to implement reference-counting.
Definition object.h:57
The common Kross API used as common codebase.
Definition callable.h:31
The Kross scripting bridge to embed scripting functionality into an application.
Definition callable.h:31
void krossdebug(const TQString &s)
Debugging function.