CrystalSpace

Public API Reference

cstool/saverref.h
Go to the documentation of this file.
00001 /* 
00002     Copyright (C) 2006 by Seth Yastrov
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __CS_SAVERREF_H__
00020 #define __CS_SAVERREF_H__
00021 
00026 #include "csextern.h"
00027 
00028 #include "csutil/csobject.h"
00029 #include "csutil/csstring.h"
00030 #include "csutil/scf_implementation.h"
00031 #include "imap/saverref.h"
00032 #include "iutil/selfdestruct.h"
00033 
00037 class CS_CRYSTALSPACE_EXPORT csPluginReference :
00038   public scfImplementationExt2<csPluginReference, 
00039                                csObject, 
00040                                iPluginReference,
00041                                iSelfDestruct>
00042 {
00043   csString name;
00044   csString id;
00045   
00046 public:
00048   csPluginReference (const char* name, const char* id);
00050   virtual ~csPluginReference ();
00051 
00052   virtual const char* GetName () const;
00053 
00054   virtual const char* GetClassID () const;
00055 
00056   virtual iObject *QueryObject () { return (csObject*)this; }
00057 
00058   void SelfDestruct () {}
00059 };
00060 
00064 class CS_CRYSTALSPACE_EXPORT csLibraryReference :
00065   public scfImplementationExt2<csLibraryReference, 
00066                                csObject, 
00067                                iLibraryReference,
00068                                iSelfDestruct>
00069 {
00070   csString file;
00071   csString path;
00072   bool checkDupes;
00073   
00074 public:
00076   csLibraryReference (const char* file, const char* path = 0,
00077     bool checkDupes = false);
00079   virtual ~csLibraryReference ();
00080 
00081   virtual const char* GetFile () const;
00082 
00083   virtual const char* GetPath () const;
00084 
00085   virtual bool GetCheckDupes () const;
00086 
00087   virtual iObject *QueryObject () { return (csObject*)this; }
00088 
00089   void SelfDestruct () {}
00090 };
00091 
00095 class CS_CRYSTALSPACE_EXPORT csAddonReference :
00096   public scfImplementationExt2<csAddonReference, 
00097                                csObject, 
00098                                iAddonReference,
00099                                iSelfDestruct>
00100 {
00101   csString plugin;
00102   csString paramsfile;
00103   csRef<iBase> addonobj;
00104   
00105 public:
00107   csAddonReference (const char* plugin, const char* paramsfile,
00108     iBase* addonobj = 0);
00110   virtual ~csAddonReference ();
00111   
00112   virtual const char* GetPlugin () const;
00113 
00114   virtual const char* GetParamsFile () const;
00115 
00116   virtual iBase* GetAddonObject () const;
00117 
00118   virtual iObject *QueryObject () { return (csObject*)this; }
00119 
00120   void SelfDestruct () {}
00121 };
00122 
00123 #endif // __CS_SAVERREF_H__

Generated for Crystal Space 2.0 by doxygen 1.7.6.1