2#ifndef AFW_TABLE_AliasMap_h_INCLUDED
3#define AFW_TABLE_AliasMap_h_INCLUDED
57 using Iterator = std::map<std::string, std::string>::const_iterator;
69 bool empty()
const {
return _internal.empty(); }
Mapping class that holds aliases for a Schema.
bool contains(AliasMap const &other) const
Return true if all aliases in this are also in other (with the same targets).
bool operator!=(AliasMap const &other) const
AliasMap(AliasMap &&other)
std::string apply(std::string const &name) const
Apply any aliases that match the given field name and return a de-aliased name.
AliasMap(AliasMap const &other)
Deep-copy an AliasMap.
std::size_t size() const
Return the number of aliases.
void setTable(std::shared_ptr< BaseTable > table)
std::shared_ptr< BaseTable > getTable() const
Iterator begin() const
Return a iterator to the beginning of the map.
std::map< std::string, std::string >::const_iterator Iterator
An iterator over alias->target pairs.
bool erase(std::string const &alias)
Remove an alias from the schema if it is present.
AliasMap & operator=(AliasMap const &)=default
bool empty() const
Return the true if there are no aliases.
std::string get(std::string const &alias) const
Return the target of the given alias.
std::size_t hash_value() const noexcept
Return a hash of this object.
AliasMap & operator=(AliasMap &&)=default
void set(std::string const &alias, std::string const &target)
Add an alias to the schema or replace an existing one.
bool operator==(AliasMap const &other) const
Equality comparison.
Iterator end() const
Return a iterator to one past the end of the map.
Base class for all tables.
lsst::afw::table::AliasMap argument_type
size_t operator()(argument_type const &obj) const noexcept