123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- /* INFO THIS
- * file: word.c */
- # ifndef L_LIB_WORD_U
- # define L_LIB_WORD_U
- // /* USE
- // * THIS word__clear
- // * THIS word__copy */
- // # include <stdio.h>
- // /* INCLUDE
- // * printf */
- /* */
- # include <iostream>
- /* INCLUDE
- * std::cout
- * std::endl */
- // /* USE
- // * THIS word__create */
- // # include <stdlib.h>
- // /* INCLUDE
- // * malloc
- // * free */
- /* TODO THOUGH
- * word__clear = word__init ??? */
- /* USE
- * THIS word__clear
- * THIS word__init */
- # include <stddef.h>
- /* INCLUDE
- * NULL */
- /* USE
- * THIS word__clear
- * THIS word__copy */
- # include "word.h"
- /* INCLUDE
- * Word
- * Word.value
- * Word.previous
- * Word.next
- * word__clear
- * word__copy */
- /* USE
- * THIS symbols__clear
- * THIS symbols__copy */
- // # include "symbols.h"
- /* INCLUDE
- * Symbols
- * String
- * symbols__clear
- * symbols__copy */
- /* INFO
- * do: COPY Word */
- Word::Word (Word &word)
- {
- /* set value */
- this->value = word.value;
-
- /* set point previous */
- this->previous = word.previous;
-
- /* set point next */
- this->next = word.next;
-
- /* log */
- printf ("word copyed\n");
- }
- // /* INFO
- // * do: CHECK symbols */
- // void
- // int__check (int *self)
- // {
- // if (self == NULL)
- // {
- // printf ("12");
- // }
- // }
- /* INFO
- * do: REMOVE Word */
- Word::~Word ()
- {
- /* if self void then error not will */
- // int__check (&self->value__for__test);
-
- /* */
- this->clear ();
- /* log */
- fprintf (stderr, "word delete\n\n");
- }
- /* INFO
- * do: PRINT Word */
- void
- Word::print ()
- {
- /* print */
- std::cout << this->value << std::endl;
- }
- /* USE
- * L__LIB_WORD__CREATE THIS
- * L__LIB_WORD__DELETE THIS */
- /* INFO word__clear
- * do: Clear Word */
- void
- Word::clear ()
- {
- // symbols__clear (this->value);
- // symbols__copy (this->value, "this text is empty");
- // symbols__copy (this->value, "this text is empty");
-
- /* clear point previous */
- this->value = "";
-
- /* clear point previous */
- this->previous = NULL;
-
- /* clear point next */
- this->next = NULL;
-
- /* log */
- fprintf (stderr, "word clear\n");
- }
- /* INFO word__create
- * do: CREATE Word */
- Word::Word ()
- {
- /* log */
- fprintf (stderr, "\nword create\n");
-
- /* create new Word in Dinamic Memory */
- // Word *self = new Word;
- // self->value = malloc (sizeof (Symbols));
- /* init self Word */
- // word__init (self) or
- // word__zero (self) or
- this->clear ();
- }
- # endif /* L_LIB_WORD_U */
|