struct CCL::IFormattedString

Overview

Interface for scanning and printing formatted values to and from a string. More…

#include <istring.h>

struct IFormattedString: public CCL::IUnknown
{
    // methods

    virtual tresult CCL_API getFloatValue (double& value) const = 0;
    virtual tresult CCL_API getFloatValue (float& value) const = 0;
    virtual tresult CCL_API getIntValue (int64& value) const = 0;
    virtual tresult CCL_API getIntValue (int32& value) const = 0;
    virtual tresult CCL_API getHexValue (int64& value) const = 0;

    virtual int CCL_API scanFormat (
        const IString* format,
        Variant args [],
        int count
    ) const = 0;

    virtual tresult CCL_API appendIntValue (int64 value, int numPaddingZeros = -1) = 0;
    virtual tresult CCL_API appendHexValue (int64 value, int numPaddingZeros = -1) = 0;

    virtual tresult CCL_API appendFloatValue (
        double value,
        int numDecimalDigits = -1
    ) = 0;

    virtual tresult CCL_API appendFormat (
        const IString* format,
        Variant args [],
        int count
    ) = 0;
};

Inherited Members

public:
    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;

Detailed Documentation

Interface for scanning and printing formatted values to and from a string.

Methods

virtual tresult CCL_API getFloatValue (double& value) const = 0

Scan floating-point value represented by this string.

virtual tresult CCL_API getFloatValue (float& value) const = 0

Scan floating-point value represented by this string.

virtual tresult CCL_API getIntValue (int64& value) const = 0

Scan integer value represented by this string.

virtual tresult CCL_API getIntValue (int32& value) const = 0

Scan integer value represented by this string.

virtual tresult CCL_API getHexValue (int64& value) const = 0

Scan hexadecimal value represented by this string.

virtual int CCL_API scanFormat (
    const IString* format,
    Variant args [],
    int count
) const = 0

Scan formatted arguments, similar to ‘scanf’ in C Library.

virtual tresult CCL_API appendIntValue (int64 value, int numPaddingZeros = -1) = 0

Append integer value, optionally padded with leading zeros to given number of digits.

virtual tresult CCL_API appendHexValue (int64 value, int numPaddingZeros = -1) = 0

Append hexadecimal value, optionally padded with leading zeros to given number of digits.

virtual tresult CCL_API appendFloatValue (
    double value,
    int numDecimalDigits = -1
) = 0

Append floating-point value, optionally limited to given number of digits after decimal point.

virtual tresult CCL_API appendFormat (
    const IString* format,
    Variant args [],
    int count
) = 0

Append formatted arguments, similar to ‘printf’ in C Library.