Logrunner is statically linked for easy deployment.
[gnucomo.git] / src / gcm_input / xml_cooker.cpp
1
2 /**************************************************************************
3 **  (c) Copyright 2002, Andromeda Technology & Automation
4 ** This is free software; you can redistribute it and/or modify it under the
5 ** terms of the GNU General Public License, see the file COPYING.
6 ***************************************************************************
7 ** MODULE INFORMATION *
8 ***********************
9 **      FILE NAME      : xml_cooker.cpp
10 **      SYSTEM NAME    : 
11 **      VERSION NUMBER : $Revision: 1.1 $
12 **
13 **  DESCRIPTION      :  Detect whether the input stream is in XML format
14 **
15 **  EXPORTED OBJECTS : 
16 **  LOCAL    OBJECTS : 
17 **  MODULES  USED    :
18 ***************************************************************************
19 **  ADMINISTRATIVE INFORMATION *
20 ********************************
21 **      ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
22 **      CREATION DATE   : Aug 06, 2003
23 **      LAST UPDATE     : Aug 06, 2003
24 **      MODIFICATIONS   : 
25 **************************************************************************/
26
27 /*****************************
28    $Log: xml_cooker.cpp,v $
29    Revision 1.1  2003-12-04 10:38:09  arjen
30    Major redesign. All input is handled through XML. Raw input data is first
31    transformed into an XML document for further processing.
32    A collection of polymorphic classes handle the transformation of various
33    input formats into XML.
34    Classifying input data is done with a finite improbability calculation.
35
36 *****************************/
37
38 /* static const char *RCSID = "$Id: xml_cooker.cpp,v 1.1 2003-12-04 10:38:09 arjen Exp $"; */
39
40 #include <ctype.h>
41
42 #include "xml_cooker.h"
43
44 static const regex re_xml_header("xml .*\?>$");
45
46 bool xml_cooker::check_pattern(String logline)
47 {
48    if (XML_detected)
49    {
50       return true;
51    }
52    else if (logline == re_xml_header)
53    {
54       XML_detected = true;
55       return true;
56    }
57    else
58    {
59       return false;
60    }
61 }
62
63 bool xml_cooker::cook_this(String logline, UTC arrival)
64 {
65
66    return true;
67 }
68
69