~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to GeneratedSaxParser/src/GeneratedSaxParserParser.cpp

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2008-2009 NetAllied Systems GmbH
 
3
 
 
4
    This file is part of GeneratedSaxParser.
 
5
 
 
6
    Licensed under the MIT Open Source License,
 
7
    for details please see LICENSE file or the website
 
8
    http://www.opensource.org/licenses/mit-license.php
 
9
*/
 
10
 
 
11
#include "GeneratedSaxParserParser.h"
 
12
#include "GeneratedSaxParserSaxParser.h"
 
13
 
 
14
//#include <libxml/parser.h>
 
15
 
 
16
 
 
17
namespace GeneratedSaxParser
 
18
{
 
19
 
 
20
 
 
21
        //--------------------------------------------------------------------
 
22
        Parser::Parser(IErrorHandler* errorHandler)
 
23
                :mSaxParser(0)
 
24
                , mErrorHandler(errorHandler)
 
25
        {
 
26
        }
 
27
 
 
28
        //--------------------------------------------------------------------
 
29
        Parser::~Parser()
 
30
        {
 
31
        }
 
32
 
 
33
 
 
34
 
 
35
        size_t Parser::stringLength( const xmlChar* string )
 
36
        {
 
37
                if ( !string )
 
38
                        return 0;
 
39
                const xmlChar* pos = string;
 
40
                while ( *pos != 0)
 
41
                        pos++;
 
42
                return pos - string;
 
43
        }
 
44
 
 
45
        size_t Parser::getLineNumber() const
 
46
        {
 
47
                return mSaxParser ? mSaxParser->getLineNumer() : 0;
 
48
        }
 
49
 
 
50
        size_t Parser::getColumnNumber() const
 
51
        {
 
52
                return mSaxParser ? mSaxParser->getColumnNumer() : 0;
 
53
        }
 
54
 
 
55
} // namespace GeneratedSaxParser