Alexander Afanasyev | 3a6ea5c | 2011-08-11 18:15:49 -0700 | [diff] [blame] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2011 University of California, Los Angeles |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation; |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | * |
| 18 | * Author: Ilya Moiseenko <iliamo@cs.ucla.edu> |
| 19 | */ |
| 20 | |
| 21 | #ifndef _NDN_NAME_COMPONENTS_H_ |
| 22 | #define _NDN_NAME_COMPONENTS_H_ |
| 23 | |
| 24 | #include <string> |
| 25 | #include <list> |
| 26 | |
| 27 | #include <ns3/simple-ref-count.h> |
| 28 | |
| 29 | namespace ns3 { |
| 30 | namespace NDNabstraction { |
| 31 | namespace Name { |
| 32 | |
| 33 | class Components : public SimpleRefCount<Components> |
| 34 | { |
| 35 | public: |
| 36 | Components (); |
| 37 | Components (const std::string &s); |
| 38 | ~Components (); |
| 39 | |
| 40 | Components& operator () (const std::string &s); |
| 41 | |
| 42 | // virtual uint32_t |
| 43 | // GetSerializedSize (void) const; |
| 44 | |
| 45 | // virtual void |
| 46 | // Serialize (Buffer::Iterator start) const; |
| 47 | |
| 48 | // virtual uint32_t |
| 49 | // Deserialize (Buffer::Iterator start); |
| 50 | |
| 51 | void Print (std::ostream &os) const; |
| 52 | |
| 53 | private: |
| 54 | std::list<std::string> m_prefix; |
| 55 | |
| 56 | typedef std::list<std::string>::iterator iterator; |
| 57 | typedef std::list<std::string>::const_iterator const_iterator; |
| 58 | }; |
| 59 | |
| 60 | std::ostream & operator << (std::ostream &os, const Components &components); |
| 61 | |
| 62 | } // Namespace Name |
| 63 | } // namespace NDNabstraction |
| 64 | } // namespace ns3 |
| 65 | |
| 66 | #endif // _NDN_NAME_COMPONENTS_H_ |
| 67 | |