/*  $Id: dom_attr.cpp,v 1.9 2004/02/01 04:31:55 mbn Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  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
*/

#include "Core/precomp.h"
#include "API/Core/XML/dom_attr.h"
#include "API/Core/XML/dom_document.h"
#include "dom_node_generic.h"

/////////////////////////////////////////////////////////////////////////////
// CL_DomAttr construction:

CL_DomAttr::CL_DomAttr()
{
}

CL_DomAttr::CL_DomAttr(CL_DomDocument doc, const std::string &name)
: CL_DomNode(doc, ATTRIBUTE_NODE)
{
	impl->node_name = name;
}

CL_DomAttr::CL_DomAttr(const CL_SharedPtr<CL_DomNode_Generic> &impl) : CL_DomNode(impl)
{
}

CL_DomAttr::~CL_DomAttr()
{
}

/////////////////////////////////////////////////////////////////////////////
// CL_DomAttr attributes:

std::string CL_DomAttr::get_name() const
{
	if (impl) return impl->node_name;
	return std::string();
}
	
bool CL_DomAttr::get_specified() const
{
	return false;
}
	
std::string CL_DomAttr::get_value() const
{
	if (impl) return impl->node_value;
	return std::string();
}
	
void CL_DomAttr::set_value(const std::string &value)
{
	if (impl) impl->node_value = value;
}

/////////////////////////////////////////////////////////////////////////////
// CL_DomAttr operations:

/////////////////////////////////////////////////////////////////////////////
// CL_DomAttr implementation:
