I decided to point a PE bean event directly into my code,
as opposed to using the default events module.
The event handler is in my module xyz.c, and the function prototype in xyz.h
After this change PE adds ALL its headers to my xyz.h.
I do not want PE to modify my source files.
Q!. Why is this done?
Q2. Is this autoedit needed?
Q3. Can it be avoided?
BR,
Anders J
Hello Anders J,
the behavoiur that you described is the normal behaviour of Processor Expert and currently there is no option to change or disable it. It is intended to help user to easily use methods of the beans in the project.
You can use #ifdef statement to avoid including all generate #include statements in your header file, for example:
#ifdef non_existing_symbol
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "Cap1.h"
#include "FC1.h"
#include "EInt1.h"
#endif
best regards
Vojtech Filip
Processor Expert Support Team
Vojtech,
Thanks for responding.
Adding headers like this may facilitate bean usage,
but I think it lays a foundation for bad coding.
Making beans "global" does not suport the concept of information hiding,
which I believe is one of the most important ways to avoid unwanted side effects.
Givin access to all beans like this is a variant of global variables misuse,
by introducing properties and methods that are unnecessarily global/visible.
I do not want tools like PE to edit my code.
Let me decide what properties, methods, functions etc, I want to make public.
Comments invited,
Anders J