Electroneum
Functions | Variables
pb2cpp Namespace Reference

Functions

def which (pgm)
 
def namespace_file (fpath, package)
 
def protoc (files, out_dir, additional_includes=(), package=None, force=False)
 
def update_message_files (tmpdir_out, out_dir, force=False)
 
def add_undef (out_dir)
 
def strip_leader (s, prefix)
 
def main ()
 

Variables

string AUTO_HEADER = "# Automatically generated by pb2cpp\n"
 
string UNDEF_STATEMENT
 
 PROTOC = None
 
 PROTOC_INCLUDE = None
 

Function Documentation

◆ add_undef()

def pb2cpp.add_undef (   out_dir)

◆ main()

def pb2cpp.main ( )

◆ namespace_file()

def pb2cpp.namespace_file (   fpath,
  package 
)
Adds / replaces package name. Simple regex parsing, may use https://github.com/ph4r05/plyprotobuf later

◆ protoc()

def pb2cpp.protoc (   files,
  out_dir,
  additional_includes = (),
  package = None,
  force = False 
)
Compile code with protoc and return the data.

◆ strip_leader()

def pb2cpp.strip_leader (   s,
  prefix 
)
Remove given prefix from underscored name.

◆ update_message_files()

def pb2cpp.update_message_files (   tmpdir_out,
  out_dir,
  force = False 
)

◆ which()

def pb2cpp.which (   pgm)

Variable Documentation

◆ AUTO_HEADER

string pb2cpp.AUTO_HEADER = "# Automatically generated by pb2cpp\n"

◆ PROTOC

pb2cpp.PROTOC = None

◆ PROTOC_INCLUDE

pb2cpp.PROTOC_INCLUDE = None

◆ UNDEF_STATEMENT

string pb2cpp.UNDEF_STATEMENT
Initial value:
1 = """
2 #ifdef minor
3 #undef minor
4 #endif
5 """