/usr/include/cvc3/cdo.h is in libcvc3-dev 2.4.1-5ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | /*****************************************************************************/
/*!
* \file cdo.h
*
* Author: Clark Barrett
*
* Created: Wed Feb 12 17:27:43 2003
*
* <hr>
*
* License to use, copy, modify, sell and/or distribute this software
* and its documentation for any purpose is hereby granted without
* royalty, subject to the terms and conditions defined in the \ref
* LICENSE file provided with this distribution.
*
* <hr>
*
*/
/*****************************************************************************/
#ifndef _cvc3__include__cdo_h_
#define _cvc3__include__cdo_h_
#include "context.h"
namespace CVC3 {
///////////////////////////////////////////////////////////////////////////////
// //
// Class: CDO (Context Dependent Object) //
// Author: Clark Barrett //
// Created: Wed Feb 12 17:28:25 2003 //
// Description: Generic templated class for an object which must be saved //
// and restored as contexts are pushed and popped. Requires //
// that operator= be defined for the data class. //
// //
///////////////////////////////////////////////////////////////////////////////
template <class T>
class CDO :public ContextObj {
T d_data;
virtual ContextObj* makeCopy(ContextMemoryManager* cmm)
{ return new(cmm) CDO<T>(*this); }
virtual void restoreData(ContextObj* data) {
d_data = ((CDO<T>*)data)->d_data;
}
virtual void setNull(void) { d_data = T(); }
// Disable copy constructor and operator=
// If you need these, use smartcdo instead
CDO(const CDO<T>& cdo): ContextObj(cdo), d_data(cdo.d_data) { }
CDO<T>& operator=(const CDO<T>& cdo) {}
public:
CDO(Context* context) : ContextObj(context)
{ IF_DEBUG(setName("CDO");) }
CDO(Context* context, const T& data, int scope = -1)
: ContextObj(context) {
IF_DEBUG(setName("CDO")); ;
set(data, scope);
}
~CDO() {}
void set(const T& data, int scope=-1) { makeCurrent(scope); d_data = data; }
const T& get() const { return d_data; }
operator T() { return get(); }
CDO<T>& operator=(const T& data) { set(data); return *this; }
};
}
#endif
|