Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by jk ( 17 years ago )
#ifndef CLIENT_ENTITY_H
#define CLIENT_ENTITY_H
#include <boost/shared_ptr.hpp>
#include "IState.h"
namespace dhcp
{
class client_entity
{
boost::shared_ptr<state::IState> m_state;
};
}
#endif
#ifndef ISTATE_H
#define ISTATE_H
#include <boost/shared_ptr.hpp>
#include "client_entity.h"
namespace dhcp
{
class client_entity;
namespace state
{
class IState
{
virtual void ChangeState(boost::shared_ptr<client_entity>, boost::shared_ptr<IState>) = 0;
virtual void Perform() = 0;
};
}
}
#endif
#ifndef OFFERSTATE_H
#define OFFERSTATE_H
#include <boost/shared_ptr.hpp>
#include "IState.h"
namespace dhcp
{
namespace state
{
class offerstate : public IState
{
void ChangeState(boost::shared_ptr<client_entity>, boost::shared_ptr<IState>);
void Perform();
};
}
}
#endif
#include "offerstate.h"
namespace dhcp
{
namespace state
{
void offerstate::ChangeState(boost::shared_ptr<client_entity>, boost::shared_ptr<IState>)
{
}
void Perform()
{
}
}
}
Revise this Paste