本文整理汇总了C++中LLHost::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ LLHost::getString方法的具体用法?C++ LLHost::getString怎么用?C++ LLHost::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLHost
的用法示例。
在下文中一共展示了LLHost::getString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onConfirmCloseCircuit
// static
bool LLFloaterMessageLog::onConfirmCloseCircuit(const LLSD& notification, const LLSD& response )
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLCircuitData* cdp = gMessageSystem->mCircuitInfo.findCircuit(LLHost(notification["payload"]["circuittoclose"].asString()));
if(!cdp) return false;
LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(cdp->getHost());
switch(option)
{
case 0: // yes
gMessageSystem->newMessageFast(_PREHASH_CloseCircuit);
gMessageSystem->sendReliable(cdp->getHost());
break;
case 2: // cancel
return false;
break;
case 1: // no
default:
break;
}
if(gMessageSystem->findCircuitCode(cdp->getHost()))
gMessageSystem->disableCircuit(cdp->getHost());
else
gMessageSystem->mCircuitInfo.removeCircuitData(cdp->getHost());
if(regionp)
{
LLHost myhost = regionp->getHost();
LLSD args;
args["MESSAGE"] = "That host had a region associated with it.\nDo you want to clean that up?";
LLSD payload;
payload["regionhost"] = myhost.getString();
LLNotificationsUtil::add("GenericAlertYesCancel", args, payload, onConfirmRemoveRegion);
}
return false;
}
示例2: onClickCloseCircuit
// static
BOOL LLFloaterMessageLog::onClickCloseCircuit(void* user_data)
{
LLNetListItem* itemp = (LLNetListItem*)user_data;
LLCircuitData* cdp = (LLCircuitData*)itemp->mCircuitData;
if(!cdp) return FALSE;
LLHost myhost = cdp->getHost();
LLSD args;
args["MESSAGE"] = "This will delete local circuit data.\nDo you want to tell the remote host to close the circuit too?";
LLSD payload;
payload["circuittoclose"] = myhost.getString();
LLNotificationsUtil::add("GenericAlertYesCancel", args, payload, onConfirmCloseCircuit);
return TRUE;
}
示例3: mCapabilityListener
LLViewerRegion::LLViewerRegion(const U64 &handle,
const LLHost &host,
const U32 grids_per_region_edge,
const U32 grids_per_patch_edge,
const F32 region_width_meters)
: mCenterGlobal(),
mHandle(handle),
mHost( host ),
mTimeDilation(1.0f),
mName(""),
mZoning(""),
mOwnerID(),
mIsEstateManager(FALSE),
mCompositionp(NULL),
mRegionFlags( REGION_FLAGS_DEFAULT ),
mSimAccess( SIM_ACCESS_MIN ),
mBillableFactor(1.0),
mMaxTasks(DEFAULT_MAX_REGION_WIDE_PRIM_COUNT),
mClassID(0),
mCPURatio(0),
mColoName("unknown"),
mProductSKU("unknown"),
mProductName("unknown"),
mHttpUrl(""),
mCacheLoaded(FALSE),
mCacheDirty(FALSE),
mCacheID(),
mEventPoll(NULL),
mReleaseNotesRequested(FALSE),
// I'd prefer to set the LLCapabilityListener name to match the region
// name -- it's disappointing that's not available at construction time.
// We could instead store an LLCapabilityListener*, making
// setRegionNameAndZone() replace the instance. Would that pose
// consistency problems? Can we even request a capability before calling
// setRegionNameAndZone()?
// For testability -- the new Michael Feathers paradigm --
// LLCapabilityListener binds all the globals it expects to need at
// construction time.
mCapabilityListener(host.getString(), gMessageSystem, *this,
gAgent.getID(), gAgent.getSessionID())
{
mWidth = region_width_meters;
mOriginGlobal = from_region_handle(handle);
updateRenderMatrix();
mLandp = new LLSurface('l', NULL);
if (!gNoRender)
{
// Create the composition layer for the surface
mCompositionp = new LLVLComposition(mLandp, grids_per_region_edge, region_width_meters/grids_per_region_edge);
mCompositionp->setSurface(mLandp);
// Create the surfaces
mLandp->setRegion(this);
mLandp->create(grids_per_region_edge,
grids_per_patch_edge,
mOriginGlobal,
mWidth);
}
if (!gNoRender)
{
mParcelOverlay = new LLViewerParcelOverlay(this, region_width_meters);
}
else
{
mParcelOverlay = NULL;
}
setOriginGlobal(from_region_handle(handle));
calculateCenterGlobal();
// Create the object lists
initStats();
//create object partitions
//MUST MATCH declaration of eObjectPartitions
mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD
mObjectPartition.push_back(new LLTerrainPartition()); //PARTITION_TERRAIN
mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER
mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE
mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE
mObjectPartition.push_back(new LLCloudPartition()); //PARTITION_CLOUD
mObjectPartition.push_back(new LLGrassPartition()); //PARTITION_GRASS
mObjectPartition.push_back(new LLVolumePartition()); //PARTITION_VOLUME
mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE
mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE
mObjectPartition.push_back(NULL); //PARTITION_NONE
}