code: def addClass(self, alias, klass):
          
          ref = self.class_idx
  
          self.class_ref[ref] = alias
          cd = self.classes[klass] = alias
  
          cd.reference = ref
  
          self.class_idx += 1
  
          return ref
docs: Creates a reference to C{class_def}.
  
          @param alias: C{ClassDefinition} instance.