def make_ctocpp_header(header, clsname):
    cls = header.get_class(clsname)
    if (cls is None):
        raise Exception(('Class does not exist: ' + clsname))
    clientside = cls.is_client_side()
    directory = cls.get_file_directory()
    defname = ''
    if (not (directory is None)):
        defname += (directory + '_')
    defname += get_capi_name(clsname[3:], False)
    defname = defname.upper()
    capiname = cls.get_capi_name()
    result = get_copyright()
    result += (((((('#ifndef CEF_LIBCEF_DLL_CTOCPP_' + defname) + '_CTOCPP_H_\n') + '#define CEF_LIBCEF_DLL_CTOCPP_') + defname) + '_CTOCPP_H_\n') + '#pragma once\n')
    if clientside:
        result += '\n#if !defined(BUILDING_CEF_SHARED)\n#error This file can be included DLL-side only\n#endif\n'
    else:
        result += '\n#if !defined(WRAPPING_CEF_SHARED)\n#error This file can be included wrapper-side only\n#endif\n'
    func_body = make_function_body(header, cls)
    if ((func_body.find('std::map') > 0) or (func_body.find('std::multimap') > 0)):
        result += '\n#include <map>'
    if (func_body.find('std::vector') > 0):
        result += '\n#include <vector>'
    result += ((((('\n#include "include/' + cls.get_file_name()) + '"') + '\n#include "include/capi/') + cls.get_capi_file_name()) + '"\n')
    declares = cls.get_forward_declares()
    for declare in declares:
        dcls = header.get_class(declare)
        if (dcls.get_file_name() != cls.get_file_name()):
            result += (((('#include "include/' + dcls.get_file_name()) + '"\n#include "include/capi/') + dcls.get_capi_file_name()) + '"\n')
    base_class_name = header.get_base_class_name(clsname)
    base_scoped = (True if (base_class_name == 'CefBaseScoped') else False)
    if base_scoped:
        template_file = 'ctocpp_scoped.h'
        template_class = 'CefCToCppScoped'
    else:
        template_file = 'ctocpp_ref_counted.h'
        template_class = 'CefCToCppRefCounted'
    result += (('#include "libcef_dll/ctocpp/' + template_file) + '"')
    result += '\n\n// Wrap a C structure with a C++ class.\n'
    if clientside:
        result += '// This class may be instantiated and accessed DLL-side only.\n'
    else:
        result += '// This class may be instantiated and accessed wrapper-side only.\n'
    result += ((((((((((((((('class ' + clsname) + 'CToCpp\n') + '    : public ') + template_class) + '<') + clsname) + 'CToCpp, ') + clsname) + ', ') + capiname) + '> {\n') + ' public:\n') + '  ') + clsname) + 'CToCpp();\n\n')
    result += func_body
    result += '};\n\n'
    result += (('#endif  // CEF_LIBCEF_DLL_CTOCPP_' + defname) + '_CTOCPP_H_')
    return result
def make_ctocpp_header(header, clsname):
    cls = header.get_class(clsname)
    if (cls is None):
        raise Exception(('Class does not exist: ' + clsname))
    clientside = cls.is_client_side()
    directory = cls.get_file_directory()
    defname = 
    if (not (directory is None)):
        defname += (directory + '_')
    defname += get_capi_name(clsname[3:], False)
    defname = defname.upper()
    capiname = cls.get_capi_name()
    result = get_copyright()
    result += (((((('#ifndef CEF_LIBCEF_DLL_CTOCPP_' + defname) + '_CTOCPP_H_\n') + '#define CEF_LIBCEF_DLL_CTOCPP_') + defname) + '_CTOCPP_H_\n') + '#pragma once\n')
    if clientside:
        result += '\n#if !defined(BUILDING_CEF_SHARED)\n#error This file can be included DLL-side only\n#endif\n'
    else:
        result += '\n#if !defined(WRAPPING_CEF_SHARED)\n#error This file can be included wrapper-side only\n#endif\n'
    func_body = make_function_body(header, cls)
    if ((func_body.find('std::map') > 0) or (func_body.find('std::multimap') > 0)):
        result += '\n#include <map>'
    if (func_body.find('std::vector') > 0):
        result += '\n#include <vector>'
    result += ((((('\n#include "include/' + cls.get_file_name()) + '"') + '\n#include "include/capi/') + cls.get_capi_file_name()) + '"\n')
    declares = cls.get_forward_declares()
    for declare in declares:
        dcls = header.get_class(declare)
        if (dcls.get_file_name() != cls.get_file_name()):
            result += (((('#include "include/' + dcls.get_file_name()) + '"\n#include "include/capi/') + dcls.get_capi_file_name()) + '"\n')
    base_class_name = header.get_base_class_name(clsname)
    base_scoped = (True if (base_class_name == 'CefBaseScoped') else False)
    if base_scoped:
        template_file = 'ctocpp_scoped.h'
        template_class = 'CefCToCppScoped'
    else:
        template_file = 'ctocpp_ref_counted.h'
        template_class = 'CefCToCppRefCounted'
    result += (('#include "libcef_dll/ctocpp/' + template_file) + '"')
    result += '\n\n// Wrap a C structure with a C++ class.\n'
    if clientside:
        result += '// This class may be instantiated and accessed DLL-side only.\n'
    else:
        result += '// This class may be instantiated and accessed wrapper-side only.\n'
    result += ((((((((((((((('class ' + clsname) + 'CToCpp\n') + '    : public ') + template_class) + '<') + clsname) + 'CToCpp, ') + clsname) + ', ') + capiname) + '> {\n') + ' public:\n') + '  ') + clsname) + 'CToCpp();\n\n')
    result += func_body
    result += '};\n\n'
    result += (('#endif  // CEF_LIBCEF_DLL_CTOCPP_' + defname) + '_CTOCPP_H_')
    return result