/*
 * Copyright (c) 2001-2006
 *     DecisionSoft Limited. All rights reserved.
 * Copyright (c) 2004-2006
 *     Progress Software Corporation. All rights reserved.
 * Copyright (c) 2004-2006
 *     Oracle. All rights reserved.
 *
 * See the file LICENSE for redistribution information.
 *
 * $Id: LocationInfo.hpp,v 1.3 2007/07/10 16:28:57 jpcs Exp $
 */

#ifndef _LOCATIONINFO_HPP
#define _LOCATIONINFO_HPP


#include <xqilla/framework/XQillaExport.hpp>

#include <xercesc/util/XercesDefs.hpp>

class XQILLA_API LocationInfo
{
public:
  LocationInfo()
    : file_(0), line_(0), column_(0) {}
  LocationInfo(const XMLCh *file, unsigned int line, unsigned int column)
    : file_(file), line_(line), column_(column) {}

  const XMLCh *getFile() const { return file_; }
  unsigned int getLine() const { return line_; }
  unsigned int getColumn() const { return column_; }
  void setLocationInfo(const XMLCh *file, unsigned int line, unsigned int column)
  {
    file_ = file;
    line_ = line;
    column_ = column;
  }
  void setLocationInfo(const LocationInfo *o)
  {
    if(o != 0) {
      file_ = o->file_;
      line_ = o->line_;
      column_ = o->column_;
    }
  }

private:
  const XMLCh *file_;
  unsigned int line_, column_;
};

#endif
