Current Version: 1.0.10
Project Name: csspp
nth_child.h
Go to the documentation of this file.
1 #ifndef CSSPP_NTH_CHILD_H
2 #define CSSPP_NTH_CHILD_H
3 // CSS Preprocessor
4 // Copyright (C) 2015-2016 Made to Order Software Corp.
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 
20 #include "csspp/csspp.h"
21 
22 namespace csspp
23 {
24 
25 typedef int32_t repeat_integer_t;
26 
27 class nth_child
28 {
29 public:
30  nth_child(integer_t an_plus_b = 1);
32  nth_child(std::string const & an_plus_b);
33 
34  void set_a(repeat_integer_t a);
35  void set_b(repeat_integer_t b);
36  repeat_integer_t get_a() const;
37  repeat_integer_t get_b() const;
38  integer_t get_nth() const;
39  std::string get_error() const;
40 
41  bool parse(std::string const & an_plus_b);
42 
43  std::string to_string() const;
44 
45 private:
46  std::string f_error;
49 };
50 
51 } // namespace csspp
52 #endif
53 // #ifndef CSSPP_NTH_CHILD_H
54 
55 // Local Variables:
56 // mode: cpp
57 // indent-tabs-mode: nil
58 // c-basic-offset: 4
59 // tab-width: 4
60 // End:
61 
62 // vim: ts=4 sw=4 et
void set_b(repeat_integer_t b)
Definition: nth_child.cpp:87
repeat_integer_t f_b
Definition: nth_child.h:48
nth_child(integer_t an_plus_b=1)
Definition: nth_child.cpp:64
repeat_integer_t f_a
Definition: nth_child.h:47
int64_t integer_t
Definition: csspp.h:52
integer_t get_nth() const
Definition: nth_child.cpp:102
bool parse(std::string const &an_plus_b)
Definition: nth_child.cpp:112
repeat_integer_t get_a() const
Definition: nth_child.cpp:92
std::string f_error
Definition: nth_child.h:46
std::string to_string() const
Definition: nth_child.cpp:356
int32_t repeat_integer_t
Definition: nth_child.h:25
std::string get_error() const
Definition: nth_child.cpp:107
repeat_integer_t get_b() const
Definition: nth_child.cpp:97
void set_a(repeat_integer_t a)
Definition: nth_child.cpp:82

Documentation of CSS Preprocessor.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.