本文整理汇总了C++中WVList类的典型用法代码示例。如果您正苦于以下问题:C++ WVList类的具体用法?C++ WVList怎么用?C++ WVList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WVList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:34,代码来源:strcview.cpp
示例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;
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:32,代码来源:strcview.cpp
示例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 );
}
}
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:10,代码来源:mitem.cpp
示例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;
}
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:54,代码来源:strcview.cpp
示例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 );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:12,代码来源:mitem.cpp
示例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] );
}
}
}
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:12,代码来源:mitem.cpp
示例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 );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:14,代码来源:mc2swtch.cpp
示例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 );
}
}
}
开发者ID:Graham-stott,项目名称:open-watcom-v2,代码行数:14,代码来源:funcsym.cpp
示例9: baseClasses
void ClassLattice::baseClasses( WVList & symlist )
//------------------------------------------------
{
loadBases();
for( int i = 0; i < _bases.count(); i += 1 ) {
symlist.add( _bases[ i ]->_class );
}
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:8,代码来源:classlat.cpp
示例10: derivedClasses
void ClassLattice::derivedClasses( WVList & symlist )
//---------------------------------------------------
{
loadDeriveds();
for( int i = 0; i < _deriveds.count(); i += 1 ) {
symlist.add( _deriveds[ i ]->_class );
}
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:8,代码来源:classlat.cpp
示例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
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:18,代码来源:module.cpp
示例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] );
}
}
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:10,代码来源:mitem.cpp
示例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 );
}
}
开发者ID:MikeyG,项目名称:open-watcom-v2,代码行数:10,代码来源:mcompon.cpp
示例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 );
}
}
}
开发者ID:MikeyG,项目名称:open-watcom-v2,代码行数:10,代码来源:mcompon.cpp
示例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 );
}
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:12,代码来源:mtool.cpp
示例16: absName
int MItem::expandAction( MAction* action, WString& command )
{
WFileName fn;
if( _isTarget ) {
absName( fn );
} else {
WVList actions;
int ocount = addActions( actions );
if( !action ) {
int icount = actions.count();
if( icount > 0 ) {
for( int i=0; i<icount; i++ ) {
MAction* act = (MAction*)actions[i];
if( act->defAction() ) {
if( act->okForMask() || !isMask() ) {
action = act;
break;
}
}
}
}
}
if( action ) {
int ix = actions.indexOfSame( action );
if( ix < 0 ) {
action = NULL;
} else if( ix >= ocount ) {
absResult( fn );
} else {
absName( fn );
}
}
}
if( action ) {
WVList* states = findActionStates( action );
return( action->expand( command, &fn, _component->mask(), states, _component->mode() ) );
}
return( -1 );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:39,代码来源:mitem.cpp
示例17: collapseNode
void StrucViewItem::collapseNode( int &index )
//--------------------------------------------
{
WVList * listobjs = _parent->getObjs();
VerboseListBox * listbox = _parent->getListBox();
initState();
if( _expandState == Expanded ) {
index += 1;
for( int i = 0; i < _kids.count(); i++ ) {
((StrucViewItem *)_kids[ i ])->collapseNode( index );
}
index -= 1;
}
listobjs->removeAt( index );
listbox->deleteString( index );
if( _expandState == Expanded ) {
_expandState = Collapsed;
}
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:22,代码来源:strcview.cpp
示例18: expandAllNode
void StrucViewItem::expandAllNode( int &index )
//---------------------------------------------
{
WVList * listobjs = _parent->getObjs();
VerboseListBox * listbox = _parent->getListBox();
initState();
if( (*listobjs)[ index ] != this ) {
if( _expandState == Collapsed ) {
_expandState = Expanded;
}
listobjs->insertAt( index, this );
char * tmp = name();
listbox->insertString( tmp, index );
delete tmp;
if( _expandState == Collapsed ) {
_expandState = Expanded;
}
} else {
if( _expandState == Collapsed ) {
_expandState = Expanded;
listbox->deleteString( index );
char * tmp = name();
listbox->insertString( tmp, index );
delete tmp;
}
}
index += 1;
if( _expandState != LeafNode ) {
for( int i = 0; i < _kids.count(); i++ ) {
((StrucViewItem *)_kids[ i ])->expandAllNode( index );
}
}
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:36,代码来源:strcview.cpp
示例19: load
void DTViewClass::load()
//----------------------
{
WVList dataMembers;
WVList methods;
WVList friends;
int i;
WString str;
ClassType * cls = (ClassType *) _symbol;
Symbol * s;
_members->clearAndDestroy();
cls->dataMembers( dataMembers );
cls->memberFunctions( methods );
cls->friendFunctions( friends );
for( i = 0; i < friends.count(); i += 1 ) {
s = (Symbol *) friends[ i ];
str.printf( " friend %s;", s->scopedName( FALSE ) );
_members->insert( new ClassMember( s, str.gets() ) );
}
for( i = 0; i < dataMembers.count(); i += 1 ) {
s = (Symbol *) dataMembers[ i ];
str.printf( " %s;", s->scopedName( FALSE ) );
_members->insert( new ClassMember( s, str.gets() ) );
}
for( i = 0; i < methods.count(); i += 1 ) {
s = (Symbol *) methods[ i ];
str.printf( " %s;", s->scopedName( FALSE ) );
_members->insert( new ClassMember( s, str.gets() ) );
}
addDescriptions();
fillBox();
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:40,代码来源:dtvclass.cpp
示例20: _parent
DescriptionPaint::DescriptionPaint( WBRWindow * prnt, const WRect & r,
Symbol * sym )
: _parent( prnt )
, _rect( r )
, _current( -1 )
//--------------------------------------------------------------------
{
int i;
WVList desc;
Description * entry;
WString buf;
const char * uDefSymName;
int x = r.x();
int w;
int h;
_parts = new WCPtrOrderedVector<DescriptionPart>;
sym->description( desc );
for( i = 0; i < desc.count(); i += 1 ) {
entry = (Description *) desc[i];
if( entry->symbol() ) {
if( sym->isEqual( entry->symbol() ) ) {
// don't hilight the symbol we're describing
buf.concat( entry->name() );
delete entry->symbol();
} else {
if( buf != "" ) { // flush buf
w = prnt->getTextExtentX( buf );
h = prnt->getTextExtentY( buf );
_parts->append( new DescriptionPart( buf.gets(), NULL,
WRect(x,r.y(),w, h ) ) );
buf="";
x+=w;
}
uDefSymName = entry->name();
w = prnt->getTextExtentX( uDefSymName );
h = prnt->getTextExtentY( uDefSymName );
_parts->append( new DescriptionPart( uDefSymName,
entry->symbol(),
WRect(x,r.y(),w, h ) ) );
x+=w;
}
} else {
buf.concat( entry->name() );
}
}
desc.deleteContents();
if( buf != "" ) { // flush buf
w = prnt->getTextExtentX( buf );
h = prnt->getTextExtentY( buf );
_parts->append( new DescriptionPart( buf, NULL,
WRect(x,r.y(),w, h ) ) );
buf="";
x+=w;
}
_rect.w( x - abs( _rect.x() ) );
}
开发者ID:ArmstrongJ,项目名称:open-watcom-v2,代码行数:69,代码来源:descpnt.cpp
注:本文中的WVList类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论