# Path: pysnmp/smi/error.py
# class SmiError(PySnmpError, PyAsn1Error): pass
# class MibOperationError(SmiError):
# class GenError(MibOperationError): pass
# class NoAccessError(MibOperationError): pass
# class WrongTypeError(MibOperationError): pass
# class WrongValueError(MibOperationError): pass
# class NoCreationError(MibOperationError): pass
# class InconsistentValueError(MibOperationError): pass
# class ResourceUnavailableError(MibOperationError): pass
# class CommitFailedError(MibOperationError): pass
# class UndoFailedError(MibOperationError): pass
# class AuthorizationError(MibOperationError): pass
# class NotWritableError(MibOperationError): pass
# class InconsistentNameError(MibOperationError): pass
# class NoSuchObjectError(MibOperationError): pass
# class NoSuchInstanceError(MibOperationError): pass
# class EndOfMibViewError(MibOperationError): pass
# class RowCreationWanted(MibOperationError): pass
# class RowDestructionWanted(MibOperationError): pass
#     def __init__(self, **kwargs): self.__outArgs = kwargs
#     def __str__(self): return '%s(%s)' % (
#     def __getitem__(self, key): return self.__outArgs[key]
#     def __contains__(self, key): return key in self.__outArgs
#     def get(self, key, defVal=None): return self.__outArgs.get(key, defVal)
#     def keys(self): return self.__outArgs.keys()
#     def update(self, d): self.__outArgs.update(d)
# 
# Path: pysnmp/debug.py
# class Debug:
#     def __init__(self, *flags):
#     def __str__(self):
#     def __call__(self, msg):
#     def __and__(self, flag):
#     def __rand__(self, flag):
# def setLogger(l):
# def hexdump(octets):


import sys
from pysnmp.smi import error
from pysnmp import debug
        # Attach Table Columns to Table Rows
        for col in cols.values():
            rowName = col.name[:-1] # XXX
            if rowName in rows:
                rows[rowName].registerSubtrees(col)
            else:
                raise error.SmiError(
                    'Orphan MIB table column %r at %r' % (col, self)
                    )
            lastBuildSyms[col.name] = rowName
            
        # Attach Table Rows to MIB tree
        for row in rows.values():
            mibTree.registerSubtrees(row)
            lastBuildSyms[row.name] = mibTree.name

        # Attach Tables to MIB tree
        for table in tables.values():
            mibTree.registerSubtrees(table)
            lastBuildSyms[table.name] = mibTree.name
            
        # Attach Scalars to MIB tree
        for scalar in scalars.values():
            mibTree.registerSubtrees(scalar)
            lastBuildSyms[scalar.name] = mibTree.name

        self.lastBuildSyms = lastBuildSyms
        
        self.lastBuildId = self.mibBuilder.lastBuildId
        

# Path: pysnmp/smi/error.py
# class SmiError(PySnmpError, PyAsn1Error): pass
# class MibOperationError(SmiError):
# class GenError(MibOperationError): pass
# class NoAccessError(MibOperationError): pass
# class WrongTypeError(MibOperationError): pass
# class WrongValueError(MibOperationError): pass
# class NoCreationError(MibOperationError): pass
# class InconsistentValueError(MibOperationError): pass
# class ResourceUnavailableError(MibOperationError): pass
# class CommitFailedError(MibOperationError): pass
# class UndoFailedError(MibOperationError): pass
# class AuthorizationError(MibOperationError): pass
# class NotWritableError(MibOperationError): pass
# class InconsistentNameError(MibOperationError): pass
# class NoSuchObjectError(MibOperationError): pass
# class NoSuchInstanceError(MibOperationError): pass
# class EndOfMibViewError(MibOperationError): pass
# class RowCreationWanted(MibOperationError): pass
# class RowDestructionWanted(MibOperationError): pass
#     def __init__(self, **kwargs): self.__outArgs = kwargs
#     def __str__(self): return '%s(%s)' % (
#     def __getitem__(self, key): return self.__outArgs[key]
#     def __contains__(self, key): return key in self.__outArgs
#     def get(self, key, defVal=None): return self.__outArgs.get(key, defVal)
#     def keys(self): return self.__outArgs.keys()
#     def update(self, d): self.__outArgs.update(d)
# 
# Path: pysnmp/debug.py
# class Debug:
#     def __init__(self, *flags):
#     def __str__(self):
#     def __call__(self, msg):
#     def __and__(self, flag):
#     def __rand__(self, flag):
# def setLogger(l):
# def hexdump(octets):


# Path: pysnmp/smi/instrum.py
import sys
from pysnmp.smi import error
from pysnmp import debug

        # Attach Table Columns to Table Rows
        for col in cols.values():
            rowName = col.name[:-1] # XXX
            if rowName in rows:
                rows[rowName].registerSubtrees(col)
            else:
                raise error.SmiError(
                    'Orphan MIB table column %r at %r' % (col, self)
                    )
            lastBuildSyms[col.name] = rowName
            
        # Attach Table Rows to MIB tree
        for row in rows.values():
            mibTree.registerSubtrees(row)
            lastBuildSyms[row.name] = mibTree.name

        # Attach Tables to MIB tree
        for table in tables.values():
            mibTree.registerSubtrees(table)
            lastBuildSyms[table.name] = mibTree.name
            
        # Attach Scalars to MIB tree
        for scalar in scalars.values():
            mibTree.registerSubtrees(scalar)
            lastBuildSyms[scalar.name] = mibTree.name

        self.lastBuildSyms = lastBuildSyms
        
        self.lastBuildId = self.mibBuilder.lastBuildId
        

        debug.logger & debug.flagIns and debug.logger('__indexMib: rebuilt')