PIP  1.8.0
Platform-Independent Primitives
PICout::Notifier Class Reference

Class for emit notifications of PICout. More...

Detailed Description

Class for emit notifications of PICout.

Synopsis

This class used as PICout events emitter. When PICout constructs with external PIString* buffer and some id, last copy of this PICout on delete emit event "finished()" on object Notifier::object(). Sample:

class A: public PIObject {
public:
A() {}
EVENT_HANDLER2(void, pcf, int, id, PIString*, buff) {
piCout << "PICout(" << id << ") finished:" << (*buff);
}
};
int main() {
A a;
CONNECTU(PICout::Notifier::object(), finished, &a, pcf);
PIString buffer = "my buff:";
PICout(&buffer, 1) << "int 10 ->" << 10 << ", time ->" << PITime::current();
return 0;
}
// PICout( 1 ) finished: my buff:int 10 -> 10 , time -> PITime(14:07:09:000)