| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2006 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 | 11 |
| 12 // Originally comes from shared/commandlineflags/flags.h | 12 // Originally comes from shared/commandlineflags/flags.h |
| 13 | 13 |
| 14 // Flags are defined and declared using DEFINE_xxx and DECLARE_xxx macros, | 14 // Flags are defined and declared using DEFINE_xxx and DECLARE_xxx macros, |
| 15 // where xxx is the flag type. Flags are referred to via FLAG_yyy, | 15 // where xxx is the flag type. Flags are referred to via FLAG_yyy, |
| 16 // where yyy is the flag name. For intialization and iteration of flags, | 16 // where yyy is the flag name. For intialization and iteration of flags, |
| 17 // see the FlagList class. For full programmatic access to any | 17 // see the FlagList class. For full programmatic access to any |
| 18 // flag, see the Flag class. | 18 // flag, see the Flag class. |
| 19 // | 19 // |
| 20 // The implementation only relies and basic C++ functionality | 20 // The implementation only relies and basic C++ functionality |
| 21 // and needs no special library or STL support. | 21 // and needs no special library or STL support. |
| 22 | 22 |
| 23 #ifndef WEBRTC_RTC_BASE_FLAGS_H_ | 23 #ifndef WEBRTC_RTC_BASE_FLAGS_H_ |
| 24 #define WEBRTC_RTC_BASE_FLAGS_H_ | 24 #define WEBRTC_RTC_BASE_FLAGS_H_ |
| 25 | 25 |
| 26 #include "webrtc/rtc_base/checks.h" | 26 #include "webrtc/base/checks.h" |
| 27 #include "webrtc/rtc_base/constructormagic.h" | 27 #include "webrtc/base/constructormagic.h" |
| 28 | 28 |
| 29 namespace rtc { | 29 namespace rtc { |
| 30 | 30 |
| 31 // Internal use only. | 31 // Internal use only. |
| 32 union FlagValue { | 32 union FlagValue { |
| 33 // Note: Because in C++ non-bool values are silently converted into | 33 // Note: Because in C++ non-bool values are silently converted into |
| 34 // bool values ('bool b = "false";' results in b == true!), we pass | 34 // bool values ('bool b = "false";' results in b == true!), we pass |
| 35 // and int argument to New_BOOL as this appears to be safer - sigh. | 35 // and int argument to New_BOOL as this appears to be safer - sigh. |
| 36 // In particular, it prevents the (not uncommon!) bug where a bool | 36 // In particular, it prevents the (not uncommon!) bug where a bool |
| 37 // flag is defined via: DEFINE_bool(flag, "false", "some comment");. | 37 // flag is defined via: DEFINE_bool(flag, "false", "some comment");. |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 char **argv_; | 259 char **argv_; |
| 260 | 260 |
| 261 private: | 261 private: |
| 262 RTC_DISALLOW_COPY_AND_ASSIGN(WindowsCommandLineArguments); | 262 RTC_DISALLOW_COPY_AND_ASSIGN(WindowsCommandLineArguments); |
| 263 }; | 263 }; |
| 264 #endif // WEBRTC_WIN | 264 #endif // WEBRTC_WIN |
| 265 | 265 |
| 266 } // namespace rtc | 266 } // namespace rtc |
| 267 | 267 |
| 268 #endif // SHARED_COMMANDLINEFLAGS_FLAGS_H_ | 268 #endif // SHARED_COMMANDLINEFLAGS_FLAGS_H_ |
| OLD | NEW |