本文整理汇总了C++中ValueInt类的典型用法代码示例。如果您正苦于以下问题:C++ ValueInt类的具体用法?C++ ValueInt怎么用?C++ ValueInt使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ValueInt类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: while
tVecStr ImageManager::filterByDate ( tVecStr list , BppTree & tree )
{
TreeIterator& it = tree.first();
while ( !it.end() )
{
KeyStr* key = dynamic_cast<KeyStr*>(it.getKey());
if( imgTree.exists( *key ) )
{
ValueInt* idImg = dynamic_cast<ValueInt*>( imgTree.find( *key ));
if( idImg != NULL )
{
ImgRegistry* reg=dynamic_cast<ImgRegistry*>(orgImages.GetRegistry(idImg->getValue()));
Date d = reg->GetDate();
if (! ( d == Date::getDate( key->getKey().c_str()) ))
{
list.push_back( key->getKey() );
}
}
delete idImg;
}
delete key;
++it;
}
tree.deleteIterator(it);
return list;
}
开发者ID:nicosuarez,项目名称:orgdatos,代码行数:27,代码来源:ImageManager.cpp
示例2: TEST_F
TEST_F(ExprConcatTest, Value)
{
ValueInt* v = dynamic_cast<ValueInt*>(testRule->value(*startState));
if(v)
EXPECT_EQ(5, v->getValue());
else
FAIL();
}
开发者ID:Svalburg,项目名称:TypeSystemImplementation,代码行数:8,代码来源:RuleExprConcat.test.cpp
示例3: TEST_F
TEST_F(RepeatTest, State)
{
StateTuple endState = testRuleState->sigma(*startState);
ValueInt* v = dynamic_cast<ValueInt*>(endState.getPStateValue("x"));
if(v)
EXPECT_EQ(10, v->getValue());
else
FAIL();
}
开发者ID:Svalburg,项目名称:TypeSystemImplementation,代码行数:9,代码来源:RuleRepeat.test.cpp
示例4: key
/* -------------------------------------------------------------------------- */
void ImageManager::DeleteImage(string imgPath, tVecStr* imgErasedList, bool filterAll, bool removetoTree)
{
KeyStr key(imgPath);
if(!imgTree.empty())
{
if(imgTree.exists(key))
{
ValueInt* vInt = dynamic_cast<ValueInt*>(imgTree.find(key));
DeleteImage(vInt->getValue(), imgErasedList, filterAll, removetoTree);
delete vInt;
}
}
}
开发者ID:nicosuarez,项目名称:orgdatos,代码行数:14,代码来源:ImageManager.cpp
示例5: strDirPath
/* -------------------------------------------------------------------------- */
void ImageManager::ShowMessageFromDirectory(const char* dirPath)
{
if( imgTree.empty())
return;
tVecStr fileList = FileSystem::GetFiles(dirPath,File);
if(fileList.empty())
return;
std::list<string> listNameMsg;
string strDirPath(dirPath);
StrToken::FormatPath(strDirPath);
for( unsigned int i=0; i<fileList.size(); i++)
{
string fullPath = strDirPath + fileList[i];
KeyStr key(fileList[i]);
ValueInt* vInt = dynamic_cast<ValueInt*>(imgTree.find(key));
if( vInt == NULL)
continue;
ImgRegistry* imgReg = dynamic_cast<ImgRegistry*>(orgImages.GetRegistry(vInt->getValue()));
tRegisterList* listIdMsg = this->orgListMsgs.GetList(imgReg->GetPtrFreeSpaceList());
if( listIdMsg != NULL )
{
itRegisterList it;
MessageManager* messageManager = MessageManager::GetInstance();
for( it=listIdMsg->begin(); it != listIdMsg->end(); it++ )
{
ListMsgRegistry* listMsgReg = dynamic_cast<ListMsgRegistry*>(*it);
ID_type idMsg = listMsgReg->GetIDMessage();
std::string nameMsg = messageManager->GetNameMessage(idMsg);
listNameMsg.push_back(nameMsg);
delete listMsgReg;
}
delete listIdMsg;
}
delete vInt;
delete imgReg;
delete listIdMsg;
}
listNameMsg.unique();
std::list<string>::iterator it;
for(it=listNameMsg.begin(); it != listNameMsg.end(); it++)
{
std::cout << (*it) << "\n";
}
}
开发者ID:nicosuarez,项目名称:orgdatos,代码行数:48,代码来源:ImageManager.cpp
示例6: ValueFloat
CountPtr<Value> ValueFloat::div(const ValueInt& left) const
{
if(m_val == 0)
{
//WARN_P(_("Division by zero"));
return VALUENULL;
}
else
{
return CountPtr<Value>(new ValueFloat(left.getVal() / m_val));
}
}
开发者ID:sdasgup3,项目名称:gri,代码行数:12,代码来源:valuefloat.cpp
示例7: return
CountPtr<Value> ValueFloat::gt(const ValueInt& left) const { return (left.getVal() > m_val) ? VALUEBOOL_TRUE : VALUEBOOL_FALSE; }
开发者ID:sdasgup3,项目名称:gri,代码行数:1,代码来源:valuefloat.cpp
注:本文中的ValueInt类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论