ListInfo.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libmspub 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 __LISTINFO_H__
00011 #define __LISTINFO_H__
00012 
00013 #include <boost/optional.hpp>
00014 
00015 #include "NumberingType.h"
00016 #include "NumberingDelimiter.h"
00017 
00018 namespace libmspub
00019 {
00020 enum ListType
00021 {
00022   ORDERED,
00023   UNORDERED
00024 };
00025 struct ListInfo
00026 {
00027   ListType m_listType;
00028 
00029   //unordered list stuff
00030   boost::optional<unsigned> m_bulletChar;
00031   ListInfo(unsigned bulletChar) : m_listType(UNORDERED),
00032     m_bulletChar(bulletChar), m_numberIfRestarted(),
00033     m_numberingType(), m_numberingDelimiter()
00034   {
00035   }
00036 
00037   //ordered list stuff
00038   boost::optional<unsigned> m_numberIfRestarted;
00039   boost::optional<NumberingType> m_numberingType;
00040   boost::optional<NumberingDelimiter> m_numberingDelimiter;
00041   ListInfo(boost::optional<unsigned> numberIfRestarted, NumberingType numberingType,
00042            NumberingDelimiter numberingDelimiter)
00043     : m_listType(ORDERED), m_bulletChar(),
00044       m_numberIfRestarted(numberIfRestarted), m_numberingType(numberingType),
00045       m_numberingDelimiter(numberingDelimiter)
00046   {
00047   }
00048 };
00049 } // namespace libmspub
00050 
00051 #endif /* __LISTINFO_H__ */
00052 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */