Skip to content
Snippets Groups Projects
Commit a391c5a2 authored by Johannes Mey's avatar Johannes Mey
Browse files

add ostream operator

parent 01ca3b86
No related branches found
No related tags found
No related merge requests found
...@@ -119,6 +119,11 @@ public: ...@@ -119,6 +119,11 @@ public:
return true; return true;
} }
} }
friend std::ostream& operator<<(std::ostream& os, const Action& action);
}; };
std::ostream& operator<<(std::ostream& os, const Action& action);
#endif // CCF_IMMERSIVE_SORTING_ACTION_H_ #endif // CCF_IMMERSIVE_SORTING_ACTION_H_
#include "action.h" #include "action.h"
std::ostream& operator<<(std::ostream& os, const Action& action)
{
switch (action.type_) {
case Action::PICK_DROP:
os << "[pick " << action.source_ << " and drop it into " << action.target_ << "]";
break;
default:
os << "[unknown action with source " << action.source_ << " and target " << action.target_ << "]";
}
return os;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment