#!/usr/bin/env python
# -*- coding: cp936 -*-

from proc0.ver1To2 import *
from proc0.ver2To3 import *
from proc0.ver3To4 import *
from proc0.ver4To5 import *
from proc0.ver5To6 import *
from proc0.ver6To7 import *
from proc0.ver7To8 import *
from proc0.ver8To9 import *
from proc0.ver9To10 import *
import BaseProc
import logging
import logger

logp = logger.FinalLogger.getLogger()

v1To2 = ver1To2()
v2To3 = ver2To3()
v3To4 = ver3To4()
v4To5 = ver4To5()
v5To6 = ver5To6()
v6To7 = ver6To7()
v7To8 = ver7To8()
v8To9 = ver8To9()
v9To10 = ver9To10()



support = [v1To2, v2To3, v3To4, v4To5, v5To6, v6To7, v7To8, v8To9, v9To10]


def verProcAll(inOld, inNew, inFn):
    for member in support:
        old, new = member.GetOldNew()
        if ((old == inOld) and (new == inNew)):
            return member.process(inFn)
            
    logp.error ('not support' , inOld, 'to', inNew)
    return 1
