From 3ee78810becfeeb3690468ac735b6ba20dc5c501 Mon Sep 17 00:00:00 2001 From: sc Date: Tue, 28 Nov 2000 14:52:16 +0000 Subject: Integration into IvyLeague Dnn -> Ivl Some class names changed, because of conflicts with previous Uch classes Imakefile is replaced with Makefile --- dnn/Event.cc | 58 +++++++++++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 31 deletions(-) (limited to 'dnn/Event.cc') diff --git a/dnn/Event.cc b/dnn/Event.cc index 600b174..b231e4e 100644 --- a/dnn/Event.cc +++ b/dnn/Event.cc @@ -15,43 +15,42 @@ #include "Event.h" #include -DnnEventFeatureList :: DnnEventFeatureList (const DnnEventFeatureList& base, int nbf, DnnEventFeature* f) -: CcuListOf (base) +IvlEventFeatureList :: IvlEventFeatureList (const IvlEventFeatureList& base, int nbf, IvlEventFeature* f) +: IvlListOf (base) { Load (nbf, f); } -DnnEventFeatureList :: DnnEventFeatureList (int nbf, DnnEventFeature* f) -: CcuListOf () +IvlEventFeatureList :: IvlEventFeatureList (int nbf, IvlEventFeature* f) +: IvlListOf () { Load (nbf, f); } void -DnnEventFeatureList :: Load (int nbf, DnnEventFeature* f) +IvlEventFeatureList :: Load (int nbf, IvlEventFeature* f) { while (nbf-- > 0) Append (f++); } -DnnEventFeatureList :: ~DnnEventFeatureList () +IvlEventFeatureList :: ~IvlEventFeatureList () { } - -/*?class DnnEventType -A \typ{DnnEventType} contains the description of a -- dynamic -- class of events. +/*?class IvlEventType +A \typ{IvlEventType} contains the description of a -- dynamic -- class of events. It holds a name and an array of offsets, each describing where to find the corresponding feature in an event of that class. ?*/ -CcuListOf * DnnEventType::AllTypes = 0; +IvlListOf * IvlEventType::AllTypes = 0; /*?hidden?*/ void -DnnEventType :: ClassInit () +IvlEventType :: ClassInit () { - AllTypes = new CcuListOf ; + AllTypes = new IvlListOf ; } /*? @@ -59,7 +58,7 @@ Build an event type named \var{name} from an array of features. This is mostly useful for statically defined event classes. \var{f} is the array of features, and \var{nbf} is the number of features in that array. ?*/ -DnnEventType :: DnnEventType (const char* name, int nbf, DnnEventFeature f []) +IvlEventType :: IvlEventType (const char* name, int nbf, IvlEventFeature f []) : Name (name), #if 0 Features (), @@ -80,7 +79,7 @@ DnnEventType :: DnnEventType (const char* name, int nbf, DnnEventFeature f []) /*? Build an event type from a list of features. ?*/ -DnnEventType :: DnnEventType (const char* name, const DnnEventFeatureList& fl) +IvlEventType :: IvlEventType (const char* name, const IvlEventFeatureList& fl) : Name (name), #if 0 Features (), @@ -93,7 +92,7 @@ DnnEventType :: DnnEventType (const char* name, const DnnEventFeatureList& fl) AllTypes->Append (this); int offset = 0; int i = 0; - CcuListIterOf f = fl; + IvlListIterOf f = fl; while (++f) { offset += (*f)->Size; FeaturesOffsets [i] = offset; @@ -102,31 +101,30 @@ DnnEventType :: DnnEventType (const char* name, const DnnEventFeatureList& fl) } /*?nodoc?*/ -DnnEventType :: ~DnnEventType () +IvlEventType :: ~IvlEventType () { AllTypes->Remove (this); delete [] FeaturesOffsets; } -DnnEvent :: DnnEvent () +IvlEvent :: IvlEvent () { } /* useless, for compatibility only */ -DnnEvent :: DnnEvent (const DnnEventType*) +IvlEvent :: IvlEvent (const IvlEventType*) { } -DnnEvent :: ~DnnEvent () +IvlEvent :: ~IvlEvent () { } - /*? Build an event of type \var{t}. ?*/ -DnnBasicEvent :: DnnBasicEvent (const DnnEventType* t) -: DnnEvent (), +IvlBasicEvent :: IvlBasicEvent (const IvlEventType* t) +: IvlEvent (), Type (*t) { int sz = t->GetTotalSize (); @@ -136,9 +134,8 @@ DnnBasicEvent :: DnnBasicEvent (const DnnEventType* t) Data = 0; } - -DnnBasicEvent :: DnnBasicEvent (const DnnEventType* t, bool alloc) -: DnnEvent (), +IvlBasicEvent :: IvlBasicEvent (const IvlEventType* t, bool alloc) +: IvlEvent (), Type (*t) { if (alloc) { @@ -153,14 +150,14 @@ DnnBasicEvent :: DnnBasicEvent (const DnnEventType* t, bool alloc) } /*?nodoc?*/ -DnnBasicEvent :: ~DnnBasicEvent () +IvlBasicEvent :: ~IvlBasicEvent () { if (Data && Data != (char*) (&Data+sizeof (char*))) delete [] Data; } void -DnnBasicEvent :: SetFeature (int i, const void* data) +IvlBasicEvent :: SetFeature (int i, const void* data) { int offset = Type.GetOffset (i); int size = Type.GetSize (i); @@ -168,7 +165,7 @@ DnnBasicEvent :: SetFeature (int i, const void* data) } void -DnnBasicEvent :: GetFeature (int i, void* data) +IvlBasicEvent :: GetFeature (int i, void* data) { int offset = Type.GetOffset (i); int size = Type.GetSize (i); @@ -177,18 +174,17 @@ DnnBasicEvent :: GetFeature (int i, void* data) #if 0 void -DnnBasicEvent :: WriteTo (DnnIOS& s) +IvlBasicEvent :: WriteTo (IvlIOS& s) { // what about byte swapping? s.WriteBuf ((const byte*) Data, Type.GetTotalSize ()); } void -DnnBasicEvent :: ReadFrom (DnnIOS& s, lword) +IvlBasicEvent :: ReadFrom (IvlIOS& s, lword) { // what about byte swapping? s.ReadBuf ((byte*) Data, Type.GetTotalSize ()); } - #endif -- cgit v1.1