本文整理汇总了C++中GetSource函数的典型用法代码示例。如果您正苦于以下问题:C++ GetSource函数的具体用法?C++ GetSource怎么用?C++ GetSource使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetSource函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetReferenceCount
int mitk::BaseData::GetExternalReferenceCount() const
{
if(m_CalculatingExternalReferenceCount==false) //this is only needed because a smart-pointer to m_Outputs (private!!) must be created by calling GetOutputs.
{
m_CalculatingExternalReferenceCount = true;
m_ExternalReferenceCount = -1;
int realReferenceCount = GetReferenceCount();
if(GetSource().IsNull())
{
m_ExternalReferenceCount = realReferenceCount;
m_CalculatingExternalReferenceCount = false;
return m_ExternalReferenceCount;
}
mitk::BaseProcess::DataObjectPointerArray outputs = m_SmartSourcePointer->GetOutputs();
unsigned int idx;
for (idx = 0; idx < outputs.size(); ++idx)
{
//references of outputs that are not referenced from someone else (reference additional to the reference from this BaseProcess object) are interpreted as non-existent
if(outputs[idx]==this)
--realReferenceCount;
}
m_ExternalReferenceCount = realReferenceCount;
if(m_ExternalReferenceCount<0)
m_ExternalReferenceCount=0;
m_CalculatingExternalReferenceCount = false;
}
else
return -1;
return m_ExternalReferenceCount;
}
开发者ID:test-fd301,项目名称:MITK,代码行数:35,代码来源:mitkBaseData.cpp
示例2: sizeof
DataItem& DataItem::CreateAndInsert(ItemPointer ptr)
{
auto x = RawItem::Get<Header>(ptr);
auto& ret = x.ritem.SplitCreate<DataItem>(
ptr.offset, x.t, x.ritem.GetSize() - ptr.offset - sizeof(Header));
if (x.t.length > 0)
ret.MoveNextToChild(x.t.length);
NEPTOOLS_ASSERT(ret.GetSize() == sizeof(Header) + x.t.length);
// hack
if (!ret.GetChildren().empty())
{
auto child = dynamic_cast<RawItem*>(&ret.GetChildren().front());
if (child && child->GetSize() > sizeof(Gbnl::Header))
{
char buf[4];
child->GetSource().Pread(child->GetSize() - sizeof(Gbnl::Header), buf, 4);
if (memcmp(buf, "GBNL", 4) == 0)
GbnlItem::CreateAndInsert({child, 0});
}
}
return ret;
}
开发者ID:u3shit,项目名称:neptools,代码行数:25,代码来源:data.cpp
示例3: Stop
void LoopingSound::InternalUpdate() {
if (fadingOut and GetCurrentGain() == 0.0f) {
Stop();
}
if (not fadingOut) {
if (leadingSample) {
if (GetSource().IsStopped()) {
SetupLoopingSound(GetSource());
GetSource().Play();
leadingSample = nullptr;
}
}
SetSoundGain(effectsVolume.Get());
}
}
开发者ID:BlueMustache,项目名称:Unvanquished,代码行数:16,代码来源:Sound.cpp
示例4: link
void HostileReference::updateOnlineStatus()
{
bool online = false;
if (!isValid())
if (Unit* target = ObjectAccessor::GetUnit(*GetSourceUnit(), getUnitGuid()))
link(target, GetSource());
// only check for online status if
// ref is valid
// target is no player or not gamemaster
// target is not in flight
if (isValid()
&& (getTarget()->GetTypeId() != TYPEID_PLAYER || !getTarget()->ToPlayer()->IsGameMaster())
&& !getTarget()->IsInFlight()
&& getTarget()->IsInMap(GetSourceUnit())
&& getTarget()->InSamePhase(GetSourceUnit())
)
{
Creature* creature = GetSourceUnit()->ToCreature();
online = getTarget()->isInAccessiblePlaceFor(creature);
if (!online)
{
if (creature->IsWithinCombatRange(getTarget(), creature->m_CombatDistance))
online = true; // not accessible but stays online
}
}
setOnlineOfflineState(online);
}
开发者ID:Helias,项目名称:azerothcore-wotlk,代码行数:30,代码来源:ThreatManager.cpp
示例5: GetScriptContext
void RegexPattern::Finalize(bool isShutdown)
{
if(isShutdown)
return;
const auto scriptContext = GetScriptContext();
if(!scriptContext)
return;
#if DBG
if(!isLiteral && !scriptContext->IsClosed())
{
const auto source = GetSource();
RegexPattern *p;
Assert(
!GetScriptContext()->GetDynamicRegexMap()->TryGetValue(
RegexKey(source.GetBuffer(), source.GetLength(), GetFlags()),
&p) ||
p != this);
}
#endif
if(isShallowClone)
return;
rep.unified.program->FreeBody(scriptContext->RegexAllocator());
}
开发者ID:EdwardBetts,项目名称:spidernode,代码行数:27,代码来源:RegexPattern.cpp
示例6: InternalUpdate
void OneShotSound::InternalUpdate() {
if (GetSource().IsStopped()) {
Stop();
return;
}
SetSoundGain(effectsVolume.Get());
}
开发者ID:BlueMustache,项目名称:Unvanquished,代码行数:7,代码来源:Sound.cpp
示例7: Rect
Rect
Image::GetCoverageBounds ()
{
// FIXME: SL3 final only supports PixelFormatPbgra32 which makes this optimization
// obsolete - unless we keep an "has_alpha" flag with each image ?!?
return Rect ();
#if FALSE
ImageSource *source = GetSource ();
if (!source || source->GetPixelFormat () == PixelFormatPbgra32)
return Rect ();
Stretch stretch = GetStretch ();
if (stretch == StretchFill || stretch == StretchUniformToFill)
return bounds;
cairo_matrix_t matrix;
Rect image = Rect (0, 0, source->GetPixelWidth (), source->GetPixelHeight ());
Rect paint = Rect (0, 0, GetActualWidth (), GetActualHeight ());
image_brush_compute_pattern_matrix (&matrix,
paint.width, paint.height,
image.width, image.height, stretch,
AlignmentXCenter, AlignmentYCenter, NULL, NULL);
cairo_matrix_invert (&matrix);
cairo_matrix_multiply (&matrix, &matrix, &absolute_xform);
image = image.Transform (&matrix);
image = image.Intersection (bounds);
return image;
#endif
}
开发者ID:snorp,项目名称:moon,代码行数:34,代码来源:media.cpp
示例8: GetDownloaderPolicy
void
MediaBase::SetAllowDownloads (bool allow)
{
const char *uri;
Downloader *dl;
if ((allow_downloads && allow) || (!allow_downloads && !allow))
return;
if (allow && IsAttached () && source_changed) {
source_changed = false;
if ((uri = GetSource ()) && *uri) {
if (!(dl = GetDeployment ()->CreateDownloader ())) {
// we're shutting down
return;
}
dl->Open ("GET", uri, GetDownloaderPolicy (uri));
SetSource (dl, "");
dl->unref ();
}
}
allow_downloads = allow;
}
开发者ID:snorp,项目名称:moon,代码行数:26,代码来源:media.cpp
示例9: GetSource
void
Image::ImageFailed (ImageErrorEventArgs *args)
{
BitmapSource *source = (BitmapSource*) GetSource ();
if (source->Is (Type::BITMAPIMAGE)) {
source->RemoveHandler (BitmapImage::DownloadProgressEvent, download_progress, this);
source->RemoveHandler (BitmapImage::ImageOpenedEvent, image_opened, this);
source->RemoveHandler (BitmapImage::ImageFailedEvent, image_failed, this);
}
source->RemoveHandler (BitmapSource::PixelDataChangedEvent, source_pixel_data_changed, this);
InvalidateArrange ();
InvalidateMeasure ();
UpdateBounds ();
Invalidate ();
args = new ImageErrorEventArgs (this, *(MoonError*)args->GetMoonError ());
if (HasHandlers (ImageFailedEvent)) {
Emit (ImageFailedEvent, args);
} else {
GetDeployment ()->GetSurface ()->EmitError (args);
}
}
开发者ID:snorp,项目名称:moon,代码行数:25,代码来源:media.cpp
示例10: xsNew
/**
* \brief Returns the source.
*
* \return The source as CString.
*/
CString CBibList::GetSource()
{
xString* src = xsNew();
GetSource(src);
CString res = CString(xsValue(src));
xsDelete(src);
return res;
}
开发者ID:stievie,项目名称:bibedt,代码行数:13,代码来源:BibList.cpp
示例11: EnumImageProperties
virtual std::vector<unsigned int> EnumImageProperties() const override
{
cdHSource hSource = GetSource();
ImagePropertyAccess p(hSource);
return p.EnumImageProperties();
}
开发者ID:vividos,项目名称:RemotePhotoTool,代码行数:8,代码来源:CdsdkRemoteReleaseControlImpl.hpp
示例12: GetSource
/* virtual */ NS_IMETHODIMP
TVSourceListener::NotifyChannelScanStopped(const nsAString& aTunerId,
const nsAString& aSourceType)
{
RefPtr<TVSource> source = GetSource(aTunerId, aSourceType);
source->NotifyChannelScanStopped();
return NS_OK;
}
开发者ID:70599,项目名称:Waterfox,代码行数:8,代码来源:TVListeners.cpp
示例13: I_SoundIsPlaying
int I_SoundIsPlaying(int handle)
{
sndsource_t *src = GetSource(handle);
if(!initOk || !src) return false;
if(src->source == NULL) return false;
return I2_IsSourcePlaying(src);
}
开发者ID:cmbruns,项目名称:Doomsday-Engine,代码行数:8,代码来源:i_ds_eax.c
示例14: GetSource
//------------------------------------------------------------------------------
bool CBOMRecognizerFilter::Read( unsigned long& ulUnitsRead, unsigned long ulUnitsToRead )
{
bool bResult = false;
//Switch on whether recognition has taken place
if( m_bRecognized )
{
bResult = GetSource()->Read( ulUnitsRead, ulUnitsToRead );
}
else
{
bResult = GetSource()->Read( ulUnitsRead, sculBOMBytes );
RecognizeBOM();
}
return bResult;
}
开发者ID:chenbk85,项目名称:QOR,代码行数:18,代码来源:BOMRecognizerFilter.cpp
示例15: xsNew
void CField::SaveToFile(CFile *file)
{
if (!m_Value.IsEmpty()) {
xString* str = xsNew();
GetSource(str);
file->Write(xsValue(str), xsLen(str));
xsDelete(str);
}
}
开发者ID:stievie,项目名称:bibedt,代码行数:9,代码来源:Field.cpp
示例16: GetSource
void
RadioBearer::Enqueue (Packet *packet)
{
#ifdef TEST_ENQUEUE_PACKETS
std::cout << "Enqueue packet on " << GetSource ()->GetIDNetworkNode () << std::endl;
#endif
GetMacQueue ()->Enqueue(packet);
}
开发者ID:AbubakarAuwal,项目名称:lte-sim,代码行数:9,代码来源:radio-bearer.cpp
示例17: GetSource
void* mitk::Image::GetData()
{
if(m_Initialized==false)
{
if(GetSource().IsNull())
return NULL;
if(GetSource()->Updating()==false)
GetSource()->UpdateOutputInformation();
}
m_CompleteData=GetChannelData();
// update channel's data
// if data was not available at creation point, the m_Data of channel descriptor is NULL
// if data present, it won't be overwritten
m_ImageDescriptor->GetChannelDescriptor(0).SetData(m_CompleteData->GetData());
return m_CompleteData->GetData();
}
开发者ID:ClydeChen,项目名称:MITK,代码行数:18,代码来源:mitkImage.cpp
示例18: Read
int WAVEFILE::Read(void* lpDest, DWORD dwBytes)
{
if (dwAccess != WAVE_OPEN_READ)
return WAVE_READ_ERROR;
DWORD dwRead=GetSource()->Read(lpDest,dwBytes);
dwCurrentPos+=dwRead;
return dwRead;
}
开发者ID:BrunoReX,项目名称:avimuxgui,代码行数:9,代码来源:WAVFile.cpp
示例19:
void
Image::Dispose ()
{
BitmapSource *source = (BitmapSource*)GetSource ();
if (source)
source->RemoveAllHandlers (this);
MediaBase::Dispose ();
}
开发者ID:snorp,项目名称:moon,代码行数:10,代码来源:media.cpp
示例20: I_Update3DSound
void I_Update3DSound(int handle, sound3d_t *desc)
{
sndsource_t *buf = GetSource(handle);
if(!initOk || !buf) return;
if(buf->source == NULL) return;
if(buf->source3D == NULL) return;
if(!I2_IsSourcePlaying(buf)) IDirectSoundBuffer_Play(buf->source, 0, 0, 0);
I2_UpdateSource(buf, desc);
}
开发者ID:cmbruns,项目名称:Doomsday-Engine,代码行数:10,代码来源:i_ds_eax.c
注:本文中的GetSource函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论