Page MenuHomec4science

Oncilla.h
No OneTemporary

File Metadata

Created
Wed, May 22, 04:53

Oncilla.h

/*
* Oncilla.h
*
* Created on: 15 dec. 2011
* Author: Alexandre Tuleu, Arne Nordmann
*/
#pragma once
#include <vector>
#include <iostream>
#include <boost/shared_ptr.hpp>
#include "common.h"
#include "Supervisor.h"
#include <liboncilla/utils/OncillaBackend.h>
#include <liboncilla/Synchronizer.h>
#include <liboncilla/nodes/Nodes.h>
namespace rci {
namespace oncilla {
class BackendLoader;
class Oncilla {
public:
typedef boost::shared_ptr<Oncilla> Ptr;
static std::string nameOfLeg(Leg l);
Oncilla();
virtual ~Oncilla();
const L0::Ptr & getL0(Leg l) const;
const L1::Ptr & getL1(Leg l) const;
const L2::Ptr & getL2(Leg l) const;
const L3::Ptr & getL3(Leg l) const;
const Trunk::Ptr & getTrunk() const;
const rci::oncilla::Synchronizer::Ptr & getSynchronizer() const;
const rci::oncilla::Supervisor::Ptr & getSupervisor() const;
private:
typedef std::vector<std::string> LegNames;
void init();
static rci::oncilla::Synchronizer::Ptr s_synchronizer;
//beware that the object holded by liboncilla
//are create by the backend. therefore, the pointer has to destroyed after
//all the other member instance
OncillaBackend::Ptr d_backend; //should be first instance WHATSOEVER
std::vector<L0::Ptr> d_L0s;
std::vector<L1::Ptr> d_L1s;
std::vector<L2::Ptr> d_L2s;
std::vector<L3::Ptr> d_L3s;
Trunk::Ptr d_trunk;
Supervisor::Ptr d_supervisor;
};
}
}

Event Timeline