~shanx-shashank/mixxx/effects_ladspa

« back to all changes in this revision

Viewing changes to mixxx/src/library/parser.h

  • Committer: shanxS
  • Date: 2013-06-16 07:42:19 UTC
  • Revision ID: shanx.shashank@gmail.com-20130616074219-wszmk0slwfa1z61q
Init Repository.
Starting with GUI of lp:~shanx-shashank/mixxx/effects_parametricEq as base

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// C++ Interface: parser
 
3
//
 
4
// Description: Interface header for the parser Parser
 
5
//
 
6
//
 
7
// Author: Ingo Kossyk <kossyki@cs.tu-berlin.de>, (C) 2004
 
8
// Author: Tobias Rafreider trafreider@mixxx.org, (C) 2011
 
9
//
 
10
// Copyright: See COPYING file that comes with this distribution
 
11
//
 
12
//
 
13
 
 
14
#ifndef PARSER_H
 
15
#define PARSER_H
 
16
 
 
17
/**Developer Information:
 
18
This is the rootclass for all parser classes for the Importer class.
 
19
It can be used to write a new type-specific parser by deriving a new class
 
20
from it and overwrite the parse function and add class specific functions to
 
21
it afterwards fro proper functioning
 
22
**/
 
23
 
 
24
#include <qobject.h>
 
25
#include <qstring.h>
 
26
#include <qfile.h>
 
27
 
 
28
 
 
29
class Parser : public QObject
 
30
{
 
31
public:
 
32
    Parser();
 
33
    ~Parser();
 
34
    /**Can be called to parse a pls file
 
35
    Note for developers:
 
36
    This function should return an empty PtrList
 
37
     or 0 in order for the trackimporter to function**/
 
38
    virtual QList<QString> parse(QString) = 0;
 
39
 
 
40
 
 
41
protected:
 
42
    /**Pointer to the parsed Filelocations**/
 
43
    QList<QString> m_sLocations;
 
44
    /**Returns the number of parsed locations**/
 
45
    long countParsed();
 
46
    /**Clears m_psLocations**/
 
47
    void clearLocations();
 
48
    /**Checks if the file does contain binary content**/
 
49
    bool isBinary(QString);
 
50
    /**Checks if the given string represents a local filepath**/
 
51
    bool isFilepath(QString );
 
52
    // check for Utf8 encoding
 
53
    static bool isUtf8(const char* string);
 
54
};
 
55
 
 
56
#endif