LSST Applications g0265f82a02+c6dfa2ddaf,g1162b98a3f+ffe7eabc7e,g2079a07aa2+1b2e822518,g2bbee38e9b+c6dfa2ddaf,g337abbeb29+c6dfa2ddaf,g36da64cc00+ea84795170,g3ddfee87b4+955a963fd8,g50ff169b8f+2eb0e556e8,g52b1c1532d+90ebb246c7,g555ede804d+955a963fd8,g591dd9f2cf+bac198a2cb,g5ec818987f+420292cfeb,g858d7b2824+d6c9a0a3b8,g876c692160+aabc49a3c3,g8a8a8dda67+90ebb246c7,g8cdfe0ae6a+4fd9e222a8,g99cad8db69+e6cd765486,g9ddcbc5298+a1346535a5,ga1e77700b3+df8f93165b,ga8c6da7877+acd47f83f4,gae46bcf261+c6dfa2ddaf,gb0e22166c9+8634eb87fb,gb3f2274832+12c8382528,gba4ed39666+1ac82b564f,gbb8dafda3b+0574160a1f,gbeb006f7da+dea2fbb49f,gc28159a63d+c6dfa2ddaf,gc86a011abf+d6c9a0a3b8,gcf0d15dbbd+955a963fd8,gdaeeff99f8+1cafcb7cd4,gdc0c513512+d6c9a0a3b8,ge79ae78c31+c6dfa2ddaf,geb67518f79+ba1859f325,gee10cc3b42+90ebb246c7,gf1cff7945b+d6c9a0a3b8,w.2024.13
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Types | Protected Member Functions | List of all members
lsst::afw::typehandling::MutableGenericMap< K > Class Template Referenceabstract

Interface for a GenericMap that allows element addition and removal. More...

#include <GenericMap.h>

Inheritance diagram for lsst::afw::typehandling::MutableGenericMap< K >:
lsst::afw::typehandling::GenericMap< K > lsst::afw::typehandling::SimpleGenericMap< K >

Public Types

using key_type = K
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

virtual ~MutableGenericMap () noexcept=default
 
virtual void clear () noexcept=0
 Remove all of the mappings from this map.
 
template<typename T >
bool insert (Key< K, T > const &key, T const &value)
 Insert an element into the map, if the map doesn't already contain a mapping with the same or a conflicting key.
 
template<typename T >
std::pair< Key< K, T >, bool > insert (K const &key, T const &value)
 Insert an element into the map, if the map doesn't already contain a mapping with a conflicting key.
 
template<typename T >
bool erase (Key< K, T > const &key)
 Remove the mapping for a key from this map, if it exists.
 
virtual size_type size () const noexcept=0
 Return the number of key-value pairs in the map.
 
virtual bool empty () const noexcept=0
 Return true if this map contains no key-value pairs.
 
virtual size_type max_size () const noexcept=0
 Return the maximum number of elements the container is able to hold due to system or library implementation limitations.
 
template<typename T >
size_type count (Key< K, T > const &key) const
 Return the number of elements mapped to the specified key.
 
virtual bool contains (K const &key) const =0
 Return true if this map contains a mapping whose key has the specified label.
 
template<typename T >
bool contains (Key< K, T > const &key) const
 Return true if this map contains a mapping for the specified key.
 
virtual std::vector< K > const & keys () const noexcept=0
 Return the set of all keys, without type information.
 
template<class Visitor >
auto apply (Visitor &&visitor) const
 Apply an operation to each key-value pair in the map.
 
template<class Visitor >
auto apply (Visitor &&visitor)
 Apply a modifying operation to each key-value pair in the map.
 
template<typename T , typename std::enable_if_t<!detail::IS_SMART_PTR< T >, int > = 0>
T & at (Key< K, T > const &key)
 Return a reference to the mapped value of the element with key equal to key.
 
template<typename T , typename std::enable_if_t<!detail::IS_SMART_PTR< T >, int > = 0>
T const & at (Key< K, T > const &key) const
 Return a reference to the mapped value of the element with key equal to key.
 
template<typename T , typename std::enable_if_t< std::is_base_of< Storable, T >::value, int > = 0>
std::shared_ptr< T > at (Key< K, std::shared_ptr< T > > const &key) const
 Return a reference to the mapped value of the element with key equal to key.
 
virtual bool operator== (GenericMap const &other) const noexcept
 Test for map equality.
 
bool operator!= (GenericMap const &other) const
 Test for map equality.
 

Protected Types

using StorableType
 The types that can be stored in a map.
 
using ConstValueReference = decltype(_typeToConstRef(std::declval<StorableType>()))
 A type-agnostic reference to the value stored inside the map.
 
using ValueReference = decltype(_typeToRef(std::declval<StorableType>()))
 A type-agnostic reference to the value stored inside the map.
 

Protected Member Functions

virtual bool unsafeInsert (K key, StorableType &&value)=0
 Create a new mapping with key equal to key and value equal to value.
 
virtual bool unsafeErase (K key)=0
 Remove the mapping for a key from this map, if it exists.
 
virtual ConstValueReference unsafeLookup (K key) const =0
 Return a reference to the mapped value of the element with key equal to key.
 
ValueReference unsafeLookup (K key)
 Return a reference to the mapped value of the element with key equal to key.
 

Detailed Description

template<typename K>
class lsst::afw::typehandling::MutableGenericMap< K >

Interface for a GenericMap that allows element addition and removal.

In Python, a MutableGenericMap behaves like a collections.abc.MutableMapping.

Note
Unlike standard library maps, this class does not support operator[] or insert_or_assign. This is because these operations would have surprising behavior when dealing with keys of different types but the same Key::getId().

Definition at line 597 of file GenericMap.h.

Member Typedef Documentation

◆ ConstValueReference

template<typename K >
using lsst::afw::typehandling::GenericMap< K >::ConstValueReference = decltype(_typeToConstRef(std::declval<StorableType>()))
protectedinherited

A type-agnostic reference to the value stored inside the map.

These are the reference equivalents (T const& or T&) of StorableType.

Definition at line 369 of file GenericMap.h.

◆ difference_type

template<typename K >
using lsst::afw::typehandling::GenericMap< K >::difference_type = std::ptrdiff_t
inherited

Definition at line 83 of file GenericMap.h.

◆ key_type

template<typename K >
using lsst::afw::typehandling::GenericMap< K >::key_type = K
inherited

Definition at line 81 of file GenericMap.h.

◆ size_type

template<typename K >
using lsst::afw::typehandling::GenericMap< K >::size_type = std::size_t
inherited

Definition at line 82 of file GenericMap.h.

◆ StorableType

template<typename K >
using lsst::afw::typehandling::GenericMap< K >::StorableType
protectedinherited
Initial value:
std::variant<bool, int, long, long long, float, double, std::string,

The types that can be stored in a map.

Keys of any subclass of Storable are implemented using PolymorphicValue to preserve type.

Definition at line 359 of file GenericMap.h.

◆ ValueReference

template<typename K >
using lsst::afw::typehandling::GenericMap< K >::ValueReference = decltype(_typeToRef(std::declval<StorableType>()))
protectedinherited

A type-agnostic reference to the value stored inside the map.

These are the reference equivalents (T const& or T&) of StorableType.

Definition at line 370 of file GenericMap.h.

Constructor & Destructor Documentation

◆ ~MutableGenericMap()

template<typename K >
virtual lsst::afw::typehandling::MutableGenericMap< K >::~MutableGenericMap ( )
virtualdefaultnoexcept

Member Function Documentation

◆ apply() [1/2]

template<typename K >
template<class Visitor >
auto lsst::afw::typehandling::GenericMap< K >::apply ( Visitor && visitor)
inlineinherited

Apply a modifying operation to each key-value pair in the map.

Template Parameters
Visitora callable that takes a key and a value. Requirements as for apply(Visitor&&) const, except that it may take non-const references to values.
Parameters
visitorthe visitor to apply
Returns
if Visitor has a return value, a std::vector of values returned from applying visitor to each key in keys, in that order. Otherwise, void.
Exception Safety
Provides basic exception safety if Visitor is exception-safe.
Note
This implementation calls keys, then calls unsafeLookup for each key before passing the result to visitor.

Definition at line 331 of file GenericMap.h.

331 {
332 // Delegate to private methods to hide special-casing of Visitor
333 return _apply(visitor);
334 }

◆ apply() [2/2]

template<typename K >
template<class Visitor >
auto lsst::afw::typehandling::GenericMap< K >::apply ( Visitor && visitor) const
inlineinherited

Apply an operation to each key-value pair in the map.

Template Parameters
Visitora callable that takes a key and a value. See below for exact requirements.
Parameters
visitorthe visitor to apply
Returns
if Visitor has a return value, a std::vector of values returned from applying visitor to each key in keys, in that order. Otherwise, void.
Exception Safety
Provides the same level of exception safety as Visitor, or strong exception safety if Visitor cannot throw.

A Visitor must define one or more operator() that take a weakly-typed key and a value. Each operator() must return the same type (which may be void). Through any combination of overloading or templates, the visitor must accept values of the following types:

  • either bool or bool const&
  • either int or int const&
  • either long or long const&
  • either long long or long long const&
  • either float or float const&
  • either double or double const&
  • std::string const&
  • Storable const&
  • std::shared_ptr<Storable const>
Note
This implementation calls keys, then calls unsafeLookup for each key before passing the result to visitor.

An example visitor that prints each key-value pair to standard output:

template <typename K>
class Printer {
public:
    template <typename V>
    void operator()(K const& key, V const& value) {
        std::cout << key << ": " << value << "," << std::endl;
    }

    void operator()(K const& key, Storable const& value) {
        std::cout << key << ": ";
        try {
            std::cout << value;
        } catch (UnsupportedOperationException const&) {
            std::cout << "[unprintable]";
        }
        std::cout << "," << std::endl;
    }

    void operator()(K const& key, std::shared_ptr<Storable const> value) {
        if (value != nullptr) {
            operator()(key, *value);
        } else {
            operator()(key, "null");
        }
    }
};

Definition at line 309 of file GenericMap.h.

309 {
310 // Delegate to private methods to hide special-casing of Visitor
311 return _apply(visitor);
312 }

◆ at() [1/3]

template<typename K >
template<typename T , typename std::enable_if_t< std::is_base_of< Storable, T >::value, int > = 0>
std::shared_ptr< T > lsst::afw::typehandling::GenericMap< K >::at ( Key< K, std::shared_ptr< T > > const & key) const
inlineinherited

Return a reference to the mapped value of the element with key equal to key.

Template Parameters
Tthe type of the element mapped to key. It may be the exact type of the element, if known, or any type to which its references or pointers can be implicitly converted (e.g., a superclass). For example, references to built-in types are not convertible, so you can't retrieve an int with T=long.
Parameters
keythe key of the element to find
Returns
a reference to the T mapped to key, if one exists
Exceptions
pex::exceptions::OutOfRangeErrorThrown if the map does not have a T with the specified key
Exception Safety
Provides strong exception safety.
Note
This implementation calls unsafeLookup once, then uses templates and RTTI to determine if the value is of the expected type.

Definition at line 121 of file GenericMap.h.

121 {
122 // Delegate to private methods to hide further special-casing of T
123 return _at(key);
124 }

◆ at() [2/3]

template<typename K >
template<typename T , typename std::enable_if_t<!detail::IS_SMART_PTR< T >, int > = 0>
T & lsst::afw::typehandling::GenericMap< K >::at ( Key< K, T > const & key)
inlineinherited

Return a reference to the mapped value of the element with key equal to key.

Template Parameters
Tthe type of the element mapped to key. It may be the exact type of the element, if known, or any type to which its references or pointers can be implicitly converted (e.g., a superclass). For example, references to built-in types are not convertible, so you can't retrieve an int with T=long.
Parameters
keythe key of the element to find
Returns
a reference to the T mapped to key, if one exists
Exceptions
pex::exceptions::OutOfRangeErrorThrown if the map does not have a T with the specified key
Exception Safety
Provides strong exception safety.
Note
This implementation calls unsafeLookup once, then uses templates and RTTI to determine if the value is of the expected type.

Definition at line 109 of file GenericMap.h.

109 {
110 // Both casts are safe; see Effective C++, Item 3
111 return const_cast<T&>(static_cast<const GenericMap&>(*this).at(key));
112 }

◆ at() [3/3]

template<typename K >
template<typename T , typename std::enable_if_t<!detail::IS_SMART_PTR< T >, int > = 0>
T const & lsst::afw::typehandling::GenericMap< K >::at ( Key< K, T > const & key) const
inlineinherited

Return a reference to the mapped value of the element with key equal to key.

Template Parameters
Tthe type of the element mapped to key. It may be the exact type of the element, if known, or any type to which its references or pointers can be implicitly converted (e.g., a superclass). For example, references to built-in types are not convertible, so you can't retrieve an int with T=long.
Parameters
keythe key of the element to find
Returns
a reference to the T mapped to key, if one exists
Exceptions
pex::exceptions::OutOfRangeErrorThrown if the map does not have a T with the specified key
Exception Safety
Provides strong exception safety.
Note
This implementation calls unsafeLookup once, then uses templates and RTTI to determine if the value is of the expected type.

Definition at line 115 of file GenericMap.h.

115 {
116 // Delegate to private methods to hide further special-casing of T
117 return _at(key);
118 }

◆ clear()

template<typename K >
virtual void lsst::afw::typehandling::MutableGenericMap< K >::clear ( )
pure virtualnoexcept

Remove all of the mappings from this map.

After this call, the map will be empty.

Implemented in lsst::afw::typehandling::SimpleGenericMap< K >.

◆ contains() [1/2]

template<typename K >
virtual bool lsst::afw::typehandling::GenericMap< K >::contains ( K const & key) const
pure virtualinherited

Return true if this map contains a mapping whose key has the specified label.

More formally, this method returns true if and only if this map contains a mapping with a key k such that k.getId() == key. There can be at most one such mapping.

Parameters
keythe weakly-typed key to search for
Returns
true if this map contains a mapping for key, regardless of value type.
Exception Safety
Provides strong exception safety.

Implemented in lsst::afw::typehandling::SimpleGenericMap< K >.

◆ contains() [2/2]

template<typename K >
template<typename T >
bool lsst::afw::typehandling::GenericMap< K >::contains ( Key< K, T > const & key) const
inlineinherited

Return true if this map contains a mapping for the specified key.

This is equivalent to testing whether at(key) would succeed.

Template Parameters
Tthe value corresponding to key
Parameters
keythe key to search for
Returns
true if this map contains a mapping from the specified key to a T
Exception Safety
Provides strong exception safety.
Note
This implementation calls contains(K const&) const. If the call returns true, it calls unsafeLookup, then uses templates and RTTI to determine if the value is of the expected type. The performance of this method depends strongly on the performance of contains(K const&).

Definition at line 194 of file GenericMap.h.

194 {
195 // Delegate to private methods to hide special-casing of T
196 return _contains(key);
197 }

◆ count()

template<typename K >
template<typename T >
size_type lsst::afw::typehandling::GenericMap< K >::count ( Key< K, T > const & key) const
inlineinherited

Return the number of elements mapped to the specified key.

Template Parameters
Tthe value corresponding to key
Parameters
keykey value of the elements to count
Returns
number of T with key key, that is, either 1 or 0.
Exception Safety
Provides strong exception safety.
Note
This implementation calls contains.

Definition at line 157 of file GenericMap.h.

157 {
158 return contains(key) ? 1 : 0;
159 }
virtual bool contains(K const &key) const =0
Return true if this map contains a mapping whose key has the specified label.

◆ empty()

template<typename K >
virtual bool lsst::afw::typehandling::GenericMap< K >::empty ( ) const
pure virtualnoexceptinherited

Return true if this map contains no key-value pairs.

Implemented in lsst::afw::typehandling::SimpleGenericMap< K >.

◆ erase()

template<typename K >
template<typename T >
bool lsst::afw::typehandling::MutableGenericMap< K >::erase ( Key< K, T > const & key)
inline

Remove the mapping for a key from this map, if it exists.

Template Parameters
Tthe type of value the key maps to
Parameters
keythe key to remove
Returns
true if key was removed, false if it was not present
Exception Safety
Provides strong exception safety.
Note
This implementation calls contains, then calls unsafeErase if the key is present.

Definition at line 676 of file GenericMap.h.

676 {
677 if (this->contains(key)) {
678 return unsafeErase(key.getId());
679 } else {
680 return false;
681 }
682 }
virtual bool unsafeErase(K key)=0
Remove the mapping for a key from this map, if it exists.

◆ insert() [1/2]

