logo       
Google Custom Search
    AddThis Social Bookmark Button

r10816 - in trunk/libraries: registry/generic sniffer vector-table: msg#00003

Subject: r10816 - in trunk/libraries: registry/generic sniffer vector-table
Author: hannes
Date: Thu Jul  6 02:02:20 2006
New Revision: 10816

Added:
   trunk/libraries/registry/generic/vector-table   (contents, props changed)
   trunk/libraries/vector-table/
   trunk/libraries/vector-table/library.dylan   (contents, props changed)
   trunk/libraries/vector-table/vector-table.dylan   (contents, props changed)
   trunk/libraries/vector-table/vector-table.lid   (contents, props changed)
Removed:
   trunk/libraries/sniffer/vector-table.dylan
Log:
Job: minor
put vector-table in a seperate library and module

Added: trunk/libraries/registry/generic/vector-table
==============================================================================
--- (empty file)
+++ trunk/libraries/registry/generic/vector-table       Thu Jul  6 02:02:20 2006
@@ -0,0 +1 @@
+abstract://dylan/vector-table/vector-table.lid

Added: trunk/libraries/vector-table/library.dylan
==============================================================================
--- (empty file)
+++ trunk/libraries/vector-table/library.dylan  Thu Jul  6 02:02:20 2006
@@ -0,0 +1,19 @@
+module: dylan-user
+Author: Andreas Bogk, Hannes Mehnert
+Copyright: (C) 2005, 2006,  All rights reserved. Free for non-commercial use.
+
+define library vector-table
+  use common-dylan;
+  use packetizer;
+  use collections, import: { table-extensions };
+
+  export vector-table;
+end;
+
+define module vector-table
+  use common-dylan;
+  use packetizer;
+  use table-extensions;
+
+  export <vector-table>;
+end;

Added: trunk/libraries/vector-table/vector-table.dylan
==============================================================================
--- (empty file)
+++ trunk/libraries/vector-table/vector-table.dylan     Thu Jul  6 02:02:20 2006
@@ -0,0 +1,21 @@
+module: vector-table
+Author: Andreas Bogk, Hannes Mehnert
+Copyright: (C) 2005, 2006,  All rights reserved. Free for non-commercial use.
+
+define sealed class <vector-table> (<table>)
+end class;
+
+define method table-protocol (table :: <vector-table>)
+ => (test-function :: <function>, hash-function :: <function>)
+  values(method (x :: <fixed-size-byte-vector-frame>, y :: 
<fixed-size-byte-vector-frame>)
+           x = y end, vector-hash);
+end method table-protocol; 
+
+define method vector-hash (vector :: <fixed-size-byte-vector-frame>, state :: 
<hash-state>)
+  => (id :: <integer>, state :: <hash-state>)
+  let hash = 0;
+  for (number in vector.data)
+    hash := hash + number;
+  end for;
+  values(hash, state);
+end method;

Added: trunk/libraries/vector-table/vector-table.lid
==============================================================================
--- (empty file)
+++ trunk/libraries/vector-table/vector-table.lid       Thu Jul  6 02:02:20 2006
@@ -0,0 +1,3 @@
+library: vector-table
+files: library
+       vector-table
-- 
Gd-chatter mailing list
Gd-chatter@xxxxxxxxxxxxxxxx
https://www.opendylan.org/mailman/listinfo/gd-chatter




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>