File: rfileparser.h

package info (click to toggle)
qcad 1.3.3-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,504 kB
  • ctags: 2,449
  • sloc: cpp: 29,400; makefile: 49; sh: 15
file content (44 lines) | stat: -rw-r--r-- 1,840 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/***************************************************************************
                          rfileparser.h  -  description
                             -------------------
    begin                : Sun Sep 12 1999
    copyright            : (C) 1999 by Andreas Mustun
    email                : andrew@ribbonsoft.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef RFILEPARSER_H
#define RFILEPARSER_H

#include <qstring.h>

#include "rprgdef.h"

class RFileParser
{
public:
  RFileParser();
  ~RFileParser();

  static QString getContents(QString fileName, bool comments=true, bool sections=true, bool whitespace=true, bool htmlComments=true);
  static QString getSection(QString s, QString sectionName);
  static QString getHtmlComment(QString s);
  static QString getNextStringBetween(QString s, int& startIndex, QChar starter, QChar stopper);
  static QString getNextStringUntil(QString s, int& startIndex, QChar stopper);
  static QString removeComments(QString s);
  static QString removeHtmlComments(QString s);
  static QString removeSections(QString s);
  static QString plainTextToHtml(QString s, int autoBreak);
  static QString charToHtml(QChar c);

};

#endif