A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
attribute-construction-list.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Mathieu Lacage
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  * Authors: Mathieu Lacage <mathieu.lacage@gmail.com>
19  */
20 #ifndef ATTRIBUTE_CONSTRUCTION_LIST_H
21 #define ATTRIBUTE_CONSTRUCTION_LIST_H
22 
23 #include "attribute.h"
24 #include <list>
25 
26 namespace ns3 {
27 
29 {
30 public:
31  struct Item
32  {
34  Ptr<AttributeValue> value;
35  std::string name;
36  };
37  typedef std::list<struct Item>::const_iterator CIterator;
38 
40  void Add (std::string name, Ptr<const AttributeChecker> checker, Ptr<AttributeValue> value);
42  CIterator Begin (void) const;
43  CIterator End (void) const;
44 private:
45  std::list<struct Item> m_list;
46 };
47 
48 } // namespace ns3
49 
50 #endif /* ATTRIBUTE_CONSTRUCTION_LIST_H */
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59