Files
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

52 lines
1.2 KiB
C++

//-------------------------------------------------------------------------------------------------------+
// Copyright (C), 1998-2007, SH Software Co. Ltd.
// = FileName : Groups 类
// = Version : ver2.0
// = Author : zjq
// = CreateDate : 2002-09-09
// = Description: Groups 定义
// = Maintainers:
//
//-------------------------------------------------------------------------------------------------------+
#include "StdAfx.h"
#include "Groups.h"
#include "XPoint.h"
#include "XGlobalFunc.h"
Groups::~Groups()
{
}
int Groups::operator == (const Groups &other) const
{
if (type != other.type)
{
return 0;
}
switch(TypeOfCode(code))
{
case RTSTR : return !_tcsicmp(string,other.string);
case RTANG:
case RTREAL : return fabs(real-other.real) < 1E-8;
case RTSHORT : return shortInt == other.shortInt;
case RTLONG : return longInt == other.longInt;
case RTENAME :
case RTPICKS : return ads_name_equal(adsName, other.adsName);
case RTPOINT :
case RT3DPOINT: return *(XPoint *)point == *(XPoint *)other.point;
}
return 0;
}
inline Groups& Groups::operator = (const Groups &src)
{
memcpy(this, &src, sizeof(Groups));
if(TypeOfCode(code) == RTSTR)
{
string = _tcsdup(src.string);
}
return *this;
}