Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Generic / String / String.h
diff options
context:
space:
mode:
Commitd5186a043e53375e5e0d83f47f99c8282da5db8f (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 16:48:51 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 16:48:51 +0300
Files95017f63d0f128468c7314e51219b9888e242ce6 /src/Generic/String/String.h
FMI-OOP-P1_TicketSystem-d5186a043e53375e5e0d83f47f99c8282da5db8f.tar
FMI-OOP-P1_TicketSystem-d5186a043e53375e5e0d83f47f99c8282da5db8f.tar.gz
FMI-OOP-P1_TicketSystem-d5186a043e53375e5e0d83f47f99c8282da5db8f.zip
Parentb146163f880a86b3b77dbd4d030a9d7dc921315b (diff)
Autocommit at 07.05.2022 @ 16:48
1 files changed, 8 insertions, 0 deletions
-rw-r--r--src/Generic/String/String.h8
diff --git a/src/Generic/String/String.h b/src/Generic/String/String.h
index 4465407..5f1dbfa 100644
--- a/src/Generic/String/String.h
+++ b/src/Generic/String/String.h
@@ -1,6 +1,9 @@
#ifndef HEADER_STRING
#define HEADER_STRING
+#include <istream>
+#include <ostream>
+
class String {
char* str;
unsigned length;
@@ -22,8 +25,13 @@ public:
String(String&& other);
String& operator=(String&& other);
+ void read(std::istream& istr);
+ void write(std::ostream& ostr);
int compare(const String& other) const;
char& operator[](unsigned index);
+
+ friend std::istream& operator>>(std::istream& istr, String& event);
+ friend std::ostream& operator<<(std::ostream& ostr, const String& event);
};
#endif