L
Let_Me_Be
Hi all,
I'm developing a small defensive programming toolkit for my own
projects. So, here are my questions.
1) Is it possible to move from something like this: SAFECALL(foo() to
__safecall foo();
2) I need to auto-add code to every method of particular class
safeclass MyClass
{
public:
void foo();
}
void MyClass::foo() {}
will modify the foo implementation - add some lines of code on the end
of the method
3) even more advanced stuff, is it possible to modify the preprocessor
(or add my own preprocessor)? I need to parse something like this.
__precheck minutes >= 0 && minutes < 60 #Checking minutes variable for
valid time information
void foo(int minutes){}
__postcheck minutes % 10 == 0 #Checking if minutes have been rounded to
10 minutes intervals
I need also the text behind #
I'm developing a small defensive programming toolkit for my own
projects. So, here are my questions.
1) Is it possible to move from something like this: SAFECALL(foo() to
__safecall foo();
2) I need to auto-add code to every method of particular class
safeclass MyClass
{
public:
void foo();
}
void MyClass::foo() {}
will modify the foo implementation - add some lines of code on the end
of the method
3) even more advanced stuff, is it possible to modify the preprocessor
(or add my own preprocessor)? I need to parse something like this.
__precheck minutes >= 0 && minutes < 60 #Checking minutes variable for
valid time information
void foo(int minutes){}
__postcheck minutes % 10 == 0 #Checking if minutes have been rounded to
10 minutes intervals
I need also the text behind #