Raised This Month: $ Target: $400
 0% 

SourceHook List


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sn4k3
Senior Member
Join Date: Nov 2005
Old 07-16-2010 , 09:18   SourceHook List
Reply With Quote #1

is Sourcehook from core (OB) different from core-legacy (Original)? or they are the same?

Sourcehook contains sh_vector and sh_list
what the difference and VS CUtlVector

Thanks
sn4k3 is offline
Send a message via MSN to sn4k3
BAILOPAN
Join Date: Jan 2004
Old 07-16-2010 , 23:46   Re: SourceHook List
Reply With Quote #2

core and core-legacy are different. otherwise... they would be the same.

SourceHook is independent of Half-Life 2, so it doesn't use Valve's template library. it's generic and designed to avoid linking against libstdc++.
__________________
egg
BAILOPAN is offline
sn4k3
Senior Member
Join Date: Nov 2005
Old 07-17-2010 , 11:10   Re: SourceHook List
Reply With Quote #3

Quote:
Originally Posted by BAILOPAN View Post
core and core-legacy are different. otherwise... they would be the same.

SourceHook is independent of Half-Life 2, so it doesn't use Valve's template library. it's generic and designed to avoid linking against libstdc++.
thanks for the explanation
but does SH List or Vector have more performance over CUtlVector?
sn4k3 is offline
Send a message via MSN to sn4k3
BAILOPAN
Join Date: Jan 2004
Old 07-18-2010 , 13:18   Re: SourceHook List
Reply With Quote #4

Linked Lists and Vectors are totally different data structures, it depends on what operations you want to be fast.

I have no idea what CUtlVector does.
__________________
egg
BAILOPAN is offline
sn4k3
Senior Member
Join Date: Nov 2005
Old 07-18-2010 , 13:43   Re: SourceHook List
Reply With Quote #5

Quote:
Originally Posted by BAILOPAN View Post
Linked Lists and Vectors are totally different data structures, it depends on what operations you want to be fast.

I have no idea what CUtlVector does.
ok, i have read about it.

CUtlVector is a vector class from valve
under tier0 i think, named as utlvector.h

valve use it on MRecipientFilter

Code:
// A growable array class that maintains a free list and keeps elements
// in the same location

// The CUtlVector class:
// A growable array class which doubles in size by default.
// It will always keep all elements consecutive in memory, and may move the
// elements around in memory (via a PvRealloc) when elements are inserted or
// removed. Clients should therefore refer to the elements of the vector
// by index (they should *never* maintain pointers to elements in the vector).
thanks

Last edited by sn4k3; 07-18-2010 at 13:45.
sn4k3 is offline
Send a message via MSN to sn4k3
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode