// ----------------------------------------------------------------------------
//
// Copyright (C) Columbia University, 1994. All Rights Reserved.
// Sameer A. Nene, Shree K. Nayar, Hiroshi Murase
//
// See file LICENSE for details of software license agreement.
//
// ----------------------------------------------------------------------------
//
// persscheme.C
//
// Author:               Sameer Nene
// Date:                 06/26/94
// Version:              1.0
// Modification History:
// Bugs:
//
// Classes:
//   PersistentSearchScheme
//
// Notes:
//   
// ----------------------------------------------------------------------------

#include "persistent.h"
#include "persscheme.h"

void* PersistentSearchScheme::d_protocol = (void*)(&PersistentSearchScheme::d_protocol);

int PersistentSearchScheme::hasProtocol(void* protocol) const
{
  return d_protocol == protocol;
}

PersistentSearchScheme* PersistentSearchScheme::safeCast(Persistent *p)
{
  return p -> hasProtocol(d_protocol) ? (PersistentSearchScheme*)p : 0;
}
