Let me introduce myself:
I'm new to this list, I'm from Italy, I'm a computer programmer and I work
on industrial process controlling. Please forgive my english, that, I know,
isn't so good.
Well, let's talk about my question.
The software I usually wrote controls mechanical machines (using electronic
devices, sensors and probes), and we store it on a EPROM. You can understand
we cannot put an harddisk inside some machines working in factories.
Since some ROMs aren't so wide, we use a MINI-DOS (a small size MS-DOS) and
I write Borland C++ DOS programs.
We use a LCD display with a Touchscreen (NO KEYBOARD!), so I must create
a good layout, like buttons, dialog box and so on. I know it would be
much easy using a GUI operating system, but in such kind of machines we
really cannot put wider ROMs.
Here my question: I've written the 1st release of this interface 2 years
ago, and now I'm doing some upgrades. I had written it for a particular machine,
and now I'm upgrading it and taking it on a standard C++ library.
I had a class called "VIDEO", owning a pointer to EVERY graphic object on the
screen (keyboards, output areas, messages windows......). Those pointers
are on a array, and I used it for sending messages (events) to each graph.
objects.
I must have a lot of pages, and each page has its own set of stuff to
do (manual controls, automatic controls, engines parameter settings......).
The 1st release of this sw had no graph. pages manager, so I sent a
enable or diable message to each object. Assuming that every page
has its own objects set you can imagine it was very easy.
Now I'm programming a new complex machine, and I'm improving my library
adding a pages manager. This pages manager simply has a objects list for
every virtual graph. page (Every list is page). I just wrote a method for
setting any page, and it simply disables other pages objects and enables set
page objects, taking their pointers from the page's list.
The pointer to this page manager is a protected member of class VIDEO,
that still has that objects array. Why? Easy: now each object could
be in more than one page at same time, so page 'A' and page 'B' can share
the same object, so when I switch from page 'A' to 'B' this object doesn't
disappear (at least I send a REPAINT message).
But I still need the simple array, for message processing:
I must use a the linear array too, because any object could be in page's lists
more than one time, creating some problems in messages (events) handling.
The best thing I thought for getting rid of this double pointer holding, is that
each page's list could hold pointers to VIDEO's array instead of
each object, but it would mean a step more for getting the object pointer
in page swapping. I'm trying to find a better solution, getting rid
of the double managment, but w/o having a complex classes system.
It's important a clear, fast and easy to handle solution.
Anyone has any idea or suggestion for improving this managment ?
Thanks in advance.
Regards
Luca Piotto.
|nodoubt |
|Job: Industrial Process Control Computer Programmer |
|Free time: |
|'96 Suzuki 937 landpilot Beta 125cc cross dirt rider |
|'78 Benelli 500/Quattro (in a barn) restorer '88 AR 75 1.6 cage driver
|
| >THE MIND IS STRONG, THE FLESH IS WEAK< |
|Country: Italy |
|Web: http://www.geocities.com/MotorCity/6818/index.html and /5737/index.html |
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:05 EST