Skip to content

Commit

Permalink
Add functions for future support of PWMapDTO
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucio Trincheri committed Dec 20, 2024
1 parent e890a82 commit be506e3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sbg/dto/multidim_inter_dto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ const IntervalDTO &MultiDimInterDTO::operator[](std::size_t n) const
return intervals_[n];
}

std::size_t MultiDimInterDTO::arity() const { return intervals_.size(); }

bool MultiDimInterDTO::isEmpty() const { return intervals_.empty(); }

std::ostream &operator<<(std::ostream &out, const MultiDimInterDTO &mdi)
Expand Down
1 change: 1 addition & 0 deletions sbg/dto/multidim_inter_dto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct MultiDimInterDTO {
/**
* @brief Traditional set operations.
*/
std::size_t arity() const;
bool isEmpty() const;

friend std::ostream &operator<<(std::ostream &out, const MultiDimInterDTO &i);
Expand Down
2 changes: 2 additions & 0 deletions sbg/dto/pw_mdinter_dto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ PWMDInterDTO::PWMDInterDTO(SetPieceDTOVector container) : pieces_() {

member_imp(PWMDInterDTO, SetPieceDTOVector, pieces);

SetPieceDTOVector::iterator PWMDInterDTO::begin() { return pieces_.begin(); }

std::size_t PWMDInterDTO::size() const { return pieces_.size(); }

void PWMDInterDTO::emplace(SetPieceDTO mdi)
Expand Down
1 change: 1 addition & 0 deletions sbg/dto/pw_mdinter_dto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ struct PWMDInterDTO {
PWMDInterDTO(SetPieceDTO mdi);
PWMDInterDTO(SetPieceDTOVector container);

SetPieceDTOVector::iterator begin();
std::size_t size() const;
void emplace(SetPieceDTO mdi);
void emplaceBack(SetPieceDTO mdi);
Expand Down

0 comments on commit be506e3

Please sign in to comment.