MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / empty

Method empty

extern/json/json.hpp:4626–4654  ·  view source on GitHub ↗

! @brief checks whether the container is empty Checks if a JSON value has no elements. @return The return value depends on the different types and is defined as follows: Value type | return value ----------- | ------------- null | `true` boolean | `false` string | `false` number

Source from the content-addressed store, hash-verified

4624 @since version 1.0.0
4625 */
4626 bool empty() const noexcept
4627 {
4628 switch (m_type)
4629 {
4630 case value_t::null:
4631 {
4632 // null values are empty
4633 return true;
4634 }
4635
4636 case value_t::array:
4637 {
4638 // delegate call to array_t::empty()
4639 return m_value.array->empty();
4640 }
4641
4642 case value_t::object:
4643 {
4644 // delegate call to object_t::empty()
4645 return m_value.object->empty();
4646 }
4647
4648 default:
4649 {
4650 // all other types are nonempty
4651 return false;
4652 }
4653 }
4654 }
4655
4656 /*!
4657 @brief returns the number of elements

Callers 11

vector_pointer_modifiersFunction · 0.45
bind_pointer_vectorFunction · 0.45
resetMethod · 0.45
stopTimingMethod · 0.45
get_insertion_pointMethod · 0.45
add_pointer_implMethod · 0.45
dumpMethod · 0.45
is_rootMethod · 0.45
splitMethod · 0.45
replace_substringMethod · 0.45
flattenMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected