Specs
Beautiful C++ Test Framework
Loading...
Searching...
No Matches
SpecComponent.h
Go to the documentation of this file.
1#pragma once
2
3#include <Specs/API.h>
4
6#include "SpecTagCollection.h"
7
8namespace SpecsCpp {
9
10 class SpecComponent : public virtual ISpecComponent {
11 bool _skip = false;
13 ISpecGroup* _parentGroup;
15 ISpecDataValueCollection* _metaDataPtr = &_metaData;
17 ISpecTagCollection* _tagsPtr = &_tags;
18
19 public:
20 SpecComponent(SpecComponentType type, ISpecGroup* parentGroup, bool skip = false)
21 : _type(type), _parentGroup(parentGroup), _skip(skip) {}
22
23 ISpecGroup* group() const override { return _parentGroup; }
24 void set_group(ISpecGroup* group) override { _parentGroup = group; }
25 ISpecDataValueCollection* data() const override { return _metaDataPtr; }
26 ISpecTagCollection* tags() const override { return _tagsPtr; }
27 SpecComponentType type() const override { return _type; }
28 bool skip() const override { return _skip; }
29 void mark_skipped(bool skip = true) override { _skip = skip; }
30 };
31}
SpecComponentType type() const override
bool skip() const override
ISpecGroup * group() const override
void mark_skipped(bool skip=true) override
SpecComponent(SpecComponentType type, ISpecGroup *parentGroup, bool skip=false)
void set_group(ISpecGroup *group) override
ISpecTagCollection * tags() const override
ISpecDataValueCollection * data() const override
Definition API.h:3
SpecComponentType
Definition API.h:128