本文整理汇总了C++中GetObj函数的典型用法代码示例。如果您正苦于以下问题:C++ GetObj函数的具体用法?C++ GetObj怎么用?C++ GetObj使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetObj函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ReadColors
static int ReadColors(CurPos &cp, const char *ObjName) {
unsigned char obj;
unsigned short len;
while ((obj = GetObj(cp, len)) != 0xFF) {
switch (obj) {
case CF_STRING:
{
char cl[30];
const char *sname = GetCharStr(cp, len);
const char *svalue;
if (sname == 0) return -1;
if ((obj = GetObj(cp, len)) != CF_STRING) return -1;
if ((svalue = GetCharStr(cp, len)) == 0) return -1;
strcpy(cl, ObjName);
strcat(cl, ".");
strcat(cl, sname);
if (SetColor(cl, svalue) == 0) return -1;
}
break;
case CF_END:
return 0;
default:
return -1;
}
}
return -1;
}
开发者ID:OS2World,项目名称:APP-EDITOR-fte,代码行数:28,代码来源:c_config.cpp
示例2: GetCount
void CSpaceObjectList::Subtract (const CSpaceObjectList &List)
// Subtract
//
// Removes all objects in List from the current list
{
int i;
// Mark all current objects
int iCount = GetCount();
for (i = 0; i < iCount; i++)
GetObj(i)->SetMarked(true);
// Clear marks on all objects to remove
for (i = 0; i < List.GetCount(); i++)
List.GetObj(i)->SetMarked(false);
// Create a new list with the remaining objects
TArray<CSpaceObject *> NewList;
for (i = 0; i < iCount; i++)
if (GetObj(i)->IsMarked())
NewList.Insert(GetObj(i));
m_List.TakeHandoff(NewList);
}
开发者ID:bmer,项目名称:Mammoth,代码行数:29,代码来源:CSpaceObjectList.cpp
示例3: ReadHilitColors
static int ReadHilitColors(CurPos &cp, EColorize *Colorize, const char * /*ObjName*/) {
unsigned char obj;
unsigned short len;
while ((obj = GetObj(cp, len)) != 0xFF) {
switch (obj) {
case CF_INT:
{
long cidx;
const char *svalue;
if (GetNum(cp, cidx) == 0) return -1;
if ((obj = GetObj(cp, len)) != CF_STRING)
return -1;
if ((svalue = GetCharStr(cp, len)) == 0)
return -1;
if (Colorize->SetColor(cidx, svalue) == 0)
return -1;
}
break;
case CF_END:
return 0;
default:
return -1;
}
}
return -1;
}
开发者ID:OS2World,项目名称:APP-EDITOR-fte,代码行数:28,代码来源:c_config.cpp
示例4: CStageMng
void CGameManager::start()
{
__super::start();
fileMng_.Load();
if (!GetObj(typeid(CStageMng)))
{
auto sm = std::shared_ptr<CStageMng>(new CStageMng());
AddObject2(sm);
TempCharacter t(sm);
sm->load();
#ifdef DEF_GM_PTR
//SetStageMngPtr(sm);
#endif
}
if (!GetObj(typeid(CScoreMng)))
{
auto sm = std::shared_ptr<CScoreMng>(new CScoreMng());
AddObject2(sm);
#ifdef DEF_GM_PTR
SetScoreMngPtr(sm);
#endif
}
if (!GetObj(typeid(CCollision)))
AddObject2(ObjPtr(new CCollision()));
}
开发者ID:jg-maon,项目名称:Pendulum,代码行数:30,代码来源:gameManager.cpp
示例5: GetObj
void CGenerator::fill(int from , int to , int id = 1 )
{
for(int z = from ; z < to ; z++)
for(int i = 0 ; i < X ; i++)
for(int j = 0 ; j < Y ; j++)
if(GetObj(glm::ivec3(i,j,z)) != 1)
GetObj(glm::ivec3(i,j,z)) = id;
}
开发者ID:Dreakii,项目名称:OpenWorld,代码行数:8,代码来源:CGenerator.cpp
示例6: ReadMenu
static int ReadMenu(CurPos &cp, const char *MenuName) {
unsigned char obj;
unsigned short len;
int menu = -1, item = -1;
menu = NewMenu(MenuName);
while ((obj = GetObj(cp, len)) != 0xFF) {
switch (obj) {
case CF_ITEM:
{
if (len == 0) {
item = NewItem(menu, 0);
} else {
const char *s = GetCharStr(cp, len);
int Cmd;
if (s == 0) return -1;
item = NewItem(menu, s);
if ((obj = GetObj(cp, len)) != CF_MENUSUB) return -1;
if ((Cmd = ReadCommands(cp, 0)) == -1) return -1;
Menus[menu].Items[item].Cmd = Cmd + 65536;
}
}
break;
case CF_SUBMENU:
{
const char *s = GetCharStr(cp, len);
const char *w;
if ((obj = GetObj(cp, len)) != CF_STRING) return -1;
if ((w = GetCharStr(cp, len)) == 0) return -1;
item = NewSubMenu(menu, s, GetMenuId(w), SUBMENU_NORMAL);
}
break;
case CF_SUBMENUCOND:
{
const char *s = GetCharStr(cp, len);
const char *w;
if ((obj = GetObj(cp, len)) != CF_STRING) return -1;
if ((w = GetCharStr(cp, len)) == 0) return -1;
item = NewSubMenu(menu, s, GetMenuId(w), SUBMENU_CONDITIONAL);
}
break;
case CF_END:
return 0;
default:
return -1;
}
}
return -1;
}
开发者ID:OS2World,项目名称:APP-EDITOR-fte,代码行数:55,代码来源:c_config.cpp
示例7: GetObj
void ledLightingDevice::OnChange()
{
cout << "New Value: " << m_cur_value << endl;
/* Update the D-Bus LightingObject */
GetObj()->m_cur_status = m_cur_value.c_str();
/* Notify status change */
lighting_object_emitSignal(GetObj(), E_LIGHTING_OBJECT_SIGNAL_CHANGED_STATUS, "DeviceName=lighting1&Command=get_status");
//DEV_AGENT->EmitSignalDeviceUpdate("DeviceName=lighting1&Command=get_status");
}
开发者ID:shaan420,项目名称:smartgateway,代码行数:12,代码来源:ledLightingDevice.cpp
示例8: GetObj
void TemperatureDevice::OnChange()
{
cout << "New Value: " << m_cur_value << endl;
/* Update the D-Bus TemperatureObject */
GetObj()->m_cur_status = m_cur_value.c_str();
/* Notify status change */
temperature_object_emitSignal(GetObj(), E_TEMPERATURE_OBJECT_SIGNAL_CHANGED_STATUS, "DeviceName=temperature1&Command=get_status");
//DEV_AGENT->EmitSignalDeviceUpdate("DeviceName=temperature1&Command=get_status");
}
开发者ID:shaan420,项目名称:smartgateway,代码行数:12,代码来源:TemperatureSensorDevice.cpp
示例9: GetTree
//****************************
void CObjInfo::OnCloseObj()
{
if(GetTree())
{
GetTree()->RemoveFromList(GetObj(),GetObjName());
SetTree(0);
}
else
{
if(bDeleteObj&&GetObj())
{
delete GetObj();
SetObj(0);
}
}
};
开发者ID:open2cerp,项目名称:Open2C-ERP,代码行数:17,代码来源:ObjInfo.cpp
示例10: LOG_DBG
SharedTrackablePtr
ObjRsrc::AllocObj(Trackable::ObjType type, string lookupName)
{
if (lookupName.length() == 0) {
LOG_DBG("Parameter lookupName has no value");
return Trackable::NullTrackablePtr;
}
SharedTrackablePtr newObj = AllocWorker(type);
if (newObj == Trackable::NullTrackablePtr) {
LOG_DBG("System unable to create object from heap");
return Trackable::NullTrackablePtr;
}
// Store this allocated object in a more permanent container
pair<TrackableMap::iterator, bool> result;
result = mObjGrpLife.insert(TrackablePair(lookupName, newObj));
if (result.second == false) {
LOG_DBG("Created object with collisions in lookupName: %s",
lookupName.c_str());
return Trackable::NullTrackablePtr;
}
return GetObj(lookupName);
}
开发者ID:Kurusamy,项目名称:tnvme,代码行数:25,代码来源:objRsrc.cpp
示例11: SetDuiTimer
bool CDuiTimer::SetDuiTimer()
{
if((GetObj() && GetFun()) || GetHwnd())
return InnerSetTimer();
return false;
}
开发者ID:shantj,项目名称:duilib,代码行数:7,代码来源:UITimer.cpp
示例12: GetObj
void CDlgView::WriteCoinfig(const string& strFilePath)
{
Json::Value root;
Json::Value arraycomm;
Json::Value arraygame;
Json::Value arraylager;
Json::Value item;
map<string ,ADD_APP_DATA>::const_iterator it = m_commapp_list.begin();
for (; it!= m_commapp_list.end(); it++)
{
GetObj(it->second,item);
root["commapp"].append(item);
}
it = m_gameapp_list.begin();
for (; it!= m_gameapp_list.end(); it++)
{
GetObj(it->second,item);
root["lagerapp"].append(item);
}
it = m_Largeapp_list.begin();
for (; it!= m_Largeapp_list.end(); it++)
{
GetObj(it->second,item);
root["lagerapp"].append(item);
}
ofstream outfile(strFilePath);
if (!outfile.is_open())
{
return;
}
string strfile = root.toStyledString();
outfile<<strfile;
outfile.close();
//CStdioFile File;
//if (File.Open((LPCTSTR)(LPSTR)strFilePath.c_str(),CFile::modeWrite | CFile::modeCreate))
//{
// string strfile = root.toStyledString();
// File.WriteString(strfile.c_str());
// File.Close();
//}
//
}
开发者ID:SoyPay,项目名称:DacrsUI,代码行数:46,代码来源:DlgView.cpp
示例13: GetObj
void XFileTransferProxy::Reset(void)
{
XFileTransfer *pFileTransfer;
pFileTransfer = (XFileTransfer *) GetObj();
if ( pFileTransfer )
pFileTransfer->Reset();
}
开发者ID:xiaobinshe,项目名称:multitv,代码行数:9,代码来源:XFileTransferDll.cpp
示例14: surrounded
bool CGenerator::surrounded(glm::ivec3 vec)
{
if(vec.z == -1)
return true;
bool is = true;
for(int k = -1 ; k < 2 ; k++)
for(int l = -1 ; l < 2 ; l++)
if( GetObj(glm::ivec3(vec.x+k,vec.y+l,vec.z)) != 1 )
is = false;
return is;
}
开发者ID:Dreakii,项目名称:OpenWorld,代码行数:11,代码来源:CGenerator.cpp
示例15: GetObj
BOOL CMyHelpDoc::SaveModified()
{
// return CRichEditDoc::SaveModified();
if(GetTree())//это режим в составе конфигурации
{
if(!GetObj()->bCanSave)
return TRUE;
CRichEditDoc::SetModifiedFlag(0);
CString Str;
((CMyHelpView*)GetView())->GetText(Str);
GetObj()->csFile=Str;
return TRUE;
}
else//это самостоятельный документ
{
return CRichEditDoc::SaveModified();
}
return TRUE;
}
开发者ID:open2cerp,项目名称:Open2C-ERP,代码行数:20,代码来源:MyHelpDoc.cpp
示例16: PROTOBUF_CMD_PARSER
bool CUserMgr::_HandlePacket_UserHeart(Packet* pack)
{
if (!pack)
return false;
/*Message::UserHeartRequest msg;
PROTOBUF_CMD_PARSER( pack, msg );*/
SendHeartResponse(GetObj(pack->GetNetID()));
return true;
}
开发者ID:songjundev,项目名称:b,代码行数:12,代码来源:UserMgr.cpp
示例17: GetValue
//界面设置解除分派时,将该维护参数设置下的所有订单全解除分派
void YKBizMapCreateMTOrderParam::GetAllOrders(YKOrderSet& orderSet,YKOrderSet& rOrderSet)
{
YKCreateMTOrderParamVec mtoVec = GetValue()->GetObjContainer();
for (YK_ID id : mtoVec)
{
YKCreateMTOrderParamExtern ptr = GetObj(id);
if(ptr.ValidObj())
{
ptr.GetAllOrders(orderSet,rOrderSet);
}
}
}
开发者ID:backo880607,项目名称:YuKonSolution,代码行数:13,代码来源:YKCreateMTOrderParamExtern.cpp
示例18: swiat
void CGenerator::print()
{
fstream swiat("swiat.txt",ios::out);
for(int i = 0 ; i < X ; i++)
{
for(int j = 0 ; j < Y ; j++)
{
if(GetObj(glm::ivec3(i,j,0)) == 1)
{
int hight = 0;
for(int k = 0 ; k < Z ; k++)
if(GetObj(glm::ivec3(i,j,k)) == 1)
hight++;
swiat << hight%10;
}
else
swiat << ".";
}
swiat << endl;
}
}
开发者ID:Dreakii,项目名称:OpenWorld,代码行数:21,代码来源:CGenerator.cpp
示例19: ReadMode
static int ReadMode(CurPos &cp, EMode *Mode, const char * /*ModeName*/) {
unsigned char obj;
unsigned short len;
while ((obj = GetObj(cp, len)) != 0xFF) {
switch (obj) {
case CF_SETVAR:
{
long what;
if (GetNum(cp, what) == 0) return -1;
switch (GetObj(cp, len)) {
case CF_STRING:
{
const char *val = GetCharStr(cp, len);
if (len == 0) return -1;
if (SetModeString(Mode, what, val) != 0) return -1;
}
break;
case CF_INT:
{
long num;
if (GetNum(cp, num) == 0) return -1;
if (SetModeNumber(Mode, what, num) != 0) return -1;
}
break;
default:
return -1;
}
}
break;
case CF_END:
return 0;
default:
return -1;
}
}
return -1;
}
开发者ID:OS2World,项目名称:APP-EDITOR-fte,代码行数:40,代码来源:c_config.cpp
示例20: GetObj
void groveTemperatureSensorDevice::OnChange()
{
cout << "grove Temperature Sensor value changed to " << m_cur_value << endl;
/* Update the D-Bus TemperatureObject */
GetObj()->m_cur_status = m_cur_value.c_str();
/* Notify status change */
// TODO: Temperature Sensor is a Time-driven device so no need for signal handler support
//temperature_object_emitSignal(GetObj(), E_TEMPERATURE_OBJECT_SIGNAL_CHANGED_STATUS, "DeviceName=temperature1&Command=get_status");
//DEV_AGENT->EmitSignalDeviceUpdate("DeviceName=temperature1&Command=get_status");
}
开发者ID:shaan420,项目名称:smartgateway,代码行数:13,代码来源:groveTemperatureSensorDevice.cpp
注:本文中的GetObj函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论