我的问题是“ 查看最新修订图纸的更有效方法是什么? ”
我计划的是这段代码
if(nextRevisionExists()) {
doSomethingWithOldRevision(drawingFile);
} else {
// MAXIMUM REVISION IS 150 TO PREVENT TOO MUCH LOAD
for(int i=currentRevision + 2; i <= 150; i++) {
if(revisionExists(i))
doSomethingWithOldRevision(drawingFile);
}
}
我不是专业程序员,而只是文档控制器。请理解我可怜的英语和编程知识不足。
答案 0 :(得分:1)
使用以下伪代码
create a map with key being filename and value being revision
do for each file{
Parse the file name and extract file name and revision
if the map already has the key as file name{
get its value from map, compare with current file's revision
}
else{
add the key value pair(name,revision) to the map
}
}