Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
48528e00
Kaydet (Commit)
48528e00
authored
Tem 10, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add some comments to include/tools/ref.hxx
Change-Id: Ic38d7f5f816f2a91bfb468c0b7fb241b084a0c44
üst
4ed943a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
ref.hxx
include/tools/ref.hxx
+15
-4
No files found.
include/tools/ref.hxx
Dosyayı görüntüle @
48528e00
...
...
@@ -28,6 +28,7 @@
namespace
tools
{
/** T must be a class that extends SvRefBase */
template
<
typename
T
>
class
SvRef
{
public
:
SvRef
()
:
pObj
(
0
)
{}
...
...
@@ -142,6 +143,7 @@ public:
};
/** Classes that want to be referenced-counted via SvRef<T>, should extend this base class */
class
TOOLS_DLLPUBLIC
SvRefBase
{
static
const
sal_uIntPtr
SV_NO_DELETE_REFCOUNT
=
0x80000000
;
...
...
@@ -184,27 +186,36 @@ public:
{
return
nRefCount
;
}
};
/** We only have one weak reference in LO, in include/sfx2/frame.hxx, class SfxFrameWeak.
This acts as a intermediary between SfxFrameWeak and SfxFrame_Impl.
*/
class
SvCompatWeakHdl
:
public
SvRefBase
{
friend
class
SvCompatWeakBase
;
void
*
_pObj
;
SvCompatWeakHdl
(
void
*
pObj
)
:
_pObj
(
pObj
)
{}
public
:
void
ResetWeakBase
(
)
{
_pObj
=
0
;
}
void
ResetWeakBase
(
)
{
_pObj
=
0
;
}
void
*
GetObj
()
{
return
_pObj
;
}
};
/** We only have one place that extends this, in sfx2/source/view/impframe.hxx, class SfxFrame_Impl,
its function is to notify the SvCompatWeakHdl when an SfxFrame_Impl object is deleted.
*/
class
SvCompatWeakBase
{
tools
::
SvRef
<
SvCompatWeakHdl
>
_xHdl
;
public
:
SvCompatWeakHdl
*
GetHdl
()
{
return
_xHdl
;
}
// does not use initializer due to compiler warnings
// Does not use initializer due to compiler warnings,
// because the lifetime of the _xHdl object can exceed the lifetime of this class.
SvCompatWeakBase
(
void
*
pObj
)
{
_xHdl
=
new
SvCompatWeakHdl
(
pObj
);
}
~
SvCompatWeakBase
()
{
_xHdl
->
ResetWeakBase
();
}
SvCompatWeakHdl
*
GetHdl
()
{
return
_xHdl
;
}
};
#define SV_DECL_COMPAT_WEAK( ClassName ) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment