//-------------------------------------------------------------------------------------------------- void legato::Executable::OutputPath ( const std::string& path ///< [IN] The file system path of the executable to be generated. ) //-------------------------------------------------------------------------------------------------- { m_OutputPath = path; if (m_CName == "") { CName(GetCSafeName(GetLastPathNode(m_OutputPath))); } }
//-------------------------------------------------------------------------------------------------- Api_t::Api_t ( const std::string& filePath ) //-------------------------------------------------------------------------------------------------- : m_FilePath(filePath) //-------------------------------------------------------------------------------------------------- { std::string fileName = GetLastPathNode(filePath); size_t pos = fileName.find_last_of('.'); if ((pos == std::string::npos) || (fileName.substr(pos) != ".api")) { throw Exception("Interface file '" + filePath + "' missing .api file name extension."); } m_Name = fileName.substr(0, pos); if (Apis.find(m_FilePath) != Apis.end()) { throw Exception("Parser internal error: Duplicate .api file '" + m_FilePath + "'."); } Apis[m_FilePath] = this; }