abseil-cpp/absl/flags/internal/program_name.h
Go to the documentation of this file.
1 //
2 // Copyright 2019 The Abseil Authors.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // https://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef ABSL_FLAGS_INTERNAL_PROGRAM_NAME_H_
17 #define ABSL_FLAGS_INTERNAL_PROGRAM_NAME_H_
18 
19 #include <string>
20 
21 #include "absl/base/config.h"
22 #include "absl/strings/string_view.h"
23 
24 // --------------------------------------------------------------------
25 // Program name
26 
27 namespace absl {
29 namespace flags_internal {
30 
31 // Returns program invocation name or "UNKNOWN" if `SetProgramInvocationName()`
32 // is never called. At the moment this is always set to argv[0] as part of
33 // library initialization.
35 
36 // Returns base name for program invocation name. For example, if
37 // ProgramInvocationName() == "a/b/mybinary"
38 // then
39 // ShortProgramInvocationName() == "mybinary"
41 
42 // Sets program invocation name to a new value. Should only be called once
43 // during program initialization, before any threads are spawned.
45 
46 } // namespace flags_internal
48 } // namespace absl
49 
50 #endif // ABSL_FLAGS_INTERNAL_PROGRAM_NAME_H_
absl::flags_internal::ProgramInvocationName
std::string ProgramInvocationName()
Definition: abseil-cpp/absl/flags/internal/program_name.cc:36
absl::flags_internal::ShortProgramInvocationName
std::string ShortProgramInvocationName()
Definition: abseil-cpp/absl/flags/internal/program_name.cc:42
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
ABSL_NAMESPACE_END
#define ABSL_NAMESPACE_END
Definition: third_party/abseil-cpp/absl/base/config.h:171
ABSL_NAMESPACE_BEGIN
#define ABSL_NAMESPACE_BEGIN
Definition: third_party/abseil-cpp/absl/base/config.h:170
absl::flags_internal::SetProgramInvocationName
void SetProgramInvocationName(absl::string_view prog_name_str)
Definition: abseil-cpp/absl/flags/internal/program_name.cc:49
absl
Definition: abseil-cpp/absl/algorithm/algorithm.h:31


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:46