c++ - How can I check a function was called by another function? -
i trying make sure member function of 1 class only called member function of class.
the architecture imposed , cannot changed, port means logic has done in a.call() before calling b.call(). a.call() therefore calls b.call() simplify things , make sure order respected.
i found this answer question. only, problem using classes, , 2 classes have same member function name , #define tries replace occurrences have different prototypes.
off top of head, options be:
- make
b.callprivate , makebaddaora.callfriend - turn
b.callclass , put body a private constructoraora.callfriend - grep source code
b.call, make sure call ina.call, , add comment @ declaration saying "if call function fired" - change
b.calltake @ least 1 of values needs parameter (even if ignores , uses value somewhere else)
Comments
Post a Comment