• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ IsEqual函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IsEqual函数的典型用法代码示例。如果您正苦于以下问题:C++ IsEqual函数的具体用法?C++ IsEqual怎么用?C++ IsEqual使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IsEqual函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetToken

void AseLoader::Process_MESH_FACE_LIST(IN std::vector<D3DXVECTOR3>& pos, OUT std::vector<FVF_PositionNormalTexture>& vertex)
{
	int level = 0;
	do 
	{
		char* aseToken = GetToken();
		if (IsEqual(aseToken, "{"))
		{
			level++;
		}
		else if (IsEqual(aseToken, "}"))
		{
			level--;
		}
		else if (IsEqual(aseToken, ID_MESH_FACE))
		{		
			//
			//*MESH_FACE    0:    A : 0 B : 1 C : 2 AB : 1 BC : 1 CA : 1
			int index = GetInteger();
			GetToken();
			int a = GetInteger();
			GetToken();
			int b = GetInteger();
			GetToken();
			int c = GetInteger();

			vertex[index * 3 + 0].pos = pos[a];
			vertex[index * 3 + 1].pos = pos[c];
			vertex[index * 3 + 2].pos = pos[b];
		}
	} while (level > 0);
}
开发者ID:SGA160108305C,项目名称:20160222_1_ASE_LOAD,代码行数:32,代码来源:AseLoader.cpp


示例2: info_single_limper

bool CGlobalVars::info_single_limper()
{
	/*
	*  return true if there is a single limper
	* Example:
	*  -true: I'm Bigblind, SB fold and other player limped
	*  -true: I'm Bigblind, SB limped and the rest fold
	*/

	if (br==1)
	{
		if(SB)
		{
			//SB posted (2*bblind+1*sblind)
			if(IsEqual(get_potplayer(), (get_sblind() + get_bblind() + get_bblind())))
				return true;

			if(set_preflop_position() == 2 && IsEqual(get_potplayer(), (get_bblind() + get_bblind())))
				return true;
		}
		else
		{
			//no SB (2*bblind)
			if(IsEqual(get_potplayer(), get_bblind() + get_bblind()))
				return true;
		}
	}

	return false;
}
开发者ID:strikles,项目名称:poker,代码行数:30,代码来源:Bot_Globalvars_bets.cpp


示例3: IsEqual

bool IsEqual(const pvdb::ConceptMap& lhs, const pvdb::ConceptMap& rhs)
{
  //Compare nodes
  {
    const std::vector<boost::shared_ptr<const pvdb::Node> > lhs_nodes = lhs.GetNodes();
    const std::vector<boost::shared_ptr<const pvdb::Node> > rhs_nodes = rhs.GetNodes();
    if (lhs_nodes.size() != rhs_nodes.size()) return false;
    const int n_nodes = static_cast<int>(lhs_nodes.size());
    for (int i=0; i!=n_nodes; ++i)
    {
      if (!IsEqual(*lhs_nodes[i],*rhs_nodes[i])) return false;
    }
  }
  //Compare edges
  {
    const std::vector<boost::shared_ptr<const pvdb::Edge> > lhs_edges = lhs.GetEdges();
    const std::vector<boost::shared_ptr<const pvdb::Edge> > rhs_edges = rhs.GetEdges();
    if (lhs_edges.size() != rhs_edges.size()) return false;
    const int n_edges = static_cast<int>(lhs_edges.size());
    for (int i=0; i!=n_edges; ++i)
    {
      if (!IsEqual(*lhs_edges[i],*rhs_edges[i])) return false;
    }
  }
  return true;

}
开发者ID:markwiering,项目名称:ProjectRichelBilderbeek,代码行数:27,代码来源:pvdbconceptmap.cpp


示例4: PipeitPtr

void PCFPipesMgr::CombinationPipe(AcGePoint3d &Pt1,AcGePoint3d &Pt2)
{
	PCFPipe *pPipe = NULL;
	PCFPipe *pPipe1 = NULL;
	PCFPipe *pPipe2 = NULL;
	IteratorPtr<PCFPipe> PipeitPtr(CreateIt());
	for(PipeitPtr->Fist();!PipeitPtr->IsDone();PipeitPtr->Next())
	{
		pPipe = &PipeitPtr->CurrentItem();
		ASSERT(pPipe != NULL);
		if(IsEqual(pPipe->EndPt(),Pt1))
		{
			pPipe1 = pPipe;
		}
		if(IsEqual(pPipe->StartPt(),Pt2))
		{
			pPipe2 = pPipe;
		}
	}
	if(pPipe1!=NULL&&pPipe2!=NULL)
	{
		pPipe1->EndPt(pPipe2->EndPt());
		Del(pPipe2->GetKey());
	}
}
开发者ID:uesoft,项目名称:AutoPFA,代码行数:25,代码来源:PCFPipesMgr.cpp


