From 9eef894e24028dbb28346bad943a51acbe777f2e Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 6 Sep 2013 14:35:59 -0700 Subject: [PATCH] add doxygen documentation for Assignment classes --- libraries/audio/src/AudioMixer.h | 2 ++ libraries/avatars/src/AvatarMixer.h | 2 ++ libraries/shared/src/Assignment.h | 18 +++++++++++++----- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/libraries/audio/src/AudioMixer.h b/libraries/audio/src/AudioMixer.h index 6318e756dc..fa67d55bca 100644 --- a/libraries/audio/src/AudioMixer.h +++ b/libraries/audio/src/AudioMixer.h @@ -9,8 +9,10 @@ #ifndef __hifi__AudioMixer__ #define __hifi__AudioMixer__ +/// Handles assignments of type AudioMixer - mixing streams of audio and re-distributing to various clients. class AudioMixer { public: + /// runs the audio mixer static void run(); }; diff --git a/libraries/avatars/src/AvatarMixer.h b/libraries/avatars/src/AvatarMixer.h index cf3f2245fe..7e58e067ce 100644 --- a/libraries/avatars/src/AvatarMixer.h +++ b/libraries/avatars/src/AvatarMixer.h @@ -11,8 +11,10 @@ #include +/// Handles assignments of type AvatarMixer - distribution of avatar data to various clients class AvatarMixer { public: + /// runs the avatar mixer static void run(); }; diff --git a/libraries/shared/src/Assignment.h b/libraries/shared/src/Assignment.h index 720169e55b..2c2673f351 100644 --- a/libraries/shared/src/Assignment.h +++ b/libraries/shared/src/Assignment.h @@ -11,6 +11,7 @@ #include "NodeList.h" +/// Holds information used for request, creation, and deployment of assignments class Assignment { public: @@ -27,6 +28,10 @@ public: }; Assignment(Assignment::Direction direction, Assignment::Type type, const char* pool = NULL); + + /// Constructs an Assignment from the data in the buffer + /// \param dataBuffer the source buffer to un-pack the assignment from + /// \param numBytes the number of bytes left to read in the source buffer Assignment(const unsigned char* dataBuffer, int numBytes); ~Assignment(); @@ -39,14 +44,17 @@ public: const sockaddr* getDomainSocket() { return _domainSocket; } void setDomainSocket(const sockaddr* domainSocket); + /// Packs the assignment to the passed buffer + /// \param buffer the buffer in which to pack the assignment + /// \return number of bytes packed into buffer int packToBuffer(unsigned char* buffer); private: - Assignment::Direction _direction; - Assignment::Type _type; - char* _pool; - sockaddr* _domainSocket; - timeval _time; + Assignment::Direction _direction; /// the direction of the assignment (Create, Deploy, Request) + Assignment::Type _type; /// the type of the assignment, defines what the assignee will do + char* _pool; /// the pool this assignment is for/from + sockaddr* _domainSocket; /// pointer to socket for domain server that created assignment + timeval _time; /// time the assignment was created (set in constructor) }; QDebug operator<<(QDebug debug, const Assignment &assignment);