template<typename K >
template<typename T >
std::pair< Key< K, T >, bool > lsst::afw::typehandling::MutableGenericMap< K >::insert ( K const & key,
T const & value )
inline

Insert an element into the map, if the map doesn't already contain a mapping with a conflicting key.

Template Parameters
Tthe type of value to insert
Parameters
keykey to insert
valuevalue to insert
Returns
a pair consisting of a strongly-typed key for the value and a flag that is true if the insertion took place and false otherwise
Exception Safety
Provides strong exception safety.
Warning
the type of the compiler-generated key may not always be what you expect. Callers should save the returned key if they wish to retrieve the value later.

Definition at line 654 of file GenericMap.h.

654 {
655 auto strongKey = makeKey<T>(key);
656 // Construct return value in advance, so that exception from copying/moving Key is atomic
657 auto result = make_pair(strongKey, false);
658 result.second = insert(strongKey, value);
659 return result;
660 }
py::object result
Definition _schema.cc:429
bool insert(Key< K, T > const &key, T const &value)
Insert an element into the map, if the map doesn't already contain a mapping with the same or a confl...
Definition GenericMap.h:630
T make_pair(T... args)

◆ insert() [2/2]

template<typename K >
template<typename T >
bool lsst::afw::typehandling::MutableGenericMap< K >::insert ( Key< K, T > const & key,
T const & value )
inline

Insert an element into the map, if the map doesn't already contain a mapping with the same or a conflicting key.

Template Parameters
Tthe type of value to insert
Parameters
keykey to insert
valuevalue to insert
Returns
true if the insertion took place, false otherwise
Exception Safety
Provides strong exception safety.
Note
It is possible for a key with a value type other than T to prevent insertion. Callers can safely assume this->contains(key.getId()) as a postcondition, but not this->contains(key).
This implementation calls contains, then calls unsafeInsert if there is no conflicting key.

Definition at line 630 of file GenericMap.h.

630 {
631 if (this->contains(key.getId())) {
632 return false;
633 }
634
635 return unsafeInsert(key.getId(), StorableType(value));
636 }
std::variant< bool, int, long, long long, float, double, std::string, PolymorphicValue, std::shared_ptr< Storable const > > StorableType
The types that can be stored in a map.
Definition GenericMap.h:359
virtual bool unsafeInsert(K key, StorableType &&value)=0
Create a new mapping with key equal to key and value equal to value.

◆ keys()

template<typename K >
virtual std::vector< K > const & lsst::afw::typehandling::GenericMap< K >::keys ( ) const
pure virtualnoexceptinherited

Return the set of all keys, without type information.

Returns
a read-only view of all keys currently in the map, in the same iteration order as this object. The view will be updated by changes to the underlying map.
Warning
Do not modify this map while iterating over its keys.
Do not store the returned reference in variables that outlive the map; destroying the map will invalidate the reference.
Note
The keys are returned as a list, rather than a set, so that subclasses can give them a well-defined iteration order.

Implemented in lsst::afw::typehandling::SimpleGenericMap< K >.

◆ max_size()

template<typename K >
virtual size_type lsst::afw::typehandling::GenericMap< K >::max_size ( ) const
pure virtualnoexceptinherited

Return the maximum number of elements the container is able to hold due to system or library implementation limitations.

Note
This value typically reflects the theoretical limit on the size of the container. At runtime, the size of the container may be limited to a value smaller than max_size() by the amount of RAM available.

Implemented in lsst::afw::typehandling::SimpleGenericMap< K >.

◆ operator!=()

template<typename K >
bool lsst::afw::typehandling::GenericMap< K >::operator!= ( GenericMap< K > const & other) const
inlineinherited

Test for map equality.

Two GenericMap objects are considered equal if they map the same keys to the same values. The two objects do not need to have the same implementation class. If either class orders its keys, the order is ignored.

Note
This implementation calls keys on both objects and compares the results. If the two objects have the same keys, it calls unsafeLookup for each key and compares the values.

Definition at line 245 of file GenericMap.h.

245{ return !(*this == other); }

◆ operator==()

template<typename K >
virtual bool lsst::afw::typehandling::GenericMap< K >::operator== ( GenericMap< K > const & other) const
inlinevirtualnoexceptinherited

Test for map equality.

