LibreOffice Module store (master) 1
stordir.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <sal/types.h>
23
24#include <rtl/textcvt.h>
25#include <rtl/string.h>
26#include <rtl/ref.hxx>
27
28#include "object.hxx"
29#include "storbase.hxx"
30
31namespace store
32{
33
34class OStorePageManager;
35struct OStoreDirectoryPageData;
36
38{
39public:
41
50 OStorePageManager *pManager,
51 rtl_String const *pPath,
52 rtl_String const *pName,
53 storeAccessMode eAccessMode);
54
61 storeFindData &rFindData);
62
63 virtual bool isKindOf (sal_uInt32 nTypeId) override;
64
65protected:
66 virtual ~OStoreDirectory_Impl() override;
67
68private:
71 static const sal_uInt32 m_nTypeId;
72
76 SAL_CALL query<> (OStoreObject *pHandle, OStoreDirectory_Impl*);
77
80
82
84 sal_uInt32 m_nPath;
85 rtl_TextToUnicodeConverter m_hTextCvt;
86
89};
90
91template<> inline OStoreDirectory_Impl*
92SAL_CALL query (OStoreObject *pHandle, SAL_UNUSED_PARAMETER OStoreDirectory_Impl*)
93{
94 if (pHandle && pHandle->isKindOf (OStoreDirectory_Impl::m_nTypeId))
95 {
96 // Handle is kind of OStoreDirectory_Impl.
97 return static_cast<OStoreDirectory_Impl*>(pHandle);
98 }
99 return nullptr;
100}
101
102} // namespace store
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const char * pName
OStorePageDescriptor m_aDescr
Definition: stordir.hxx:83
storeError create(OStorePageManager *pManager, rtl_String const *pPath, rtl_String const *pName, storeAccessMode eAccessMode)
create (two-phase construction).
Definition: stordir.cxx:76
static const sal_uInt32 m_nTypeId
IStoreHandle TypeId.
Definition: stordir.hxx:71
PageHolderObject< inode > inode_holder_type
Definition: stordir.hxx:79
rtl::Reference< OStorePageManager > m_xManager
Definition: stordir.hxx:81
OStoreDirectory_Impl & operator=(const OStoreDirectory_Impl &)=delete
OStoreDirectory_Impl(const OStoreDirectory_Impl &)=delete
virtual ~OStoreDirectory_Impl() override
Definition: stordir.cxx:61
storeError iterate(storeFindData &rFindData)
iterate.
Definition: stordir.cxx:115
rtl_TextToUnicodeConverter m_hTextCvt
Definition: stordir.hxx:85
virtual bool isKindOf(sal_uInt32 nTypeId) override
Replaces dynamic_cast type checking.
Definition: stordir.cxx:71
OStoreDirectoryPageData inode
Definition: stordir.hxx:78
virtual bool isKindOf(sal_uInt32 nTypeId)
Replaces dynamic_cast type checking.
Definition: object.cxx:28
Old OStorePageCache implementation.
Definition: lockbyte.cxx:133
store_handle_type *SAL_CALL query(OStoreObject *pHandle, store_handle_type *)
Template helper function as dynamic_cast replacement.
Find Data structure.
Definition: types.h:105
storeAccessMode
Access Mode enumeration.
Definition: types.h:62
storeError
Error Code enumeration.
Definition: types.h:73