EditFlatten.cpp 1.48 KB
Newer Older
gsell's avatar
gsell committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
// ------------------------------------------------------------------------
// $RCSfile: EditFlatten.cpp,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Class: EditFlatten
//   The class for the OPAL sequence editor FLATTEN command.
//
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:33:38 $
// $Author: Andreas Adelmann $
//
// ------------------------------------------------------------------------

#include "Editor/EditFlatten.h"
#include "Editor/Edit.h"
#include "Lines/Sequence.h"
#include "Utilities/Options.h"
#include <iostream>


// Class EditFlatten
// ------------------------------------------------------------------------


EditFlatten::EditFlatten():
    Editor(0, "FLATTEN",
           "The \"FLATTEN\" sub-command creates a flat sequence from the "
           "sequence being edited.")
{}


37
EditFlatten::EditFlatten(const std::string &name, EditFlatten *parent):
gsell's avatar
gsell committed
38 39 40 41 42 43 44 45
    Editor(name, parent)
{}


EditFlatten::~EditFlatten()
{}


46
EditFlatten *EditFlatten::clone(const std::string &name) {
gsell's avatar
gsell committed
47 48 49 50 51 52 53 54 55 56 57
    return new EditFlatten(name, this);
}


void EditFlatten::execute() {
    Edit::block->flatten();

    if(Options::info) {
        std::cerr << "\nSequence has been flattened.\n" << std::endl;
    }
}