libebml: a plain integer doesn't need a const

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@280 a6f86f6d-0131-4f8e-9e7b-e335508773d5
This commit is contained in:
Steve Lhomme 2010-05-27 15:52:47 +00:00
parent c59c4616d3
commit 33c808ec0e
6 changed files with 139 additions and 139 deletions

View File

@ -371,12 +371,12 @@ class EBML_DLL_API EbmlElement {
int GetSizeLength() const {return SizeLength;}
static EbmlElement * FindNextElement(IOCallback & DataStream, const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1);
static EbmlElement * FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize);
static EbmlElement * FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, uint64 MaxDataSize);
/*!
\brief find the next element with the same ID
*/
EbmlElement * FindNext(IOCallback & DataStream, const uint64 MaxDataSize);
EbmlElement * FindNext(IOCallback & DataStream, uint64 MaxDataSize);
EbmlElement * SkipData(EbmlStream & DataStream, const EbmlSemanticContext & Context, EbmlElement * TestReadElt = NULL, bool AllowDummyElt = false);

View File

@ -1,76 +1,76 @@
/****************************************************************************
** libebml : parse EBML files, see http://embl.sourceforge.net/
**
** <file/class description>
**
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
**
** This file is part of libebml.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
**
** Contact license@matroska.org if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
/*!
\file
\version \$Id: EbmlStream.h 639 2004-07-09 20:59:14Z mosu $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBEBML_STREAM_H
#define LIBEBML_STREAM_H
#include "EbmlTypes.h"
#include "IOCallback.h"
#include "EbmlElement.h"
START_LIBEBML_NAMESPACE
/*!
\class EbmlStream
\brief Handle an input/output stream of EBML elements
*/
class EBML_DLL_API EbmlStream {
public:
EbmlStream(IOCallback & output);
~EbmlStream();
/*!
\brief Find a possible next ID in the data stream
\param MaxDataSize The maximum possible of the data in the element (for sanity checks)
\note the user will have to delete that element later
*/
EbmlElement * FindNextID(const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize);
EbmlElement * FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, const uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1);
inline IOCallback & I_O() {return Stream;}
operator IOCallback &() {return Stream;}
#if defined(EBML_STRICT_API)
private:
#else
protected:
#endif
IOCallback & Stream;
};
END_LIBEBML_NAMESPACE
#endif // LIBEBML_STREAM_H
/****************************************************************************
** libebml : parse EBML files, see http://embl.sourceforge.net/
**
** <file/class description>
**
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
**
** This file is part of libebml.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
**
** Contact license@matroska.org if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
/*!
\file
\version \$Id$
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBEBML_STREAM_H
#define LIBEBML_STREAM_H
#include "EbmlTypes.h"
#include "IOCallback.h"
#include "EbmlElement.h"
START_LIBEBML_NAMESPACE
/*!
\class EbmlStream
\brief Handle an input/output stream of EBML elements
*/
class EBML_DLL_API EbmlStream {
public:
EbmlStream(IOCallback & output);
~EbmlStream();
/*!
\brief Find a possible next ID in the data stream
\param MaxDataSize The maximum possible of the data in the element (for sanity checks)
\note the user will have to delete that element later
*/
EbmlElement * FindNextID(const EbmlCallbacks & ClassInfos, uint64 MaxDataSize);
EbmlElement * FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1);
inline IOCallback & I_O() {return Stream;}
operator IOCallback &() {return Stream;}
#if defined(EBML_STRICT_API)
private:
#else
protected:
#endif
IOCallback & Stream;
};
END_LIBEBML_NAMESPACE
#endif // LIBEBML_STREAM_H

View File

@ -76,7 +76,7 @@ class EBML_DLL_API EbmlUInteger : public EbmlElement {
void SetDefaultValue(uint64);
const uint64 DefaultVal() const;
uint64 DefaultVal() const;
bool IsDefaultValue() const {
return (DefaultISset() && Value == DefaultValue);

View File

@ -257,7 +257,7 @@ EbmlElement::~EbmlElement()
\todo this method is deprecated and should be called FindThisID
\todo replace the new RawElement with the appropriate class (when known)
*/
EbmlElement * EbmlElement::FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize)
EbmlElement * EbmlElement::FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, uint64 MaxDataSize)
{
binary PossibleId[4];
int PossibleID_Length = 0;

View File

@ -1,57 +1,57 @@
/****************************************************************************
** libebml : parse EBML files, see http://embl.sourceforge.net/
**
** <file/class description>
**
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
**
** This file is part of libebml.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
**
** Contact license@matroska.org if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
/*!
\file
\version \$Id: EbmlStream.cpp 639 2004-07-09 20:59:14Z mosu $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#include "ebml/EbmlStream.h"
START_LIBEBML_NAMESPACE
EbmlStream::EbmlStream(IOCallback & DataStream)
:Stream(DataStream)
{}
EbmlStream::~EbmlStream()
{}
EbmlElement * EbmlStream::FindNextID(const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize)
{
return EbmlElement::FindNextID(Stream, ClassInfos, MaxDataSize);
}
EbmlElement * EbmlStream::FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, const uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel)
{
return EbmlElement::FindNextElement(Stream, Context, UpperLevel, MaxDataSize, AllowDummyElt, MaxLowerLevel);
}
END_LIBEBML_NAMESPACE
/****************************************************************************
** libebml : parse EBML files, see http://embl.sourceforge.net/
**
** <file/class description>
**
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
**
** This file is part of libebml.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
**
** Contact license@matroska.org if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
/*!
\file
\version \$Id$
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#include "ebml/EbmlStream.h"
START_LIBEBML_NAMESPACE
EbmlStream::EbmlStream(IOCallback & DataStream)
:Stream(DataStream)
{}
EbmlStream::~EbmlStream()
{}
EbmlElement * EbmlStream::FindNextID(const EbmlCallbacks & ClassInfos, uint64 MaxDataSize)
{
return EbmlElement::FindNextID(Stream, ClassInfos, MaxDataSize);
}
EbmlElement * EbmlStream::FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel)
{
return EbmlElement::FindNextElement(Stream, Context, UpperLevel, MaxDataSize, AllowDummyElt, MaxLowerLevel);
}
END_LIBEBML_NAMESPACE

View File

@ -30,7 +30,7 @@
/*!
\file
\version \$Id: EbmlUInteger.cpp 1079 2005-03-03 13:18:14Z robux4 $
\version \$Id$
\author Steve Lhomme <robux4 @ users.sf.net>
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -64,7 +64,7 @@ void EbmlUInteger::SetDefaultValue(uint64 aValue)
SetDefaultIsSet();
}
const uint64 EbmlUInteger::DefaultVal() const
uint64 EbmlUInteger::DefaultVal() const
{
assert(DefaultISset());
return DefaultValue;