[squeak-dev] Proper Smalltalk lots of classes

Louis LaBrunda Lou at Keystone-Software.com
Tue Jan 4 15:02:11 UTC 2011


Hi Jimmie,

I took a quick look at my code and thought I would share a little more with
you.  I created a class to hold some information about a FIX field's
definition.  It had these instance variables "fieldName tag inCvtBlock
outCvtBlock isLength needsLengthTag fieldClassName" whose name are fairly
indicative of what they hold.

I create an instance of this class for each field in a given FIX message
and add it to a class variable dictionary keyed by the FIX tag number. When
parsing the FIX message, I lookup the FIX field by its tag and the info in
its corresponding instance tells me how to convert and save the value.

I also created a class with these instance variables "tag value fieldDef".
When parsing FIX messages, I save an instance of this class in a
dictionary, instead of just the value.  This way I can more easily create a
FIX message for output from this information.

Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com




More information about the Squeak-dev mailing list