ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ObjID in 64-bit

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
spetric Posted - Apr 04 2014 : 13:59:51
Hi,

Currently, I'm storing some pointer values inside vector's ObjID property. This information tells the program which class is "in charge" for specific vectorial objects. One class can be "in charge" for several vectorial objects, so this information comes very handy
when translating or rotating vectorial objects with respect to some ObjId.

As ObjID is of type integer, in 64-bit environment, integer value is not sufficient to hold pointer values.

Is it safe to use ObjUserData?
I'm worried about using ObjUserData as in documentation is stated:
"Load/save and clipboard methods save this field allocating the buffer when needed and freeing it when an object is destroyed."

What does it mean?

2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 05 2014 : 02:49:40
I forgot to mention there is a demo for it. See "Vectorial with User Data" on the demo page.

Source for it is in your demos folder:

\Annotations\UserDataVect\UserDataVect.dpr

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Apr 04 2014 : 16:50:18
In general, you should see little difference between using ObjUserData and ObjID.

The main difference is that when the object is destroyed then the memory of ObjUserData will also be freed (if it has not been reset to nil).

Also when loading/saving/copying/pasting the content of the ObjUserData will be stored/copied using a buffer.


Another option for you is to have a seperate table containing your data and assign its index to ObjID.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com