Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Eiffel > Re: check type ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 862 of 917
Post > Topic >>

Re: check type of object

by Philippe Ribet <ribet@[EMAIL PROTECTED] > Apr 23, 2007 at 05:45 PM

Thomas Delaet wrote:
> Hi all,
> 
> Is it possible to check if an object conforms to a type represented by
> a STRING?
> 
> For example:
> 
>  s1: STRING is "ANY"
>  s2: STRING IS "EMPLOYEE"
> 
>  a: EMPLOYEE
> 
>  I should be abble to assert is s1 and s2 represents types to which a
> conforms? (this is true in both cases).
> 
>  I found the generating_type and generator features of class ANY, but
> these do not provide this functionality.
> 
>

Do you know ?= operator?

employee: EMPLOYEE
a: ANY

employee ?= a
if employee /= Void then
	...

PS: you may have a look at operators introduced by SmartEiffel, ?:= and
::=

Best regards,

Philippe Ribet




 5 Posts in Topic:
check type of object
Thomas Delaet <tdelaet  2007-04-23 06:07:45 
Re: check type of object
Philippe Ribet <ribet@  2007-04-23 17:45:47 
Re: check type of object
Georg Bauhaus <bauhaus  2007-04-23 20:39:42 
Re: check type of object
Philippe Ribet <ribet@  2007-04-27 13:26:14 
Re: check type of object
Thomas Delaet <tdelaet  2007-04-26 01:19:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 11:18:28 CDT 2008.