From 7c945d6ba7b773673acd1507dabf6c19b5239163 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 22 May 2016 15:40:47 -0400 Subject: [PATCH] Added additional text merge backends. --- glabels/Merge/CMakeLists.txt | 7 +++ glabels/Merge/Factory.cpp | 42 +++++++++++++++ glabels/Merge/TextColon.cpp | 80 +++++++++++++++++++++++++++++ glabels/Merge/TextColon.h | 63 +++++++++++++++++++++++ glabels/Merge/TextColonKeys.cpp | 80 +++++++++++++++++++++++++++++ glabels/Merge/TextColonKeys.h | 63 +++++++++++++++++++++++ glabels/Merge/TextCsv.cpp | 6 ++- glabels/Merge/TextCsv.h | 2 +- glabels/Merge/TextCsvKeys.cpp | 80 +++++++++++++++++++++++++++++ glabels/Merge/TextCsvKeys.h | 63 +++++++++++++++++++++++ glabels/Merge/TextSemicolon.cpp | 80 +++++++++++++++++++++++++++++ glabels/Merge/TextSemicolon.h | 63 +++++++++++++++++++++++ glabels/Merge/TextSemicolonKeys.cpp | 80 +++++++++++++++++++++++++++++ glabels/Merge/TextSemicolonKeys.h | 63 +++++++++++++++++++++++ glabels/Merge/TextTsv.cpp | 80 +++++++++++++++++++++++++++++ glabels/Merge/TextTsv.h | 63 +++++++++++++++++++++++ glabels/Merge/TextTsvKeys.cpp | 80 +++++++++++++++++++++++++++++ glabels/Merge/TextTsvKeys.h | 63 +++++++++++++++++++++++ 18 files changed, 1055 insertions(+), 3 deletions(-) create mode 100644 glabels/Merge/TextColon.cpp create mode 100644 glabels/Merge/TextColon.h create mode 100644 glabels/Merge/TextColonKeys.cpp create mode 100644 glabels/Merge/TextColonKeys.h create mode 100644 glabels/Merge/TextCsvKeys.cpp create mode 100644 glabels/Merge/TextCsvKeys.h create mode 100644 glabels/Merge/TextSemicolon.cpp create mode 100644 glabels/Merge/TextSemicolon.h create mode 100644 glabels/Merge/TextSemicolonKeys.cpp create mode 100644 glabels/Merge/TextSemicolonKeys.h create mode 100644 glabels/Merge/TextTsv.cpp create mode 100644 glabels/Merge/TextTsv.h create mode 100644 glabels/Merge/TextTsvKeys.cpp create mode 100644 glabels/Merge/TextTsvKeys.h diff --git a/glabels/Merge/CMakeLists.txt b/glabels/Merge/CMakeLists.txt index dbc4cee..5962fb5 100644 --- a/glabels/Merge/CMakeLists.txt +++ b/glabels/Merge/CMakeLists.txt @@ -16,6 +16,13 @@ set (merge_sources None.cpp Text.cpp TextCsv.cpp + TextCsvKeys.cpp + TextTsv.cpp + TextTsvKeys.cpp + TextColon.cpp + TextColonKeys.cpp + TextSemicolon.cpp + TextSemicolonKeys.cpp ) set (merge_qobject_headers diff --git a/glabels/Merge/Factory.cpp b/glabels/Merge/Factory.cpp index a27a55e..ca6fa98 100644 --- a/glabels/Merge/Factory.cpp +++ b/glabels/Merge/Factory.cpp @@ -22,6 +22,13 @@ #include "None.h" #include "TextCsv.h" +#include "TextCsvKeys.h" +#include "TextTsv.h" +#include "TextTsvKeys.h" +#include "TextColon.h" +#include "TextColonKeys.h" +#include "TextSemicolon.h" +#include "TextSemicolonKeys.h" namespace merge @@ -48,6 +55,41 @@ namespace merge tr("Text: Comma Separated Values (CSV)"), FILE, &TextCsv::create ); + + registerBackend( TextCsvKeys::id(), + tr("Text: Comma Separated Values (CSV), keys on line 1"), + FILE, + &TextCsvKeys::create ); + + registerBackend( TextTsv::id(), + tr("Text: Tab Separated Values (TSV)"), + FILE, + &TextTsv::create ); + + registerBackend( TextTsvKeys::id(), + tr("Text: Tab Separated Values (TSV), keys on line 1"), + FILE, + &TextTsvKeys::create ); + + registerBackend( TextColon::id(), + tr("Text: Colon Separated Values"), + FILE, + &TextColon::create ); + + registerBackend( TextColonKeys::id(), + tr("Text: Colon Separated Values, keys on line 1"), + FILE, + &TextColonKeys::create ); + + registerBackend( TextSemicolon::id(), + tr("Text: Semicolon Separated Values"), + FILE, + &TextSemicolon::create ); + + registerBackend( TextSemicolonKeys::id(), + tr("Text: Semicolon Separated Values, keys on line 1"), + FILE, + &TextSemicolonKeys::create ); } diff --git a/glabels/Merge/TextColon.cpp b/glabels/Merge/TextColon.cpp new file mode 100644 index 0000000..55deba1 --- /dev/null +++ b/glabels/Merge/TextColon.cpp @@ -0,0 +1,80 @@ +/* Merge/TextColon.cpp + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#include "TextColon.h" + + +namespace merge +{ + static const QString ID = "Text/Colon"; + + + /// + /// Constructor + /// + TextColon::TextColon() : Text(':',false) + { + mId = ID; + } + + + /// + /// Constructor + /// + TextColon::TextColon( const TextColon* merge ) : Text( merge ) + { + } + + + /// + /// Destructor + /// + TextColon::~TextColon() + { + } + + + /// + /// Clone + /// + TextColon* TextColon::clone() const + { + return new TextColon( this ); + } + + + /// + /// Get ID + /// + QString TextColon::id() + { + return ID; + } + + + /// + /// Create + /// + Merge* TextColon::create() + { + return new TextColon(); + } + +} diff --git a/glabels/Merge/TextColon.h b/glabels/Merge/TextColon.h new file mode 100644 index 0000000..9f9005e --- /dev/null +++ b/glabels/Merge/TextColon.h @@ -0,0 +1,63 @@ +/* Merge/TextColon.h + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#ifndef merge_TextColon_h +#define merge_TextColon_h + +#include "Text.h" + + +namespace merge +{ + + /// + /// TextColon Merge Backend + /// + struct TextColon : public Text + { + + ///////////////////////////////// + // Life Cycle + ///////////////////////////////// + private: + TextColon(); + TextColon( const TextColon* merge ); + virtual ~TextColon(); + + + ///////////////////////////////// + // Object duplication + ///////////////////////////////// + public: + TextColon* clone() const; + + + ///////////////////////////////// + // Static methods + ///////////////////////////////// + public: + static QString id(); + static Merge* create(); + + }; + +} + +#endif // merge_TextColon_h diff --git a/glabels/Merge/TextColonKeys.cpp b/glabels/Merge/TextColonKeys.cpp new file mode 100644 index 0000000..8414e68 --- /dev/null +++ b/glabels/Merge/TextColonKeys.cpp @@ -0,0 +1,80 @@ +/* Merge/TextColonKeys.cpp + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#include "TextColonKeys.h" + + +namespace merge +{ + static const QString ID = "Text/Colon/Line1Keys"; + + + /// + /// Constructor + /// + TextColonKeys::TextColonKeys() : Text(':',true) + { + mId = ID; + } + + + /// + /// Constructor + /// + TextColonKeys::TextColonKeys( const TextColonKeys* merge ) : Text( merge ) + { + } + + + /// + /// Destructor + /// + TextColonKeys::~TextColonKeys() + { + } + + + /// + /// Clone + /// + TextColonKeys* TextColonKeys::clone() const + { + return new TextColonKeys( this ); + } + + + /// + /// Get ID + /// + QString TextColonKeys::id() + { + return ID; + } + + + /// + /// Create + /// + Merge* TextColonKeys::create() + { + return new TextColonKeys(); + } + +} diff --git a/glabels/Merge/TextColonKeys.h b/glabels/Merge/TextColonKeys.h new file mode 100644 index 0000000..ce83e16 --- /dev/null +++ b/glabels/Merge/TextColonKeys.h @@ -0,0 +1,63 @@ +/* Merge/TextColonKeys.h + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#ifndef merge_TextColonKeys_h +#define merge_TextColonKeys_h + +#include "Text.h" + + +namespace merge +{ + + /// + /// TextColonKeys Merge Backend + /// + struct TextColonKeys : public Text + { + + ///////////////////////////////// + // Life Cycle + ///////////////////////////////// + private: + TextColonKeys(); + TextColonKeys( const TextColonKeys* merge ); + virtual ~TextColonKeys(); + + + ///////////////////////////////// + // Object duplication + ///////////////////////////////// + public: + TextColonKeys* clone() const; + + + ///////////////////////////////// + // Static methods + ///////////////////////////////// + public: + static QString id(); + static Merge* create(); + + }; + +} + +#endif // merge_TextColonKeys_h diff --git a/glabels/Merge/TextCsv.cpp b/glabels/Merge/TextCsv.cpp index e774afe..bfb7aaa 100644 --- a/glabels/Merge/TextCsv.cpp +++ b/glabels/Merge/TextCsv.cpp @@ -23,13 +23,15 @@ namespace merge { + static const QString ID = "Text/Comma"; + /// /// Constructor /// TextCsv::TextCsv() : Text(',',false) { - mId = "Text/Comma"; + mId = ID; } @@ -63,7 +65,7 @@ namespace merge /// QString TextCsv::id() { - return "Text/Comma"; + return ID; } diff --git a/glabels/Merge/TextCsv.h b/glabels/Merge/TextCsv.h index c5d0255..2bb52d2 100644 --- a/glabels/Merge/TextCsv.h +++ b/glabels/Merge/TextCsv.h @@ -46,7 +46,6 @@ namespace merge // Object duplication ///////////////////////////////// public: - static QString id(); TextCsv* clone() const; @@ -54,6 +53,7 @@ namespace merge // Static methods ///////////////////////////////// public: + static QString id(); static Merge* create(); }; diff --git a/glabels/Merge/TextCsvKeys.cpp b/glabels/Merge/TextCsvKeys.cpp new file mode 100644 index 0000000..791f0b2 --- /dev/null +++ b/glabels/Merge/TextCsvKeys.cpp @@ -0,0 +1,80 @@ +/* Merge/TextCsvKeys.cpp + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#include "TextCsvKeys.h" + + +namespace merge +{ + static const QString ID = "Text/Comma/Line1Keys"; + + + /// + /// Constructor + /// + TextCsvKeys::TextCsvKeys() : Text(',',true) + { + mId = ID; + } + + + /// + /// Constructor + /// + TextCsvKeys::TextCsvKeys( const TextCsvKeys* merge ) : Text( merge ) + { + } + + + /// + /// Destructor + /// + TextCsvKeys::~TextCsvKeys() + { + } + + + /// + /// Clone + /// + TextCsvKeys* TextCsvKeys::clone() const + { + return new TextCsvKeys( this ); + } + + + /// + /// Get ID + /// + QString TextCsvKeys::id() + { + return ID; + } + + + /// + /// Create + /// + Merge* TextCsvKeys::create() + { + return new TextCsvKeys(); + } + +} diff --git a/glabels/Merge/TextCsvKeys.h b/glabels/Merge/TextCsvKeys.h new file mode 100644 index 0000000..515c6d2 --- /dev/null +++ b/glabels/Merge/TextCsvKeys.h @@ -0,0 +1,63 @@ +/* Merge/TextCsvKeys.h + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#ifndef merge_TextCsvKeys_h +#define merge_TextCsvKeys_h + +#include "Text.h" + + +namespace merge +{ + + /// + /// TextCsvKeys Merge Backend + /// + struct TextCsvKeys : public Text + { + + ///////////////////////////////// + // Life Cycle + ///////////////////////////////// + private: + TextCsvKeys(); + TextCsvKeys( const TextCsvKeys* merge ); + virtual ~TextCsvKeys(); + + + ///////////////////////////////// + // Object duplication + ///////////////////////////////// + public: + TextCsvKeys* clone() const; + + + ///////////////////////////////// + // Static methods + ///////////////////////////////// + public: + static QString id(); + static Merge* create(); + + }; + +} + +#endif // merge_TextCsvKeys_h diff --git a/glabels/Merge/TextSemicolon.cpp b/glabels/Merge/TextSemicolon.cpp new file mode 100644 index 0000000..b9931c6 --- /dev/null +++ b/glabels/Merge/TextSemicolon.cpp @@ -0,0 +1,80 @@ +/* Merge/TextSemicolon.cpp + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#include "TextSemicolon.h" + + +namespace merge +{ + static const QString ID = "Text/Semicolon"; + + + /// + /// Constructor + /// + TextSemicolon::TextSemicolon() : Text(';',false) + { + mId = ID; + } + + + /// + /// Constructor + /// + TextSemicolon::TextSemicolon( const TextSemicolon* merge ) : Text( merge ) + { + } + + + /// + /// Destructor + /// + TextSemicolon::~TextSemicolon() + { + } + + + /// + /// Clone + /// + TextSemicolon* TextSemicolon::clone() const + { + return new TextSemicolon( this ); + } + + + /// + /// Get ID + /// + QString TextSemicolon::id() + { + return ID; + } + + + /// + /// Create + /// + Merge* TextSemicolon::create() + { + return new TextSemicolon(); + } + +} diff --git a/glabels/Merge/TextSemicolon.h b/glabels/Merge/TextSemicolon.h new file mode 100644 index 0000000..fa73481 --- /dev/null +++ b/glabels/Merge/TextSemicolon.h @@ -0,0 +1,63 @@ +/* Merge/TextSemicolon.h + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#ifndef merge_TextSemicolon_h +#define merge_TextSemicolon_h + +#include "Text.h" + + +namespace merge +{ + + /// + /// TextSemicolon Merge Backend + /// + struct TextSemicolon : public Text + { + + ///////////////////////////////// + // Life Cycle + ///////////////////////////////// + private: + TextSemicolon(); + TextSemicolon( const TextSemicolon* merge ); + virtual ~TextSemicolon(); + + + ///////////////////////////////// + // Object duplication + ///////////////////////////////// + public: + TextSemicolon* clone() const; + + + ///////////////////////////////// + // Static methods + ///////////////////////////////// + public: + static QString id(); + static Merge* create(); + + }; + +} + +#endif // merge_TextSemicolon_h diff --git a/glabels/Merge/TextSemicolonKeys.cpp b/glabels/Merge/TextSemicolonKeys.cpp new file mode 100644 index 0000000..4abd6fc --- /dev/null +++ b/glabels/Merge/TextSemicolonKeys.cpp @@ -0,0 +1,80 @@ +/* Merge/TextSemicolonKeys.cpp + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#include "TextSemicolonKeys.h" + + +namespace merge +{ + static const QString ID = "Text/Colon"; + + + /// + /// Constructor + /// + TextSemicolonKeys::TextSemicolonKeys() : Text(';',true) + { + mId = ID; + } + + + /// + /// Constructor + /// + TextSemicolonKeys::TextSemicolonKeys( const TextSemicolonKeys* merge ) : Text( merge ) + { + } + + + /// + /// Destructor + /// + TextSemicolonKeys::~TextSemicolonKeys() + { + } + + + /// + /// Clone + /// + TextSemicolonKeys* TextSemicolonKeys::clone() const + { + return new TextSemicolonKeys( this ); + } + + + /// + /// Get ID + /// + QString TextSemicolonKeys::id() + { + return ID; + } + + + /// + /// Create + /// + Merge* TextSemicolonKeys::create() + { + return new TextSemicolonKeys(); + } + +} diff --git a/glabels/Merge/TextSemicolonKeys.h b/glabels/Merge/TextSemicolonKeys.h new file mode 100644 index 0000000..43d28dd --- /dev/null +++ b/glabels/Merge/TextSemicolonKeys.h @@ -0,0 +1,63 @@ +/* Merge/TextSemicolonKeys.h + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#ifndef merge_TextSemicolonKeys_h +#define merge_TextSemicolonKeys_h + +#include "Text.h" + + +namespace merge +{ + + /// + /// TextSemicolonKeys Merge Backend + /// + struct TextSemicolonKeys : public Text + { + + ///////////////////////////////// + // Life Cycle + ///////////////////////////////// + private: + TextSemicolonKeys(); + TextSemicolonKeys( const TextSemicolonKeys* merge ); + virtual ~TextSemicolonKeys(); + + + ///////////////////////////////// + // Object duplication + ///////////////////////////////// + public: + TextSemicolonKeys* clone() const; + + + ///////////////////////////////// + // Static methods + ///////////////////////////////// + public: + static QString id(); + static Merge* create(); + + }; + +} + +#endif // merge_TextSemicolonKeys_h diff --git a/glabels/Merge/TextTsv.cpp b/glabels/Merge/TextTsv.cpp new file mode 100644 index 0000000..ea47701 --- /dev/null +++ b/glabels/Merge/TextTsv.cpp @@ -0,0 +1,80 @@ +/* Merge/TextTsv.cpp + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#include "TextTsv.h" + + +namespace merge +{ + static const QString ID = "Text/Tab"; + + + /// + /// Constructor + /// + TextTsv::TextTsv() : Text('\t',false) + { + mId = ID; + } + + + /// + /// Constructor + /// + TextTsv::TextTsv( const TextTsv* merge ) : Text( merge ) + { + } + + + /// + /// Destructor + /// + TextTsv::~TextTsv() + { + } + + + /// + /// Clone + /// + TextTsv* TextTsv::clone() const + { + return new TextTsv( this ); + } + + + /// + /// Get ID + /// + QString TextTsv::id() + { + return ID; + } + + + /// + /// Create + /// + Merge* TextTsv::create() + { + return new TextTsv(); + } + +} diff --git a/glabels/Merge/TextTsv.h b/glabels/Merge/TextTsv.h new file mode 100644 index 0000000..0404467 --- /dev/null +++ b/glabels/Merge/TextTsv.h @@ -0,0 +1,63 @@ +/* Merge/TextTsv.h + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#ifndef merge_TextTsv_h +#define merge_TextTsv_h + +#include "Text.h" + + +namespace merge +{ + + /// + /// TextTsv Merge Backend + /// + struct TextTsv : public Text + { + + ///////////////////////////////// + // Life Cycle + ///////////////////////////////// + private: + TextTsv(); + TextTsv( const TextTsv* merge ); + virtual ~TextTsv(); + + + ///////////////////////////////// + // Object duplication + ///////////////////////////////// + public: + TextTsv* clone() const; + + + ///////////////////////////////// + // Static methods + ///////////////////////////////// + public: + static QString id(); + static Merge* create(); + + }; + +} + +#endif // merge_TextTsv_h diff --git a/glabels/Merge/TextTsvKeys.cpp b/glabels/Merge/TextTsvKeys.cpp new file mode 100644 index 0000000..7dd2b8d --- /dev/null +++ b/glabels/Merge/TextTsvKeys.cpp @@ -0,0 +1,80 @@ +/* Merge/TextTsvKeys.cpp + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#include "TextTsvKeys.h" + + +namespace merge +{ + static const QString ID = "Text/Tab/Line1Keys"; + + + /// + /// Constructor + /// + TextTsvKeys::TextTsvKeys() : Text('\t',true) + { + mId = ID; + } + + + /// + /// Constructor + /// + TextTsvKeys::TextTsvKeys( const TextTsvKeys* merge ) : Text( merge ) + { + } + + + /// + /// Destructor + /// + TextTsvKeys::~TextTsvKeys() + { + } + + + /// + /// Clone + /// + TextTsvKeys* TextTsvKeys::clone() const + { + return new TextTsvKeys( this ); + } + + + /// + /// Get ID + /// + QString TextTsvKeys::id() + { + return ID; + } + + + /// + /// Create + /// + Merge* TextTsvKeys::create() + { + return new TextTsvKeys(); + } + +} diff --git a/glabels/Merge/TextTsvKeys.h b/glabels/Merge/TextTsvKeys.h new file mode 100644 index 0000000..fd94809 --- /dev/null +++ b/glabels/Merge/TextTsvKeys.h @@ -0,0 +1,63 @@ +/* Merge/TextTsvKeys.h + * + * Copyright (C) 2016 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#ifndef merge_TextTsvKeys_h +#define merge_TextTsvKeys_h + +#include "Text.h" + + +namespace merge +{ + + /// + /// TextTsvKeys Merge Backend + /// + struct TextTsvKeys : public Text + { + + ///////////////////////////////// + // Life Cycle + ///////////////////////////////// + private: + TextTsvKeys(); + TextTsvKeys( const TextTsvKeys* merge ); + virtual ~TextTsvKeys(); + + + ///////////////////////////////// + // Object duplication + ///////////////////////////////// + public: + TextTsvKeys* clone() const; + + + ///////////////////////////////// + // Static methods + ///////////////////////////////// + public: + static QString id(); + static Merge* create(); + + }; + +} + +#endif // merge_TextTsvKeys_h