Beispiel #1
0
void ArraySet::From( 
	I_PacketRcv* 	inPacket,
	bool		  	inBlock )
{
	argused1( inBlock );

	// Destroy existing content first.
	InitSelf( 0 );

	// 1) Allocated len.
	vuint32 allocLen = inPacket->get_ULongParam();

	if( allocLen > 0 )
	{
		InitSelf( allocLen / sizeof(REC_ID) );

		// 2) Actual len.
		vuint32 actualLen = inPacket->get_ULongParam();
		if( actualLen > 0)
		{
			// 3) BitSet's data.
			inPacket->get_BinaryParam( mpStart, actualLen );
			
			mpFinish = mpStart + (actualLen / sizeof(REC_ID));

			// 4) 'Sorted' flag.
			mIsSorted = inPacket->get_BoolParam();
		}
	}
}
Beispiel #2
0
void ArraySet::From( 
	I_IStream_Ptr inStream,
	bool		  inBlock )
{
	argused1( inBlock );

	// Destroy existing content first.
	InitSelf( 0 );

	// 1) Allocated len.
	vuint32 allocLen;
	inStream->get( allocLen );

	if( allocLen > 0 )
	{
		InitSelf( allocLen / sizeof(REC_ID) );

		// 2) Actual len.
		vuint32 actualLen;
		inStream->get(actualLen);
		if( actualLen > 0)
		{
			// 3) BitSet's data.
			inStream->get((vuint8*)mpStart, actualLen);
			mpFinish = mpStart + (actualLen / sizeof(REC_ID));

			// 4) 'Sorted' flag.
			inStream->get( mIsSorted );
		}
	}
}
Beispiel #3
0
void Value_Raw::Clear( void ) 
{
	if( m_pStart )
	{
		delete [] m_pStart;	
		InitSelf();	
	}
}						
Beispiel #4
0
FBL_Begin_Namespace


/**********************************************************************************************/
Value_Raw::Value_Raw( void )  
: 
	mDeltaPlus( 0 ),
	mIsRemote( false )
{ 
	InitSelf(); 
}
Beispiel #5
0
 NotificationManager::NotificationManager(InworldSceneController *inworld_scene_controller) : 
     QObject(),
     inworld_scene_controller_(inworld_scene_controller),
     scene_(inworld_scene_controller->GetInworldScene()),
     notice_max_width_(200),
     notice_start_pos_(QPointF()),
     browser_widget_(new CoreUi::NotificationBrowserWidget()),
     panel_(inworld_scene_controller_->GetControlPanelManager())
 {
     InitSelf();
 }
Beispiel #6
0
void ArraySet::InitSelfWithArraySet( const ArraySet& inSet )
{	
	// A new array will get the size EXACTLY as the number of items in the inSet.
	// i.e. we do not copy empty space. 
	vuint32 inItems = inSet.get_Count();

	InitSelf( inItems );

	memcpy( mpStart, inSet.begin(), inItems * sizeof(ID_TYPE) );
	mpFinish = mpStart + inItems;

	mIsSorted = inSet.mIsSorted;
}
Beispiel #7
0
Value_Raw::Value_Raw( const Value_Raw& inOther )  
:
	mDeltaPlus( inOther.mDeltaPlus ),
	mIsRemote( false )
{ 
	InitSelf();

	Alloc( inOther.get_Allocated() );

	if( vuint32 len = inOther.get_Length() )
	{
		char* pb = (char*)inOther.begin();
		memcpy( m_pStart, pb, len );
		m_pEnd = m_pStart + len;
	}
}
Beispiel #8
0
// Convert bit vector to the ArraySet.
// Note, Array is sorted automatically!
//
ArraySet::ArraySet( const BitSet& inSet, vuint32 ioLimitCount )
{
	InitSelf( inSet.get_Bits_1_Count() );
	
	SetIterator_Ptr iter = inSet.get_Iterator();
	SetIterator& refIter = *iter;

	ID_TYPE id;
	if( (id = refIter.FirstItem()) != 0 )
	{			
		do
		{
			Append( id );
		}
		while( (id = refIter.NextItem()) && ioLimitCount-- ); 
	
		put_IsSorted( true );
	}		
}
Beispiel #9
0
cvar_t::cvar_t(const char* var_name, const char* def, const char* help, cvartype_t type,
		DWORD flags, void (*callback)(cvar_t &), float minval, float maxval)
{
	InitSelf(var_name, def, help, type, flags, callback, minval, maxval);
}
Beispiel #10
0
cvar_t::cvar_t(const char* var_name, const char* def, const char* help, cvartype_t type,
		DWORD flags, float minval, float maxval)
{
	InitSelf(var_name, def, help, type, flags, NULL, minval, maxval);
}
Beispiel #11
0
ArraySet::ArraySet( vuint32 ioLimitCount ) 
{
	InitSelf( ioLimitCount );
}
Beispiel #12
0
cvar_t::cvar_t (const char *var_name, const char *def, DWORD flags, void (*callback)(cvar_t &))
{
	InitSelf (var_name, def, flags, callback);
}
Beispiel #13
0
cvar_t::cvar_t (const char *var_name, const char *def, DWORD flags)
{
	InitSelf (var_name, def, flags, NULL);
}
Beispiel #14
0
cvar_t::cvar_t (const char *var_name, const char *def, const char *help, cvartype_t type, DWORD flags, void (*callback)(cvar_t &))
{
	InitSelf (var_name, def, help, type, flags, callback);
}
Beispiel #15
0
cvar_t::cvar_t (const char *var_name, const char *def, const char *help, cvartype_t type, DWORD flags)
{
	InitSelf (var_name, def, help, type, flags, NULL);
}