42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
/*
|
||
* FlushData.cpp
|
||
*
|
||
* Created on: 25 янв. 2021 г.
|
||
* Author: titov
|
||
*/
|
||
|
||
#include "FlushData.hh"
|
||
|
||
#include "../../systemic/FlushString.hh"
|
||
#include "../../systemic/MemberFuntion.hpp"
|
||
|
||
bool application::basic::FlushData::input( Environment & env ) {
|
||
|
||
return systemic::getStringView( buff, env.cparams, prov, links.data );
|
||
|
||
}
|
||
|
||
void application::basic::FlushData::build( Environment & env ) {
|
||
|
||
|
||
if(links.data){
|
||
std::pair<const peripheral::protected_char *, std::size_t> data
|
||
= buff.get();
|
||
|
||
systemic::FlushString * flush_string = memories::instance_object<systemic::FlushString>(env.static_object_ma,
|
||
env.cparams, data, prov, links.data );
|
||
|
||
if(links.flush){
|
||
typedef systemic::detail::MemberFuntion<systemic::FlushString, void, &systemic::FlushString::flush> ActionFlush;
|
||
ActionFlush * action_flush = memories::instance_object<ActionFlush>( env.static_setup_ma, *flush_string );
|
||
|
||
typedef systemic::IFunctor<void> Action;
|
||
env.rholder.share<Action>( *action_flush, links.flush );
|
||
}
|
||
}
|
||
|
||
|
||
}
|
||
|
||
application::basic::FlushData::FlushData( const Links & links ) : links(links) {}
|