RE: [buildcheapeeg] Question for Doug

From: John Morrison (jmorrison_at_ahc.net.au)
Date: 2002-02-28 10:54:04


DOUG,

I KNOW OO !!!!!!!!!!
I've just spent 3 years at University an almost everything taught is OO.
:-)
But I do like your explanation!

> Apply these concepts of inheritance, encapsulation, and
> polymorphism to EEG. Think entities and relationships first.
> We have sensors, filters, displays, users, configurations,
> etc. Most of these can and will exists in heirarchies of
> supertypes and sub-types. If we think carefully on this we
> can come up with just a dozen or so objects. Then we work
> on methods, for both the super and sub types. From there
> we examine the relationships and figure out how to apply
> design patterns like MVC for event handling. My proposal
> then is not to think about EEG data and EEG functions,
> instead we should be thinking about sensor entities and
> entities that relate to sensors. We could break this down
> functionally, and componentization would probably do that,
> but I'm a proponent of OO, an if we don't do OO then I
> will do it anyways.
OO All the way!

> Now, let's go back to your question, you said that when
> you compile C++ you get an .EXE (executable). All native
> code compilation involves two steps, creation of an
> object module, then linking to a loadable or executable.
> When you compile a C program, it creates .o files first
> (object modules) and the final link creates the end
> result, often an single executable as you say. But there
> are different kinds of linking: static and and dynamic.
>
> Static linking goes out into the libraries referenced
> and copies the code into the executable. Dynamic linking
> does NOT copy the code, it refers a shared library. A
> statically linked program is self-contained, it needs
> nothing else, and chews a lot of ram in the process.
> A dynamically linked program will resolve the symbol
> table at RUNTIME and load the necessary code ON DEMAND
> from shared libraries. So we DON'T end up with one big
> honking huge memory hog executable, we create a small
> main program, we create shared libraries, and the C++
> program loads only what it needs on the fly. The only
> COST is disk space, and this won't be a huge system.
I'm not sure how this allows us to add new classes/objects, but don't care
right now lets get this show on the road!

> -- Doug

John



This archive was generated by hypermail 2.1.4 : 2002-07-27 12:28:39 BST