I utilize arrays of function pointers (recipe in a state machine) in a couple of projects. I have the same general definitions for each of the functions (return type, parameter, a few calls inside that are used in each function, commenting, etc...) inside the array. I have written an application that can scan all of my header files in the project folder, create a list of unique functions, I can then drag functions into the array or type names for new functions. Currently when I accept my input all I can really do is copy the new generated code to the clip board.
What I would like to do is:
1) have it insert any new function declarations into a specific header file (which may be open in the ide with pending changes that haven't been saved)
2) Insert the array of function pointers into the current cursor location inside the current source file in the ide
3) Insert any new function definitions in appropriate files.
In my current app I am afraid to open and change files, not know if there are any pending changes in CVI not saved yet. Would hate to loose all that hard effort if I forget to press CTRL+S.
I think it would be wonder full if when typing a statement like "if " the ide would automagically replace it with "if () {} else {}" with the cursor inside the ()...if the else isn't populated it drops. Same thing for a for loop. This is only because I hate typing, but I hate using a mouse more, perhaps soon we can have "thought to code". Also, you have to know that I am the type of person that if they need to a task a second time, a program is written.
So, to ease my fears I would like to be able to run a tool that when it is ready to write to a file I can manipulate the code directly through a CVI api or something. If this already exists please point me in the right direction. I looked at the function panels, there is an insert button for those, but what I want is more complicated than a single function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.