commit
325242c2e4
@ -0,0 +1,17 @@
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdlogic.h"
|
@ -0,0 +1,41 @@
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef NL_STDMISC_H
|
||||
#define NL_STDMISC_H
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <limits>
|
||||
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# define _WIN32_WINDOWS 0x0500
|
||||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0500
|
||||
# endif
|
||||
# ifndef NL_COMP_MINGW
|
||||
# define WINVER 0x0500
|
||||
# define NOMINMAX
|
||||
# endif
|
||||
# include <WinSock2.h>
|
||||
# include <Windows.h>
|
||||
#endif
|
||||
|
||||
#endif // NL_STDMISC_H
|
@ -0,0 +1,47 @@
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
#include "stdmisc.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
|
||||
#include <libxml/parser.h>
|
||||
|
||||
//=======================================
|
||||
void CXMLAutoPtr::destroy()
|
||||
{
|
||||
if (_Value)
|
||||
{
|
||||
xmlFree(const_cast<char *>(_Value));
|
||||
_Value = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================
|
||||
CXMLAutoPtr::~CXMLAutoPtr()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
//=======================================
|
||||
CXMLAutoPtr &CXMLAutoPtr::operator = (const char *other)
|
||||
{
|
||||
if (other == _Value) return *this;
|
||||
destroy();
|
||||
_Value = other;
|
||||
return *this;
|
||||
}
|
Loading…
Reference in New Issue