1 |
douglas |
552 |
// By |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#ifndef _By_hpp_ |
8 |
|
|
#define _By_hpp_ |
9 |
|
|
|
10 |
|
|
#include <menes/platform.hpp> |
11 |
|
|
|
12 |
|
|
#ifdef MENES_PRAGMA_ONCE |
13 |
|
|
#pragma once |
14 |
|
|
#endif |
15 |
|
|
|
16 |
|
|
struct By |
17 |
|
|
{ |
18 |
|
|
enum By_ { ARTIST, TITLE, ALBUM, GENRE, LAST } by; |
19 |
|
|
By(By_ by) : by(by) {} |
20 |
|
|
By(const cse::String& name); |
21 |
|
|
cse::String GetName() const; |
22 |
|
|
_finline By operator++() { by = By_(by + 1); return *this; } |
23 |
|
|
_finline operator By_() const { return by; } |
24 |
|
|
}; |
25 |
|
|
|
26 |
|
|
ios::PrintWriter& operator<<(ios::PrintWriter& out, const By& by); |
27 |
|
|
|
28 |
|
|
#endif//_By_hpp_ |