Download include/google/protobuf/compiler/cpp/namespace_printer.h from Shenghong/dai_env: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/Shenghong/dai_env/resolve/main/include/google/protobuf/compiler/cpp/namespace_printer.h
- Command line
-
hf download hf://Shenghong/dai_env/include/google/protobuf/compiler/cpp/namespace_printer.h
-
curl -L -o namespace_printer.h https://huggingface.co/Shenghong/dai_env/resolve/main/include/google/protobuf/compiler/cpp/namespace_printer.h
1.69 kB
| // Protocol Buffers - Google's data interchange format | |
| // Copyright 2024 Google Inc. All rights reserved. | |
| // | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file or at | |
| // https://developers.google.com/open-source/licenses/bsd | |
| // An RAII type for printing a namespace. | |
| // | |
| // Example: | |
| // { | |
| // Printer printer(output_stream.get(), '$'); | |
| // const NamespacePrinter namespace_printer(&printer, {"a", "b", "c"}); | |
| // // namespace opening will be opened here | |
| // ... | |
| // // namespace closing will be emitted here | |
| // } | |
| // | |
| // By default, the filename will be converted to a macro by substituting '/' and | |
| // '.' characters with '_'. If a different transformation is required, an | |
| // optional transformation function can be provided. | |
| // Must be included last. | |
| namespace google { | |
| namespace protobuf { | |
| namespace compiler { | |
| namespace cpp { | |
| // An RAII type for printing a namespace. | |
| class PROTOC_EXPORT NamespacePrinter final { | |
| public: | |
| explicit NamespacePrinter(google::protobuf::io::Printer* p, | |
| std::vector<std::string> namespace_components); | |
| ~NamespacePrinter(); | |
| private: | |
| google::protobuf::io::Printer* const p_; | |
| const std::vector<std::string> namespace_components_; | |
| }; | |
| } // namespace cpp | |
| } // namespace compiler | |
| } // namespace protobuf | |
| } // namespace google | |