00001 /* moveablebuffer.h 00002 */ 00003 00004 /* Copyright 2009 10gen Inc. 00005 * 00006 * Licensed under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00019 #pragma once 00020 00021 namespace mongo { 00022 00026 struct MoveableBuffer { 00027 MoveableBuffer(); 00028 MoveableBuffer(void *); 00029 MoveableBuffer& operator=(const MoveableBuffer&); 00030 ~MoveableBuffer(); 00031 00032 void *p; 00033 }; 00034 00035 /* implementation (inlines) below */ 00036 00037 // this is a temp stub implementation...not really done yet - just having everything compile & such for checkpointing into git 00038 00039 inline MoveableBuffer::MoveableBuffer() : p(0) { } 00040 00041 inline MoveableBuffer::MoveableBuffer(void *_p) : p(_p) { } 00042 00043 inline MoveableBuffer& MoveableBuffer::operator=(const MoveableBuffer& r) { 00044 p = r.p; 00045 return *this; 00046 } 00047 00048 inline MoveableBuffer::~MoveableBuffer() { 00049 } 00050 00051 }