LoadableModuleDescription.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
00004 
00005   See Doc/copyright/copyright.txt
00006   or http://www.slicer.org/copyright/copyright.txt for details.
00007 
00008   Program:   Module Description Parser
00009   Module:    $HeadURL: http://svn.slicer.org/Slicer3/trunk/Libs/LoadableModule/LoadableModuleDescription.h $
00010   Date:      $Date: 2011-02-11 12:50:36 -0500 (Fri, 11 Feb 2011) $
00011   Version:   $Revision: 16000 $
00012 
00013 ==========================================================================*/
00014 
00015 #ifndef __LoadableModuleDescription_h
00016 #define __LoadableModuleDescription_h
00017 
00018 #include "LoadableModuleWin32Header.h"
00019 
00020 #include "vtkTclUtil.h"
00021 
00022 #include <string>
00023 #include <vector>
00024 #include <iterator>
00025 
00026 class vtkSlicerModuleGUI;
00027 class vtkSlicerModuleLogic;
00028 
00029 typedef void * (*TclInit)(Tcl_Interp*);
00030 
00031 class LoadableModule_EXPORT LoadableModuleDescription
00032 {
00033 public:
00034   LoadableModuleDescription();
00035   LoadableModuleDescription(const LoadableModuleDescription &md);
00036 
00037   LoadableModuleDescription& operator=(const LoadableModuleDescription &md);
00038   
00039   void SetName(const std::string &name)
00040   {
00041     this->Name = name;
00042   }
00043 
00044   const std::string& GetName() const
00045   {
00046     return this->Name;
00047   }
00048 
00049   void SetShortName(const std::string &name)
00050   {
00051     this->ShortName = name;
00052   }
00053 
00054   const std::string& GetShortName() const
00055   {
00056     return this->ShortName;
00057   }
00058 
00059   void SetGUIName(const std::string &name)
00060   {
00061     this->GUIName = name;
00062   }
00063 
00064   const std::string& GetGUIName() const
00065   {
00066     return this->GUIName;
00067   }
00068 
00069   void SetTclInitName(const std::string &name)
00070   {
00071     this->TclInitName = name;
00072   }
00073 
00074   const std::string& GetTclInitName() const
00075   {
00076     return this->TclInitName;
00077   }
00078 
00079   void SetMessage(const std::string &message)
00080   {
00081     this->Message = message;
00082   }
00083 
00084   const std::string& GetMessage() const
00085   {
00086     return this->Message;
00087   }
00088 
00089   void SetGUIPtr(vtkSlicerModuleGUI* guiPtr)
00090   {
00091     this->GUIPtr = guiPtr;
00092   }
00093 
00094   vtkSlicerModuleGUI* GetGUIPtr() const
00095   {
00096     return this->GUIPtr;
00097   }
00098  
00099   void SetLogicPtr(vtkSlicerModuleLogic* logicPtr)
00100   {
00101     this->LogicPtr = logicPtr;
00102   }
00103 
00104   vtkSlicerModuleLogic* GetLogicPtr() const
00105   {
00106     return this->LogicPtr;
00107   }
00108 
00109   void SetTclInitFunction(TclInit functionPtr)
00110   {
00111     this->TclInitFunction = functionPtr;
00112   }
00113 
00114   TclInit GetTclInitFunction() const
00115   {
00116     return this->TclInitFunction;
00117   }
00118 
00119   void AddDependency(const std::string &depend)
00120   {
00121     this->Dependencies.push_back(depend);
00122   }
00123 
00124   const std::vector<std::string>& GetDependencies() const
00125   {
00126     return this->Dependencies;
00127   }
00128 
00129   void SetType(const std::string &type)
00130   {
00131     this->Type = type;
00132   }
00133 
00134   const std::string& GetType() const
00135   {
00136     return this->Type;
00137   }
00138 
00139   void SetTarget(const std::string &target)
00140   {
00141     this->Target = target;
00142   }
00143 
00144   const std::string& GetTarget() const
00145   {
00146     return this->Target;
00147   }
00148 
00149   void SetLocation(const std::string &location)
00150   {
00151     this->Location = location;
00152   }
00153 
00154   const std::string& GetLocation() const
00155   {
00156     return this->Location;
00157   }
00158 
00159   void SetAlternativeType(const std::string &type)
00160   {
00161     this->AlternativeType = type;
00162   }
00163 
00164   const std::string& GetAlternativeType() const
00165   {
00166     return this->AlternativeType;
00167   }
00168 
00169   const std::string& GetAlternativeTarget() const
00170   {
00171     return this->AlternativeTarget;
00172   }
00173 
00174   void SetAlternativeTarget(const std::string &target)
00175   {
00176     this->AlternativeTarget = target;
00177   }
00178 
00179   void SetAlternativeLocation(const std::string &location)
00180   {
00181     this->AlternativeLocation = location;
00182   }
00183 
00184   const std::string& GetAlternativeLocation() const
00185   {
00186     return this->AlternativeLocation;
00187   }
00188 
00189   private:
00190   std::string Name;
00191   std::string ShortName;
00192   std::string GUIName;
00193   std::string TclInitName;
00194 
00195   std::string Message;
00196 
00197   vtkSlicerModuleGUI* GUIPtr;
00198   vtkSlicerModuleLogic* LogicPtr;
00199 
00200   TclInit TclInitFunction;
00201 
00202   std::vector<std::string> Dependencies;
00203 
00204   std::string Type;
00205   std::string Target;
00206   std::string Location;
00207 
00208   std::string AlternativeType;
00209   std::string AlternativeTarget;
00210   std::string AlternativeLocation;
00211 
00212 };
00213 
00214 LoadableModule_EXPORT std::ostream & operator<<(std::ostream &os, const LoadableModuleDescription &module);
00215 
00216 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1