Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ProgramPaths.h

Go to the documentation of this file.
00001 #ifndef ProgramPathsH
00002 #define ProgramPathsH
00003 
00004 /*******************************************************************************
00005 Copyright 2001,2002 Petr Kulhanek
00006 
00007     This file is part of Core plugin.
00008 
00009     Core plugin is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013 
00014     Core plugin is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU General Public License for more details.
00018 
00019     You should have received a copy of the GNU General Public License
00020     along with Core plugin; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 *******************************************************************************/
00023 /*******************************************************************************
00024 ** PROJEKT:             Projekt NEMESIS
00025 ** SOUBOR:              ProgramPaths
00026 ** úČEL:                shromažďuje informace o cestách
00027 ** VERZE:               1.0
00028 ** JAZYK:               CBuilder C++ 
00029 ** CÍLOVÝ POČÍTAČ:      IBM PC
00030 ** PROGRAMÁTOR:         Petr Kulhánek
00031 ** HISTORIE úPRAV:
00032 VERZE   DATUM       POZNÁMKA
00033 1.0     2001-04-21
00034 *******************************************************************************/
00035 
00039 /* HLAVIČKOVÉ SOUBORY *********************************************************/
00040 
00041 #include "CoreMainHeader.h"
00042 #include "SmallString.h"
00043 
00044 /* KONEC HLAVIČKOVÝCH SOUBORů *************************************************/
00045 
00046 class CExtUUID;
00047 class CUUID;
00048 
00049 /* DEFINICE TŘÍD **************************************************************/
00050 
00052 
00055 class NEMESIS_CORE_PACKAGE CProgramPaths{
00056     public:
00057  // inicialzace cest
00058     bool __fastcall Init(void);  // provede inicializaci cest
00059 
00060     public:
00061  // klíče
00062     static const CSmallString& __fastcall GetMainPackageKey(void);
00063     static const CSmallString  __fastcall GetNemesisKey(void);
00064     static const CSmallString  __fastcall GetDefaultUserRegistrySetupKey(void);
00065     static const CSmallString  __fastcall GetPluginsKey(void);
00066     static const CSmallString  __fastcall GetLanguagesKey(void);
00067     static const CSmallString  __fastcall GetCharonClientSetupKey(void);
00068     static const CSmallString  __fastcall GetWorkPanelSetupsKey(const CExtUUID& type);
00069     static const CSmallString  __fastcall GetProjectsDesktopKey(const CUUID& type);
00070     static const CSmallString  __fastcall CreateTemporaryDir(void);
00071 
00072  // získávání informací
00073     inline const CSmallString& __fastcall GetProgramPath(void) const;
00074     inline const CSmallString& __fastcall GetUserPrefsPath(void) const;
00075     inline const CSmallString& __fastcall GetLocalPrefsPath(void) const;
00076     inline const CSmallString& __fastcall GetPluginsPath(void) const;
00077     inline const CSmallString& __fastcall GetSetupSchemePath(void) const;
00078 
00079     inline const CSmallString& __fastcall GetLastOpenFilePath(void) const;
00080     inline void                __fastcall SetLastOpenFilePath(const CSmallString& path);
00081 
00082  // sekce soukromých dat -------------------------------------------------------
00083     private:
00084     CSmallString  ProgramPath;      // cesta k programu
00085     CSmallString  UserPrefsPath;    // cesta k uživatelovu nastavení
00086     CSmallString  LocalPrefsPath;   // cesta k základnímu nastavení programu
00087     CSmallString  LastOpenFilePath; // cesta k posledně otevřenému souboru
00088     CSmallString  PluginsPath;      // cesta k uložišti pluginů
00089     CSmallString  SetupSchemesPath;      // cesta k uložišti pluginů
00090     static CSmallString MainPackageKey;    // main key of whole package
00091     };
00092 
00093 //---------------------------------------------------------------------------
00094 
00095 extern NEMESIS_CORE_PACKAGE class CProgramPaths         Paths;
00096 
00097 //---------------------------------------------------------------------------
00098 
00099 inline const CSmallString& __fastcall CProgramPaths::GetProgramPath(void) const
00100 {
00101  return(ProgramPath);
00102 }
00103 
00104 //---------------------------------------------------------------------------
00105 
00106 inline const CSmallString& __fastcall CProgramPaths::GetUserPrefsPath(void) const
00107 {
00108  return(UserPrefsPath);
00109 }
00110 
00111 //---------------------------------------------------------------------------
00112 
00113 inline const CSmallString& __fastcall CProgramPaths::GetLocalPrefsPath(void) const
00114 {
00115  return(LocalPrefsPath);
00116 }
00117 
00118 //---------------------------------------------------------------------------
00119 
00120 inline const CSmallString& __fastcall CProgramPaths::GetLastOpenFilePath(void) const
00121 {
00122  return(LastOpenFilePath);
00123 }
00124 
00125 //---------------------------------------------------------------------------
00126 
00127 inline void __fastcall CProgramPaths::SetLastOpenFilePath(const CSmallString& path)
00128 {
00129  LastOpenFilePath = path;
00130 }
00131 
00132 //---------------------------------------------------------------------------
00133 
00134 inline const CSmallString& __fastcall CProgramPaths::GetPluginsPath(void) const
00135 {
00136  return(PluginsPath);
00137 }
00138 
00139 //---------------------------------------------------------------------------
00140 
00141 inline const CSmallString& __fastcall CProgramPaths::GetSetupSchemePath(void) const
00142 {
00143  return(SetupSchemesPath);
00144 }
00145 
00146 //---------------------------------------------------------------------------
00147 
00148 #endif

Generated on Sun Feb 9 12:53:51 2003 for NemesisCore by doxygen1.3-rc2