~ubuntu-branches/ubuntu/lucid/xbill/lucid

« back to all changes in this revision

Viewing changes to Network.h

  • Committer: Bazaar Package Importer
  • Author(s): Adrian Bridgett
  • Date: 2004-09-07 09:52:14 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040907095214-d0m46ojc8f7upuqm
Tags: 2.1-4
maintainer upload of NMU - many thanks Tollef (closes: #268885) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef NETWORK_H
2
2
#define NETWORK_H
3
3
 
4
 
#include "Computer.h"
5
 
#include "Cable.h"
6
 
 
7
 
class Network { /*structure for global network of computers*/
8
 
public:
9
 
        static const int MAX_COMPUTERS = 20;    /* max computers on screen */
10
 
        static const int NUM_SYS = 6;           /* number of computer types */
11
 
        Picture pictures[NUM_SYS+1];            /* array of cpu pictures */
12
 
        int width, height;                      /* size of cpu picture */
13
 
        int units;                              /* number of cpus in network */
14
 
        int win, base, off;                     /* number in each state */
15
 
        Computer computers[MAX_COMPUTERS];      /* array of cpu info */
16
 
        Cable cables[MAX_COMPUTERS];
17
 
        int ncables;
18
 
        void setup();
19
 
        void load_pix();
20
 
        void draw();
21
 
        void update();
22
 
        void toasters();
23
 
        int on(int lev);
24
 
 
25
 
};
 
4
/* Counters */
 
5
#define NETWORK_COUNTER_OFF 0
 
6
#define NETWORK_COUNTER_BASE 1
 
7
#define NETWORK_COUNTER_WIN 2
 
8
#define NETWORK_COUNTER_MAX 2
 
9
 
 
10
void Network_setup(void);
 
11
void Network_draw(void);
 
12
void Network_update(void);
 
13
void Network_toasters(void);
 
14
Computer * Network_get_computer(int index);
 
15
int Network_num_computers(void);
 
16
Cable * Network_get_cable(int index);
 
17
int Network_num_cables(void);
 
18
void Network_clear_stray(Bill *bill);
 
19
void Network_inc_counter(int counter, int val);
 
20
int Network_get_counter(int counter);
26
21
 
27
22
#endif