SimpleNetwork.cc (6795:394bc95d417b) | SimpleNetwork.cc (6876:a658c315512c) |
---|---|
1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 45 unchanged lines hidden (view full) --- 54// calls new to abstract away from the network 55/* 56Network* Network::createNetwork(int nodes) 57{ 58 return new SimpleNetwork(nodes); 59} 60*/ 61 | 1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 45 unchanged lines hidden (view full) --- 54// calls new to abstract away from the network 55/* 56Network* Network::createNetwork(int nodes) 57{ 58 return new SimpleNetwork(nodes); 59} 60*/ 61 |
62SimpleNetwork::SimpleNetwork(const string & name) 63 : Network(name) | 62SimpleNetwork::SimpleNetwork(const Params *p) 63 : Network(p) |
64{ 65 m_virtual_networks = 0; 66 m_topology_ptr = NULL; 67} 68 | 64{ 65 m_virtual_networks = 0; 66 m_topology_ptr = NULL; 67} 68 |
69void SimpleNetwork::init(const vector<string> & argv) | 69void SimpleNetwork::init() |
70{ 71 | 70{ 71 |
72 Network::init(argv); | 72 Network::init(); |
73 74 m_endpoint_switches.setSize(m_nodes); 75 76 m_in_use.setSize(m_virtual_networks); 77 m_ordered.setSize(m_virtual_networks); 78 for (int i = 0; i < m_virtual_networks; i++) { 79 m_in_use[i] = false; 80 m_ordered[i] = false; --- 177 unchanged lines hidden (view full) --- 258 259 m_topology_ptr->printConfig(out); 260} 261 262void SimpleNetwork::print(ostream& out) const 263{ 264 out << "[SimpleNetwork]"; 265} | 73 74 m_endpoint_switches.setSize(m_nodes); 75 76 m_in_use.setSize(m_virtual_networks); 77 m_ordered.setSize(m_virtual_networks); 78 for (int i = 0; i < m_virtual_networks; i++) { 79 m_in_use[i] = false; 80 m_ordered[i] = false; --- 177 unchanged lines hidden (view full) --- 258 259 m_topology_ptr->printConfig(out); 260} 261 262void SimpleNetwork::print(ostream& out) const 263{ 264 out << "[SimpleNetwork]"; 265} |
266 267 268SimpleNetwork * 269SimpleNetworkParams::create() 270{ 271 return new SimpleNetwork(this); 272} |
|