本文整理汇总了C++中IsEqual函数的典型用法代码示例。如果您正苦于以下问题:C++ IsEqual函数的具体用法?C++ IsEqual怎么用?C++ IsEqual使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsEqual函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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;
}
示例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;
}
示例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());
}
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}