1 #ifndef WIRECELL_IFANINNODE 2 #define WIRECELL_IFANINNODE 6 #include <boost/any.hpp> 18 typedef std::shared_ptr<IFaninNodeBase>
pointer;
25 virtual bool operator()(
const any_vector& anyin, boost::any& anyout) = 0;
38 template <
typename InputType,
typename OutputType,
int FaninMultiplicity=3>
53 auto in = boost::any_cast<input_pointer>(
a);
57 bool ok = (*this)(invec, out);
65 virtual bool operator()(
const input_vector& invec, output_pointer& out) = 0;
71 std::vector<std::string> ret(FaninMultiplicity,
std::string(
typeid(input_type).
name()));
76 return std::vector<std::string>{
typeid(output_type).
name()};
virtual bool operator()(const any_vector &anyin, boost::any &anyout)=0
The calling signature:
virtual NodeCategory category()
Return the behavior category type.
std::vector< input_pointer > input_vector
virtual bool operator()(const any_vector &anyv, boost::any &anyout)
The calling signature:
virtual ~IFaninNodeBase()
virtual std::vector< std::string > input_types()
virtual int concurrency()
Fanin nodes can usually do their thing stateless.
virtual std::vector< std::string > output_types()
std::shared_ptr< const InputType > input_pointer
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
std::vector< boost::any > any_vector
std::shared_ptr< const OutputType > output_pointer
std::shared_ptr< IFaninNodeBase > pointer