BufferedLogCallback#

class BufferedLogCallback : public simgear::LogCallback#

Public Types

typedef std::vector<unsigned char*> vector_cstring#

copying a (large) vector of std::string would be very expensive. once logged, this call retains storage of the underlying string data, so when copying, it’s sufficient to pass around the strings as raw char arrays. This means we’re only copying a vector of pointers, which is very efficient.

Public Functions

void truncateAt(unsigned int)#

truncate messages longer than a certain length. This is to work-around for broken PUI behaviour, it can be removed once PUI is gone.

unsigned int stamp() const#

read the stamp value associated with the log buffer. This is incremented whenever the log contents change, so can be used to poll for changes.

unsigned int threadsafeCopy(vector_cstring &aOutput)#

copy the buffered log data into the provided output list (which will be cleared first). This method is safe to call from any thread.

returns the stamp value of the copied data

class BufferedLogCallbackPrivate#