示例5: GetToken

void cAseLoader::ProcessMESH_TFACELIST( IN std::vector<D3DXVECTOR2>& vecVT, 
	OUT std::vector<ST_PNT_VERTEX>& vecVertex )
{
	int nLevel = 0;

	do 
	{
		char* szToken = GetToken();
		if(IsEqual(szToken, "{"))
		{
			++nLevel;
		}
		else if(IsEqual(szToken, "}"))
		{
			--nLevel;
		}
		else if(IsEqual(szToken, ID_MESH_TFACE))
		{
			int nFaceIndex = GetInteger();
			int nA = GetInteger();
			int nB = GetInteger();
			int nC = GetInteger();

			vecVertex[nFaceIndex * 3 + 0].t = vecVT[nA];
			vecVertex[nFaceIndex * 3 + 1].t = vecVT[nC];
			vecVertex[nFaceIndex * 3 + 2].t = vecVT[nB];
		}

	} while (nLevel > 0);
}
开发者ID:gawallsibya,项目名称:SGA_Direct3D,代码行数:30,代码来源:cAseLoader.cpp


示例6: IsEqual

BOOL IsEqual(CERTIFICATENAMES& n1, CERTIFICATENAMES&n2)
	{
	if (n1.flags != n2.flags)
		return FALSE;
	if (n1.flags & CERTIFICATENAME_DIGEST)
		{
		if (memcmp(&n1.digest, &n2.digest, sizeof(n1.digest)) != 0)
			return FALSE;
		}
	if (n1.flags & CERTIFICATENAME_ISSUERSERIAL)
		{
		if (!IsEqual(n1.issuerSerial.issuerName, n2.issuerSerial.issuerName))
			return FALSE;
		if (!IsEqual(n1.issuerSerial.serialNumber, n2.issuerSerial.serialNumber))
			return FALSE;
		}
	if (n1.flags & CERTIFICATENAME_SUBJECT)
		{
		if (!IsEqual(n1.subject, n2.subject))
			return FALSE;
		}
	if (n1.flags & CERTIFICATENAME_ISSUER)
		{
		if (!IsEqual(n1.issuer, n2.issuer))
			return FALSE;
		}
	return TRUE;
	}
开发者ID:mingpen,项目名称:OpenNT,代码行数:28,代码来源:debug.cpp


示例7: write_log

double CTableLimits::GuessSmallBlindFromBigBlind()
{
	write_log(3, "CTableLimits::GuessSmallBlindFromBigBlind()\n");
	// Special case: 0.02/0.05/0.10
	if (IsEqual(tablelimit_unreliable_input.bblind, 0.05))
	{
		return 0.02;
	}
	// Special case: 0.05/0.15/0.30
	if (IsEqual(tablelimit_unreliable_input.bblind, 0.15))
	{
		return 0.05;
	}
	// Special case: 0.10/0.25/0.50
	if (IsEqual(tablelimit_unreliable_input.bblind, 0.25))
	{
		return 0.10;
	}
	// Special case: 0.02/0.05
	if (IsEqual(tablelimit_unreliable_input.bblind, 0.05))
	{
		return 0.02;
	}
	return (tablelimit_unreliable_input.bblind / 2);
}
开发者ID:buranela,项目名称:OpenHoldemV12,代码行数:25,代码来源:CTableLimits.cpp


示例8: search_and_destroy

list search_and_destroy(element e, list l)
{
	list r = l;
	if (l == NULL)
		return NULL;
	if (detect(e, l) == false)
		return l;
	list tmp = l;
	if (IsEqual(head(l), e) == true)
	{
		l = DelFirst(l);
		return l;
	}
	while (llenght(l) != 1)
	{
		if (IsEqual(head(tail(l)), e) == true)
		{
			DeleteElement(l->next->value);
			tmp = l->next;
			l->next = l->next->next;
			free(tmp);
			return r;
		}
		l = tail(l);
	}
	return NULL;
}
开发者ID:LeoMirots,项目名称:Lists,代码行数:27,代码来源:list.c


