FACT++  1.0
std::ostream& operator<< ( std::ostream &  out,
const DimState s 
)
inline

Definition at line 87 of file DimState.h.

References State::comment, DimState::description(), Time::GetAsStr(), State::index, kBlue, kBold, DimState::kNotAvailable, DimState::kOffline, State::name, DimState::server, DimState::state(), and DimState::time().

88 {
89  const State rc = s.description();
90 
91  out << s.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
92  out << kBold << s.server;
93 
94  if (s.state()==DimState::kOffline)
95  return out << ": Offline";
96 
98  return out;
99 
100  out << ": ";
101 
102 // if (rc.index==-2)
103 // out << s.state();
104 // else
105  out << rc.name << "[" << rc.index << "]";
106 
107  if (!rc.comment.empty())
108  out << " - " << kBlue << rc.comment;
109 
110  return out;
111 }
virtual State description() const
Definition: DimState.h:84
std::string comment
Name (e.g. &#39;Connected&#39;)
Definition: State.h:13
const int32_t & state() const
Definition: DimState.h:80
std::string server
Definition: DimState.h:61
int index
Definition: State.h:11
Set color Blue.
Definition: WindowLog.h:20
std::string name
Index (e.g. 1)
Definition: State.h:12
std::string GetAsStr(const char *fmt="%Y-%m-%d %H:%M:%S") const
Definition: Time.cc:240
const Time & time() const
Definition: DimState.h:79
Set attribute Bold.
Definition: WindowLog.h:36

+ Here is the call graph for this function: