Skip to content

Commit

Permalink
UP-14 Method InsertFront() deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
tatyanakrivonogova committed May 22, 2024
1 parent 4a2e75d commit df415a4
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 37 deletions.
1 change: 0 additions & 1 deletion include/document/glyphs/button.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Button : public Glyph {
void Draw() override;

void Insert(GlyphPtr& glyph) override {}
void InsertFront(GlyphPtr& glyph) override {}
void Remove(const GlyphPtr& glyph) override {}
void Add(GlyphPtr) override {}

Expand Down
1 change: 0 additions & 1 deletion include/document/glyphs/character.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class Character : public Glyph {
Glyph::GlyphList Select(const Glyph::GlyphPtr& area) override {}

void Insert(GlyphPtr& glyph) override {}
void InsertFront(GlyphPtr& glyph) override {}
void Remove(const GlyphPtr& glyph) override {}
void Add(GlyphPtr) override {}

Expand Down
1 change: 0 additions & 1 deletion include/document/glyphs/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class Column : public GlyphContainer {
Glyph::GlyphList Select(const Glyph::GlyphPtr& area) override;

void Insert(GlyphPtr& glyph) override;
void InsertFront(GlyphPtr& glyph) override;
void Remove(const GlyphPtr& glyph) override;

std::shared_ptr<Glyph> Clone() const override;
Expand Down
6 changes: 0 additions & 6 deletions include/document/glyphs/glyph.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ class Glyph {
*/
virtual void Insert(GlyphPtr& glyph) = 0;

/**
* @brief Inserts a glyph at the beginning of the line.
* @param glyph Pointer to the glyph.
*/
virtual void InsertFront(GlyphPtr& glyph) = 0;

/**
* @brief Removes the glyph passed by the pointer from the
* document.
Expand Down
1 change: 0 additions & 1 deletion include/document/glyphs/glyph_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class GlyphContainer : public Glyph {
void Draw() override;

virtual void Insert(GlyphPtr& glyph) = 0;
virtual void InsertFront(GlyphPtr& glyph) = 0;
virtual void Remove(const GlyphPtr& glyph) = 0;
void Add(GlyphPtr glyph) override;

Expand Down
1 change: 0 additions & 1 deletion include/document/glyphs/monoglyph.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class MonoGlyph : public Glyph {
Glyph::GlyphList Select(const Glyph::GlyphPtr& area) override;

void Insert(GlyphPtr& glyph) override;
void InsertFront(GlyphPtr& glyph) override;
void Remove(const GlyphPtr& glyph) override;
void Add(GlyphPtr glyph) override;

Expand Down
1 change: 0 additions & 1 deletion include/document/glyphs/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Page : public GlyphContainer {
Glyph::GlyphList Select(const Glyph::GlyphPtr& area) override;

void Insert(GlyphPtr& glyph) override;
void InsertFront(GlyphPtr& glyph) override;
void Remove(const GlyphPtr& glyph) override;

std::shared_ptr<Glyph> Clone() const override;
Expand Down
7 changes: 0 additions & 7 deletions include/document/glyphs/row.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ class Row : public GlyphContainer {
* @param glyph Pointer to the glyph.
*/
void Insert(GlyphPtr& glyph);

/**
* @brief Inserts a glyph at the beginning of the line.
* @param glyph Pointer to the glyph.
*/
void InsertFront(GlyphPtr& glyph);

void Remove(const GlyphPtr& glyph) override;

std::shared_ptr<Glyph> Clone() const override;
Expand Down
4 changes: 0 additions & 4 deletions src/document/glyphs/column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ void Column::Insert(GlyphPtr& glyph) {
(*intersectedGlyphIt)->Insert(glyph);
}

void Column::InsertFront(GlyphPtr& glyph) {
// TO DO
}

void Column::Remove(const GlyphPtr& glyph) {
assert(glyph != nullptr && "Cannot remove glyph by nullptr");
auto it = std::find(components.begin(), components.end(), glyph);
Expand Down
5 changes: 0 additions & 5 deletions src/document/glyphs/monoglyph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ void MonoGlyph::Insert(GlyphPtr& glyph) {
component->Insert(glyph);
}

void MonoGlyph::InsertFront(GlyphPtr& glyph) {
std::cout << "Monoglyph::Insert()" << std::endl;
component->InsertFront(glyph);
}

void MonoGlyph::Remove(const GlyphPtr& glyph) {
std::cout << "Monoglyph::Remove()" << std::endl;
component->Remove(glyph);
Expand Down
4 changes: 0 additions & 4 deletions src/document/glyphs/page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ void Page::Insert(GlyphPtr& glyph) {
(*intersectedGlyphIt)->Insert(glyph);
}

void Page::InsertFront(GlyphPtr& glyph) {
// TO DO
}

void Page::Remove(const GlyphPtr& glyph) {
assert(glyph != nullptr && "Cannot remove glyph by nullptr");
auto it = std::find(components.begin(), components.end(), glyph);
Expand Down
5 changes: 0 additions & 5 deletions src/document/glyphs/row.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ void Row::Insert(GlyphPtr& glyph) {
}
}

void Row::InsertFront(GlyphPtr& glyph) {
glyph->SetPosition(Point(this->GetPosition().x, this->GetPosition().y));
this->Insert(glyph);
}

void Row::Remove(const GlyphPtr& ptr) {
assert(ptr != nullptr && "Cannot remove glyph by nullptr");
auto it = std::find(components.begin(), components.end(), ptr);
Expand Down

0 comments on commit df415a4

Please sign in to comment.