本文整理汇总了C++中Array::Clean方法的典型用法代码示例。如果您正苦于以下问题:C++ Array::Clean方法的具体用法?C++ Array::Clean怎么用?C++ Array::Clean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Array
的用法示例。
在下文中一共展示了Array::Clean方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OpenPlugin
FARAPI(HANDLE) OpenPlugin(int OpenFrom,int Item)
{
UpdateConfig();
if(OpenFrom==OPEN_EDITOR)
{
//DebugBreak();
EditorInfo ei;
I.EditorControl(ECTL_GETINFO,&ei);
Autoload(ei.FileName);
if(Count()==0)
{
Msg(MENotLoaded);
return INVALID_HANDLE_VALUE;
}
MenuList ml;
enum{
miFindSymbol,miUndo,miResetUndo,
miComplete,miBrowseFile,miBrowseClass,
};
ml<<MI(MFindSymbol,miFindSymbol)
<<MI(MCompleteSymbol,miComplete)
<<MI(MUndoNavigation,miUndo)
<<MI(MResetUndo,miResetUndo)
<<MI(MBrowseSymbolsInFile,miBrowseFile)
<<MI(MBrowseClass,miBrowseClass);
int res=Menu(GetMsg(MPlugin),ml,0);
if(res==-1)return INVALID_HANDLE_VALUE;
switch(res)
{
case miFindSymbol:
{
String word=GetWord();
if(word.Length()==0)return INVALID_HANDLE_VALUE;
//Msg(word);
PTagArray ta=Find(word,ei.FileName);
if(!ta)
{
Msg(GetMsg(MNotFound));
return INVALID_HANDLE_VALUE;
}
TagInfo *ti;
if(ta->Count()==1)
{
ti=(*ta)[0];
}else
{
ti=TagsMenu(ta);
}
if(ti)NavigateTo(ti);
FreeTagsArray(ta);
}break;
case miUndo:
{
if(UndoArray.Count()==0)return INVALID_HANDLE_VALUE;
/*char b[32];
sprintf(b,"%d",ei.CurState);
Msg(b);*/
if(ei.CurState==ECSTATE_SAVED)
{
I.EditorControl(ECTL_QUIT,NULL);
I.AdvControl(I.ModuleNumber,ACTL_COMMIT,(void*)-1);
}
SUndoInfo ui;
UndoArray.Pop(ui);
SetPos(ui.file,ui.line,ui.pos,ui.top,ui.left);
}break;
case miResetUndo:
{
UndoArray.Clean();
}break;
case miComplete:
{
EditorInfo ei;
I.EditorControl(ECTL_GETINFO,&ei);
String word=GetWord(1);
if(word.Length()==0)return INVALID_HANDLE_VALUE;
StrList lst;
FindParts(ei.FileName,word,lst);
if(lst.Count()==0)
{
Msg(MNothingFound);
return INVALID_HANDLE_VALUE;
}
int res;
if(lst.Count()>1)
{
MenuList ml;
for(int i=0;i<lst.Count();i++)
{
ml<<MI(lst[i],i);
}
res=Menu(GetMsg(MSelectSymbol),ml,0,MF_FILTER|MF_SHOWCOUNT,(void*)word.Str());
if(res==-1)return INVALID_HANDLE_VALUE;
}else
{
res=0;
}
EditorGetString egs;
egs.StringNumber=-1;
I.EditorControl(ECTL_GETSTRING,&egs);
//.........这里部分代码省略.........