#ifndef __FFIS_VARIANT_PACKER_H
#define __FFIS_VARIANT_PACKER_H
/*
5D programming language
Copyright (C) 2011 Danny Milosavljevic
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see .
*/
#ifdef WIN32
#include
#include
#include
#endif
namespace FFIs {
#ifdef WIN32
void encodeVariant(Values::NodeT source, VARIANT* value);
Values::NodeT decodeVariant(VARIANT* value);
static inline VARIANT encodeVariantCXX(Values::NodeT source) {
VARIANT result;
VariantInit(&result);
encodeVariant(source, &result);
return(result);
}
static inline Values::NodeT decodeVariantCXX(VARIANT value) {
return(decodeVariant(&value));
}
#else
#include
typedef struct {
uint32_t vt;
char dummy[14];
} VARIANT;
static inline VARIANT encodeVariantCXX(Values::NodeT source) {
VARIANT result = {0};
return(result);
}
static inline Values::NodeT decodeVariantCXX(VARIANT value) {
return(NULL);
}
#endif
};
#endif /* __FFIS_VARIANT_PACKER_H */