DEFINITION MODULE ColaC;
FROM TadItem IMPORT ITEM;

TYPE COLAC;

PROCEDURE Crear(): COLAC;
PROCEDURE Destruir(VAR c: COLAC);

PROCEDURE EsVacia(c: COLAC): BOOLEAN;
PROCEDURE Longitud(c: COLAC): CARDINAL;
(* pre: NOT EsVacia(c) *)
PROCEDURE Frente(c: COLAC): ITEM;

PROCEDURE Insertar(x: ITEM; VAR c: COLAC);
(* pre: NOT EsVacia(c) *)
PROCEDURE Extraer(VAR c: COLAC);

(* pre: NOT EsVacia(c) *)
PROCEDURE Rotar(VAR c: COLAC);

PROCEDURE Inicializar(c: COLAC);
PROCEDURE Elemento(c: COLAC): ITEM;

TYPE TIPO_ERROR = (SinError, SinMemoria, ColaCNoCreada,
                   ColaCVacia, IteracionCompleta);

PROCEDURE Error(): TIPO_ERROR;

END ColaC.


