本文整理汇总了C++中WVList类的典型用法代码示例。如果您正苦于以下问题:C++ WVList类的具体用法?C++ WVList怎么用?C++ WVList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WVList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: expandNode
void StrucViewItem::expandNode( int index )
//-----------------------------------------
{
VerboseListBox * listbox = _parent->getListBox();
WVList * listobjs = _parent->getObjs();
int childIndex = index + 1;
int i;
initState();
if( _expandState == Collapsed ) {
_expandState=Expanded;
} else {
return;
}
char * tmp = name();
listbox->deleteString( index );
listbox->insertString( tmp, index );
delete tmp;
listobjs->removeAt( index );
listobjs->insertAt( index, this );
for( i = 0; i < _kids.count(); i++ ) {
char *tmp = ((StrucViewItem *)_kids[i])->name();
listbox->insertString( tmp, childIndex );
delete tmp;
listobjs->insertAt( childIndex, _kids[i] );
childIndex ++;
}
listbox->select( index );
return;
}
示例2: name
bool StrucViewItem::inhHook( DerivationPtr & ptr, void * info )
//-------------------------------------------------------------
{
InheritedData * data = (InheritedData *) info;
WString name( *data->name );
StrucViewItem * item = NULL;
name.concat( "::" );
name.concat( ptr._class->name() );
if( ptr._virtuality == DR_VIRTUALITY_VIRTUAL ) {
WVList * list = data->me->_parent->getSeen();
for( int i = list->count(); i > 0; i -= 1 ) {
StrucViewItem * test = (StrucViewItem *) (*list)[ i - 1 ];
if( test->_info->getHandle() == ptr._class->getHandle() ) {
item = test;
}
}
}
if( item != NULL ) {
item->_name.concat( ", " );
item->_name.concat( name );
} else {
item = new StrucViewItem( data->me->_parent, ptr._class,
data->me->_indentLevel );
item->_name = name;
item->initState();
data->me->_kids.add( item );
}
return true;
}
示例3: pruneStates
void MItem::pruneStates( WVList& states )
{
for( int i=states.count(); i>0; ) {
i--;
MState* s = (MState*)states[i];
if( !s->legal() ) {
delete states.removeAt( i );
}
}
}
示例4: REQUIRE
void StrucViewItem::initState()
//-----------------------------
// if i represent a variable, i must find my type
// if the base type is a ClassType, then i am Collapsed
// else i am LeafNode
{
bool do_inherited = false;
ClassType * classType;
dr_sym_type stype = _info->symtype();
REQUIRE( stype != DR_SYM_NOT_SYM,"strucview::initstate ack");
if( !_initialized ) {
if( _classNode != NULL ) {
REQUIRE( stype == DR_SYM_CLASS,"strucview::initstate nak");
classType = (ClassType *)_info;
_type = _name;
} else {
classType = flattenTypeDesc( _info, _type );
_name = _info->name();
}
if( classType ) {
WVList kidInfos;
FilterFlags flags = _parent->getFilter();
if( ( flags & FILT_INHERITED ) || ( flags & FILT_ALL_INHERITED )) {
do_inherited = true;
FILT_RESET_INHERITED( flags );
}
classType->dataMembers( kidInfos, flags );
if( kidInfos.count() != 0 ) {
_expandState = Collapsed;
_parent->addSeen( this );
for( int i = 0; i < kidInfos.count(); i++ ) {
_kids.add( new StrucViewItem( _parent, ((Symbol *)kidInfos[i]),
_indentLevel + 1 ) );
}
} else {
_expandState = LeafNode;
}
if( classType != _info ) {
delete classType;
}
if( do_inherited ) {
startInherited();
}
} else {
_expandState = LeafNode;
}
_initialized = true;
}
}
示例5: expandAction
int MItem::expandAction( const WString& actionName, WString& command )
{
WVList actions;
addActions( actions );
for( int i=0; i<actions.count(); i++ ) {
MAction* action = (MAction*)actions[i];
if( action->name().match( actionName ) ) {
return( expandAction( action, command ) );
}
}
return( -1 );
}
示例6: addActions
void MItem::addActions( WFileName& fn, WVList& list )
{
WVList rules;
if( _config->findMatchingRules( fn, _component->mask(), rules ) ) {
for( int i=0; i<rules.count(); i++ ) {
MRule* r = (MRule*)rules[i];
for( int j=0; j<r->actions().count(); j++ ) {
list.add( r->actions()[j] );
}
}
}
}
示例7: findStates
void MC2Switch::getText( WString& str, WVList* states, SwMode mode )
{
bool state = _state[mode];
WVList found;
findStates( states, found );
int icount = found.count();
for( int i=0; i<icount; i++ ) {
MCState* st = (MCState*)found[i];
if( st->mode() == mode ) {
state = st->state();
}
}
addone( str, state );
}
示例8: callers
void FunctionSym::callers( WVList & list )
//----------------------------------------
{
int i;
getModule()->findRefSyms( &list, this );
for( i = 0; i < list.count(); i += 1 ) {
Symbol * sym = (Symbol *) list[ i ];
if( sym->symtype() != DR_SYM_FUNCTION ) {
list.removeAt( i );
}
}
}
示例9: baseClasses
void ClassLattice::baseClasses( WVList & symlist )
//------------------------------------------------
{
loadBases();
for( int i = 0; i < _bases.count(); i += 1 ) {
symlist.add( _bases[ i ]->_class );
}
}
示例10: derivedClasses
void ClassLattice::derivedClasses( WVList & symlist )
//---------------------------------------------------
{
loadDeriveds();
for( int i = 0; i < _deriveds.count(); i += 1 ) {
symlist.add( _deriveds[ i ]->_class );
}
}
示例11: referenceHook
static bool referenceHook( drmem_hdl, dr_ref_info * refinfo, char * name,
void * info )
//-----------------------------------------------------------------------
{
Reference * ref;
WVList * list = (WVList *) info;
for( int i = 0; i < list->count(); i++ ) {
ref = (Reference *) (*list)[i];
if( ref->line() == refinfo->line && ref->column() == refinfo->column
&& strcmp( ref->sourceFile(), refinfo->file ) == 0 ) {
WBRFree( name );
return true;
}
}
list->add( new Reference( refinfo, name ) );
return true; // keep going
}
示例12: addStates
void MItem::addStates( WVList& list, SwMode mode )
{
int icount = _states.count();
for( int i=0; i<icount; i++ ) {
MState* st = (MState*)_states[i];
if( st->mode() == mode ) {
list.add( _states[i] );
}
}
}
示例13: addWorkFiles
void MComponent::addWorkFiles( WVList& workFiles, SwMode mode, MComponent* comp )
{
for( int i=0; i<_items.count(); i++ ) {
MItem* m = (MItem*)_items[i];
WFileName f;
m->absName( f );
MWorkFile* w = new MWorkFile( f, mode, m, comp );
workFiles.add( w );
}
}
示例14: getMaskItems
void MComponent::getMaskItems( WVList& list )
{
int icount = _items.count();
for( int i=0; i<icount; i++ ) {
MItem* m = (MItem*)_items[i];
if( m->isMask() ) {
list.add( m );
}
}
}
示例15: addFamilies
void MTool::addFamilies( WVList& list )
{
int icount = _families.count();
for( int i = 0; i < icount; i++ ) {
list.add( _families[i] );
}
icount = _incTools.count();
for( int i = 0; i < icount; i++ ) {
MTool* tool = (MTool*)_incTools[i];
tool->addFamilies( list );
}
}