Current Version: 1.0.33
Project Name: csspp
nth_child.h
Go to the documentation of this file.
1// Copyright (c) 2015-2025 Made to Order Software Corp. All Rights Reserved
2//
3// This program is free software; you can redistribute it and/or modify
4// it under the terms of the GNU General Public License as published by
5// the Free Software Foundation; either version 2 of the License, or
6// (at your option) any later version.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12//
13// You should have received a copy of the GNU General Public License along
14// with this program; if not, write to the Free Software Foundation, Inc.,
15// 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16#pragma once
17
18// self
19//
20#include "csspp/csspp.h"
21
22
23namespace csspp
24{
25
26typedef int32_t repeat_integer_t;
27
29{
30public:
31 nth_child(integer_t an_plus_b = 1);
33 nth_child(std::string const & an_plus_b);
34
35 void set_a(repeat_integer_t a);
36 void set_b(repeat_integer_t b);
37 repeat_integer_t get_a() const;
38 repeat_integer_t get_b() const;
39 integer_t get_nth() const;
40 std::string get_error() const;
41
42 bool parse(std::string const & an_plus_b);
43
44 std::string to_string() const;
45
46private:
47 std::string f_error = std::string();
50};
51
52} // namespace csspp
53// vim: ts=4 sw=4 et
repeat_integer_t f_b
Definition nth_child.h:49
std::string get_error() const
std::string f_error
Definition nth_child.h:47
void set_a(repeat_integer_t a)
Definition nth_child.cpp:81
std::string to_string() const
repeat_integer_t f_a
Definition nth_child.h:48
integer_t get_nth() const
bool parse(std::string const &an_plus_b)
void set_b(repeat_integer_t b)
Definition nth_child.cpp:86
repeat_integer_t get_a() const
Definition nth_child.cpp:91
repeat_integer_t get_b() const
Definition nth_child.cpp:96
The namespace of all the classes in the CSS Preprocessor.
Definition csspp.h:48
int32_t repeat_integer_t
Definition nth_child.h:26
int64_t integer_t
Definition csspp.h:58

Documentation of CSS Preprocessor.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.