40 if (i != _internal.
end() && i->first.
size() == name.
size() && i->first ==
name) {
43 }
else if (i != _internal.
begin()) {
49 if (i->first.size() < name.
size() && name.
compare(0, i->first.size(), i->first) == 0) {
50 name.
replace(0, i->first.size(), i->second);
59 (boost::format(
"Cycle detected in schema aliases involving name '%s'") % name).str());
70 if (i == _internal.
end()) {
72 (boost::format(
"Alias '%s' not found") % name).str());
std::string get(std::string const &alias) const
Return the target of the given alias.
bool contains(AliasMap const &other) const
Return true if all aliases in this are also in other (with the same targets).
Key< Flag > const & target
Iterator end() const
Return a iterator to one past the end of the map.
void set(std::string const &alias, std::string const &target)
Add an alias to the schema or replace an existing one.
Mapping class that holds aliases for a Schema.
ItemVariant const * other
A base class for image defects.
std::string apply(std::string const &name) const
Apply any aliases that match the given field name and return a de-aliased name.
bool operator==(AliasMap const &other) const
Equality comparison.
bool erase(std::string const &alias)
Remove an alias from the schema if it is present.
std::unique_ptr< SchemaItem< U > > result
#define LSST_EXCEPT(type,...)
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.
virtual void handleAliasChange(std::string const &alias)