From 8148d73c033f3d5c0ddb0a358db5d2e6bd9cb51a Mon Sep 17 00:00:00 2001 From: jsteemann Date: Thu, 17 Mar 2016 00:36:34 +0100 Subject: [PATCH] removed some more Shaper --- arangod/VocBase/DocumentAccessor.cpp | 2 ++ arangod/VocBase/DocumentAccessor.h | 34 ---------------------- arangod/VocBase/Shaper.h | 43 ---------------------------- 3 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 arangod/VocBase/Shaper.h diff --git a/arangod/VocBase/DocumentAccessor.cpp b/arangod/VocBase/DocumentAccessor.cpp index 11c0f015cd..1dbb80d3eb 100644 --- a/arangod/VocBase/DocumentAccessor.cpp +++ b/arangod/VocBase/DocumentAccessor.cpp @@ -308,6 +308,7 @@ void DocumentAccessor::lookupDocumentAttribute(char const* name, return; } +#if 0 if (name[1] == 'r' && nameLength == 4 && memcmp(name, TRI_VOC_ATTRIBUTE_REV, nameLength) == 0) { // _rev @@ -322,6 +323,7 @@ void DocumentAccessor::lookupDocumentAttribute(char const* name, _current = _json.get(); return; } +#endif #if 0 // TODO diff --git a/arangod/VocBase/DocumentAccessor.h b/arangod/VocBase/DocumentAccessor.h index 440900f06e..6580a9c487 100644 --- a/arangod/VocBase/DocumentAccessor.h +++ b/arangod/VocBase/DocumentAccessor.h @@ -28,7 +28,6 @@ #include "Basics/JsonHelper.h" #include "Utils/Transaction.h" #include "VocBase/document-collection.h" -#include "VocBase/Shaper.h" #include "Wal/Marker.h" #include @@ -123,37 +122,4 @@ static inline std::string TRI_EXTRACT_MARKER_KEY(arangodb::Transaction* trx, trx, static_cast(mptr->getDataPtr())); } -//////////////////////////////////////////////////////////////////////////////// -/// @brief extracts the revision id from a marker -//////////////////////////////////////////////////////////////////////////////// - -static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID( - arangodb::Transaction*, TRI_df_marker_t const* marker) { -#if 0 - if (marker->_type == TRI_WAL_MARKER_VPACK_DOCUMENT) { - auto b = reinterpret_cast(marker) + - sizeof(arangodb::wal::vpack_document_marker_t); - VPackSlice slice(reinterpret_cast(b)); - VPackSlice value = slice.get(TRI_VOC_ATTRIBUTE_REV); - return arangodb::velocypack::readUInt64(value.start() + 1); - } - -#ifdef ARANGODB_ENABLE_MAINTAINER_MODE - // invalid marker type - TRI_ASSERT(false); -#endif -#endif - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief extracts the revision id from a master pointer -//////////////////////////////////////////////////////////////////////////////// - -static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID(arangodb::Transaction* trx, - TRI_doc_mptr_t const* mptr) { - return TRI_EXTRACT_MARKER_RID( - trx, static_cast(mptr->getDataPtr())); -} - #endif diff --git a/arangod/VocBase/Shaper.h b/arangod/VocBase/Shaper.h deleted file mode 100644 index b0ca9f6231..0000000000 --- a/arangod/VocBase/Shaper.h +++ /dev/null @@ -1,43 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// http://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// -/// Copyright holder is ArangoDB GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -/// @author Martin Schoenert -//////////////////////////////////////////////////////////////////////////////// - -#ifndef ARANGOD_VOC_BASE_SHAPER_H -#define ARANGOD_VOC_BASE_SHAPER_H 1 - -#include "Basics/Common.h" - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json shaper -//////////////////////////////////////////////////////////////////////////////// - -class Shaper { - public: - Shaper(Shaper const&) = delete; - Shaper& operator=(Shaper const&) = delete; - Shaper() {} - virtual ~Shaper() {} - -}; - -#endif