示例9: getWallIndex

void Room::reorderWalls()
{
	int index;
	std::vector<MazeWall>::iterator it;
	MazeWall tempMaze;
	double tmpX =  walls[0].To_X;
	double tmpY = walls[0].To_Y;

	for(unsigned int i = 0; i < walls.size();i++)
	{
		index = getWallIndex(i + 1, tmpX ,tmpY);

		if(IsEqual(tmpX, walls[index].To_X) &&  IsEqual(tmpY,walls[index].To_Y))
		{
			tmpX =  walls[index].From_X;
			tmpY = walls[index].From_Y;
		}
		else
		{
			tmpX =  walls[index].To_X;
			tmpY = walls[index].To_Y;
		}

		it = walls.begin();

		if(index > -1)
		{
			tempMaze = walls[index];
			walls.erase(it + index);
			walls.insert(it + i + 1,tempMaze);
		}
	}
}
开发者ID:project-capo,项目名称:amber-cpp-drivers,代码行数:33,代码来源:Room.cpp


示例10: first_limper

int CGlobalVars::first_limper()
{
	/*
	*  
	*/

	//Check UTG...BT
	for(int i=3; i < k_MaxChairs; i++)
	{
		for(int j=0; j < k_MaxChairs; j++)
		{
			if(IsEqual(currentbets[j], get_bblind()) && (get_ac_dealpos(j) == i))
				return j;
		}
	}

	//Check SB
	for(int i=0; i < k_MaxChairs; i++)
	{
		if(IsEqual(currentbets[i], get_bblind()) && (get_ac_dealpos(i) == 1))
			return i;
	}

	return -1;
}
开发者ID:strikles,项目名称:poker,代码行数:25,代码来源:Bot_Globalvars_bets.cpp


示例11: fopen_s

cFrame* cAseLoader::Load( char* szFullPath )
{
	fopen_s(&m_fp, szFullPath, "r");
	while(char* szToken = GetToken())
	{
		if(IsEqual(szToken, ID_SCENE))
		{
			SkipBlock();
		}
		else if(IsEqual(szToken, ID_MATERIAL_LIST))
		{
			ProcessMATERIAL_LIST();
		}
		else if(IsEqual(szToken, ID_GEOMETRY))
		{
			cFrame* pFrame = ProcessGEOMOBJECT();
			m_mapFrame[pFrame->GetFrameName()] = pFrame;
			if(m_pRoot == NULL)
				m_pRoot = pFrame;
		}
	}
		
	fclose(m_fp);

	if(m_pRoot)
		m_pRoot->SetOriginLocalTM(NULL);

	return m_pRoot;
}
开发者ID:gawallsibya,项目名称:SGA_Direct3D,代码行数:29,代码来源:cAseLoader.cpp


示例12: ASSERT

bool CMesh::IntersectSegments(CVector<2> const &vA0, CVector<2> const &vA1, CVector<2> const &vB0, CVector<2> const &vB1, float &fTA, float &fTB)
{
  CVector<2> vA, vB, vBP, vAP, vD;
  float fD;

  vA = vA1 - vA0;
  vB = vB1 - vB0;
  vAP = vA.Perpendicular2D();
  vBP = vB.Perpendicular2D();

  fD = vA % vBP;
  if (IsEqual(fD, 0)) // Colinear or one of the vectors is 0, so we return no intersection
    return false;
  vD = vB0 - vA0;
  fTA = (vD % vBP) / fD;
  if (fTA < 0 || fTA > 1)
    return false;
  fTB = (vD % vAP) / fD;
  if (fTB < 0 || fTB > 1)
    return false;

  ASSERT(IsEqual(((vB0 + fTB * vB) - (vA0 + fTA * vA)).Length(), 0));

  return true;
}
开发者ID:aaalexandrov,项目名称:Alex,代码行数:25,代码来源:Mesh.cpp


