Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29663/src/classes
Modified Files:
Profile.cpp
Log Message:
fixed CreateModuleProfile()
Index: Profile.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/Profile.cpp,v
retrieving revision 1.159
retrieving revision 1.160
diff -b -u -2 -r1.159 -r1.160
--- Profile.cpp 9 Jul 2004 13:16:46 -0000 1.159
+++ Profile.cpp 12 Jul 2004 00:18:31 -0000 1.160
@@ -627,5 +627,5 @@
{
public:
- static FilterProfile * CreateFilterProfile(const String &name)
+ static FilterProfile * Create(const String &name)
{ return new FilterProfile(name); }
@@ -651,4 +651,27 @@
};
+/// Same as Identity and FilterProfile but for "/Modules" branch
+class ModuleProfile : public ProfileImpl
+{
+public:
+ static ModuleProfile *Create(const String& name)
+ {
+ return new ModuleProfile(name);
+ }
+
+ virtual const wxChar *GetProfileSection() const
+ {
+ return _T("/Modules");
+ }
+
+private:
+ ModuleProfile(const String& name)
+ {
+ m_ProfileName << GetRootPath() << _T('/') << name;
+ }
+
+ DECLARE_NO_COPY_CLASS(ModuleProfile)
+};
+
/**
Temporary profile.
@@ -1175,5 +1198,5 @@
ASSERT(idName.Length() == 0 || // only relative paths allowed
(idName[0u] != '.' && idName[0u] != '/'));
- Profile *p = FilterProfile::CreateFilterProfile(idName);
+ Profile *p = FilterProfile::Create(idName);
EnforcePolicy(p);
return p;
@@ -1183,8 +1206,10 @@
Profile::CreateModuleProfile(const String & classname, Profile const *parent)
{
+ ASSERT_MSG( !parent,
+ _T("CreateModuleProfile(): !NULL parent not supported") );
+
ASSERT(classname.Length() == 0 || // only relative paths allowed
(classname[0u] != '.' && classname[0u] != _T('/')));
- String newName = _T("Modules/") + classname;
- Profile *p = ProfileImpl::CreateProfile(newName, parent);
+ Profile *p = ModuleProfile::Create(classname);
EnforcePolicy(p);
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates