• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

arangodb / velocypack / 3998645281

pending completion
3998645281

Pull #148

github

GitHub
Merge b1e3c924b into 5a28b6413
Pull Request #148: use separate namespace for xxh functions

0 of 5107 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Value.cpp
1
////////////////////////////////////////////////////////////////////////////////
2
/// DISCLAIMER
3
///
4
/// Copyright 2014-2020 ArangoDB GmbH, Cologne, Germany
5
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
6
///
7
/// Licensed under the Apache License, Version 2.0 (the "License");
8
/// you may not use this file except in compliance with the License.
9
/// You may obtain a copy of the License at
10
///
11
///     http://www.apache.org/licenses/LICENSE-2.0
12
///
13
/// Unless required by applicable law or agreed to in writing, software
14
/// distributed under the License is distributed on an "AS IS" BASIS,
15
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
/// See the License for the specific language governing permissions and
17
/// limitations under the License.
18
///
19
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
20
///
21
/// @author Max Neunhoeffer
22
/// @author Jan Steemann
23
////////////////////////////////////////////////////////////////////////////////
24

25
#include "velocypack/Exception.h"
26
#include "velocypack/Value.h"
27

28
using namespace arangodb::velocypack;
29

30
// creates a Value with the specified type Array or Object
31
Value::Value(ValueType t, bool allowUnindexed)
×
32
    : _valueType(t), _cType(CType::None), _value(allowUnindexed) {
×
33
  // we use the boolean part to store the allowUnindexed value
34
  if (allowUnindexed &&
×
35
      (_valueType != ValueType::Array && _valueType != ValueType::Object)) {
×
36
    throw Exception(Exception::InvalidValueType, "Expecting compound type");
×
37
  }
38
}
×
39

40
bool Value::unindexed() const {
×
41
  if (_valueType != ValueType::Array && _valueType != ValueType::Object) {
×
42
    throw Exception(Exception::InvalidValueType, "Expecting compound type");
×
43
  }
44
  return _value.b;
×
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc