Win32: friend incosistent linkage
This commit is contained in:
+11
-6
@@ -113,14 +113,19 @@ void Status::deserialize(ByteBuffer *buffer, DeserializableControl *flusher)
|
||||
}
|
||||
}
|
||||
|
||||
void Status::dump(std::ostream& o) const
|
||||
{
|
||||
o << "Status [type=" << Status::StatusTypeName[m_statusType];
|
||||
if (!m_message.empty())
|
||||
o << ", message=" << m_message;
|
||||
if (!m_stackDump.empty())
|
||||
o << ", stackDump=" << std::endl << m_stackDump;
|
||||
o << ']';
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& o, const Status& status)
|
||||
{
|
||||
o << "Status [type=" << Status::StatusTypeName[status.m_statusType];
|
||||
if (!status.m_message.empty())
|
||||
o << ", message=" << status.m_message;
|
||||
if (!status.m_stackDump.empty())
|
||||
o << ", stackDump=" << std::endl << status.m_stackDump;
|
||||
o << ']';
|
||||
status.dump(o);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -98,6 +98,8 @@ namespace epics { namespace pvData {
|
||||
void serialize(ByteBuffer *buffer, SerializableControl *flusher) const;
|
||||
void deserialize(ByteBuffer *buffer, DeserializableControl *flusher);
|
||||
|
||||
void dump(std::ostream& o) const;
|
||||
|
||||
private:
|
||||
|
||||
static std::string m_emptyStringtring;
|
||||
@@ -106,7 +108,6 @@ namespace epics { namespace pvData {
|
||||
std::string m_message;
|
||||
std::string m_stackDump;
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& o, const Status& status);
|
||||
};
|
||||
|
||||
epicsShareExtern std::ostream& operator<<(std::ostream& o, const Status& status);
|
||||
|
||||
+10
-6
@@ -196,23 +196,27 @@ void Timer::schedulePeriodic(
|
||||
if(isFirst) waitForWork.signal();
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& o, Timer& timer)
|
||||
void Timer::dump(std::ostream& o)
|
||||
{
|
||||
Lock xx(timer.mutex);
|
||||
if(!timer.alive) return o;
|
||||
Lock xx(mutex);
|
||||
if(!alive) return;
|
||||
TimeStamp currentTime;
|
||||
TimerCallbackPtr nodeToCall(timer.head);
|
||||
TimerCallbackPtr nodeToCall(head);
|
||||
currentTime.getCurrent();
|
||||
while(true) {
|
||||
if(nodeToCall.get()==NULL) return o;
|
||||
if(nodeToCall.get()==NULL) return;
|
||||
TimeStamp timeToRun = nodeToCall->timeToRun;
|
||||
double period = nodeToCall->period;
|
||||
double diff = TimeStamp::diff(timeToRun,currentTime);
|
||||
o << "timeToRun " << diff << " period " << period << std::endl;
|
||||
nodeToCall = nodeToCall->next;
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& o, Timer& timer)
|
||||
{
|
||||
timer.dump(o);
|
||||
return o;
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public:
|
||||
void cancel(TimerCallbackPtr const &timerCallback);
|
||||
bool isScheduled(TimerCallbackPtr const &timerCallback);
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& o, Timer& timer);
|
||||
void dump(std::ostream& o);
|
||||
|
||||
private:
|
||||
void addElement(TimerCallbackPtr const &timerCallback);
|
||||
|
||||
Reference in New Issue
Block a user