26 #include <unordered_map> 37 copy->addFrame(iframe, map, frame);
47 for (
auto const &item : _domainIndexDict) {
55 copy->removeFrame(iframe);
70 copy->setDomain(domain);
75 _domainIndexDict = _makeNewDict(*
this);
80 for (
int index = 1,
end = frameSet.
getNFrame(); index <=
end; ++index) {
81 auto const domain = frameSet.
getFrame(index,
false)->getDomain();
84 }
else if (dict.
count(domain) > 0) {
std::string getDomain() const
Get Domain: coordinate system domain.
int getNFrame() const
Get FrameSet_NFrame "NFrame": number of Frames in the FrameSet, starting from 1.
int getIndex(std::string const &domain) const
Get the index of a frame specified by domain.
AST wrapper classes and functions.
std::shared_ptr< Frame > getFrame(int iframe, bool copy=true) const
Obtain a deep copy of the specified Frame.
An abstract base class for objects which transform one set of coordinates to another.
std::set< std::string > getAllDomains() const
Get the domain names for all contained Frames (excluding frames with empty or defaulted domain names)...
void addFrame(int iframe, Mapping const &map, Frame const &frame) override
Add a new Frame and an associated Mapping to this FrameSet so as to define a new coordinate system...
Frame is used to represent a coordinate system.
std::shared_ptr< FrameDict > copy() const
Return a deep copy of this object.
void setDomain(std::string const &domain) override
Set the domain of the current frame (and update the internal dict).
void removeFrame(int iframe) override
Remove a Frame from a FrameSet.
std::shared_ptr< FrameSet > getFrameSet() const
Return a deep copy as a FrameSet.
A FrameSet consists of a set of one or more Frames (which describe coordinate systems), connected together by Mappings (which describe how the coordinate systems are inter-related).
bool hasDomain(std::string const &domain) const
Return True if a frame in this FrameDict has the specified domain.
FrameDict(Frame const &frame, std::string const &options="")
Construct a FrameDict from a single Frame.