CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

reco::parser::MethodInvoker Struct Reference

#include <MethodInvoker.h>

List of all members.

Public Member Functions

Reflex::Object invoke (const Reflex::Object &o, Reflex::Object &retstore) const
const Reflex::Member & method () const
 MethodInvoker (const MethodInvoker &)
 MethodInvoker (const Reflex::Member &method, const std::vector< AnyMethodArgument > &ints=std::vector< AnyMethodArgument >())
MethodInvokeroperator= (const MethodInvoker &)

Private Member Functions

void setArgs ()

Private Attributes

std::vector< void * > args_
std::vector< AnyMethodArgumentints_
bool isFunction_
Reflex::Member method_

Detailed Description

Definition at line 15 of file MethodInvoker.h.


Constructor & Destructor Documentation

reco::parser::MethodInvoker::MethodInvoker ( const Reflex::Member &  method,
const std::vector< AnyMethodArgument > &  ints = std::vector< AnyMethodArgument >() 
) [explicit]
MethodInvoker::MethodInvoker ( const MethodInvoker other)

Definition at line 24 of file MethodInvoker.cc.

References setArgs().

                                                        :
  method_(other.method_), ints_(other.ints_), isFunction_(other.isFunction_) {
  setArgs();
}

Member Function Documentation

Reflex::Object reco::parser::MethodInvoker::invoke ( const Reflex::Object &  o,
Reflex::Object &  retstore 
) const

Invokes the method, putting the result in retval. Returns the Object that points to the result value, after removing any "*" and "&" Caller code is responsible for allocating retstore before calling 'invoke', and of deallocating it afterwards

const Reflex::Member& reco::parser::MethodInvoker::method ( ) const [inline]

Definition at line 25 of file MethodInvoker.h.

References method_.

{ return method_; }
MethodInvoker & MethodInvoker::operator= ( const MethodInvoker other)

Definition at line 29 of file MethodInvoker.cc.

References ints_, isFunction_, method_, and setArgs().

                                                                    {
  method_ = other.method_;
  ints_ = other.ints_;
  isFunction_ = other.isFunction_;
  setArgs();
  return *this;
}
void MethodInvoker::setArgs ( ) [private]

Definition at line 37 of file MethodInvoker.cc.

References args_, i, and ints_.

Referenced by MethodInvoker(), and operator=().

                            {
  for(size_t i = 0; i < ints_.size(); ++i) {
      args_.push_back( boost::apply_visitor( AnyMethodArgument2VoidPtr(), ints_[i] ) );
  }
}

Member Data Documentation

std::vector<void*> reco::parser::MethodInvoker::args_ [private]

Definition at line 30 of file MethodInvoker.h.

Referenced by evf::ServiceWebRegistry::invoke(), and setArgs().

Definition at line 29 of file MethodInvoker.h.

Referenced by operator=(), and setArgs().

Definition at line 31 of file MethodInvoker.h.

Referenced by evf::ServiceWebRegistry::invoke(), and operator=().

Reflex::Member reco::parser::MethodInvoker::method_ [private]

Definition at line 28 of file MethodInvoker.h.

Referenced by evf::ServiceWebRegistry::invoke(), method(), and operator=().