9 #ifndef RMF_ALIAS_DECORATORS_H
10 #define RMF_ALIAS_DECORATORS_H
12 #include <RMF/config.h>
19 #include <RMF/internal/paths.h>
21 #include <boost/lexical_cast.hpp>
43 int id = get_node().get_value(aliased_);
45 } RMF_DECORATOR_CATCH( );
48 static std::string get_decorator_type_name() {
51 RMF_SHOWABLE(
AliasConst,
"Alias: " << get_node());
66 } RMF_DECORATOR_CATCH( );
69 static std::string get_decorator_type_name() {
83 cat_(fh.get_category(
"alias")),
84 aliased_(fh.
get_key<IntTag>(cat_,
"aliased")) {
87 cat_(fh.get_category(
"alias")),
88 aliased_(fh.
get_key<IntTag>(cat_,
"aliased")) {
92 RMF_USAGE_CHECK((nh.get_type() ==
RMF::ALIAS), std::string(
"Bad node type. Got \"")
93 + boost::lexical_cast<std::string>(nh.get_type())
94 +
"\" in decorator type Alias");
99 RMF_USAGE_CHECK((nh.get_type() ==
RMF::ALIAS), std::string(
"Bad node type. Got \"")
100 + boost::lexical_cast<std::string>(nh.get_type())
101 +
"\" in decorator type Alias");
102 return Alias(nh, aliased_);
108 && !nh.get_value(aliased_).get_is_null();
112 && !nh.get_static_value(aliased_).get_is_null();
114 RMF_SHOWABLE(AliasFactory,
"AliasFactory");
117 struct AliasConstFactory:
public AliasFactory {
118 AliasConstFactory(FileConstHandle fh):
121 AliasConstFactory(FileHandle fh):
bool get_is(NodeConstHandle nh) const
Mostly empty base classes for decorators and factories.
A handle for a particular node in the hierarchy.
The base class for decorators.
NodeType get_type() const
get the type of this node
A handle for a particular node in a read-only hierarchy.
A handle for a read-only RMF file.
void set_value(ID< Tag > k, typename Tag::ArgumentType v) const
A handle for an RMF file.
The base class for Factories.
Declaration for RMF::FileHandle.
Declaration of NodeHandle.
ID< Tag > get_key(Category category, std::string name) const
Various general useful macros for IMP.
NodeHandle get_node(NodeID id) const
Return a NodeHandle from a NodeID.