38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
/*
|
||
* StatusActionLoggerInitializer.cpp
|
||
*
|
||
* Created on: 23 янв. 2022 г.
|
||
* Author: sozonov
|
||
*/
|
||
|
||
|
||
#include "StatusActionLogger.hh"
|
||
|
||
#include "../../systemic/ActionLogger.hpp"
|
||
#include "../../systemic/MemberFuntion.hpp"
|
||
|
||
application::log::StatusActionLogger::StatusActionLogger( const Links & links ) : links( links ) {}
|
||
|
||
|
||
bool application::log::StatusActionLogger::input( Environment & env ) {
|
||
|
||
return ( status = env.statuses.get( links.status ) );
|
||
|
||
}
|
||
|
||
void application::log::StatusActionLogger::build( Environment & env ) {
|
||
typedef systemic::StatusActionLogger StatActionLogger;
|
||
|
||
StatActionLogger * loggable = memories::instance_object<StatActionLogger>( env.static_setup_ma, *status);
|
||
|
||
|
||
env.rholder.share<logging::ILoggable>(*loggable, links.status_log);
|
||
|
||
|
||
typedef systemic::detail::MemberFuntion<StatActionLogger, void, &StatActionLogger::logging > ActionLogging;
|
||
ActionLogging * action_log = memories::instance_object<ActionLogging>( env.static_setup_ma, *loggable );
|
||
env.rholder.share<Action>( *action_log, links.logging );
|
||
|
||
|
||
}
|