Author: rmottola
Date: Tue Jun 16 00:26:14 2015
New Revision: 38641
URL: http://svn.gna.org/viewcvs/gnustep?rev=38641&view=rev
Log:
Enable project addition of obj-c++ classes
Added:
apps/projectcenter/trunk/Framework/Resources/ocppclass.template
Modified:
apps/projectcenter/trunk/ChangeLog
apps/projectcenter/trunk/Framework/GNUmakefile
apps/projectcenter/trunk/Framework/PCFileCreator.m
apps/projectcenter/trunk/Headers/ProjectCenter/PCFileCreator.h
Modified: apps/projectcenter/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/ChangeLog?rev=38641&r1=38640&r2=38641&view=diff
==============================================================================
--- apps/projectcenter/trunk/ChangeLog (original)
+++ apps/projectcenter/trunk/ChangeLog Tue Jun 16 00:26:14 2015
@@ -1,3 +1,11 @@
+2015-06-16 Riccardo Mottola <[email protected]>
+
+ * Framework/GNUmakefile
+ * Framework/PCFileCreator.m
+ * Headers/ProjectCenter/PCFileCreator.h
+ * Framework/Resources/ocppclass.template
+ Enable project addition of obj-c++ classes.
+
2015-06-13 Riccardo Mottola <[email protected]>
* Framework/PCProjectEditor.m
Modified: apps/projectcenter/trunk/Framework/GNUmakefile
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Framework/GNUmakefile?rev=38641&r1=38640&r2=38641&view=diff
==============================================================================
--- apps/projectcenter/trunk/Framework/GNUmakefile (original)
+++ apps/projectcenter/trunk/Framework/GNUmakefile Tue Jun 16 00:26:14 2015
@@ -104,6 +104,7 @@
Resources/header.template \
Resources/postamble.template \
Resources/protocol.template \
+ Resources/ocppclass.template \
#
# Localization
Modified: apps/projectcenter/trunk/Framework/PCFileCreator.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Framework/PCFileCreator.m?rev=38641&r1=38640&r2=38641&view=diff
==============================================================================
--- apps/projectcenter/trunk/Framework/PCFileCreator.m (original)
+++ apps/projectcenter/trunk/Framework/PCFileCreator.m Tue Jun 16 00:26:14 2015
@@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
- Copyright (C) 2001-2013 Free Software Foundation
+ Copyright (C) 2001-2015 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@@ -44,6 +44,7 @@
NSDictionary *headerDict;
NSDictionary *ccDict;
NSDictionary *chDict;
+ NSDictionary *classPpDict;
NSDictionary *protocolDict;
NSDictionary *gsmarkupDict;
NSString *descr;
@@ -108,6 +109,17 @@
template,@"TemplateFile",
nil];
+ // Objective C++ Class
+ descr = @"Generic Objective-C++ class.\n\n"
+ @"This is a plain subclass of NSObject which includes"
+ @" only Foundation.h. Extend it with c++";
+ template = [bundle pathForResource:@"ocppclass" ofType:@"template"];
+ classPpDict = [NSDictionary dictionaryWithObjectsAndKeys:
+ PCClasses, @"ProjectKey",
+ descr, @"TypeDescription",
+ template,@"TemplateFile",
+ nil];
+
// GSMarkup
descr = @"Generic GSMarkup File.\n\n"
@"This is the interface description of GNUstep Renaissance.";
@@ -125,6 +137,7 @@
protocolDict, ProtocolFile,
headerDict, ObjCHeader,
classDict, ObjCClass,
+ classPpDict, ObjCppClass,
gsmarkupDict, GSMarkupFile,
nil];
}
@@ -194,6 +207,12 @@
{
newFile = [path stringByAppendingPathExtension:@"m"];
[files setObject:[dict objectForKey:ObjCClass] forKey:newFile];
+ }
+ // Objective-C++ Class
+ else if ([type isEqualToString:ObjCppClass])
+ {
+ newFile = [path stringByAppendingPathExtension:@"mm"];
+ [files setObject:[dict objectForKey:ObjCppClass] forKey:newFile];
}
// C File
else if ([type isEqualToString:CFile])
Added: apps/projectcenter/trunk/Framework/Resources/ocppclass.template
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Framework/Resources/ocppclass.template?rev=38641&view=auto
==============================================================================
--- apps/projectcenter/trunk/Framework/Resources/ocppclass.template (added)
+++ apps/projectcenter/trunk/Framework/Resources/ocppclass.template Tue Jun
16 00:26:14 2015
@@ -0,0 +1,35 @@
+/*
+ Project: $PROJECTNAME$
+
+ Copyright (C) $YEAR$ Free Software Foundation
+
+ Author: $FULLUSERNAME$
+
+ Created: $DATE$ by $USERNAME$
+
+ This application is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This application is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+*/
+
+#import "$FILENAME$.h"
+
+// This is an Obj-C++ file... add what you need to mighty Objective-C
+
+// if you need, add your C++ classes
+
+@implementation $FILENAME$
+
+@end
+
+// add your C++ methods here
Modified: apps/projectcenter/trunk/Headers/ProjectCenter/PCFileCreator.h
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Headers/ProjectCenter/PCFileCreator.h?rev=38641&r1=38640&r2=38641&view=diff
==============================================================================
--- apps/projectcenter/trunk/Headers/ProjectCenter/PCFileCreator.h
(original)
+++ apps/projectcenter/trunk/Headers/ProjectCenter/PCFileCreator.h Tue Jun
16 00:26:14 2015
@@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
- Copyright (C) 2001-2004 Free Software Foundation
+ Copyright (C) 2001-2015 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@@ -33,6 +33,7 @@
#define ObjCHeader @"Objective-C Header"
#define CFile @"C File"
#define CHeader @"C Header"
+#define ObjCppClass @"Objective-C++ Class"
#define GSMarkupFile @"GNUstep Markup"
@class PCProject;
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs