def cpp_class(package, message=None):
    """Returns the fully qualified class name for a message type"""
    if not message:
        return package.replace('.', '::')
    return '::%s::%s' % (package.replace('.', '::'), message)
