;;;
;;; VERSIONSTR:  Version control classes
;;;
;;; ----------------------------------------------------------------------
;;;
;;; This file is part of ILOG Talk.
;;; Inquiries to ILOG S.A.
;;;              9 rue de Verdun, BP 85,
;;;              94253 Gentilly Cedex, France.
;;;
;;; Copyright (c) 1992-1996 by ILOG
;;; $Header: /nfs/talk/work/talk/contrib/src/RCS/iltvers.t,v 3.11 1996/01/13 12:03:54 v16admin Exp $
;;; ----------------------------------------------------------------------
;;;

(defglobal .*version-control-systems* (make-hash-table))

(defun .add-version-control-system (name prototype)
  ;; Add the system instance PROTOTYPE to the version control system
  ;; table.
  (setf (htref .*version-control-systems* name) prototype)
  name)

(defun find-version-control-system (name)
  (htref .*version-control-systems* name))

(defmethod initialize-instance ((class .<vcs-class>) initlist)
  (call-next-method)
  (let ((prototype (make-instance class)))
    (setf (.vcs-class-prototype class) prototype)
    (.add-version-control-system (.vcs-class-name class) prototype)
    class))

(.defclass .<default-system> ()
  ;; The name of the version control system.
  ;; \\ can't be defined with DEFINE-VERSION-CONTROL-SYSTEM because of
  ;; the funny superclass.
  ()
  metaclass: .<vcs-class>
  metaclass-keywords: (.name: 'default))
