//
// © 2018-2020 Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "IoTRepresentationUtils.h"

BOOL boolValueFromRepresentation(const OC::OCRepresentation rep, const char * key)
{
    bool cppValue = rep[key];
    return (BOOL)cppValue;
}

int intValueFromRepresentation(const OC::OCRepresentation rep, const char * key)
{
    int cppValue = rep[key];
    return cppValue;
}

double doubleValueFromRepresentation(const OC::OCRepresentation rep, const char * key)
{
    double cppValue = rep[key];
    return cppValue;
}

NSString * stringValueFromRepresentation(const OC::OCRepresentation rep, const char * key)
{
    std::string cppValue = rep[key];
    return [NSString stringWithUTF8String:cppValue.c_str()];
}

