summaryrefslogtreecommitdiffstats
path: root/languages/cpp/newclass_templates
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/cpp/newclass_templates
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/newclass_templates')
-rw-r--r--languages/cpp/newclass_templates/Makefile.am4
-rw-r--r--languages/cpp/newclass_templates/cpp_header31
-rw-r--r--languages/cpp/newclass_templates/cpp_source9
-rw-r--r--languages/cpp/newclass_templates/gtk_header24
-rw-r--r--languages/cpp/newclass_templates/gtk_source35
-rw-r--r--languages/cpp/newclass_templates/objc_header11
-rw-r--r--languages/cpp/newclass_templates/objc_source4
7 files changed, 118 insertions, 0 deletions
diff --git a/languages/cpp/newclass_templates/Makefile.am b/languages/cpp/newclass_templates/Makefile.am
new file mode 100644
index 00000000..5b013d27
--- /dev/null
+++ b/languages/cpp/newclass_templates/Makefile.am
@@ -0,0 +1,4 @@
+cppsupportdatadir = ${kde_datadir}/kdevcppsupport
+newclassdir = ${cppsupportdatadir}/newclass
+
+newclass_DATA = cpp_header cpp_source gtk_header gtk_source objc_header objc_source
diff --git a/languages/cpp/newclass_templates/cpp_header b/languages/cpp/newclass_templates/cpp_header
new file mode 100644
index 00000000..3952210c
--- /dev/null
+++ b/languages/cpp/newclass_templates/cpp_header
@@ -0,0 +1,31 @@
+#ifndef $HEADERGUARD$
+#define $HEADERGUARD$
+
+$INCLUDEBASEHEADER$
+
+$NAMESPACEBEG$
+
+$DOC$
+$TEMPLATE$
+class $CLASSNAME$$INHERITANCE$
+{
+$QOBJECT$
+public:
+$CONSTRUCTORDECLARATIONS$
+
+$PUBLICDECLARATIONS$
+
+$PUBLICSLOTS$
+
+$PROTECTEDDECLARATIONS$
+
+$PROTECTEDSLOTS$
+
+$PRIVATEDECLARATIONS$
+
+$PRIVATESLOTS$
+};
+
+$NAMESPACEEND$
+
+#endif
diff --git a/languages/cpp/newclass_templates/cpp_source b/languages/cpp/newclass_templates/cpp_source
new file mode 100644
index 00000000..eeeb1ea0
--- /dev/null
+++ b/languages/cpp/newclass_templates/cpp_source
@@ -0,0 +1,9 @@
+#include "$HEADER$"
+
+$NAMESPACEBEG$
+
+$CONSTRUCTORDEFINITIONS$
+
+$DEFINITIONS$
+
+$NAMESPACEEND$
diff --git a/languages/cpp/newclass_templates/gtk_header b/languages/cpp/newclass_templates/gtk_header
new file mode 100644
index 00000000..c44bff32
--- /dev/null
+++ b/languages/cpp/newclass_templates/gtk_header
@@ -0,0 +1,24 @@
+#ifndef $HEADERGUARD$
+#define $HEADERGUARD$
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+
+$DOC$
+typedef struct td_test {
+/* TODO: put your data here */
+} $CLASSNAME$, *$CLASSNAME$Ptr;
+
+
+$CLASSNAME$* $CLASSNAME$_new(void);
+void $CLASSNAME$_delete($CLASSNAME$* self);
+gboolean $CLASSNAME$_init($CLASSNAME$* self);
+void $CLASSNAME$_end($CLASSNAME$* self);
+
+
+#endif
diff --git a/languages/cpp/newclass_templates/gtk_source b/languages/cpp/newclass_templates/gtk_source
new file mode 100644
index 00000000..aa5f05ea
--- /dev/null
+++ b/languages/cpp/newclass_templates/gtk_source
@@ -0,0 +1,35 @@
+#include "$HEADER$"
+
+$CLASSNAME$* $CLASSNAME$_new(void)
+{
+ $CLASSNAME$* self;
+ self = g_new($CLASSNAME$, 1);
+ if(NULL != self)
+ {
+ if(!$CLASSNAME$_init(self))
+ {
+ g_free(self);
+ self = NULL;
+ }
+ }
+ return self;
+}
+
+void $CLASSNAME$_delete($CLASSNAME$* self)
+{
+ g_return_if_fail(NULL != self);
+ $CLASSNAME$_end(self);
+ g_free(self);
+}
+
+gboolean $CLASSNAME$_init($CLASSNAME$* self)
+{
+ /* TODO: put init code here */
+
+ return TRUE;
+}
+
+void $CLASSNAME$_end($CLASSNAME$* self)
+{
+ /* TODO: put deinit code here */
+}
diff --git a/languages/cpp/newclass_templates/objc_header b/languages/cpp/newclass_templates/objc_header
new file mode 100644
index 00000000..9213782c
--- /dev/null
+++ b/languages/cpp/newclass_templates/objc_header
@@ -0,0 +1,11 @@
+#ifndef _$HEADERGUARD$_
+#define _$HEADERGUARD$_
+
+$INCLUDEBASEHEADER$
+#include <Foundation/NSObject.h>
+
+$DOC$
+@interface $CLASSNAME$ : $BASECLASS$
+@end
+
+#endif
diff --git a/languages/cpp/newclass_templates/objc_source b/languages/cpp/newclass_templates/objc_source
new file mode 100644
index 00000000..298e941d
--- /dev/null
+++ b/languages/cpp/newclass_templates/objc_source
@@ -0,0 +1,4 @@
+#include "$HEADER$"
+
+@implementation $CLASSNAME$
+@end