LibreOffice Module sc (master)  1
columnset.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 
10 #pragma once
11 
12 #include "types.hxx"
13 
14 #include <unordered_set>
15 #include <unordered_map>
16 #include <vector>
17 
18 namespace sc {
19 
23 class ColumnSet
24 {
25  typedef std::unordered_set<SCCOL> ColsType;
26  typedef std::unordered_map<SCTAB, ColsType> TabsType;
27  TabsType maTabs;
28 
29 public:
30  void set(SCTAB nTab, SCCOL nCol);
31  void getColumns(SCTAB nTab, std::vector<SCCOL>& rCols) const;
32  bool hasTab( SCTAB nTab ) const;
33  bool empty() const;
34 };
35 
36 }
37 
38 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool hasTab(SCTAB nTab) const
Definition: columnset.cxx:55
Simple container to keep track of sheet - column pair.
Definition: columnset.hxx:23
std::unordered_set< SCCOL > ColsType
Definition: columnset.hxx:25
void set(SCTAB nTab, SCCOL nCol)
Definition: columnset.cxx:15
TabsType maTabs
Definition: columnset.hxx:27
sal_Int16 SCCOL
Definition: types.hxx:22
void getColumns(SCTAB nTab, std::vector< SCCOL > &rCols) const
Definition: columnset.cxx:34
std::unordered_map< SCTAB, ColsType > TabsType
Definition: columnset.hxx:26
bool empty() const
Definition: columnset.cxx:60
sal_Int16 SCTAB
Definition: types.hxx:23