<commit_before>//
// Base.h
//
// Copyright (c) 2001 Virtual Terrain Project
// Free for all uses, see license.txt for details.
//

#ifndef VTLIB_BASEH
#define VTLIB_BASEH

#include "vtdata/vtString.h"

#ifndef MAX
#define MAX(a, b) (((a)>(b))?(a):(b))
#endif

#ifndef MIN
#define MIN(a, b) (((a)>(b))?(b):(a))
#endif

enum vtMouseEventType
{
	VT_MOVE,
	VT_DOWN,
	VT_UP
};

#define VT_NONE		0
#define VT_LEFT		1
#define VT_RIGHT	2
#define VT_MIDDLE	4

// event flags: modifier keys for mouse and keyboard events
#define VT_SHIFT	1
#define VT_CONTROL	2
#define VT_ALT		4

struct vtMouseEvent
{
	vtMouseEventType type;
	int button;
	IPoint2 pos;
	int flags;
};

/**
 * This class simply provides the ability to store whether an object is
 * "enabled" or not.  This is generally useful, such as for Nodes or Engines
 * which can be turned on and off.
 */
class vtEnabledBase
{
public:
	vtEnabledBase() { m_bEnabled = true; }

	virtual void SetEnabled(bool bOn) { m_bEnabled = bOn; }
	bool GetEnabled() { return m_bEnabled; }

protected:
	bool m_bEnabled;
};

class vtNode;
class vtMaterial;
class vtMaterialArray;
class vtCamera;
class vtGroup;
class vtRoot;
class vtEngine;
class vtGeom;
class vtRoot;

/** Base class for Node implementation. */
class vtNodeBase
{
public:
	virtual void GetBoundBox(FBox3 &box) = 0;
	virtual void GetBoundSphere(FSphere &sphere) = 0;

	virtual void SetName2(const char *str) = 0;
	virtual const char *GetName2() = 0;

	/** Looks for a descendent node with a given name.  If not found, NULL
	 is returned. */
	vtNode *FindDescendantByName(const char *name);
};

//
// Base class for a Group node (scene graph node that can have children).
//
class vtGroupBase
{
public:
	virtual void AddChild(class vtNode *pChild) = 0;
	virtual void RemoveChild(class vtNode *pChild) = 0;
	virtual vtNode *GetChild(int num) = 0;
	virtual int GetNumChildren() = 0;<commit_msg>duplicate forward decl<commit_after>//
// Base.h
//
// Copyright (c) 2001 Virtual Terrain Project
// Free for all uses, see license.txt for details.
//

#ifndef VTLIB_BASEH
#define VTLIB_BASEH

#include "vtdata/vtString.h"

#ifndef MAX
#define MAX(a, b) (((a)>(b))?(a):(b))
#endif

#ifndef MIN
#define MIN(a, b) (((a)>(b))?(b):(a))
#endif

enum vtMouseEventType
{
	VT_MOVE,
	VT_DOWN,
	VT_UP
};

#define VT_NONE		0
#define VT_LEFT		1
#define VT_RIGHT	2
#define VT_MIDDLE	4

// event flags: modifier keys for mouse and keyboard events
#define VT_SHIFT	1
#define VT_CONTROL	2
#define VT_ALT		4

struct vtMouseEvent
{
	vtMouseEventType type;
	int button;
	IPoint2 pos;
	int flags;
};

/**
 * This class simply provides the ability to store whether an object is
 * "enabled" or not.  This is generally useful, such as for Nodes or Engines
 * which can be turned on and off.
 */
class vtEnabledBase
{
public:
	vtEnabledBase() { m_bEnabled = true; }

	virtual void SetEnabled(bool bOn) { m_bEnabled = bOn; }
	bool GetEnabled() { return m_bEnabled; }

protected:
	bool m_bEnabled;
};

class vtNode;
class vtMaterial;
class vtMaterialArray;
class vtCamera;
class vtGroup;
class vtRoot;
class vtEngine;
class vtGeom;

/** Base class for Node implementation. */
class vtNodeBase
{
public:
	virtual void GetBoundBox(FBox3 &box) = 0;
	virtual void GetBoundSphere(FSphere &sphere) = 0;

	virtual void SetName2(const char *str) = 0;
	virtual const char *GetName2() = 0;

	/** Looks for a descendent node with a given name.  If not found, NULL
	 is returned. */
	vtNode *FindDescendantByName(const char *name);
};

//
// Base class for a Group node (scene graph node that can have children).
//
class vtGroupBase
{
public:
	virtual void AddChild(class vtNode *pChild) = 0;
	virtual void RemoveChild(class vtNode *pChild) = 0;
	virtual vtNode *GetChild(int num) = 0;
	virtual int GetNumChildren() = 0;
{'fraction_non_alphanumeric': 0.11105221309302941, 'fraction_numerical': 0.012191889742910151, 'mean_word_length': 4.205517241379311, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1048626', 'n_tokens_mistral': 1390, 'n_tokens_neox': 1360, 'n_words': 469}