QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
dataparsers.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2002, 2003 Decillion Pty(Ltd)
5 Copyright (C) 2006 Joseph Wang
6 Copyright (C) 2009 Mark Joshi
7 Copyright (C) 2009 StatPro Italia srl
8
9 This file is part of QuantLib, a free-software/open-source library
10 for financial quantitative analysts and developers - http://quantlib.org/
11
12 QuantLib is free software: you can redistribute it and/or modify it
13 under the terms of the QuantLib license. You should have received a
14 copy of the license along with this program; if not, please email
15 <quantlib-dev@lists.sf.net>. The license is also available online at
16 <http://quantlib.org/license.shtml>.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the license for more details.
21*/
22
27#ifndef quantlib_data_parsers_hpp
28#define quantlib_data_parsers_hpp
29
30#include <ql/time/date.hpp>
31#include <vector>
32#include <string>
33
34namespace QuantLib {
35
37 public:
38 static Period parse(const std::string& str);
39 private:
40 static Period parseOnePeriod(const std::string& str);
41 };
42
43 class DateParser {
44 public:
46
49 static Date parseFormatted(const std::string& str,
50 const std::string& fmt);
51 static Date parseISO(const std::string& str);
52 };
53
54}
55
56
57#endif
Concrete date class.
Definition: date.hpp:125
static Date parseISO(const std::string &str)
static Date parseFormatted(const std::string &str, const std::string &fmt)
Parses a string in a used-defined format.
Definition: dataparsers.cpp:90
static Period parse(const std::string &str)
Definition: dataparsers.cpp:40
static Period parseOnePeriod(const std::string &str)
Definition: dataparsers.cpp:63
Definition: any.hpp:35