void serialize(Archive& ar, const uint32 ver) { ensure_msg(!isStrict(), "Strict handle node-serialization not yet supported"); if (Archive::is_saving::value) { game::WorldEntityId id= getId(); ar & id; } else { game::WorldEntityId id; ar & id; setId(id); } }
void ensure_tag_as_utc_timestamp(const fix_group_node* node, size_t tag, const char* value) { const int64_t ts = get_fix_tag_as_utc_timestamp(node, tag); ensure_msg(ts != (int64_t)-1, "get_fix_tag_as_utc_timestamp() failed"); const time_t sec = (time_t)(ts / 10000000); struct tm* const ptm = gmtime(&sec); ensure_msg(ptm, "gmtime() failed"); char buff[50]; ensure(snprintf(buff, sizeof(buff), "%04hu%02hu%02hu-%02hu:%02hu:%02hu.%03hu", ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec, (unsigned)((ts % 10000000) / 10000)) > 0); //printf("Expected: \"%s\", got: \"%s\"\n", value, buff); ensure_msg(strcmp(buff, value) == 0, "Invalid time stamp"); }
void CompositionNodeSlot::attachImpl(SubSignalType from, SubSignalType to, CompositionNodeSlot& other){ ensure(isCompatible(from, to, other)); auto it= attachedSlotInfos.find(AttachedSlotInfo{CompositionNodeSlotHandle(other), from, to}); ensure_msg(it == attachedSlotInfos.end(), "Routing multiple outputs to a single (sub)slot is not supported"); attachedSlotInfos.pushBack(AttachedSlotInfo{CompositionNodeSlotHandle(other), from, to}); ensure(attachedSlotInfos.back().slot.get()); getOwner().onRoutingChange(*this); }