LibreOffice Module tools (master) 1
globname.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#ifndef INCLUDED_TOOLS_GLOBNAME_HXX
20#define INCLUDED_TOOLS_GLOBNAME_HXX
21
22#include <tools/toolsdllapi.h>
23#include <com/sun/star/uno/Sequence.hxx>
24
26{
27 sal_uInt32 Data1;
28 sal_uInt16 Data2;
29 sal_uInt16 Data3;
30 sal_uInt8 Data4[8];
31};
32
33class SvStream;
34
36{
37public:
38 SvGlobalName() = default;
39 SvGlobalName(const SvGlobalName& rObj) = default;
40
41 SvGlobalName( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3,
42 sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11,
43 sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 );
44
45 // create SvGlobalName from a platform independent representation
46 SvGlobalName( const css::uno::Sequence< sal_Int8 >& aSeq );
47
48 SvGlobalName( const SvGUID & rId );
49
50 SvGlobalName & operator = ( const SvGlobalName & rObj ) = default;
51
54
55 bool operator < ( const SvGlobalName & rObj ) const;
56
57 bool operator == ( const SvGlobalName & rObj ) const;
58 bool operator != ( const SvGlobalName & rObj ) const
59 { return !(*this == rObj); }
60
61 void MakeFromMemory( void const * pData );
62 bool MakeId( std::u16string_view rId );
63 OUString GetHexName() const;
64
65 const SvGUID& GetCLSID() const { return m_aData; }
66
67 // platform independent representation of a "GlobalName"
68 // maybe transported remotely
69 css::uno::Sequence < sal_Int8 > GetByteSequence() const;
70
71private:
73};
74
75#endif
76
77/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool operator==(const BigInt &rVal1, const BigInt &rVal2)
Definition: bigint.cxx:806
bool operator<(const BigInt &rVal1, const BigInt &rVal2)
Definition: bigint.cxx:818
const SvGUID & GetCLSID() const
Definition: globname.hxx:65
SvGlobalName()=default
SvGlobalName(const SvGlobalName &rObj)=default
MapData m_aData
bool operator!=(const Fraction &rVal1, const Fraction &rVal2)
Definition: fract.cxx:340
SvStream & operator>>(SvStream &rStr, SvGlobalName &rObj)
Definition: globname.cxx:64
SvStream & WriteSvGlobalName(SvStream &rOStr, const SvGlobalName &rObj)
Definition: globname.cxx:55
sal_uInt16 Data3
Definition: globname.hxx:29
sal_uInt16 Data2
Definition: globname.hxx:28
sal_uInt32 Data1
Definition: globname.hxx:27
#define TOOLS_DLLPUBLIC
Definition: toolsdllapi.h:28
unsigned char sal_uInt8
#define SAL_WARN_UNUSED