ctkAbstractQObjectFactory.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Library:   CTK
00004  
00005   Copyright (c) 2010  Kitware Inc.
00006 
00007   Licensed under the Apache License, Version 2.0 (the "License");
00008   you may not use this file except in compliance with the License.
00009   You may obtain a copy of the License at
00010 
00011       http://www.commontk.org/LICENSE
00012 
00013   Unless required by applicable law or agreed to in writing, software
00014   distributed under the License is distributed on an "AS IS" BASIS,
00015   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016   See the License for the specific language governing permissions and
00017   limitations under the License.
00018  
00019 =========================================================================*/
00020 
00021 #ifndef __ctkAbstractQObjectFactory_h
00022 #define __ctkAbstractQObjectFactory_h
00023 
00024 // Qt includes
00025 #include <QDebug>
00026 
00027 // CTK includes
00028 #include "ctkAbstractObjectFactory.h"
00029 
00030 //----------------------------------------------------------------------------
00031 template<typename BaseClassType>
00032 class ctkAbstractQObjectFactory : public ctkAbstractObjectFactory<BaseClassType>
00033 {
00034 public:
00037   explicit ctkAbstractQObjectFactory();
00038   virtual ~ctkAbstractQObjectFactory();
00039 
00042   virtual BaseClassType * instantiate(const QString& itemKey);
00043 
00046   virtual void uninstantiate(const QString& itemKey);
00047 
00051   virtual QString objectNameToKey(const QString& objectName);
00052   
00057   template<typename ClassType>
00058   bool registerQObject(QString& key);
00059 
00060 private:
00061   ctkAbstractQObjectFactory(const ctkAbstractQObjectFactory &);  
00062   void operator=(const ctkAbstractQObjectFactory&); 
00063 };
00064 
00065 #include "ctkAbstractQObjectFactory.tpp"
00066 
00067 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1