genrelistlist.cpp 2.08 KB
Newer Older
1 2 3 4 5
/***************************************************************************
                          genrelistlist.cpp  -  description
                             -------------------
    begin                : Sun Mar 3 2002
    copyright            : (C) 2002 by Scott Wheeler
6
    email                : wheeler@kde.org
7
***************************************************************************/
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <kstandarddirs.h>

#include "genrelistlist.h"

////////////////////////////////////////////////////////////////////////////////
// static members
////////////////////////////////////////////////////////////////////////////////

26
// There are some nasty hacks here to get around not being able to call locate()
27
// in the initialization of a static data member.  As a result, the function
28 29 30
// below can not be called in the initialization of another static member and
// if it is, well, all hell will break loose and you'll get a strange segfault.

31
// public
32 33

GenreList *GenreListList::ID3v1List()
34
{
35 36 37
    if(!ID3v1Loaded) {
        ID3v1->load(locate("data", "juk/id3v1.genreml"));
        ID3v1Loaded = true;
38
    }
39
    return(ID3v1);
40 41 42
}

// private
43 44 45

GenreList *GenreListList::ID3v1 = new GenreList(true);
bool GenreListList::ID3v1Loaded = false;
46 47 48 49 50 51 52

////////////////////////////////////////////////////////////////////////////////
// public members
////////////////////////////////////////////////////////////////////////////////

GenreListList::GenreListList()
{
53

54 55 56 57
}

GenreListList::~GenreListList()
{
58

59
}