summaryrefslogtreecommitdiff
path: root/dnn/Event.cc
diff options
context:
space:
mode:
authorsc2000-11-28 14:52:16 +0000
committersc2000-11-28 14:52:16 +0000
commit3ee78810becfeeb3690468ac735b6ba20dc5c501 (patch)
tree4d2f3642e6ac53573a2721298dbc0c991216427b /dnn/Event.cc
parent7130702588fdc681f54f254bf378c07cd5392af7 (diff)
downloadivy-league-3ee78810becfeeb3690468ac735b6ba20dc5c501.zip
ivy-league-3ee78810becfeeb3690468ac735b6ba20dc5c501.tar.gz
ivy-league-3ee78810becfeeb3690468ac735b6ba20dc5c501.tar.bz2
ivy-league-3ee78810becfeeb3690468ac735b6ba20dc5c501.tar.xz
Integration into IvyLeague
Dnn -> Ivl Some class names changed, because of conflicts with previous Uch classes Imakefile is replaced with Makefile
Diffstat (limited to 'dnn/Event.cc')
-rw-r--r--dnn/Event.cc58
1 files changed, 27 insertions, 31 deletions
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 <memory.h>
-DnnEventFeatureList :: DnnEventFeatureList (const DnnEventFeatureList& base, int nbf, DnnEventFeature* f)
-: CcuListOf <DnnEventFeature> (base)
+IvlEventFeatureList :: IvlEventFeatureList (const IvlEventFeatureList& base, int nbf, IvlEventFeature* f)
+: IvlListOf <IvlEventFeature> (base)
{
Load (nbf, f);
}
-DnnEventFeatureList :: DnnEventFeatureList (int nbf, DnnEventFeature* f)
-: CcuListOf <DnnEventFeature> ()
+IvlEventFeatureList :: IvlEventFeatureList (int nbf, IvlEventFeature* f)
+: IvlListOf <IvlEventFeature> ()
{
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>* DnnEventType::AllTypes = 0;
+IvlListOf <IvlEventType>* IvlEventType::AllTypes = 0;
/*?hidden?*/
void
-DnnEventType :: ClassInit ()
+IvlEventType :: ClassInit ()
{
- AllTypes = new CcuListOf <DnnEventType>;
+ AllTypes = new IvlListOf <IvlEventType>;
}
/*?
@@ -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 <DnnEventFeature> f = fl;
+ IvlListIterOf <IvlEventFeature> 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