/** * \file rmf/NodeID.h * \brief Handle read/write of Model data from/to files. * * Copyright 2007-2011 IMP Inventors. All rights reserved. * */ #ifndef RMF_NODE_ID_H #define RMF_NODE_ID_H #include "rmf_config.h" #include "rmf_macros.h" #include #include namespace rmf { /** A key for a node in the hierarchy. */ class NodeID { int i_; friend class NodeHandle; friend struct NodeIDTraits; friend class RootHandle; public: NodeID(unsigned int i): i_(i){} NodeID(): i_(-1){} void show(std::ostream &out) const { out << i_; } int get_index() const { return i_; } RMF_COMPARISONS_1(NodeID, i_); RMF_HASHABLE_INLINE(NodeID, return i_); }; RMF_VALUES(NodeID, NodeIDs); } #endif /* RMF_NODE_ID_H */