Scalable Simulation Framework
SSF API C++ Binding

#define Object void

class Event {
public:
  Event* save();
  void release();
  boolean aliased();
};

class Entity {
public:
  virtual void init() =0;
  ltime_t now();
  void startAll(ltime_t t1);
  void startAll(ltime_t t0, ltime_t t1);
  ltime_t pauseAll();
  void resumeAll();
  void joinAll();
  Object* alignment();
  ltime_t alignto(Entity* s);
  Entity** coalignedEntities();   // null-terminated 
  process** processes();          // null-terminated
  inChannel** inChannels();       // null-terminated
  outChannel** outChannels();     // null-terminated
};

class process {
public:
  process(Entity* theowner, int simple=0);
  process(Entity* theowner, void(Entity::*body)(process*), int simple=0);
  virtual void action(); 
  virtual void init();
  virtual boolean isSimple();
  Entity* owner();
  void waitOn(inChannel** waitchannels);
  void waitOn(inChannel* waitchannel);
  void waitForever();
  void waitFor(ltime_t waitinterval);
  boolean waitOnFor(inChannel** waitchannels, ltime_t timeout);
};

class outChannel {
public:
  Entity* owner();
  inChannel** mappedto();         // null-terminated
  void write(Event* evt, ltime_t delay =0);
  ltime_t mapto(inChannel* tgt, ltime_t mapping_delay =0);
  ltime_t unmap(inChannel* tgt);
};

class inChannel {
public:
  Entity* owner();
  Event** activeEvents();        // null-terminated
  outChannel** mappedto();       // null-terminated
};