Esempio n. 1
0
void FromJSObject<gcRefPtr<UserCore::Item::BranchInfoI>>(gcRefPtr<UserCore::Item::BranchInfoI> &branch, JSObjHandle& arg)
{
	if (arg->isObject())
		branch = arg->getUserObject<UserCore::Item::BranchInfoI>();
	else
		branch = nullptr;
}
Esempio n. 2
0
void FromJSObject<gcRefPtr<UserCore::Misc::UploadInfoThreadI>>(gcRefPtr<UserCore::Misc::UploadInfoThreadI> &upload, JSObjHandle& arg)
{
	if (arg->isObject())
		upload = arg->getUserObject<UserCore::Misc::UploadInfoThreadI>();
	else
		upload = nullptr;
}
void FromJSObject(ServiceItem* &jsItem, JSObjHandle& arg)
{
	if (arg->isObject())
		jsItem = dynamic_cast<ServiceItem*>(arg->getUserObject<ScriptCoreItemI>());
	else
		jsItem = NULL;
}
Esempio n. 4
0
void FromJSObject(UserItem* &jsItem, JSObjHandle& arg)
{
	if (arg->isObject())
		jsItem = dynamic_cast<UserItem*>(arg->getUserObject<ScriptCoreItemI>());
	else
		jsItem = nullptr;
}
Esempio n. 5
0
void FromJSObject(UserCore::Misc::UploadInfoThreadI* &upload, JSObjHandle& arg)
{
	if (arg->isObject())
		upload = arg->getUserObject<UserCore::Misc::UploadInfoThreadI>();
	else
		upload = NULL;
}
Esempio n. 6
0
void FromJSObject<UTIL::FS::FileHandle*>(UTIL::FS::FileHandle* &jsItem, JSObjHandle& arg)
{
	if (arg->isObject())
		jsItem = arg->getUserObject<UTIL::FS::FileHandle>();
	else
		jsItem = nullptr;
}
Esempio n. 7
0
void FromJSObject<gcRefPtr<UserCore::Item::ItemInfoI>>(gcRefPtr<UserCore::Item::ItemInfoI> &item, JSObjHandle& arg)
{
	if (arg->isObject() == false)
		return;

	item = arg->getUserObject<UserCore::Item::ItemInfoI>();
}
Esempio n. 8
0
void FromJSObject(std::map<gcString, gcString> &map, JSObjHandle& arg)
{
    if (arg->isArray() == false && arg->isObject() == false)
        return;

    for (int y=0; y<arg->getNumberOfKeys(); y++)
    {
        char key[255] = {0};
        gcString val;

        arg->getKey(y, key, 255);

        try
        {
            JSObjHandle jObj = arg->getValue(key);
            FromJSObject(val, jObj);
            map[gcString(key)] = val;
        }
        catch (...) // TODO
        {
        }
    }
}