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

📄 gacodevaluesbuffer.h

📁 遗传算法做的排课系统
💻 H
字号:

#ifndef __GA_CODE_VALUE_BUFFER_H__
#define __GA_CODE_VALUE_BUFFER_H__

#include "..\..\ExportImport.h"
#include "..\..\CallConvention.h"

namespace Chromosome
{
	namespace Representation
	{

		// Buffer for manupulation over parts of chromosom's code
		class GaCodeValuesBuffer
		{

		private:

			// Memory buffer
			void* _buffer;

			// Size of buffer in bytes
			int _size;

			// Current position in buffer
			int _currentPosition;

		public:

			// Allocates memory for the buffer
			DLL_EXPORT
			GaCodeValuesBuffer(int size);

			// Free memory used by buffer
			DLL_EXPORT
			~GaCodeValuesBuffer();

			// Moves current position
			DLL_EXPORT
			void GACALL Move(int delta);

			// Returns pointer to start of the buffer
			DLL_EXPORT
			void* GACALL GetBuffer() const;

			// Return size of the buffer in bytes
			DLL_EXPORT
			int GACALL GetSize() const;

			// Returns current position
			DLL_EXPORT
			int GACALL GetPosition() const;

		};// END CLASS DEFINITION GaCodeValuesBuffer

	} // Representation
} // Chromosome

#endif // __GA_CODE_VALUE_BUFFER_H__

⌨️ 快捷键说明

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