// Ryzom - MMORPG Framework
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
#include "record.h"
CRecord::CRecord()
{
}
CRecord::CRecord(std::vector &)
{
}
CRecord::~CRecord()
{
/* std::vector::iterator it_val = _Values.begin();
while ( it_val != _Values.end() )
{
IValue *val = *it_val;
it_val++;
delete val;
}
*/
}
void CRecord::addValue(IValue *value)
{
_Values.push_back( value );
}
void CRecord::addValue(std::string &str)
{
_Values.push_back( new CValue(str) );
}
void CRecord::addValue(bool b)
{
_Values.push_back( new CValue(b) );
}
void CRecord::addValue(int val)
{
_Values.push_back( new CValue(val) );
}
const std::vector &CRecord::getValues()
{
return _Values;
}
const IValue *CRecord::operator[](int index)
{
return _Values[index];
}
int CRecord::size()
{
return (int)_Values.size();
}