10 #ifndef __Teko_RequestMesg_hpp__
11 #define __Teko_RequestMesg_hpp__
16 #include "Teuchos_RCP.hpp"
17 #include "Teuchos_ParameterList.hpp"
30 explicit RequestMesg(
const std::string& name,
unsigned int tag = 0) : name_(name), tag_(tag) {}
38 explicit RequestMesg(
const Teuchos::RCP<const Teuchos::ParameterList>& pl) : paramList_(pl) {
39 fromParameterList(*paramList_);
43 virtual ~RequestMesg() {}
46 std::string getName()
const {
return name_; }
49 unsigned int getTag()
const {
return tag_; }
52 const Teuchos::RCP<const Teuchos::ParameterList> getParameterList()
const {
53 return paramList_.getConst();
57 void fromParameterList(
const Teuchos::ParameterList& pl) {
58 name_ =
"Parameter List";
60 if (pl.isParameter(
"Name")) name_ = pl.get<std::string>(
"Name");
61 if (pl.isParameter(
"Tag")) tag_ = pl.get<
unsigned int>(
"Tag");
66 Teuchos::RCP<const Teuchos::ParameterList> paramList_;
70 inline std::ostream& operator<<(std::ostream& os,
const Teko::RequestMesg& rm) {
72 <<
"name = \"" << rm.getName() <<
"\", "
73 <<
"tag = " << rm.getTag() <<
">";