Two GenericMap objects are considered equal if they map the same keys to the same values. The two objects do not need to have the same implementation class. If either class orders its keys, the order is ignored.

Note
This implementation calls keys on both objects and compares the results. If the two objects have the same keys, it calls unsafeLookup for each key and compares the values.

Definition at line 229 of file GenericMap.h.

229 {
230 auto keys1 = this->keys();
231 auto keys2 = other.keys();
232 if (!std::is_permutation(keys1.begin(), keys1.end(), keys2.begin(), keys2.end())) {
233 return false;
234 }
235 for (K const& key : keys1) {
236 // Can't use std::variant::operator== here because
237 // std::reference_wrapper isn't equality-comparable.
238 if (!detail::refwrap_equals()(this->unsafeLookup(key), other.unsafeLookup(key))) {
239 return false;
240 }
241 }
242 return true;
243 }
virtual ConstValueReference unsafeLookup(K key) const =0
Return a reference to the mapped value of the element with key equal to key.
virtual std::vector< K > const & keys() const noexcept=0
Return the set of all keys, without type information.
T is_permutation(T... args)

◆ size()

template<typename K >
virtual size_type lsst::afw::typehandling::GenericMap< K >::size ( ) const
pure virtualnoexceptinherited

Return the number of key-value pairs in the map.

Implemented in lsst::afw::typehandling::SimpleGenericMap< K >.

◆ unsafeErase()

template<typename K >
virtual bool lsst::afw::typehandling::MutableGenericMap< K >::unsafeErase ( K key)
protectedpure virtual

Remove the mapping for a key from this map, if it exists.

Parameters
keythe key to remove
Returns
true if key was removed, false if it was not present
Exception Safety
Must provide strong exception safety.

Implemented in lsst::afw::typehandling::SimpleGenericMap< K >.

◆ unsafeInsert()

template<typename K >
virtual bool lsst::afw::typehandling::MutableGenericMap< K >::unsafeInsert ( K key,
StorableType && value )
protectedpure virtual

Create a new mapping with key equal to key and value equal to value.

This method is the primary way to implement the MutableGenericMap interface.

Parameters
keythe key of the element to insert. The method may assume that the map does not contain key.
valuea reference to the value to insert.
Returns
true if the insertion took place, false otherwise
Exception Safety
Must provide strong exception safety.

Implemented in lsst::afw::typehandling::SimpleGenericMap< K >.

◆ unsafeLookup() [1/2]

template<typename K >
ValueReference lsst::afw::typehandling::GenericMap< K >::unsafeLookup ( K key)
inlineprotectedinherited

Return a reference to the mapped value of the element with key equal to key.

This method is the primary way to implement the GenericMap interface.

Parameters
keythe key of the element to find
Returns
the value mapped to key, if one exists
Exceptions
pex::exceptions::OutOfRangeErrorThrown if the map does not have a value with the specified key
Exception Safety
Must provide strong exception safety.

Definition at line 391 of file GenericMap.h.

391 {
392 ConstValueReference constRef = static_cast<const GenericMap&>(*this).unsafeLookup(key);
393 return std::visit(
394 [](auto const & v) { return ValueReference(detail::refwrap_const_cast(v)); },
395 constRef
396 );
397 }
decltype(_typeToRef(std::declval< StorableType >())) ValueReference
A type-agnostic reference to the value stored inside the map.
Definition GenericMap.h:370
decltype(_typeToConstRef(std::declval< StorableType >())) ConstValueReference
A type-agnostic reference to the value stored inside the map.
Definition GenericMap.h:369
std::reference_wrapper< T > refwrap_const_cast(std::reference_wrapper< T const > const &r)

◆ unsafeLookup() [2/2]

template<typename K >
virtual ConstValueReference lsst::afw::typehandling::GenericMap< K >::unsafeLookup ( K key) const
protectedpure virtualinherited

Return a reference to the mapped value of the element with key equal to key.

This method is the primary way to implement the GenericMap interface.

Parameters
keythe key of the element to find
Returns
the value mapped to key, if one exists
Exceptions
pex::exceptions::OutOfRangeErrorThrown if the map does not have a value with the specified key
Exception Safety
Must provide strong exception safety.

Implemented in lsst::afw::typehandling::SimpleGenericMap< K >.


The documentation for this class was generated from the following file: