Go to the source code of this file.
Compounds | |
class | GetClassInstance |
Callback class for retrieving a new instance of the class. More... | |
Defines | |
#define | BEGIN_NAMESPACE(ns) namespace ns { |
#define | decl_dynamic(classname) |
#define | impl_dynamic(classname, bases) |
#define | impl_abstract(classname, bases) Class classname::class_##classname (#classname, #bases, NULL);\ |
#define | newobj(classname) ((classname*) & ClassLib::getinstance(#classname)) |
#define | dyncreate(classname) (&ClassLib::getinstance(classname)) |
Functions | |
BEGIN_NAMESPACE (MagiC) |
Definition in file mdynamic.h.
|
This file is part of the MagiC++ library. * * Copyright (C) 1998-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
Definition at line 29 of file mdynamic.h. |
|
Value: static Class class_##classname;\ public:\ virtual const Class& getclass () const {return class_##classname;}\ protected: This macro should be used in class declaration of a dynamic class. Definition at line 55 of file mdynamic.h. |
|
Creates an object of the given class dynamically.
Definition at line 94 of file mdynamic.h. |
|
Implements the dynamic features of an abstract class.
Definition at line 79 of file mdynamic.h. |
|
Value: class GetInstance_##classname : public GetClassInstance {\ public: Object* getInstance(){return new classname();}\ };\ Class classname::class_##classname (#classname, #bases, new GetInstance_##classname());\ This macro should be used in the definition file of a dynamic class. Definition at line 67 of file mdynamic.h. |
|
Creates an object of the given class dynamically.
Definition at line 89 of file mdynamic.h. |
|
This file is part of the MagiC++ library. * * Copyright (C) 1998-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
|