CPN
Computational Process Networks
Static Public Member Functions | List of all members
CPN::NodeBasePrivate::CoerceParam< T > Struct Template Reference

#include <NodeBase.h>

Static Public Member Functions

static T Coerce (const std::string &key, const std::string &param)
 

Detailed Description

template<typename T>
struct CPN::NodeBasePrivate::CoerceParam< T >

Definition at line 44 of file NodeBase.h.

Member Function Documentation

template<typename T >
static T CPN::NodeBasePrivate::CoerceParam< T >::Coerce ( const std::string &  key,
const std::string &  param 
)
inlinestatic

Definition at line 45 of file NodeBase.h.

Referenced by CPN::NodeBase::GetParam().

45  {
46  std::istringstream iss(param);
47  T ret;
48  if (iss >> ret) {
49  return ret;
50  }
51  throw std::invalid_argument("Unable to convert parameter \"" + key + "\": \"" + param + "\"");
52  }

+ Here is the caller graph for this function:


The documentation for this struct was generated from the following file: