geometry.cpp

来自「将对Oracle数据库读写操作的OCI进行封装。不但具有普通数据的读取操作」· C++ 代码 · 共 78 行

CPP
78
字号
/*
* 文件名:  Geometry.cpp
*        
* 作者:    杨向科
*     
* 描述:    用来保存空间数据和数据信息
*     
* 全局变量:无
*          
* 修订记录:
*     日期            修订者           修订描述
*     2004-06-16      杨向科          创建本文件
*/

// Geometry.cpp: implementation of the CGeometry class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Geometry.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CGeometry::CGeometry()
{
}

CGeometry::~CGeometry()
{

}

CGeometry::CGeometry(CGeometry& geometry)
{
	m_eleminfo.RemoveAll();
	m_ordinates.RemoveAll();
	int countElem = geometry.m_eleminfo.GetSize();
	for(int i = 0; i < countElem; i++)
	{
		m_eleminfo.Add(geometry.m_eleminfo[i]);
	}
	int countOrdinates = geometry.m_ordinates.GetSize();
	for(int j = 0; j < countElem; j++)
	{
		m_ordinates.Add(geometry.m_ordinates[j]);
	}
	m_nID = geometry.m_nID;
	m_nType = geometry.m_nType;
}

CGeometry& CGeometry::operator =(const CGeometry& geometry)
{
	m_eleminfo.RemoveAll();                 //存储各基本元素的信息
	m_ordinates.RemoveAll();          //存储空间对象的坐标数值
	int countElem = geometry.m_eleminfo.GetSize();
	for(int i = 0; i < countElem; i++)
	{
		m_eleminfo.Add(geometry.m_eleminfo[i]);
	}
	int countOrdinates = geometry.m_ordinates.GetSize();
	for(int j = 0; j < countOrdinates; j++)
	{
		m_ordinates.Add(geometry.m_ordinates[j]);
	}
	m_nID = geometry.m_nID;
	m_nType = geometry.m_nType;

	return *this;
}

⌨️ 快捷键说明

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