| |
|
|
 Michael Wodrich | I lead The Discussion time here away, there under XProfan 10 Yes only Opportunities geäussert go should: [quote:3bf23b0aa6=Michael Wodrich] i wish me The expansion the Objects on LongInt-Zuweisung. there it the TypeOf() already gives should Yes intern with the Long-Variable stand, that tappt im dunkeln of type Object is.
me succeed it namely with the aray-Objects not, these To link.
example: class SingleListElem = Next&, values#(20),SingleListElem@ class SingleList = Head&,modes@,...
One element the Head& allocate fails already. further items over the Next& pursue goes neither, as long as one one Objekt not on a LongInt allocate can. the reading and Save the modified values can over modes resolved go. If XProfan here a interne Zugriffsprüfung spendiert becomes à la These operation with Objekt so you don't say so ought to it still weg...
Best wishes Michael Wodrich[/quote:3bf23b0aa6] [quote:3bf23b0aa6=RGH]IBei the LongInt-variables standing intern quite nothing. and too one LongInt in the area(Objekt/structure) occupied exakt four Bytes, the TypeOf functions only Memory-Variables. with of/ one Zuweisung one Objektes a Longint (what Yes with einfachen reaches and Structures functions) went any Information over the Objekt except its address lost. what wished one so yet begin?
but ließe itself your trouble not solve, in the You a method Head@ write, the You as Parameter one Objekt the class SingleListElem commit.
Greeting Roland[/quote:3bf23b0aa6] my trouble is really, that one element the list yes a Objekt is and NEXT& a Zeiger the next Objekt contains. so can itself by the (if need be endlose) list the Objects hangeln.
SingleListNode are means dynamic Objects the list and SingleList has only whom Zeiger the first begot Objekt in HEAD& To stand.
there's of course The Possibility the Zuweisung on Arrays but unfortunately are The Yes not dynamic. an list and a aray are hold 2 couple shoes. 
Best wishes Michael Wodrich
P.s: I had already attempts, with GlobalAlloc and Co. To tricksen, but Objects having now once your own Gesetzmäßigkeiten (Ã la How enchants one a global allozierten Speicherbereich, into one Objekt hineinkopiert becomes again into funktionierendes Objekt) |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 02/22/06 ▲ |
|
|
|
|
 Michael Wodrich | i know Yes unfortunately not, as Objects intern prepares go. but Perhaps is something like possible How:
NewObjectPtr( Ptr&, class [,Parameter] )
Obj# = ActivateObject( Ptr& )
DisposeObjectPtr( Ptr & )
then can The Speicherbereiche dynamic prepares go, go of XProfan through NewObjectPtr vergattert and DisposeObjectPtr again entzaubert.
The Access to these Pointer would then with ActivateObject possible.
the reservieren and enable the Speichers piloting one then self. so müssten itself as much as you want Objects release let.
Best wishes Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 02/24/06 ▲ |
|
|
|
|
 RGH | Hello Michael,
first of all try I To ergründen, what very You there program want. see I it correctly., that You a verkettete list gleichartiger Objects (= Objects of/ one class) create want? One Objekt ought to know, which his Vorgänger and which his Nachgfolger is?
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 02/24/06 ▲ |
|
|
|
|
 Michael Wodrich | 
with whom Nodes would it naturally well, if too artfremde Objects assembled go could.
I put me there to, that z.B. in a Grafikprogramm Objects unterschiedlichster manner (but evtl. with same forefather) in a list assembled go can.
first Ansatz was The simply verkettete list, then ought to The twice verkettete come and since the zirkuläre on the twice verketteten aufbaut, ought to here Heredity used go.
the everything should means sometime in a container for Objects terminate. and the Number of possible Objects is vaguely (therefore the cry to Dynamik).
Best wishes Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 02/24/06 ▲ |
|
|
|
|
 RGH | [quote:0828590cc7=Michael Wodrich]P.s: I had already attempts, <...> To tricksen[/quote:0828590cc7] The Ansatzpunkt isn't badly (Beginner Please not read along. what now comes:contradict jeglicher Kapselung Objects ;) ):
with @Addr can the address one Objektes detect and @SizeOf which Size. now dimensionieren we a Memory-Variable in passender Size and point this The address the Objektes To ... and schwupp: we've a normal Memory-Variable, The whom equal memory occupied, How the Objekt. whom Schweinereien are now door and goal opened! concise: The address a Objektes (whom Pointer) having we means. (original wished so did i whom attempt the investigation of/ one Objektadresse prohibit, but then wished I still for Profis one Hintertürchen open let.) one could now then on The verwegene idea come, with MoveMemory (windows-API) the Objekt in dynamic Speicherbereiche To copy ... and the so often, so far the memory reicht and these copies could naturally verkettet his. moreover need it Yes only The jeweiligen Adressen into Eigenschafte Next& and Prev& the Objektes. And if one now one the Objects from the list reading wants, copies one it with MoveMemory again on The address ours Objektes. (moreover need one not even The mentioned Memory-Variable. The eröffnet but further Opportunities.)
concise: it ought to means possible his, like The Stringliste, a Objektliste To kreieren. on the best naturally too in a class.
the have I now of course only so in that blue spun, but Perhaps helps it you moreover. (and Perhaps juckt it me too, the whole self in a class To pour, The I then naturally in the Forum publish.)
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 02/24/06 ▲ |
|
|
|