LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2008 INRIA | 3 * Copyright (c) 2008 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 std::string::size_type cur = 0; | 133 std::string::size_type cur = 0; |
134 std::string::size_type next = 0; | 134 std::string::size_type next = 0; |
135 while (next != std::string::npos) | 135 while (next != std::string::npos) |
136 { | 136 { |
137 next = env.find (";", cur); | 137 next = env.find (";", cur); |
138 std::string tmp = std::string (env, cur, next-cur); | 138 std::string tmp = std::string (env, cur, next-cur); |
139 std::string::size_type equal = tmp.find ("="); | 139 std::string::size_type equal = tmp.find ("="); |
140 if (equal != std::string::npos) | 140 if (equal != std::string::npos) |
141 { | 141 { |
142 std::string name = tmp.substr (0, equal); | 142 std::string name = tmp.substr (0, equal); |
143 std::string tvalue = tmp.substr (equal+1, tmp.size () - eq
ual - 1); | 143 std::string envval = tmp.substr (equal + 1, tmp.size () -
equal - 1); |
144 if (name == tid.GetAttributeFullName (i)) | 144 if (name == tid.GetAttributeFullName (i)) |
145 { | 145 { |
146 if (DoSet (info.accessor, info.checker, StringValue (t
value))) | 146 if (DoSet (info.accessor, info.checker, StringValue (e
nvval))) |
147 { | 147 { |
148 NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::
"<< | 148 NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::
"<< |
149 info.name <<"\" from env var"); | 149 info.name <<"\" from env var"); |
150 break; | 150 break; |
151 } | 151 } |
152 } | 152 } |
153 } | 153 } |
154 cur = next + 1; | 154 cur = next + 1; |
155 } | 155 } |
156 } | 156 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 { | 338 { |
339 return false; | 339 return false; |
340 } | 340 } |
341 bool ok = accessor->Disconnect (this, context, cb); | 341 bool ok = accessor->Disconnect (this, context, cb); |
342 return ok; | 342 return ok; |
343 } | 343 } |
344 | 344 |
345 | 345 |
346 | 346 |
347 } // namespace ns3 | 347 } // namespace ns3 |
LEFT | RIGHT |