Browse Source

Make Name::Component.getValue() return Blob& .

pull/1/head
Jeff Thompson 12 years ago
parent
commit
9bdb3b2936
  1. 2
      ndn-cpp/interest.cpp
  2. 2
      ndn-cpp/name.cpp
  3. 4
      ndn-cpp/name.hpp

2
ndn-cpp/interest.cpp

@ -49,7 +49,7 @@ string Exclude::toUri() const
if (entries_[i].getType() == ndn_Exclude_ANY)
result << "*";
else
Name::toEscapedString(entries_[i].getComponent().getValue(), result);
Name::toEscapedString(*entries_[i].getComponent().getValue(), result);
}
return result.str();

2
ndn-cpp/name.cpp

@ -222,7 +222,7 @@ std::string Name::toUri() const
ostringstream result;
for (unsigned int i = 0; i < components_.size(); ++i) {
result << "/";
toEscapedString(components_[i].getValue(), result);
toEscapedString(*components_[i].getValue(), result);
}
return result.str();

4
ndn-cpp/name.hpp

@ -67,7 +67,9 @@ public:
*/
bool setFromEscapedString(const char *first, const char *last);
const std::vector<unsigned char>& getValue() const { return (*value_); }
const Blob& getValue() const { return value_; }
void setValue(const Blob& value) { value_ = value; }
/**
* Set this component to the encoded segment number.

Loading…
Cancel
Save