/*
 * $Id: switchnode.h 672 2009-01-16 08:34:17Z misek $
 *
 * Description  : One line description of file.
 * Author       : Antonin Misek <antonin.misek@skoda-auto.cz>
 *
 * Purpose      :
 *     Long description of what the file is for.
 */


#ifndef __SWITCHNODE__H__
#define __SWITCHNODE__H__

#include "scenenode.h"
//#include "moddefs.h"

namespace VRUT
{
	///\c SceneNode of type Switch
	class SwitchNode : public SceneNode
	{
	private:
	protected:
		///active choice
		size_t activeChild;

	public:
		static const SCENENODE_TYPE ClassType = SWITCH;

		///Class constructor, \c SWITCH type by default
		SwitchNode(const wxString & _name) : SceneNode(_name, ClassType), activeChild(0)
		{
		}

		///Copy constructor
		SwitchNode(const SwitchNode & sw) : SceneNode(sw), activeChild(sw.activeChild)
		{
		}

		///Class destructor
		virtual ~SwitchNode()
		{
		}

		///Get active choice
		size_t GetActiveChild() const
		{
			return activeChild;
		}

		///Get string with node's properties - \c SceneNode overload
		virtual wxString ToString() const
		{
			return SceneNode::ToString()+wxString::Format(wxT("active child: %lu\n"), (unsigned long)activeChild);
		}

		///Get copy of instance - \c SceneNode overload
		virtual SceneNode * Clone() const
		{
			return new SwitchNode(*this);
		}

		friend class Scene;
	};
}

#endif
