40 #include "../FactoryExceptions.hpp" 42 #include "../Service.hpp" 43 #include "../Logger.hpp" 50 using namespace detail;
59 std::vector<DataSourceBase::shared_ptr>
args;
66 size_t sz = ofp->
arity();
67 if ( sz == args.size() ) {
69 m = ofp->
produce(args, caller );
83 log(
Error) <<
"Error in OperationCallerC::ret : can not convert return value of type "<< m->getType() <<
" to given type "<< rta->getType()<<
endlog();
92 this->args.push_back( na );
93 this->checkAndCreate();
107 : ofp(mr), caller(caller), mname(name), rta(), m(), s()
109 this->checkAndCreate();
113 : ofp(other.ofp), caller(other.caller), mname(other.mname),
114 args( other.args ), rta( other.rta ), m( other.m ), s(other.s)
130 :
d( mr ? new
D( mr, name, caller) : 0 ),
ofp(mr),
mname(name)
139 log(
Error) <<
"Can not construct OperationCallerC for '"<<name<<
"' from null OperationInterfacePart."<<
endlog();
144 :
d( other.
d ? new
D(*other.
d) : 0 ),
m( other.
m ? other.
m : 0),
s( other.
s ? other.
s : 0),
ofp(other.
ofp),
mname(other.
mname)
160 if ( &other ==
this )
163 d = ( other.
d ?
new D(*other.
d) : 0 );
201 log(
Error) <<
"Error in OperationCallerC::ret : can not convert return value of type "<<
m->getType() <<
" to given type "<< r->
getDataSource()->getType()<<
endlog();
204 log(
Error) <<
"Can not add return argument to invalid OperationCallerC."<<
endlog();
218 log(
Error) <<
"Can not add return argument to invalid OperationCallerC."<<
endlog();
226 return m->evaluate();
263 h->update(
s.get() );
OperationCallerC & arg(base::DataSourceBase::shared_ptr a)
base::DataSourceBase::shared_ptr getCallDataSource()
virtual base::DataSourceBase::shared_ptr produceSend(const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const =0
OperationCallerC & operator=(const OperationCallerC &other)
void newarg(DataSourceBase::shared_ptr na)
base::DataSourceBase::shared_ptr m
void ret(AttributeBase *r)
static std::ostream & nl(std::ostream &__os)
virtual std::string getName() const =0
virtual DataSourceBase::shared_ptr getDataSource() const =0
DataSourceBase::shared_ptr rta
D(OperationInterfacePart *mr, const std::string &name, ExecutionEngine *caller)
virtual unsigned int arity() const =0
virtual base::DataSourceBase::shared_ptr produceHandle() const =0
base::DataSourceBase::shared_ptr getSendDataSource()
static std::ostream & endl(std::ostream &__os)
virtual base::DataSourceBase::shared_ptr produce(const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const =0
OperationCallerC & ret(base::AttributeBase *r)
void ret(DataSourceBase::shared_ptr d)
OperationInterfacePart * ofp
DataSourceBase::shared_ptr s
std::vector< DataSourceBase::shared_ptr > args
base::DataSourceBase::shared_ptr s
DataSourceBase::shared_ptr m
boost::intrusive_ptr< DataSourceBase > shared_ptr
std::string const & getName() const
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
OperationInterfacePart * ofp
OperationInterfacePart * getOrp() const
virtual const char * what() const
static Logger::LogFunction endlog()