File indexing completed on 2025-10-30 08:43:33
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 
0017 
0018 
0019 
0020 
0021 
0022 
0023 
0024 
0025 
0026 #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_IFNDEF_GUARD_H__
0027 #define GOOGLE_PROTOBUF_COMPILER_CPP_IFNDEF_GUARD_H__
0028 
0029 #include <string>
0030 
0031 #include "absl/functional/any_invocable.h"
0032 #include "absl/strings/string_view.h"
0033 #include "google/protobuf/io/printer.h"
0034 
0035 
0036 #include "google/protobuf/port_def.inc"
0037 
0038 namespace google {
0039 namespace protobuf {
0040 namespace compiler {
0041 namespace cpp {
0042 
0043 class PROTOC_EXPORT IfdefGuardPrinter final {
0044  public:
0045   explicit IfdefGuardPrinter(google::protobuf::io::Printer* p,
0046                              absl::string_view filename);
0047 
0048   explicit IfdefGuardPrinter(
0049       google::protobuf::io::Printer* p, absl::string_view filename,
0050       absl::AnyInvocable<std::string(absl::string_view)> make_ifdef_identifier);
0051 
0052   ~IfdefGuardPrinter();
0053 
0054  private:
0055   google::protobuf::io::Printer* const p_;
0056   const std::string ifdef_identifier_;
0057 };
0058 
0059 #include "google/protobuf/port_undef.inc"
0060 
0061 }  
0062 }  
0063 }  
0064 }  
0065 
0066 #endif