示例13: if

	ERMsg COGRBaseOption::ProcessOption(int& i, int argc, char* argv[])
	{
		ERMsg msg;
		string error;


		if (IsUsed(BASE_OPTIONS) && IsEqual(argv[i], "--utility_version"))
		{
			m_bVersion = true;
		}
		else if (IsUsed(BASE_OPTIONS) && IsEqual(argv[i], "-co") && i < argc - 1)
		{
			m_createOptions.push_back(argv[++i]);
		}
		else if (IsUsed(BASE_OPTIONS) && IsEqual(argv[i], "-of") && i < argc - 1)
		{
			m_format = argv[++i];
		}
		else if (IsUsed(BASE_OPTIONS) && IsEqual(argv[i], "-wo") && i < argc - 1)//working option
		{
			//UNIFIED_SRC_NODATA
			m_workOptions.push_back(argv[++i]);
		}
		else if (IsUsed(BASE_OPTIONS) && IsEqual(argv[i], "-multi"))
		{
			m_bMulti = true;
		}
		else if (IsUsed(BASE_OPTIONS) && IsEqual(argv[i], "-f") && i < argc - 1)
		{
			m_format = argv[i + 1];
		}
		else if (IsUsed(BASE_OPTIONS) && IsEqual(argv[i], "-overwrite"))
		{
			m_bOverwrite = true;
		}
		else if (IsUsed(BASE_OPTIONS) && IsEqual(argv[i], "-q"))
		{
			m_bQuiet = true;
		}
		else if (IsEqual(argv[i], "-?") || IsEqual(argv[i], "-help"))
		{
			m_bNeedHelp = true;
		}
		else if (argv[i][0] == '-')
		{
			error = string("ERROR: Invalid option: ") + argv[i] + ", use - ? for more help.\n";
			msg.ajoute(error);
			//return false;
		}
		else
		{
			m_filesPath.push_back(argv[i]);
		}

		return msg;
	}
开发者ID:RNCan,项目名称:WeatherBasedSimulationFramework,代码行数:56,代码来源:OGRBasic.cpp


示例14: if

void PlayerHpBar::SetOffset(const std::string &target, Vector2f offset)
{
	if (IsEqual(target.c_str(), "avatar"))
	{
		m_avatarOffset = offset;
	}
	else if (IsEqual(target.c_str(), "bar"))
	{
		m_barOffset = offset;
	}
}
开发者ID:Rtyui,项目名称:PvpBattleProject,代码行数:11,代码来源:PlayerHpBar.cpp


示例15: TranslateSeriesStatusFrom

int TranslateSeriesStatusFrom(const std::wstring& value) {
  if (IsEqual(value, L"Currently Airing")) {
    return anime::kAiring;
  } else if (IsEqual(value, L"Finished Airing")) {
    return anime::kFinishedAiring;
  } else if (IsEqual(value, L"Not Yet Aired")) {
    return anime::kNotYetAired;
  }

  LOG(LevelWarning, L"Unknown value: " + value);
  return anime::kUnknownStatus;
}
开发者ID:alfateam123,项目名称:taiga,代码行数:12,代码来源:hummingbird_util.cpp


示例16: switch

LRESULT AnimeDialog::OnNotify(int idCtrl, LPNMHDR pnmh) {
  switch (idCtrl) {
    case IDC_LINK_NOWPLAYING: {
      switch (pnmh->code) {
        // Link click
        case NM_CLICK: {
          PNMLINK pNMLink = reinterpret_cast<PNMLINK>(pnmh);
          wstring action = pNMLink->item.szUrl;
          if (IsEqual(pNMLink->item.szID, L"menu")) {
            action = UI.Menus.Show(m_hWindow, 0, 0, pNMLink->item.szUrl);
          } else if (IsEqual(pNMLink->item.szID, L"search")) {
            action = L"SearchAnime(" + CurrentEpisode.title + L")";
          } else if (IsEqual(pNMLink->item.szUrl, L"score")) {
            action = L"";
            CurrentEpisode.anime_id = ToInt(pNMLink->item.szID);
            auto anime_item = AnimeDatabase.FindItem(CurrentEpisode.anime_id);
            if (anime_item) {
              anime_item->AddtoUserList();
              auto synonyms = anime_item->GetUserSynonyms();
              synonyms.push_back(CurrentEpisode.title);
              anime_item->SetUserSynonyms(synonyms);
              Meow.UpdateCleanTitles(anime_item->GetId());
              Settings.Save();
              anime_item->StartWatching(CurrentEpisode);
              MainDialog.ChangeStatus();
            }
          }
          ExecuteAction(action, 0, GetCurrentId());
          return TRUE;
        }

        // Custom draw
        case NM_CUSTOMDRAW: {
          return CDRF_DODEFAULT;
        }
      }
      break;
    }

    case IDC_TAB_ANIME: {
      switch (pnmh->code) {
        // Tab select
        case TCN_SELCHANGE: {
          SetCurrentPage(tab_.GetCurrentlySelected() + 1);
          break;
        }
      }
      break;
    }
  }
  
  return 0;
}
开发者ID:Greathood,项目名称:taiga,代码行数:53,代码来源:dlg_anime_info.cpp


