00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* 00003 * This file is part of the libvisio project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 */ 00009 00010 #ifndef __VSDSHAPELIST_H__ 00011 #define __VSDSHAPELIST_H__ 00012 00013 #include <vector> 00014 #include <map> 00015 00016 namespace libvisio 00017 { 00018 00019 class VSDShapeList 00020 { 00021 public: 00022 VSDShapeList(); 00023 ~VSDShapeList(); 00024 VSDShapeList(const VSDShapeList &shapeList); 00025 VSDShapeList &operator=(const VSDShapeList &shapeList); 00026 void addShapeId(unsigned id, unsigned shapeId); 00027 void addShapeId(unsigned shapeId); 00028 void setElementsOrder(const std::vector<unsigned> &elementsOrder); 00029 void clear(); 00030 bool empty() const 00031 { 00032 return (m_elements.empty()); 00033 } 00034 const std::vector<unsigned> &getShapesOrder(); 00035 private: 00036 std::map<unsigned, unsigned> m_elements; 00037 std::vector<unsigned> m_elementsOrder; 00038 std::vector<unsigned> m_shapesOrder; 00039 }; 00040 00041 } // namespace libvisio 00042 00043 #endif // __VSDSHAPELIST_H__ 00044 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */