modCalcAltAz::modCalcAltAz(QWidget *parentSplit) : QFrame(parentSplit) { setupUi(this); KStarsData *data = KStarsData::Instance(); RA->setDegType(false); //Initialize Date/Time and Location data geoPlace = data->geo(); LocationButton->setText( geoPlace->fullName() ); //Make sure slotDateTime() gets called, so that LST will be set connect(DateTime, SIGNAL(dateTimeChanged(const QDateTime&)), this, SLOT(slotDateTimeChanged(const QDateTime&))); DateTime->setDateTime( data->lt().dateTime() ); connect(NowButton, SIGNAL(clicked()), this, SLOT(slotNow())); connect(LocationButton, SIGNAL(clicked()), this, SLOT(slotLocation())); connect(ObjectButton, SIGNAL(clicked()), this, SLOT(slotObject())); connect(RA, SIGNAL(editingFinished()), this, SLOT(slotCompute())); connect(Dec, SIGNAL(editingFinished()), this, SLOT(slotCompute())); connect(Az, SIGNAL(editingFinished()), this, SLOT(slotCompute())); connect(Alt, SIGNAL(editingFinished()), this, SLOT(slotCompute())); show(); }
static status attributeElevation(Elevation e, Name att, Any val) { if ( notNil(e->name) ) return errorPce(e, NAME_readOnly); return slotObject(e, att, val); }
void MM_CollectorLanguageInterfaceImpl::generationalWriteBarrierStore(OMR_VMThread *omrThread, omrobjectptr_t parentObject, fomrobject_t *parentSlot, omrobjectptr_t childObject) { GC_SlotObject slotObject(omrThread->_vm, parentSlot); slotObject.writeReferenceToSlot(childObject); MM_GCExtensionsBase *extensions = MM_GCExtensionsBase::getExtensions(omrThread->_vm); if (extensions->scavengerEnabled) { if (extensions->isOld(parentObject) && !extensions->isOld(childObject)) { if (extensions->objectModel.atomicSetRemembered(parentObject)) { /* The object has been successfully marked as REMEMBERED - allocate an entry in the remembered set */ MM_EnvironmentStandard *env = MM_EnvironmentStandard::getEnvironment(omrThread); extensions->scavenger->addToRememberedSetFragment(env, parentObject); } } } }
modCalcGalCoord::modCalcGalCoord(QWidget *parentSplit) : QFrame(parentSplit) { setupUi(this); RA->setDegType(false); connect( RA, SIGNAL(editingFinished()), this, SLOT(slotComputeCoords()) ); connect( Dec, SIGNAL(editingFinished()), this, SLOT(slotComputeCoords()) ); connect( GalLongitude, SIGNAL(editingFinished()), this, SLOT(slotComputeCoords()) ); connect( GalLatitude, SIGNAL(editingFinished()), this, SLOT(slotComputeCoords()) ); connect( ObjectButton, SIGNAL(clicked()), this, SLOT(slotObject()) ); connect(decCheckBatch, SIGNAL(clicked()), this, SLOT(slotDecCheckedBatch())); connect(raCheckBatch, SIGNAL(clicked()), this, SLOT(slotRaCheckedBatch())); connect(epochCheckBatch, SIGNAL(clicked()), this, SLOT(slotEpochCheckedBatch())); connect(galLongCheckBatch, SIGNAL(clicked()), this, SLOT(slotGalLongCheckedBatch())); connect(galLatCheckBatch, SIGNAL(clicked()), this, SLOT(slotGalLatCheckedBatch())); connect(runButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch())); show(); }
int32_t GCConfigTest::removeObjectFromParentSlot(const char *name, ObjectEntry *parentEntry) { OMRPORT_ACCESS_FROM_OMRVM(exampleVM->_omrVM); MM_GCExtensionsBase *extensions = (MM_GCExtensionsBase *)exampleVM->_omrVM->_gcOmrVMExtensions; uintptr_t size = extensions->objectModel.getConsumedSizeInBytesWithHeader(parentEntry->objPtr); fomrobject_t *currentSlot = (fomrobject_t *)parentEntry->objPtr + 1; fomrobject_t *endSlot = (fomrobject_t *)((uint8_t *)parentEntry->objPtr + size); int32_t rt = 1; ObjectEntry *objEntry = find(name); if (NULL == objEntry) { omrtty_printf("%s:%d Could not find object %s in hash table.\n", __FILE__, __LINE__, name); goto done; } while (currentSlot < endSlot) { GC_SlotObject slotObject(exampleVM->_omrVM, currentSlot); if (objEntry->objPtr == slotObject.readReferenceFromSlot()) { #if defined(OMRGCTEST_DEBUG) omrtty_printf("Remove object %s(%p[0x%llx]) from parent %s(%p[0x%llx]) slot %p.\n", name, objEntry->objPtr, *(objEntry->objPtr), parentEntry->name, parentEntry->objPtr, *(parentEntry->objPtr), slotObject.readAddressFromSlot()); #endif slotObject.writeReferenceToSlot(NULL); rt = 0; break; } currentSlot += 1; } if (0 != rt) { omrtty_printf("%s:%d Failed to remove object %s from its parent's slot.\n", __FILE__, __LINE__, name); goto done; } done: return rt; }
void JSONSerializer::SerializeGeneralNode( rapidjson::Value& nodeValue, const shared_ptr<Node>& node) { /// Save slots if (node->GetSerializableSlots().size() > 0) { rapidjson::Value slotsObject(rapidjson::kObjectType); for (const auto& slotPair : node->GetSerializableSlots()) { Slot* slot = slotPair.second; ASSERT(slot->GetName().get() != nullptr && !slot->GetName()->empty()); rapidjson::Value slotObject(rapidjson::kObjectType); /// Save ghost flag if (slot->IsGhost()) { slotObject.AddMember("ghost", true, *mAllocator); } if (slot->mIsMultiSlot) { /// Save connections rapidjson::Value connections(rapidjson::kArrayType); for (const auto& connectedNode : slot->GetDirectMultiNodes()) { int connectedID = mNodes.at(connectedNode); connections.PushBack(connectedID, *mAllocator); } slotObject.AddMember("connect", connections, *mAllocator); } else { /// Save connection const auto& connectedNode = slot->GetDirectNode(); if (connectedNode != nullptr && !slot->IsDefaulted()) { int connectedID = mNodes.at(connectedNode); slotObject.AddMember("connect", connectedID, *mAllocator); } /// Save default values FloatSlot* floatSlot; Vec2Slot* vec2Slot; Vec3Slot* vec3Slot; Vec4Slot* vec4Slot; StringSlot* stringSlot; if ((floatSlot = dynamic_cast<FloatSlot*>(slot)) != nullptr) { slotObject.AddMember("default", floatSlot->GetDefaultValue(), *mAllocator); } else if ((vec2Slot = dynamic_cast<Vec2Slot*>(slot)) != nullptr) { slotObject.AddMember("default", SerializeVec2(vec2Slot->GetDefaultValue()), *mAllocator); } else if ((vec3Slot = dynamic_cast<Vec3Slot*>(slot)) != nullptr) { slotObject.AddMember("default", SerializeVec3(vec3Slot->GetDefaultValue()), *mAllocator); } else if ((vec4Slot = dynamic_cast<Vec4Slot*>(slot)) != nullptr) { slotObject.AddMember("default", SerializeVec4(vec4Slot->GetDefaultValue()), *mAllocator); } else if ((stringSlot = dynamic_cast<StringSlot*>(slot)) != nullptr) { slotObject.AddMember("default", stringSlot->GetDefaultValue(), *mAllocator); } } slotsObject.AddMember(rapidjson::Value(*slot->GetName(), *mAllocator), slotObject, *mAllocator); } nodeValue.AddMember("slots", slotsObject, *mAllocator); } }