bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

automatic code generation


From: box
Subject: automatic code generation
Date: Wed, 12 Jul 2006 11:21:44 -0700 (PDT)

I'm trying to a write a script to automatically generate some .cpp & .h
files.  I have the templates in external files which look something like
this:

void ${NAME}Panel::showEvent(QShowEvent *e) {
    ...code....
}

I want to be able to run my script, have it read the contents of the files
while replacing ${NAME} with a variable that is defined elsewhere in my
script.  My issue is that I can't get NAME to bind to anything in the .cpp
file I generate.  By this I mean that if ${NAME} evaluates to Foo in the
script, when I output the file I still get

void ${NAME}Panel::showEvent(QShowEvent *e) {
    ...code....
}

when what I want is

void FooPanel::showEvent(QShowEvent *e) {
    ...code....
}

Any suggestions? 
-- 
View this message in context: 
http://www.nabble.com/automatic-code-generation-tf1932672.html#a5294509
Sent from the Gnu - Bash forum at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]