⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 agent-list.h

📁 柯老师网站上找到的
💻 H
字号:
// Satish Kumar, kkumar@isi.edu#ifndef agent_list_h_#define agent_list_h_#include <cstdlib>#include <stdlib.h>#include <stdio.h>#include <iostream.h>#include <iomanip.h>#include <assert.h>#include <tclcl.h>#include <trace.h>#include <rng.h>#include <agent.h>class AgentList : public TclObject {public:  AgentList() {    agents_ = NULL;    num_agents_ = 0;  }  virtual int command(int argc, const char * const * argv);  static AgentList* instance() {assert(instance_); return instance_; }  void AddAgent(nsaddr_t node_addr, void *a);  void* GetAgent(nsaddr_t node_addr) {    assert(num_agents_ > node_addr);    return(agents_[node_addr]);  }  private:  void **agents_;  int num_agents_;  static AgentList* instance_;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -