Wizard
Software Engineering Project - Wizard
Loading...
Searching...
No Matches
cpp.gmock_class Namespace Reference

Functions

 _RenderType (ast_type)
 
 _GenerateArg (source)
 
 _EscapeForMacro (s)
 
 _GenerateMethods (output_lines, source, class_node)
 
 _GenerateMocks (filename, source, ast_list, desired_class_names)
 
 main (argv=sys.argv)
 

Variables

 _dummy = set
 
 set = sets.Set
 
tuple _VERSION = (1, 0, 1)
 
int _INDENT = 2
 

Detailed Description

Generate Google Mock classes from base classes.

This program will read in a C++ source file and output the Google Mock
classes for the specified classes.  If no class is specified, all
classes in the source file are emitted.

Usage:
  gmock_class.py header-file.h [ClassName]...

Output is sent to stdout.

Function Documentation

◆ _EscapeForMacro()

cpp.gmock_class._EscapeForMacro ( s)
protected
Escapes a string for use as an argument to a C++ macro.

◆ _GenerateArg()

cpp.gmock_class._GenerateArg ( source)
protected
Strips out comments, default arguments, and redundant spaces from a single argument.

Args:
  source: A string for a single argument.

Returns:
  Rendered string of the argument.

◆ _RenderType()

cpp.gmock_class._RenderType ( ast_type)
protected
Renders the potentially recursively templated type into a string.

Args:
  ast_type: The AST of the type.

Returns:
  Rendered string of the type.