[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
CAPE-OPEN • View topic - What is the VARIANT's value type of enumeration

What is the VARIANT's value type of enumeration

What is the VARIANT's value type of enumeration

Postby bcbooo » 08 March 2013, 02:49

In the interface of ICapeThermoMaterial, I need to use SetPresentPhases & GetPresentPhases, they all have the parameter "phaseStatus", it is a CapeArrayEnumeration type, like the following:

enum eCapePhaseStatus
{
CAPE_UNKNOWNPHASESTATUS = 0,
CAPE_ATEQUILIBRIUM = 1,
CAPE_ESTIMATES = 2
};

My building environment is Visual C++ 2005, so my code like this:

VARIANT phaseLabels,phaseStatus;
phaseLabels.vt=VT_EMPTY;
phaseStatus.vt=VT_EMPTY;
pThermoMaterial->GetPresentPhases(&phaseLabels,&phaseStatus); // the pThermoMaterial is a smart pointer to the ICapeThermoMaterial ,has been initialized.

Then the PME will return the phaseLabels and phaseStaus, I know the phaseLabels' type is VT_BSTR, but what is phaseStatus' ? VT_I4 , VT_INT or VT_R8 ?
bcbooo
 
Posts: 66
Joined: 22 November 2012, 06:41
Location: China

Re: What is the VARIANT's value type of enumeration

Postby jasper » 08 March 2013, 08:00

This information is sadly lacking from the standard specifications.

If you pass an enumeration object to others, I would use VT_I4. If you interpret enumeration objects passed to you from others, I would be ready to interpret the most common integer types: VT_I2, VT_I4, VT_UI2, VT_UI4, VT_INT, VT_UINT. The real type VT_R8 does not make too much sense in this context.

I have yet to see any other interpretation than VT_I4 as this corresponds to CapeInteger.

Similar confusion exists over the data type of dimensionality of the parameters. This has now been settled upon and should be VT_R8. However, when interpreting data from other sources, I would be ready to deal with other numeric types, especially VT_I4.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: What is the VARIANT's value type of enumeration

Postby colancto » 15 March 2013, 16:16

Would that call for an item in an Errata and Clarifications document, starting with the Errata and Clarifications document for Thermo 1.1 even if this issue appears within other CAPE-OPEN specifications?
User avatar
colancto
Administrateur
 
Posts: 92
Joined: 23 October 2012, 11:46

Re: What is the VARIANT's value type of enumeration

Postby jasper » 15 March 2013, 16:24

Yes - actually this belongs to the M&T Sig.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: What is the VARIANT's value type of enumeration

Postby wbarrett » 25 March 2013, 17:20

wbarrett
 
Posts: 4
Joined: 16 March 2013, 01:21

Re: What is the VARIANT's value type of enumeration

Postby jasper » 26 March 2013, 07:31

User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain


Return to Thermodynamic components

Who is online

Users browsing this forum: No registered users and 1 guest

cron