#pragma once

#include <string>

namespace torch {
namespace jit {

// Utility functions to maintain consistency between import and export paths.
namespace ImportExportHelpers {

// Convert a class type's qualifier name to the corresponding path the source
// file it should be written to.
//
// Qualifier is like: foo.bar.baz
// Returns: libs/foo/bar/baz.py
std::string qualifierToPath(const std::string& qualifier, size_t proto_version);

// Convert a source file path to a class type's qualifier name.
//
// Path is like: libs/foo/bar/baz.py
// Returns: foo.bar.baz
std::string pathToQualifier(const std::string& classPath, size_t proto_version);

} // namespace ImportExportHelpers
} // namespace jit
} // namespace torch
