⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qvstate.h

📁 Windows上的MUD客户端程序
💻 H
字号:
#ifndef  _QV_STATE_
#define  _QV_STATE_

#include <QvElement.h>

class QvState {

  public:

    // Stack indices, based on type of elements in them:
    enum StackIndex {
	CameraIndex,
	Coordinate3Index,
	LightIndex,
	MaterialBindingIndex,
	MaterialIndex,
	NormalBindingIndex,
	NormalIndex,
	ShapeHintsIndex,
	Texture2Index,
	Texture2TransformationIndex,
	TextureCoordinate2Index,
	TransformationIndex,

	FontStyleIndex,
	BaseColorIndex,

	// Chaco added stacks
	InfoIndex,
	// End Chaco stacks

	// This has to be last!!!
	NumStacks,
    };

    static const char *stackNames[NumStacks];	// Names of stacks

    int		depth;		// Current state depth
    QvElement	**stacks;	// Stacks of elements

    QvState();
    ~QvState();

    // Adds an element instance to the indexed stack
    void	addElement(StackIndex stackIndex, QvElement *elt);

    // Returns top element on a stack
    QvElement *	getTopElement(StackIndex stackIndex)
	{ return stacks[stackIndex]; }

    // Pushes/pops the stacks
    void	push();
    void	pop();

    // Pops top element off one stack
    virtual void	popElement(StackIndex stackIndex); 		// jwd: needs to be virtual for derivation

    // Prints contents for debugging, mostly
    void	print();
};

#endif /* _QV_STATE_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -