OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
t_c_generator.cc File Reference
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <ctype.h>
#include "platform.h"
#include "t_oop_generator.h"
Include dependency graph for t_c_generator.cc:

Go to the source code of this file.

Classes

class  t_c_generator
 

Functions

string initial_caps_to_underscores (string name)
 
string to_upper_case (string name)
 
string to_lower_case (string name)
 

Function Documentation

string initial_caps_to_underscores ( string  name)

Makes a string friendly to C code standards by lowercasing and adding underscores, with the exception of the first character. For example:

Input: "ZomgCamelCase" Output: "zomg_camel_case"

Definition at line 2891 of file t_c_generator.cc.

string to_lower_case ( string  name)

Lower case a string. Wraps boost's string utility.

Definition at line 2877 of file t_c_generator.cc.

string to_upper_case ( string  name)

Upper case a string. Wraps boost's string utility.

Definition at line 2867 of file t_c_generator.cc.