///////////////////////////////////////////////////////////////////////////////
-// Name: common/stdpbase.cpp
+// Name: src/common/stdpbase.cpp
// Purpose: wxStandardPathsBase methods common to all ports
// Author: Vadim Zeitlin
// Modified by:
// Created: 2004-10-19
-// RCS-ID: $Id$
// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
-// License: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// module globals
// ----------------------------------------------------------------------------
-static wxStandardPaths gs_stdPaths;
+namespace
+{
+
+// Derive a class just to be able to create it: wxStandardPaths ctor is
+// protected to prevent its misuse, but it also means we can't create an object
+// of this class directly.
+class wxStandardPathsDefault : public wxStandardPaths
+{
+public:
+ wxStandardPathsDefault() { }
+};
+
+static wxStandardPathsDefault gs_stdPaths;
+
+} // anonymous namespace
// ============================================================================
// implementation
// ============================================================================
/* static */
-wxStandardPathsBase& wxStandardPathsBase::Get()
+wxStandardPaths& wxStandardPathsBase::Get()
{
wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
- wxCHECK_MSG( traits, gs_stdPaths, _T("create wxApp before calling this") );
+ wxCHECK_MSG( traits, gs_stdPaths, wxT("create wxApp before calling this") );
return traits->GetStandardPaths();
}
return filename.GetFullPath();
}
-wxStandardPathsBase& wxAppTraitsBase::GetStandardPaths()
+wxStandardPaths& wxAppTraitsBase::GetStandardPaths()
{
return gs_stdPaths;
}
if ( !component.empty() )
{
const wxChar ch = *(subdir.end() - 1);
- if ( !wxFileName::IsPathSeparator(ch) && ch != _T('.') )
+ if ( !wxFileName::IsPathSeparator(ch) && ch != wxT('.') )
subdir += wxFileName::GetPathSeparator();
subdir += component;