当前位置: 首页>>代码示例>>C++>>正文


C++ SetCount函数代码示例

本文整理汇总了C++中SetCount函数的典型用法代码示例。如果您正苦于以下问题:C++ SetCount函数的具体用法?C++ SetCount怎么用?C++ SetCount使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetCount函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetCount

bool MQuestItem::Create( const unsigned long int nItemID, const int nCount, MQuestItemDesc* pDesc, bool bKnown )
{
	m_nItemID	= nItemID;
	m_pDesc		= pDesc;

	return SetCount( nCount, bKnown );
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:7,代码来源:MQuestItem.cpp

示例2: fFirstline

scContUnit::scContUnit( TypeSpec&	spec,
						scContUnit* prevPara,
						long		count ) :
								fFirstline( 0 ),
								fParaCount( 0 ),
								fSpecRun( spec ),
								defspec_( spec )
#ifdef _RUBI_SUPPORT
								, fRubiArray( 0 )
#endif
{
#if SCDEBUG > 1 
	fReformatEvent = 0;
#endif

	try {
		SetCount( count );

		Mark( scRETABULATE );
		
		if ( prevPara )
			prevPara->SetNext( this );
		SetPrev( prevPara );
	}
	catch( ... ) {
		delete this;
		throw;
	} 
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:29,代码来源:Scparagr.cpp

示例3: VListWin

PathListWin::PathListWin(Win* parent, PathList& dataList)
    : VListWin(Win::WT_CHILD, WH_TABFOCUS | WH_CLICKFOCUS, 0, parent, VListWin::SINGLE_SELECT, VListWin::BORDER_3D, 0),
    m_dataList(dataList)
{
    wal::GC gc(this);
    gc.Set(GetFont());

    cpoint ts = gc.GetTextExtents(ABCString);
    const int fontH = ts.y + 2;
    this->SetItemSize((fontH > 16 ? fontH : 16) + 1, 100);

    LSize ls;
    ls.x.maximal = 10000;
    ls.x.ideal = 1000;
    ls.x.minimal = 600;

    ls.y.maximal = 10000;
    ls.y.ideal = 600;
    ls.y.minimal = 400;

    SetLSize(ls);

    if (m_dataList.GetCount() > 0)
    {
        SetCount(m_dataList.GetCount());
        SetCurrent(0);
    }
}
开发者ID:0-wiz-0,项目名称:WCMCommander,代码行数:28,代码来源:path-list.cpp

示例4: node

	void TextList::Append( const unicode_t* txt, int i, void* p )
	{
		TLNode node( txt, i, p );
		list.append( node );
		valid = false;
		SetCount( list.count() );
	}
开发者ID:KonstantinKuklin,项目名称:WalCommander,代码行数:7,代码来源:swl_textlist.cpp

示例5: SetCapacity

bool ON_Polyline::CreateStarPolygon(
    const ON_Circle& circle,
    double other_radius,
    int side_count
)
{
    bool rc = ( circle.IsValid() && side_count >= 3 && other_radius >= 0.0 )
              ? true
              : false;
    if ( rc )
    {
        SetCapacity(2*side_count+1);
        SetCount(2*side_count+1);
        double half_a = ON_PI/side_count;
        int i;
        ON_Circle other_circle = circle;
        other_circle.radius = other_radius;
        for ( i = 0; i < side_count; i++ )
        {
            m_a[i*2]   = circle.PointAt(half_a*2*i);
            m_a[i*2+1] = other_circle.PointAt(half_a*(1+2*i));
        }
        m_a[side_count*2] = m_a[0];
    }
    else
        Destroy();
    return rc;
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:28,代码来源:opennurbs_polyline.cpp

示例6: SetCount

CDataFactory::LPDATAITEM CDataFactory::_AddNew()
{
	if(m_dwCountOfDataItems == 0 || m_lpDataItems == NULL)
	{
		// 如果当前数据为空,则初始化一个新的。
		SetCount(1000);
		m_dwCurUsedDataItemCount = 1;
		return &m_lpDataItems[0];
	}
	
	// 当前数据不为空,在后面添加
	m_dwCurUsedDataItemCount ++;
	
	if(m_dwCurUsedDataItemCount <= m_dwCountOfDataItems)
	{
		return &m_lpDataItems[m_dwCurUsedDataItemCount - 1];
	}
	else
	{
		LPDATAITEM pNewDataItem = new DATAITEM;
		if(pNewDataItem == NULL)
		{
			m_dwCurUsedDataItemCount --;
			ASSERT(FALSE);
			return NULL;
		}
		
		m_cExtDataItemArray.Add((DWORD)pNewDataItem);
		
		return pNewDataItem;
	}
}
开发者ID:haha2500,项目名称:QCLottery,代码行数:32,代码来源:DataFactory.cpp

示例7: Plant

void Plantable::Plant(ItemPtr sourceItem)
{
    auto x = Player::Get().GetPositionX();
    auto y = Player::Get().GetPositionY();
    auto currentLandmark = GameState::Get().GetCurrentLandmark();
    auto currentTile = currentLandmark->GetTile(x, y);

    if (currentTile.TileType != TileType::Tilled) {
        GameState::Get().AddLogMessage("You can only plant on tilled land!");
        return;
    }

    auto item = currentLandmark->GetItem(x, y);
    if (item != nullptr) {
        GameState::Get().AddLogMessageFmt("Cannot plant, %s is on the ground here.", item->GetName().c_str());
        return;
    }

    auto crop = GameState::Get().GetItemFromItemDatabase(this->Crop);
    crop->SetCount(1);
    currentLandmark->AddItem(x, y, crop);

    auto growableInterface = crop->GetInterface<Growable>(ItemInterfaceType::Growable);
    if (growableInterface != nullptr) {
        growableInterface->StartGrowing(crop);
    }

    sourceItem->RemoveOne();

}
开发者ID:HarvestRogue,项目名称:harvest-rogue,代码行数:30,代码来源:plantable.cpp

示例8: SetQuestion

void CWndGuildVote::SelChange(CGuild* pGuild, int nIndex)
{
	GUILD_VOTE_SELECT guildvotesel[4];
	
	CWndComboBox* pCombo = (CWndComboBox*)GetDlgItem(WIDC_COMBOBOX1);
	
	list <CGuildVote*>::iterator it = pGuild->m_votes.begin();
	
	for ( ; it != pGuild->m_votes.end() ; ++it )
	{
		if( (*it)->GetID() == pCombo->GetItemData(nIndex) )
		{
			guildvotesel[0] = (*it)->GetVoteSelect(0);
			guildvotesel[1] = (*it)->GetVoteSelect(1);
			guildvotesel[2] = (*it)->GetVoteSelect(2);
			guildvotesel[3] = (*it)->GetVoteSelect(3);
			
			SetQuestion( (*it)->GetQuestion() );
			break;
		}
	}
	
	SetszString( guildvotesel[0].szString, guildvotesel[1].szString, guildvotesel[2].szString, guildvotesel[3].szString );
	SetCount( guildvotesel[0].cbCount, guildvotesel[1].cbCount, guildvotesel[2].cbCount, guildvotesel[3].cbCount );
}
开发者ID:iceberry,项目名称:flyffsf,代码行数:25,代码来源:WndGuildVote.cpp

示例9: SetValue

	bool SetValue(const void *src_ptr, std::size_t src_count)
	{
		bool ptr_changed_flag = SetCount(src_count, false);
	
		memcpy(buffer_sptr_.get(), src_ptr, src_count);

		return(ptr_changed_flag);
	}
开发者ID:neilgroves,项目名称:MlbDev,代码行数:8,代码来源:IncrementalBuffer.hpp

示例10: SetCount

__fastcall TPolyline::TPolyline(TPolyline *Poly,__int32 id)
{
FId=id;
FCount=FCapacity=0;
FPoints=NULL;
SetCount(Poly->Count);
for (int i=0;i<FCount;i++)
    FPoints[i]=(*Poly)[i];
}
开发者ID:SevenLines,项目名称:RSign,代码行数:9,代码来源:Metrics.cpp

示例11: Count

void VectorBase::Erase( char* address, SizeType elementSize )
{
  char* startAddress = address + elementSize;
  const char* endAddress = reinterpret_cast< char* >( mData ) + Count() * elementSize;
  SizeType numberOfBytes = endAddress - startAddress;
  // addresses overlap so use memmove
  memmove( address, startAddress, numberOfBytes );
  SetCount( Count() - 1 );
}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:9,代码来源:dali-vector.cpp

示例12: MP4Property

MP4BytesProperty::MP4BytesProperty(char* name, u_int32_t valueSize,
                                   u_int32_t defaultValueSize)
	: MP4Property(name)
{
	SetCount(1);
	m_values[0] = (u_int8_t*)MP4Calloc(valueSize);
	m_valueSizes[0] = valueSize;
	m_fixedValueSize = 0;
        m_defaultValueSize = defaultValueSize;
}
开发者ID:BOTCrusher,项目名称:sagetv,代码行数:10,代码来源:mp4property.cpp

示例13: SetCount

HsvFeatures::HsvFeatures(const Config &conf)
{
    int num_bins = kNumH * kNumS + kNumV;
    SetCount(num_bins);
    std::cout<< "hsv histogram bins: "<< GetCount() << std::endl;

    m_h_step = 180.0 / kNumH;
    m_s_step = 256.0 / kNumS;
    m_v_step = 256.0 / kNumV;

}
开发者ID:duxiaofei283,项目名称:struck-1,代码行数:11,代码来源:HsvFeatures.cpp

示例14: SetCount

flag CActuator::ValidateData(ValidateDataBlk & VDB)
  {
  if (m_DataBlk.GetSize()<1)
    SetCount(1);
  if (SortRqd())
    {
    Sort();
    FixIOTags();
    }
  return FlwNode::ValidateData(VDB);
  }
开发者ID:ChrisMoreton,项目名称:Test3,代码行数:11,代码来源:Actuator.cpp

示例15: SetCount

////////////////////////////////////////////////////////////////
// どこでもLOAD
////////////////////////////////////////////////////////////////
bool cP6T::DokoLoad( cIni *Ini )
{
	int st;
	
	if( !Ini ) return false;
	
	Ini->GetInt( "P6T",	"Counter",	&st,	0 );
	SetCount( st );
	Ini->GetInt( "P6T",	"swait",	&swait,	swait );
	Ini->GetInt( "P6T",	"pwait",	&pwait,	pwait );
	
	return true;
}
开发者ID:meesokim,项目名称:p6001v,代码行数:16,代码来源:p6t2.cpp


注:本文中的SetCount函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。