Jeff Thompson | 9c41dfe | 2013-06-27 12:10:25 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Author: Jeff Thompson |
| 3 | * |
| 4 | * BSD license, See the LICENSE file for more information. |
| 5 | */ |
| 6 | |
Jeff Thompson | e606351 | 2013-07-01 15:11:28 -0700 | [diff] [blame^] | 7 | #include <sstream> |
Jeff Thompson | 9c41dfe | 2013-06-27 12:10:25 -0700 | [diff] [blame] | 8 | #include "Name.hpp" |
| 9 | |
| 10 | using namespace std; |
| 11 | |
| 12 | namespace ndn { |
| 13 | |
Jeff Thompson | 4881511 | 2013-06-28 18:22:48 -0700 | [diff] [blame] | 14 | Name::Name() |
| 15 | { |
| 16 | } |
| 17 | |
Jeff Thompson | e606351 | 2013-07-01 15:11:28 -0700 | [diff] [blame^] | 18 | std::string Name::to_uri() |
| 19 | { |
| 20 | // TODO: implement fully. |
| 21 | ostringstream output; |
| 22 | for (int i = 0; i < components_.size(); ++i) { |
| 23 | output << "/"; |
| 24 | for (int j = 0; j < components_[i].size(); ++j) |
| 25 | output << components_[i][j]; |
| 26 | } |
| 27 | |
| 28 | return output.str(); |
| 29 | } |
| 30 | |
Jeff Thompson | 9c41dfe | 2013-06-27 12:10:25 -0700 | [diff] [blame] | 31 | } |