Skip to content

Commit

Permalink
Added support for ostream printing of element references.
Browse files Browse the repository at this point in the history
  • Loading branch information
asrivast28 committed Apr 3, 2018
1 parent 5adb944 commit 5517207
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ElementRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ ElementRef::~ElementRef(
m_elementRef = 0;
}


std::ostream& operator<< (
std::ostream& stream,
const ElementRef& obj
)
{
stream << obj.m_elementRef;
return stream;
}

size_t
ElementRefHasher::operator()(
const ElementRef& elementRef
Expand Down
4 changes: 4 additions & 0 deletions ElementRef.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#ifndef APSDK_ELEMENTREF_HPP_
#define APSDK_ELEMENTREF_HPP_

#include <ostream>
#include <string>

#include <micron/ap/ap_anml.h>
Expand All @@ -43,6 +44,9 @@ class ElementRef {
bool
operator==(const ElementRef&) const;

friend
std::ostream& operator<< (std::ostream& stream, const ElementRef&);

~ElementRef();

private:
Expand Down

0 comments on commit 5517207

Please sign in to comment.