示例#1
0
Container::PathList Container::PackageLocations() const
{
    XPathWrangler xpath(_ocf, {{"ocf", "urn:oasis:names:tc:opendocument:xmlns:container"}});

    PathList output;
    for ( string& str : xpath.Strings(gRootfilePathsXPath) )
    {
        output.emplace_back(std::move(str));
    }

    return output;
}
示例#2
0
Container::PathList Container::PackageLocations() const
{
#if EPUB_COMPILER_SUPPORTS(CXX_INITIALIZER_LISTS)
    XPathWrangler xpath(_ocf, {{"ocf", "urn:oasis:names:tc:opendocument:xmlns:container"}});
#else
    XPathWrangler::NamespaceList __ns;
    __ns["ocf"] = OCFNamespaceURI;
    XPathWrangler xpath(_ocf, __ns);
#endif
    
    PathList output;
    for ( string& str : xpath.Strings(gRootfilePathsXPath) )
    {
        output.emplace_back(std::move(str));
    }
    
    return output;
}
示例#3
0
IResultPtr PerforceDepotView::move(const char* srcFile, const char* dstFile, ChangeListId changeListId)
{
	std::stringstream command;
	PathList paths;
	paths.emplace_back(srcFile);
	paths.emplace_back(dstFile);
	getLatest(paths);
	checkout(paths, changeListId);
	if (changeListId != kDefaultChangelist)
	{
		command << "move -c " << changeListId << " -f " << EscapePaths(paths);
	}
	else
	{
		command << "move -f " << EscapePaths(paths);
	}
	return RunCommand(command.str());
}