blob: 18e66a7987b65c05c8d6da541bb9db4ecc3e7072 [file] [log] [blame]
/*=========================================================================
* Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
* This product is protected by U.S. and international copyright
* and intellectual property laws. Pivotal products are covered by
* one or more patents listed at http://www.pivotal.io/patents.
*=========================================================================
*/
/*
* Delta.cpp
*
* Created on: Nov 9, 2009
* Author: abhaware
*/
#include "Delta.hpp"
using namespace gemfire;
DeltaPtr Delta::clone( )
{
DataOutput out;
Cacheable* ptr = dynamic_cast< Cacheable* >( this );
out.writeObject( ptr );
DataInput in( out.getBuffer(), out.getBufferLength( ) );
CacheablePtr theClonePtr;
in.readObject( theClonePtr );
return DeltaPtr( theClonePtr );
}