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

📄 note.hpp

📁 机甲指挥官2源代码
💻 HPP
字号:
//===========================================================================//
// File:     notation.hpp                                                    //
// Title:    Declaration of NotationFile classes.                            //
// Purpose:  Provide general purpose access to data stored in a formatted    //
//           text file.                                                      //
//---------------------------------------------------------------------------//
// Copyright (C) Microsoft Corporation. All rights reserved.                 //
//===========================================================================//

#pragma once

#include "Stuff.hpp"
#include "Page.hpp"

namespace Stuff {

	//##########################################################################
	//##############    Note    ##############################
	//##########################################################################

	class Note:
		public Plug
	{
		friend class NotationFile;
		friend class Page;

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Constructors
	//
	protected:
		Note(Page *page):
			Plug(DefaultData)
				{m_page = page;}

		Page
			*m_page;

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Note functions
	//
	public:
		void
			SetName(const char *entryname)
				{Check_Object(this); Check_Pointer(entryname); m_name = entryname;}
		const char*
			GetName() const
				{ Check_Object(this); return m_name; }

	protected:
		MString
			m_name,
			m_text;

		void
			SetDirty()
				{Check_Object(this); Check_Object(m_page); m_page->SetDirty();}

		void
			WriteNotation(MemoryStream *stream);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// string access
	//
	public:
		void
			GetEntry(const char **contents)
				{
					Check_Object(this); Check_Pointer(contents);
					*contents = m_text;
				}
		void
			SetEntry(const char *contents)
				{Check_Object(this); m_text = contents;}

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// int access
	//
	public:
		void
			GetEntry(int *value);
		void
			SetEntry(int value);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// scalar access
	//
	public:
		void
			GetEntry(Scalar *value);
		void
			SetEntry(Scalar value);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// bool access
	//
	public:
		void
			GetEntry(bool *value);
		void
			SetEntry(bool value);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Vector3D access
	//
	public:
		void
			GetEntry(Vector3D *value);
		void
			SetEntry(const Vector3D &value);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// YawPitchRoll access
	//
	public:
		void
			GetEntry(YawPitchRoll *value);
		void
			SetEntry(const YawPitchRoll &value);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// UnitQuaternion access
	//
	public:
		void
			GetEntry(UnitQuaternion *value);
		void
			SetEntry(const UnitQuaternion &value);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Motion3D access
	//
	public:
		void
			GetEntry(Motion3D *value);
		void
			SetEntry(const Motion3D &value);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// RGBColor access
	//
	public:
		void
			GetEntry(RGBColor *value);
		void
			SetEntry(const RGBColor &value);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// RGBAColor access
	//
	public:
		void
			GetEntry(RGBAColor *value);
		void
			SetEntry(const RGBAColor &value);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// NotationFile access
	//
	public:
		void
			GetEntry(NotationFile *value);
		void
			SetEntry(NotationFile *value);

	public:
		void
			TestInstance() const;
	};

}

⌨️ 快捷键说明

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