diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2013-03-02 15:57:34 -0600 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2013-03-02 15:57:34 -0600 |
commit | 7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f (patch) | |
tree | c76702a7f6310fbe9d437e347535422e836e94e9 /tdeabc/vcard/include/generated/generateHeaders.awk | |
parent | a2a38be7600e2a2c2b49c66902d912ca036a2c0f (diff) | |
parent | 27bbee9a5f9dcda53d8eb23863ee670ad1360e41 (diff) | |
download | tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.tar.gz tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdelibs
Diffstat (limited to 'tdeabc/vcard/include/generated/generateHeaders.awk')
-rwxr-xr-x | tdeabc/vcard/include/generated/generateHeaders.awk | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tdeabc/vcard/include/generated/generateHeaders.awk b/tdeabc/vcard/include/generated/generateHeaders.awk new file mode 100755 index 000000000..471db11b4 --- /dev/null +++ b/tdeabc/vcard/include/generated/generateHeaders.awk @@ -0,0 +1,41 @@ +#!/bin/awk -f + +{ + outfile = $1 "-generated.h" + name = $1 + + OFS="" + + print "// XXX Automatically generated. DO NOT EDIT! XXX //\n" > outfile + print "// WARNING! All changes made in this file will be lost!\n" > outfile + + if ($2 == "v") { pre = "virtual " } else { pre = "" } + + print "public:" >> outfile + print name "();" >> outfile + print name "(const " name "&);" >> outfile + print name "(const QCString&);" >> outfile + print pre name " & operator = (" name "&);" >> outfile + print pre name " & operator = (const QCString&);" >> outfile + print pre "bool operator ==(" name "&);" >> outfile + print pre "bool operator !=(" name "& x) {return !(*this==x);}" \ + >> outfile + print pre "bool operator ==(const QCString& s) {" name " a(s);" \ + "return(*this==a);} " >> outfile + print pre "bool operator != (const QCString& s) {return !(*this == s);}\n" \ + >> outfile + print "virtual ~" name "();" >> outfile + print pre "void parse() " \ + "{if(!parsed_) _parse();parsed_=true;assembled_=false;}\n" \ + >> outfile + print pre "void assemble() " \ + "{if(assembled_) return;parse();_assemble();assembled_=true;}\n" \ + >> outfile + print pre "void _parse();" >> outfile + print pre "void _assemble();" >> outfile + print pre "const char * className() const { return \"" name "\"; }" \ + >> outfile + + print "\n// End of automatically generated code //" >> outfile +} + |