示例17: ParseOption

	ERMsg COGRBaseOption::ParseOption(int argc, char* argv[])
	{
		ERMsg msg;
		// Must process GDAL_SKIP before GDALAllRegister(), but we can't call 
		// GDALGeneralCmdLineProcessor before it needs the drivers to be registered 
		// for the --format or --formats options 
		for (int i = 1; i < argc; i++)
		{
			if (IsEqual(argv[i], "--config") && i + 2 < argc && IsEqual(argv[i + 1], "GDAL_SKIP"))
			{
				CPLSetConfigOption(argv[i + 1], argv[i + 2]);

				i += 2;
			}
		}

		// -------------------------------------------------------------------- 
		//      Register standard GDAL drivers, and process generic GDAL        
		//      command options.                                                
		// -------------------------------------------------------------------- 
		OGRRegisterAll();
		argc = OGRGeneralCmdLineProcessor(argc, &argv, 0);
		if (argc < 1)
			exit(-argc);

		// -------------------------------------------------------------------- 
		//      Parse arguments.                                                
		// -------------------------------------------------------------------- 
		for (int i = 1; i < argc; i++)
		{
			msg += ProcessOption(i, argc, argv);
		}

		if (m_bVersion)
		{
			string error = Format("%s was compiled against GDAL %s and is running against GDAL %s\n",
				argv[0], GDAL_RELEASE_NAME, GDALVersionInfo("RELEASE_NAME"));

			msg.ajoute(error);
			//return msg;
		}

		if (m_bNeedHelp)
		{
			msg.ajoute(GetUsage());
			msg.ajoute(GetHelp());
			//return msg;
		}


		return msg;
	}
开发者ID:RNCan,项目名称:WeatherBasedSimulationFramework,代码行数:52,代码来源:OGRBasic.cpp


示例18: DegreesToRadians

/**
 * Virtual function to calculate a point for this fucntion.
 * @param x (input) x input value for this function.
 * @return Y value corresponding to the x input.
 */
TMathResult
TrigFunction::CalculateY(
	double x,
	double *y)
{
	TMathResult status = MATH_SUCCESS;
	double result = 0;
	double angle = x;
	if(GetAngleMode() == MATH_ANGLES_IN_DEGREES)
	{
		angle = DegreesToRadians(x);
	}

	switch(GetOperatorType())
	{
	case MATH_SIN:
		result = sin(angle);
		break;
	case MATH_COS:
		result = cos(angle);
		break;
	case MATH_TAN:
		result = tan(angle);
		break;
	case MATH_COT:
		result = tan(angle);
		if(!IsEqual(result, 0))
			result = 1/result;
		else
			status = MATH_UNDEFINED;
		break;
	case MATH_SEC:
		result = cos(angle);
		if(!IsEqual(result, 0))
			result = 1/result;
		else
			status = MATH_UNDEFINED;
		break;
	case MATH_CSC:
		result = sin(angle);
		if(!IsEqual(result, 0))
			result = 1/result;
		else
			status = MATH_UNDEFINED;
		break;
	}

	if(status == MATH_SUCCESS)
		*y = result;

	return status;
}
开发者ID:mwyllie,项目名称:MathFunctions,代码行数:57,代码来源:TrigFunction.cpp


示例19: if

uint ButtonComponent::GetStyleIndex(const std::string& style)
{
	if (IsEqual(style.c_str(), "deep_on_click"))
	{
		return DEEP_ON_CLICK;
	}
	else if (IsEqual(style.c_str(), "deep_on_focus"))
	{
		return DEEP_ON_FOCUS;
	}
	assert(nullptr);
	return 100;
}
开发者ID:PaulPopa,项目名称:Games,代码行数:13,代码来源:ButtonComponent.cpp



注:本文中的IsEqual函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsEqualGUID函数代码示例发布时间:2022-05-30
下一篇:
C++ IsEnabledEffective函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap