📄 instance.h
字号:
/*************************************************************************** instance.h - description ------------------- begin : Sat Dec 22 2001 copyright : (C) 2001 by Rudiger Koch email : rudiger_koch@yahoo.com ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#ifndef INSTANCE_H#define INSTANCE_H#include <amygdala/mpnetwork.h>#include <pthread.h>/** @class Instance instance.h amygdala/instance.h * Basic properties of a Network instance. There are 3 types of instances: <p> * 1. a local instance. This instance resides in the same physical memory on a * SMP host<p> * 2. an instance on a TCP/IP network. In this case, the instance object holds * all information needed to send UDP datagrams to that instance. (TODO)<p> * 3. an MPI instance. ( TODO ) *@author R黡iger Koch */class Instance {public:// Instance(UDP stuff);// Instance(MPI stuff); /** @param instID the instance ID this instance will have */ Instance(unsigned int instId); Instance(MpNetwork* net); ~Instance(); /** @return the MpNetwork object associated to this instance */ MpNetwork* GetNetwork(); /** @return the instance id */ unsigned int GetId(); void SetNetworkThread(pthread_t *nt); /** @return the thread object, or NULL if no multithreading in this Node */ pthread_t* GetNetworkThread();protected: // Protected attributes /** If this is a local instance */ MpNetwork* network; /** The instance ID */ unsigned int id; /** references the thread in case this is a local instance */ pthread_t* networkThread;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -