first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / octopi / library / tentacles / entity_registry.cpp
1 /*****************************************************************************\
2 *                                                                             *
3 *  Name   : entity_registry                                                   *
4 *  Author : Chris Koeritz                                                     *
5 *                                                                             *
6 *******************************************************************************
7 * Copyright (c) 2002-$now By Author.  This program is free software; you can  *
8 * redistribute it and/or modify it under the terms of the GNU General Public  *
9 * License as published by the Free Software Foundation; either version 2 of   *
10 * the License or (at your option) any later version.  This is online at:      *
11 *     http://www.fsf.org/copyleft/gpl.html                                    *
12 * Please send any updates to: fred@gruntose.com                               *
13 \*****************************************************************************/
14
15 #include "entity_registry.h"
16
17 #include <mathematics/chaos.h>
18 #include <processes/safe_roller.h>
19 #include <octopus/entity_defs.h>
20
21 using namespace basis;
22 using namespace mathematics;
23 using namespace processes;
24 using namespace timely;
25
26 namespace octopi {
27
28 entity_registry::entity_registry()
29 : _sequencer(new safe_roller(1, MAXINT32 / 2)),
30   _rando(new chaos)
31 {
32 }
33
34 entity_registry::~entity_registry()
35 {
36   WHACK(_sequencer);
37   WHACK(_rando);
38 }
39
40 //////////////
41
42 astring blank_entity_registry::text_form()
43 { return "blank_entity_registry--all are allowed, none are remembered."; }
44
45 bool blank_entity_registry::locate_entity(const octopus_entity &formal(entity),
46     time_stamp &last_active, byte_array &verification)
47 {
48   last_active = time_stamp();
49   verification = byte_array();
50   return true;
51 }
52
53 } //namespace.
54