本文整理匯總了C++中AddList函數的典型用法代碼示例。如果您正苦於以下問題:C++ AddList函數的具體用法?C++ AddList怎麽用?C++ AddList使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了AddList函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: AddString
void CSettings::LoadDefaults()
{
// jenksta: HACKY, find another way
#ifdef _SERVER
AddString("logfile", "ivmp-svr.log");
AddInteger("port", 9999, 1024, 65535);
AddInteger("httpport", 9998, 80, 65535);
AddString("httpserver", "");
AddInteger("maxplayers", MAX_PLAYERS, 1, MAX_PLAYERS);
AddInteger("maxvehicles", MAX_VEHICLES, 0, MAX_VEHICLES);
AddString("password", "");
AddBool("query", true);
AddBool("listed", false);
AddBool("guinametags",false);
AddBool("vehicledamage", false);
AddBool("vehiclewaterdeath", true);
AddBool("headmovement",true);
AddBool("checkGTAFiles",true);
AddString("hostname", VERSION_IDENTIFIER_2 " Server");
AddString("hostaddress", "");
AddBool("frequentevents", false);
AddBool("kickoldplayers", true);
AddBool("paynspray", true);
AddBool("autoaim", true);
AddInteger("weather", 1, 1, 10);
AddFloat("wind",0.0,0.0,50.0);
AddBool("silent", false);
AddBool("timestamp", true);
AddList("script");
AddList("clientscript");
AddList("clientresource");
AddList("module");
AddList("config");
AddString("masterlistpath", MASTERLIST_ADD_PATH);
#else
AddString("ip", "127.0.0.1");
AddInteger("port", 9999, 1024, 65535);
AddString("currentconnect_server", "0.0.0.0");
AddInteger("currentconnect_port", 9999, 1024, 65535);
AddString("nick", "player");
AddString("pass", "");
AddBool("windowed", false);
AddBool("fps", false);
AddString("chatfont", "tahoma-bold");
AddInteger("chatsize", 10, 1, 100);
AddInteger("chatbga", 0, 0, 255);
AddInteger("chatbgr", 0, 0, 255);
AddInteger("chatbgg", 0, 0, 255);
AddInteger("chatbgb", 0, 0, 255);
AddString("masterlistpath", MASTERLIST_LIST_PATH);
#endif
AddString("masterlist", MASTERLIST_ADDRESS);
AddInteger("masterlistport", MASTERLIST_PORT, 1, 65535);
}
示例2: CreateTitle
// Build the screen
LTBOOL CScreenHostLevels::Build()
{
LTIntPt addPos = g_pLayoutMgr->GetScreenCustomPoint((eScreenID)m_nScreenID,"AddPos");
LTIntPt removePos = g_pLayoutMgr->GetScreenCustomPoint((eScreenID)m_nScreenID,"RemovePos");
LTIntPt commandPos = g_pLayoutMgr->GetScreenCustomPoint((eScreenID)m_nScreenID,"CommandPos");
if (g_pLayoutMgr->HasCustomValue((eScreenID)m_nScreenID,"ListFontSize"))
nListFontSize = (uint8)g_pLayoutMgr->GetScreenCustomInt((eScreenID)m_nScreenID,"ListFontSize");
CreateTitle(IDS_TITLE_HOST_MISSIONS);
m_pAdd = AddTextItem(IDS_HOST_ADD_MISSION, CMD_ADD_LEVEL, IDS_HELP_ADD_MISSION, addPos);
m_pAddAll = AddTextItem(IDS_HOST_ADD_ALL, CMD_ADD_ALL, IDS_HELP_ADD_ALL, commandPos);
m_pRemoveAll = AddTextItem(IDS_HOST_REMOVE_ALL, CMD_REMOVE_ALL, IDS_HELP_REM_ALL);
m_pRemove = AddTextItem(IDS_HOST_REMOVE_MISSION, CMD_REMOVE_LEVEL, IDS_HELP_REM_MISSION, removePos);
LTRect rcAvailRect = g_pLayoutMgr->GetScreenCustomRect((eScreenID)m_nScreenID,"AvailRect");
int nListHeight = (rcAvailRect.bottom - rcAvailRect.top);
nAvailWidth = (rcAvailRect.right - rcAvailRect.left);
m_pAvailMissions = AddList(LTIntPt(rcAvailRect.left,rcAvailRect.top),nListHeight,LTTRUE,nAvailWidth);
m_pAvailMissions->SetIndent(LTIntPt(5,5));
m_pAvailMissions->SetFrameWidth(2);
m_pAvailMissions->Enable(LTFALSE);
LTRect rcSelRect = g_pLayoutMgr->GetScreenCustomRect((eScreenID)m_nScreenID,"SelectRect");
nListHeight = (rcSelRect.bottom - rcSelRect.top);
nSelWidth = (rcSelRect.right - rcSelRect.left);
m_pSelMissions = AddList(LTIntPt(rcSelRect.left,rcSelRect.top),nListHeight,LTTRUE,nSelWidth);
m_pSelMissions->SetIndent(LTIntPt(5,5));
m_pSelMissions->SetFrameWidth(2);
m_pSelMissions->Enable(LTFALSE);
m_nextPos.y += nListHeight;
uint16 nListWidth = nSelWidth-16;
m_pLoopToggle = AddToggle(IDS_LOOP_MISSIONS,IDS_HELP_LOOP_MISSIONS,nListWidth,&m_bLoopMissions);
m_pLoopToggle->SetOnString(LoadTempString(IDS_YES));
m_pLoopToggle->SetOffString(LoadTempString(IDS_NO));
// Make sure to call the base class
if (!CBaseScreen::Build()) return LTFALSE;
UseBack(LTTRUE,LTTRUE);
return LTTRUE;
}
示例3: GetName
void CAclApp::AddAcl(PXACL pAcl, BOOL bIsSelect, BOOL bIsEdit, int iIndex)
{
CString sString[ACL_APP_LIST_COUNT];
sString[0].Format("%u", pAcl->ulAclID);
sString[1] = (pAcl->sApplication[0] == '*' ? "*" : GetName(pAcl->sApplication));
sString[2] = GUI_DIRECTION[pAcl->bDirection];
sString[3] = ACL_NET_TYPE[pAcl->bRemoteNetType];
sString[4].Format("%u", pAcl->uiServicePort);
sString[5].Format("%u", pAcl->wLocalPort);
sString[6] = GUI_ACTION[pAcl->bAction];
sString[7] = GUI_SERVICE_TYPE[pAcl->bServiceType];
sString[8] = ACL_TIME_TYPE[pAcl->bAccessTimeType];
sString[9] = pAcl->sMemo[0] == 0 ? MEMO_CONST : pAcl->sMemo;
sString[10] = (pAcl->sApplication[0] == '*' ? "*" : GetPath(pAcl->sApplication));
HICON hIcon = ExtractIcon(theApp.m_hInstance, pAcl->sApplication, 0);
if(hIcon == NULL)
hIcon = theApp.LoadIcon(IDR_NULLAPP);
int iIcon;
if(bIsEdit)
iIcon = m_ImageList.Replace(iIndex, hIcon);
else
iIcon = m_ImageList.Add(hIcon);
DestroyIcon(hIcon);
iIndex = AddList(&m_List, (LPCTSTR*)sString, ACL_APP_LIST_COUNT, bIsSelect, bIsEdit, iIndex, iIcon);
}
示例4: GetLoadStrU8
BOOL TShareDlg::EvCreate(LPARAM lParam)
{
shareListView.AttachWnd(GetDlgItem(FILE_LIST));
char *title[] = { GetLoadStrU8(IDS_FILENAME), GetLoadStrU8(IDS_SIZE), GetLoadStrU8(IDS_LOCATION), NULL };
int size[] = { 120, 70, 180 };
int fmt[] = { LVCFMT_LEFT, LVCFMT_RIGHT, LVCFMT_LEFT, LVCFMT_LEFT };
int i;
for (i=0; title[i]; i++) {
shareListView.InsertColumn(i, title[i], size[i], fmt[i]);
}
for (i=0; i < shareInfo->fileCnt; i++) {
AddList(i);
}
if (rect.left == CW_USEDEFAULT)
{
GetWindowRect(&rect);
int xsize = rect.right - rect.left, ysize = rect.bottom - rect.top;
int cx = ::GetSystemMetrics(SM_CXFULLSCREEN), cy = ::GetSystemMetrics(SM_CYFULLSCREEN);
int x = (cx - xsize)/2;
int y = (cy - ysize)/2;
MoveWindow((x < 0) ? 0 : x % (cx - xsize), (y < 0) ? 0 : y % (cy - ysize), xsize, ysize, FALSE);
}
else
MoveWindow(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, FALSE);
Show();
::SetFocus(shareListView.hWnd);
return TRUE;
}
示例5: main
int main (int argc, char **argv)
{
GenList A, a, b;
int p;
Initialize (&A);
Initialize (&a);
Initialize (&b);
AddAtom (2, 0, &a);
AddAtom (3, 1, &a);
AddAtom (5, 2, &a);
AddAtom (4, 0, &b);
AddAtom (6, 1, &b);
AddAtom (7, 2, &b);
AddAtom (8, 3, &b);
//Append (&a, &b);
AddList (&b, 0, &A);
AddAtom (4, 0, &A);
AddAtom (6, 1, &A);
//AddList (&b, 1, &A);
//AddAtom (10, 2, &A);
Traverse(&A, print, PrintLength);
}
示例6: t_item
coupled_item_list_t circuit_t::GetParallelLists ()
{
coupled_item_list_t result;
item_list_t current_list;
for (list<element_t*>::iterator p = elements.begin(); p != elements.end(); p++)
{
current_list.clear();
if ((*p)->type == E_RESISTOR || (*p)->type == E_INDUCTOR || (*p)->type == E_CAPACITOR || (*p)->type == E_IMPEDANCE
|| (*p)->type == E_CSRC)
{
item_t t_item (*p, false);
current_list.push_back (t_item);
for (list<element_t*>::iterator z = elements.begin(); z != elements.end(); z++)
{
if (*z != *p && (*z)->type == (*p)->type && SharedNodes (*p, *z) == 2)
{
item_t t_item (*z, false);
current_list.push_back (t_item);
} /* if */
} /* for */
} /* if */
} /* for */
// add all couples to main list, callee takes care of duplicates
AddList (current_list, result);
} /* circuit_t::get_parallel_lists */
示例7: AddList
void Node::AddList(std::string name, std::vector<int> attribute_list) {
std::vector<std::string> attribute_list_strings;
for(auto item : attribute_list) {
attribute_list_strings.push_back(std::to_string(item));
}
AddList(name, attribute_list_strings);
}
示例8: IngameWindow
iwMusicPlayer::iwMusicPlayer()
: IngameWindow(CGI_MUSICPLAYER, (unsigned short) - 1, (unsigned short) - 1, 430, 330, _("Music player"),
LOADER.GetImageN("resource", 41)), changed(false)
{
AddList(0, 20, 30, 330, 200, TC_GREEN1, NormalFont);
AddText(1, 20, 240, _("Playlist:"), COLOR_YELLOW, 0, NormalFont);
AddComboBox(2, 20, 260, 330, 22, TC_GREEN1, NormalFont, 200);
// Playlistbuttons
const unsigned short button_distance = 10;
const unsigned short button_width = (330 - button_distance) / 2;
ctrlButton* b1 = AddTextButton(3, 20, 290, button_width, 22, TC_GREEN2, _("Add"), NormalFont);
AddTextButton(4, b1->GetX(false) + button_width + button_distance, 290, button_width, 22, TC_GREEN2, _("Remove"), NormalFont);
//AddTextButton(5,b1->GetX(false),320,button_width,22,TC_GREEN2,_("Save"),NormalFont);
//AddTextButton(6,b2->GetX(false),320,button_width,22,TC_GREEN2,_("Load"),NormalFont);
// Buttons für die Musikstücke
AddImageButton(7, 370, 30, 40, 40, TC_GREY, LOADER.GetImageN("io", 138), _("Add track"));
AddImageButton(8, 370, 80, 40, 40, TC_GREY, LOADER.GetImageN("io_new", 2), _("Add directory of tracks"));
AddImageButton(9, 370, 130, 40, 40, TC_RED1, LOADER.GetImageN("io", 220), _("Remove track"));
AddImageButton(10, 370, 180, 40, 15, TC_GREY, LOADER.GetImageN("io", 33), _("Upwards"));
AddImageButton(11, 370, 195, 40, 15, TC_GREY, LOADER.GetImageN("io", 34), _("Downwards"));
AddDeepening(12, 370, 220, 40, 20, TC_GREY, "1", NormalFont, COLOR_YELLOW);
AddImageButton(13, 370, 240, 20, 20, TC_RED1, LOADER.GetImageN("io", 139), _("Less repeats"));
AddImageButton(14, 390, 240, 20, 20, TC_GREY, LOADER.GetImageN("io", 138), _("More repeats"));
AddImageButton(15, 370, 270, 40, 40, TC_GREY, LOADER.GetImageN("io", 107), _("Playback in this order")); //225
// Mit Werten füllen
MUSICPLAYER.GetPlaylist().FillMusicPlayer(this);
UpdatePlaylistCombo(SETTINGS.sound.playlist);
}
示例9: RouteDetectSrc
void RouteDetectSrc(unsigned short src){
int i;
unsigned short curr,cursor_ID;
fwdneigh * queue=NULL;
for(i=0;i<network[src].n_customers;i++){
curr=network[src].customers[i];
network[src].FIB[curr]=1;
queue=AddList(curr,queue);
}
while(queue!=NULL){
curr=queue->ID;
queue=RemoveFirst(queue);
for(i=0;i<network[curr].n_customers;i++){
cursor_ID = network[curr].customers[i];
if( network[src].FIB[cursor_ID] > 1 ){
network[src].FIB[cursor_ID]=1;
queue=AddList(cursor_ID,queue);
}
}
}
for(i=0;i<network[src].n_peers;i++){
curr=network[src].peers[i];
if( network[src].FIB[curr] > 2 ){
network[src].FIB[curr]=2;
queue=AddList(curr,queue);
}
}
while(queue!=NULL){
curr=queue->ID;
queue=RemoveFirst(queue);
for(i=0;i<network[curr].n_customers;i++){
cursor_ID = network[curr].customers[i];
if( network[src].FIB[cursor_ID] > 2 ){
network[src].FIB[cursor_ID]=2;
queue=AddList(cursor_ID,queue);
}
}
}
}
示例10: while
BOOL TShareDlg::EvDropFiles(HDROP hDrop)
{
int lastFileCnt = shareInfo->fileCnt;
parent->EvDropFiles(hDrop);
while (lastFileCnt < shareInfo->fileCnt)
AddList(lastFileCnt++);
return TRUE;
}
示例11: TLock
j_void_t *CXMemPool::Alloc(j_uint32_t nSize)
{
TLock(m_locker);
J_MEM_NODE *pNode = FindFreeNode(nSize);
void *pRetVal = NULL;
if (pNode != NULL)
{
J_MEM_NODE *pFreeNode = SplitMem(&pNode, nSize);
DeleteList(&m_pFreeList, pNode);
AddList(&m_pFreeList, pFreeNode);
AddList(&m_pBusyList, pNode);
pRetVal = pNode->p;
}
TUnlock(m_locker);
return pRetVal;
}
示例12: AddList
void CWipeFree::OnSelchangeWipeDiskCombo()
{
int nSel;
nSel = m_WipeDiskList.GetCurSel ();
nSel = m_WipeDiskList.GetItemData (nSel);
m_WipeParList.DeleteAllItems();
AddList(&m_WipeParList, nSel+DISK_BASE);
}
示例13: AddList
void CAclWeb::AddAcl(PXACL_WEB pAcl, BOOL bIsSelect, BOOL bIsEdit, int iIndex)
{
CString sString[ACL_WEB_LIST_COUNT];
sString[0].Format("%u", pAcl->dwId);
sString[1] = pAcl->sWeb;
sString[2] = GUI_ACTION[pAcl->bAction];
sString[3] = pAcl->sMemo[0] == 0 ? MEMO_CONST : pAcl->sMemo;
AddList(&m_List, (LPCTSTR*)sString, ACL_WEB_LIST_COUNT, bIsSelect, bIsEdit, iIndex);
}
示例14: main
void main()
{
LIST *Cur,*First=new LIST;
First->next=NULL;
srand(time(NULL));
for(int i=0;i<10;++i)
{
if(!First->next)
{
Cur=new LIST;
First->next=Cur;
}
else
{
Cur->next=new LIST;
Cur=Cur->next;
}
CreateList(Cur);
}
Cur=First;
PrintList(Cur);
int b;
int n;
while(1)
{
printf("\n\n1-add\n2-delete\n3-count\n");
scanf("%d",&b);
switch(b)
{
case 1:
printf("\nNumber of elem\n");
scanf("%d",&n);
Cur=First;
AddList(Cur,n);
Cur=First;
PrintList(Cur);
break;
case 2:
printf("\nNumber of elem\n");
scanf("%d",&n);
Cur=First;
DeleteList(Cur,n);
Cur=First;
PrintList(Cur);
break;
case 3:
printf("\nNumber of elem\n");
scanf("%d",&n);
Cur=First;
GetCount(Cur,n);
break;
}
}
}
示例15: switch
BOOL TShareDlg::EvCommand(WORD wNotifyCode, WORD wID, LPARAM hWndCtl)
{
switch (wID)
{
case IDOK: EndDialog(TRUE); break;
case IDCANCEL: EndDialog(FALSE); break;
case FILE_BUTTON:
{
int i = shareInfo->fileCnt;
if (FileAddDlg(this, shareMng, shareInfo, cfg))
for (i; i < shareInfo->fileCnt; i++)
AddList(i);
}
break;
case FOLDER_BUTTON:
if (BrowseDirDlg(this, GetLoadStrU8(IDS_FOLDERATTACH), cfg->lastOpenDir, cfg->lastOpenDir))
{
if (shareMng->AddFileShare(shareInfo, cfg->lastOpenDir))
{
AddList(shareInfo->fileCnt -1);
cfg->WriteRegistry(CFG_GENERAL);
}
}
break;
case DEL_BUTTON:
{
for (int i=shareInfo->fileCnt-1; i >= 0; i--)
{
if (!shareListView.IsSelected(i)) continue;
DelList(i);
}
}
break;
default: break;
}
return TRUE;
}