pelican/server/src/ServiceDataBuffer.cpp
/**
 * @details
 * Activates the passed LockableServiceData object, making it available
 * to be served.
 *
 * @param[in] data Pointer to the LockableServiceData object to activate.
 */
@details
Activates the passed LockableServiceData object, making it available
to be served.

@param[in] data Pointer to the LockableServiceData object to activate.
@details Activates the passed LockableServiceData object making it available to be served . @param [ in ] data Pointer to the LockableServiceData object to activate .
void ServiceDataBuffer::activateData(LockableServiceData* data)
{
    if (data->isValid())
    {
        QMutexLocker lock(&_mutex);
        QString id = data->id();
        if (id.isEmpty()) {
            id.setNum(++_id);
            data->setId(id);
        }
        _data.insert(id, data);
        _newData = 0;
        _current = id;
    }
}
void ServiceDataBuffer :: activateData ( LockableServiceData * data ) { if ( data -> isValid ( ) ) { QMutexLocker lock ( & _mutex ) ; QString id = data -> id ( ) ; if ( id . isEmpty ( ) ) { id . setNum ( ++ _id ) ; data -> setId ( id ) ; } _data . insert ( id , data ) ; _newData = 0 ; _current = id ; } }
@details
 Activates the passed LockableServiceData object, making it available
 to be served.
@details Activates the passed LockableServiceData object making it available to be served .
// Determine the version ID for this object. // Generate a unique ID if not already set. // Move from pending into the active data hash. // Set the current pointer to this one.