[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
CAPE-OPEN • View topic - What is the VARIANT's value type of enumeration
Page 1 of 1

What is the VARIANT's value type of enumeration

PostPosted: 08 March 2013, 02:49
by bcbooo
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 ?

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

PostPosted: 08 March 2013, 08:00
by jasper
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.

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

PostPosted: 15 March 2013, 16:16
by colancto
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?

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

PostPosted: 15 March 2013, 16:24
by jasper
Yes - actually this belongs to the M&T Sig.

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

PostPosted: 25 March 2013, 17:20
by wbarrett

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

PostPosted: 26 March 2013, 07:31
by jasper