typedef anyone?
i have data structures i'm making intellectual excercise - linked list , variants. work except there seems no way determine type of object. thought read name of constructor function. can't seem either. if knows c++ , knows "typedef" understands i'm trying replicate.
with data structures in c++ 1 preserves type of objects going in , out of list. instance, if have linked list of addresscards. in c++, before instantiating new list, can define type with: typedef listitemtype addresscard. inside implementation code list, can have methods return list items this: public function retrieve( index:number ):listitemtype -- voi la! no need type items var acard:addresscard = addresscard(list.retrieve(0)); can trust list pass items of type specified typedef statement. anywho.. know that's little advanced, if gurus out there can give me tip, or tell me give up.
if wants @ them, , maybe lend advice, i'd excited. files can found @
http:www.null.bz/adt_lib/adt_lib.zip
the zip includes: package "adt.list" "list.as" , it's little sister "stack.as" few test files, , pretty serious documentation (i bored)
so, thank in advance crazy pros know shower me wonderful advice!
with data structures in c++ 1 preserves type of objects going in , out of list. instance, if have linked list of addresscards. in c++, before instantiating new list, can define type with: typedef listitemtype addresscard. inside implementation code list, can have methods return list items this: public function retrieve( index:number ):listitemtype -- voi la! no need type items var acard:addresscard = addresscard(list.retrieve(0)); can trust list pass items of type specified typedef statement. anywho.. know that's little advanced, if gurus out there can give me tip, or tell me give up.
if wants @ them, , maybe lend advice, i'd excited. files can found @
http:www.null.bz/adt_lib/adt_lib.zip
the zip includes: package "adt.list" "list.as" , it's little sister "stack.as" few test files, , pretty serious documentation (i bored)
so, thank in advance crazy pros know shower me wonderful advice!
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment