1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_TKEYVALUE_HXX
20 #define INCLUDED_CONNECTIVITY_SOURCE_INC_TKEYVALUE_HXX
22 #include <connectivity/FValue.hxx>
23 #include <connectivity/dbtoolsdllapi.hxx>
24 #include <osl/diagnose.h>
26 namespace connectivity
28 class OOO_DLLPUBLIC_DBTOOLS OKeyValue final
30 std::vector
<ORowSetValueDecoratorRef
> m_aKeys
;
33 OKeyValue(sal_Int32 nVal
);
38 static std::unique_ptr
<OKeyValue
> createKeyValue(sal_Int32 nVal
);
40 void pushKey(const ORowSetValueDecoratorRef
& _aValueRef
)
42 m_aKeys
.push_back(_aValueRef
);
45 OUString
getKeyString(std::vector
<ORowSetValueDecoratorRef
>::size_type i
) const
47 OSL_ENSURE(m_aKeys
.size() > i
,"Wrong index for KEyValue");
48 return m_aKeys
[i
]->getValue();
50 double getKeyDouble(std::vector
<ORowSetValueDecoratorRef
>::size_type i
) const
52 OSL_ENSURE(m_aKeys
.size() > i
,"Wrong index for KEyValue");
53 return m_aKeys
[i
]->getValue();
56 sal_Int32
getValue() const { return m_nValue
; }
60 #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_TKEYVALUE_HXX
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */