nc print person
This commit is contained in:
+1
-2
@@ -1,2 +1 @@
|
|||||||
g++ -o bin/debug/famt -std=gnu++20 -g -Og -Wall *.cpp -lncursesw
|
g++ -o bin/debug/famt -std=gnu++20 -g -Og *.cpp -lncursesw
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,13 @@
|
|||||||
|
|
||||||
using std::cin;
|
using std::cin;
|
||||||
using std::cout;
|
using std::cout;
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
initscr(); /* Start curses mode */
|
initscr(); /* Start curses mode */
|
||||||
|
noecho();
|
||||||
|
cbreak(); /* get input instantly */
|
||||||
|
refresh(); /* if not present the first real refresh is missed */
|
||||||
|
|
||||||
/*Tree test1("Dechkovi"); //addTree Dechkovi addTree Karamanovi load 0 load 1 (to work with these example trees)
|
/*Tree test1("Dechkovi"); //addTree Dechkovi addTree Karamanovi load 0 load 1 (to work with these example trees)
|
||||||
Tree test2("Karamanovi");
|
Tree test2("Karamanovi");
|
||||||
@@ -51,10 +53,11 @@ int main()
|
|||||||
firstTree.addRelation(2, Brother, 3);
|
firstTree.addRelation(2, Brother, 3);
|
||||||
firstTree.addRelation(2, Brother, 4);
|
firstTree.addRelation(2, Brother, 4);
|
||||||
|
|
||||||
firstTree.print();
|
/* firstTree.print(); */
|
||||||
|
firstTree.draw();
|
||||||
firstTree.saveTree();
|
firstTree.saveTree();
|
||||||
|
|
||||||
firstTree.printRel(3);
|
/* firstTree.printRel(3); */
|
||||||
firstTree.printOldestAncestors(3);
|
firstTree.printOldestAncestors(3);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -138,7 +138,7 @@ void Person::print()const
|
|||||||
waddstr(info_tab, "Death: ");
|
waddstr(info_tab, "Death: ");
|
||||||
death_.print();
|
death_.print();
|
||||||
|
|
||||||
mvaddstr(LINES-1, 0, "Press any key to return.");
|
mvwaddstr(info_tab, LINES-1, 0, "Press any key to return.");
|
||||||
|
|
||||||
wrefresh(info_tab);
|
wrefresh(info_tab);
|
||||||
getch(); /* waint press */
|
getch(); /* waint press */
|
||||||
|
|||||||
@@ -440,6 +440,10 @@ void Tree::removeRelation(const unsigned firstId, const unsigned secondId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Tree::draw() const
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void Tree::print() const
|
void Tree::print() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ public:
|
|||||||
void removeRelation(const unsigned firstId, const unsigned secondId);
|
void removeRelation(const unsigned firstId, const unsigned secondId);
|
||||||
void removeRelation(const char* firstName, const char* secondName);
|
void removeRelation(const char* firstName, const char* secondName);
|
||||||
|
|
||||||
|
void draw() const;
|
||||||
|
|
||||||
void print()const;
|
void print()const;
|
||||||
void printRel(const unsigned id)const; //Prints out close relatives
|
void printRel(const unsigned id)const; //Prints out close relatives
|
||||||
void printMember(const unsigned id)const;
|
void printMember(const unsigned id)const;
|
||||||
|
|||||||
Reference in New Issue
Block a user