40 #ifndef _uhal_Node_hpp_
41 #define _uhal_Node_hpp_
49 #include "boost/unordered_map.hpp"
60 class NodeTreeBuilder;
61 class DerivedNodeFactory;
66 UHAL_DEFINE_EXCEPTION_CLASS ( WriteAccessDenied ,
"Exception class to handle the case where a write was performed on a register which does not allow write access." )
68 UHAL_DEFINE_EXCEPTION_CLASS ( ReadAccessDenied , "Exception class to handle the case where a read was performed on a register which does not allow read access." )
70 UHAL_DEFINE_EXCEPTION_CLASS ( NoBranchFoundWithGivenUID , "Exception class to handle the case where a child ID was requested which does not exist." )
72 UHAL_DEFINE_EXCEPTION_CLASS ( BulkTransferOnSingleRegister , "Exception class to handle the case where a bulk read or
write was performed on a single register." )
76 UHAL_DEFINE_EXCEPTION_CLASS ( BulkTransferOffsetRequestedForFifo , "Exception class to handle the case where an offset was requested into a FIFO." )
78 UHAL_DEFINE_EXCEPTION_CLASS ( BulkTransferOffsetRequestedForSingleRegister , "Exception class to handle the case where an offset was requested into a Single Register." )
93 class const_iterator :
public std::iterator< std::forward_iterator_tag , Node , ptrdiff_t, const Node* , const Node& >
96 typedef std::deque< std::vector< Node* >::const_iterator >
stack;
105 const Node& value()
const;
106 const Node& operator*()
const;
107 const Node* operator->()
const;
139 virtual Node& operator= (
const Node& aNode );
145 virtual Node* clone()
const;
160 bool operator == (
const Node& aNode )
const;
167 const Node&
getNode (
const std::string& aId )
const;
174 template<
typename T>
175 const T&
getNode (
const std::string& aId )
const;
181 std::vector<std::string> getNodes()
const;
188 std::vector<std::string> getNodes (
const std::string& aRegex )
const;
194 const std::string& getId()
const;
200 std::string getPath()
const;
206 const uint32_t& getAddress()
const;
212 const uint32_t& getMask()
const;
224 const uint32_t& getSize()
const;
236 const std::string& getTags()
const;
242 const std::string& getDescription()
const;
248 const std::string& getModule()
const;
254 const boost::unordered_map< std::string, std::string >& getParameters()
const;
260 const boost::unordered_map< std::string, std::string >& getFirmwareInfo()
const;
267 void stream ( std::ostream& aStr , std::size_t aIndent = 0 )
const;
289 ValHeader writeBlockOffset (
const std::vector< uint32_t >& aValues ,
const uint32_t& aOffset )
const;
319 std::vector<const Node*> getLineage(
const Node& aAncestor)
const;
322 bool isChildOf(
const Node& aParent)
const;
326 std::string getRelativePath(
const Node& aAncestor)
const;
329 void getAncestors ( std::deque< const Node* >& aPath )
const;