diff --git a/core/deck.cpp b/core/deck.cpp index 013845f5..b7ef2ea1 100644 --- a/core/deck.cpp +++ b/core/deck.cpp @@ -1,4 +1,5 @@ -/* +/** + * @file * Copyright 2013 (c) Anna Schumaker. */ #include diff --git a/include/core/deck.h b/include/core/deck.h index e04dc6cd..6349620a 100644 --- a/include/core/deck.h +++ b/include/core/deck.h @@ -1,4 +1,5 @@ -/* +/** + * @file * Copyright 2013 (c) Anna Schumaker. */ #ifndef OCARINA_CORE_DECK_H @@ -24,23 +25,81 @@ public: void sort(sort_t, bool); }; +/** + * Namespace for manipulating Queue deck. + */ namespace deck { + /** + * Read the deck file from disk and restore the queues. + */ void init(); + + /** + * Save the current queues to a file on disk. + */ void write(); + /** + * Create a new queue at the end of the deck. + * + * @param random Set to true if the new queue should return a random + * track when queue->next() is called. + * @return The newly created queue. + */ Queue *create(bool); + + /** + * Removes the queue from the deck. + * + * @param queue The queue to be removed. + */ void destroy(Queue *); + + /** + * Move the queue to a new location. + * + * @param queue The queue to be moved. + * @param index The new index of the queue. + */ void move(Queue *, unsigned int); + /** + * Find the index of the requested queue. + * + * @param queue The queue in question. + * @return The index of the requested queue. + */ unsigned int index(Queue *); + + /** + * Access the queue at the specified index. + * + * @param index The index of the queue that should be accessed. + * @return The queue at the requested index. + */ Queue *get(unsigned int); + /** + * @return A track from the first enabled queue. If no queues are + * enabled, return a track from the Library. + */ Track *next(); + + /** + * @return A track from the recent tracks queue. + */ Track *prev(); + /** + * @return The deck of queues. + */ std::list &get_queues(); + + /** + * @return The queue of recent tracks. + */ Queue *get_queue(); };