OTest2
A C++ testing framework
include
otest2
tagsstack.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 Ondrej Starek
3
*
4
* This file is part of OTest2
5
*
6
* OTest2 is free software: you can redistribute it and/or modify it under
7
* the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation, either version 3 of the License,
9
* or (at your option) any later version.
10
*
11
* OTest2 is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
* License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with OTest2. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef OTest2_INCLUDE_OTEST2_TAGSSTACK_H_
21
#define OTest2_INCLUDE_OTEST2_TAGSSTACK_H_
22
23
#include <string>
24
#include <vector>
25
26
#include <
otest2/tags.h
>
27
28
namespace
OTest2
{
29
36
class
TagsStack
{
37
private
:
38
struct
Impl;
39
Impl* pimpl;
40
41
public
:
45
TagsStack
();
46
50
~TagsStack
();
51
52
/* -- avoid copying */
53
TagsStack
(
54
const
TagsStack
&) =
delete
;
55
TagsStack
&
operator =
(
56
const
TagsStack
&) =
delete
;
57
64
void
pushTags
(
65
const
std::string& name_,
66
const
Tags
& tags_);
67
71
void
popTags
();
72
76
struct
TagRecord
{
77
std::string
name
;
78
Tags
tags
;
79
};
80
86
void
fillTags
(
87
std::vector<TagRecord>& tags_)
const
;
88
};
89
90
}
/* -- namespace OTest2 */
91
92
#endif
/* -- OTest2_INCLUDE_OTEST2_TAGSSTACK_H_ */
OTest2::TagsStack::fillTags
void fillTags(std::vector< TagRecord > &tags_) const
Fill the stack into a vector (used for glob evaluation)
Definition:
tagsstack.cpp:72
tags.h
OTest2::TagsStack::~TagsStack
~TagsStack()
Dtor.
Definition:
tagsstack.cpp:57
OTest2::TagsStack::TagRecord::name
std::string name
Definition:
tagsstack.h:77
OTest2::TagsStack::popTags
void popTags()
Pop tags at the top of the stack.
Definition:
tagsstack.cpp:67
OTest2::TagsStack::TagsStack
TagsStack()
Ctor.
Definition:
tagsstack.cpp:52
OTest2::TagsStack::operator=
TagsStack & operator=(const TagsStack &)=delete
OTest2::TagsStack::pushTags
void pushTags(const std::string &name_, const Tags &tags_)
Push tags.
Definition:
tagsstack.cpp:61
OTest2
Definition:
assertbean.h:25
OTest2::TagsStack::TagRecord::tags
Tags tags
Definition:
tagsstack.h:78
OTest2::TagsStack
Stack of assigned tags.
Definition:
tagsstack.h:36
OTest2::Tags
List of tags assigned to a testing object.
Definition:
tags.h:32
OTest2::TagsStack::TagRecord
One record of the tag stack.
Definition:
tagsstack.h:76
Generated by
1.8.17