void rspfSource::setProperty(rspfRefPtr<rspfProperty> property) { if(!property.valid()) return; rspfString name = property->getName(); name = name.downcase(); if(name == rspfKeywordNames::ENABLED_KW) { rspfString value; property->valueToString(value); setEnableFlag(value.toBool()); } else { rspfConnectableObject::setProperty(property); } }
void ossimPlanetLayer::execute(const ossimPlanetAction& action) { #if 0 if(action.command() == "setReceiver") { if(action.argCount() == 1) { setPathnameAndRegister(action.arg(1)); } } else if(action.command() == "setEnableFlag") { if(action.argCount() == 1) { setEnableFlag(ossimString(action.arg(1)).toBool()); } } else if(action.command() == "setId") { if(action.argCount()==1) { setId(action.arg(1)); } } else if(action.command() == "setName") { if(action.argCount()==1) { setName(action.arg(1)); } } else if(action.command() == "setDescription") { if(action.argCount()==1) { setDescription(action.arg(1)); } } else if(action.command() == "init") { if(action.argCount() != 1) return; ossimString objectName; ossimString objectArg; ossim_uint32 idx = 1; ossimPlanetAction nestedAction(":dummy dummy " + action.arg(1) ); for(idx = 1; idx <= nestedAction.argCount(); ++idx) { if(mkUtils::extractObjectAndArg(objectName, objectArg, nestedAction.arg(idx))) { if(objectName == "Name") { setName(objectArg); } else if(objectName == "Id") { setId(objectArg); } else if(objectName == "Description") { setDescription(objectArg); } else if(objectName == "ReceiverPath") { setPathnameAndRegister(objectArg); } else if(objectName == "Enable") { setEnableFlag(objectArg.toBool()); } } } } #endif }
void rspfSource::disableSource() { setEnableFlag(false); }
void rspfSource::enableSource() { setEnableFlag(true); }