cdew / omnithreadlibrary

Automatically exported from code.google.com/p/omnithreadlibrary
0 stars 0 forks source link

Get type info on TOmniValue contents - enhancement #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I hope I'm not just missing something here, there's not a log of help out there 
on TOmniValue.
I am switching a bespoke ORM system over to using TOmniValue from TValue, and I 
have a lot of code that looks at the type information to determine what to do 
with the data, but I can't see a way of getting that from TOmniValue.

What steps will reproduce the problem?
1. Use TOmniValue.isRecord or isObject = true, then how to determine what 
object to cast it to without previously knowing the type in the OmniValue? 

What is the expected output? What do you see instead?
Expected to be able to use some kind of TOmniValue.TypeInfo = 
TypeInfo(TMyRecord) etc.

Instead, I don't know what's stored in an omnivalue apart from the container 
type (isRecord, isObject, isInteger etc).

What version of the product are you using? On what operating system?
3.03a
Windows 7 professional.

Please provide any additional information below.
If this would add too much overhead either in memory or speed then I'd rather 
not bother you with it, but if there's a simple way for me to do this, I'd 
really appreciate the help!

Original issue reported on code.google.com by ryan.lip...@gmail.com on 12 Dec 2013 at 1:09