Spinscale: create new namespace sscl
This commit is contained in:
+16
-16
@@ -14,32 +14,32 @@
|
||||
namespace smo {
|
||||
namespace body {
|
||||
|
||||
Body::Body(Mind &parent, const std::shared_ptr<ComponentThread> &thread)
|
||||
: PuppetComponent(parent, thread)
|
||||
Body::Body(Mind &parent, const std::shared_ptr<sscl::ComponentThread> &thread)
|
||||
: sscl::PuppetComponent(static_cast<sscl::PuppetApplication&>(parent), thread)
|
||||
{
|
||||
}
|
||||
|
||||
class Body::InitializeReq
|
||||
: public PostedAsynchronousContinuation<bodyLifetimeMgmtOpCbFn>
|
||||
: public sscl::PostedAsynchronousContinuation<bodyLifetimeMgmtOpCbFn>
|
||||
{
|
||||
public:
|
||||
InitializeReq(
|
||||
PuppetApplication &parent,
|
||||
const std::shared_ptr<ComponentThread> &caller,
|
||||
Callback<bodyLifetimeMgmtOpCbFn> callback)
|
||||
: PostedAsynchronousContinuation<bodyLifetimeMgmtOpCbFn>(caller, callback),
|
||||
sscl::PuppetApplication &parent,
|
||||
const std::shared_ptr<sscl::ComponentThread> &caller,
|
||||
sscl::Callback<bodyLifetimeMgmtOpCbFn> callback)
|
||||
: sscl::PostedAsynchronousContinuation<bodyLifetimeMgmtOpCbFn>(caller, callback),
|
||||
parent(parent)
|
||||
{}
|
||||
|
||||
private:
|
||||
PuppetApplication &parent;
|
||||
sscl::PuppetApplication &parent;
|
||||
|
||||
public:
|
||||
void initializeReq1_posted(
|
||||
[[maybe_unused]] std::shared_ptr<InitializeReq> context
|
||||
)
|
||||
{
|
||||
auto self = ComponentThread::getSelf();
|
||||
auto self = sscl::ComponentThread::getSelf();
|
||||
if (self->id != SmoThreadId::BODY)
|
||||
{
|
||||
throw std::runtime_error(std::string(__func__)
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
|
||||
void initializeReq2(
|
||||
[[maybe_unused]] std::shared_ptr<InitializeReq> context,
|
||||
smo::AsynchronousLoop &results
|
||||
sscl::AsynchronousLoop &results
|
||||
)
|
||||
{
|
||||
std::cout << "Mrntt: attached "
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
[[maybe_unused]] std::shared_ptr<FinalizeReq> context
|
||||
)
|
||||
{
|
||||
auto self = ComponentThread::getSelf();
|
||||
auto self = sscl::ComponentThread::getSelf();
|
||||
if (self->id != SmoThreadId::BODY)
|
||||
{
|
||||
throw std::runtime_error(std::string(__func__)
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
|
||||
void finalizeReq2(
|
||||
[[maybe_unused]] std::shared_ptr<FinalizeReq> context,
|
||||
smo::AsynchronousLoop &results
|
||||
sscl::AsynchronousLoop &results
|
||||
)
|
||||
{
|
||||
std::cout << "Mrntt: Successfully detached "
|
||||
@@ -149,9 +149,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void Body::initializeReq(Callback<bodyLifetimeMgmtOpCbFn> callback)
|
||||
void Body::initializeReq(sscl::Callback<bodyLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
auto mrntt = ComponentThread::getSelf();
|
||||
auto mrntt = sscl::ComponentThread::getSelf();
|
||||
|
||||
if (mrntt->id != SmoThreadId::MRNTT)
|
||||
{
|
||||
@@ -168,9 +168,9 @@ void Body::initializeReq(Callback<bodyLifetimeMgmtOpCbFn> callback)
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
void Body::finalizeReq(Callback<bodyLifetimeMgmtOpCbFn> callback)
|
||||
void Body::finalizeReq(sscl::Callback<bodyLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
auto mrntt = ComponentThread::getSelf();
|
||||
auto mrntt = sscl::ComponentThread::getSelf();
|
||||
|
||||
if (mrntt->id != SmoThreadId::MRNTT)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user