From 35831ff8dc30c9884a7c3340414f005a0d4ada10 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 12 May 2022 20:21:09 +0300 Subject: Completely reworked documentation --- docs/html/String_8h_source.html | 129 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 docs/html/String_8h_source.html (limited to 'docs/html/String_8h_source.html') diff --git a/docs/html/String_8h_source.html b/docs/html/String_8h_source.html new file mode 100644 index 0000000..cc0e50f --- /dev/null +++ b/docs/html/String_8h_source.html @@ -0,0 +1,129 @@ + + + + + + + +FMI Ticket System: src/Generic/String/String.h Source File + + + + + + + + + +
+
+ + + + + + +
+
FMI Ticket System +
+
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 1 | Project Topic 4 |
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
String.h
+
+
+Go to the documentation of this file.
1#ifndef HEADER_STRING
+
2#define HEADER_STRING
+
3
+
8#include <istream>
+
9#include <ostream>
+
10
+
11class String {
+
12 char* str;
+
13 unsigned length;
+
14
+
15 void free();
+
16 void copyFrom(const String& other);
+
17
+
18public:
+
20 String(unsigned length);
+
22 String(const char* str);
+
24 const char* get_cstr() const;
+
26 unsigned get_length() const;
+
28 char& operator[](unsigned index);
+
29
+
31 String& operator+=(const char* str);
+
33 String& operator+=(unsigned number);
+
34
+
35 String();
+
36 String(const String& other);
+
37 String& operator=(const String& other);
+
38 ~String();
+
39
+
40 String(String&& other);
+
41 String& operator=(String&& other);
+
42
+
44 void read(std::istream& istr);
+
46 void write(std::ostream& ostr) const;
+
48 int compare(const String& other) const;
+
49
+
51 friend std::istream& operator>>(std::istream& istr, String& event);
+
53 friend std::ostream& operator<<(std::ostream& ostr, const String& event);
+
54};
+
55
+
56#endif
+
Definition: String.h:11
+
friend std::istream & operator>>(std::istream &istr, String &event)
Reads String from stream with >> operator.
Definition: String.cpp:153
+
const char * get_cstr() const
Returns internal C-style string.
Definition: String.cpp:35
+
int compare(const String &other) const
Compares two strings.
Definition: String.cpp:143
+
char & operator[](unsigned index)
Returns a character reference (from the underlying C-style string) at the given index.
Definition: String.cpp:43
+
String & operator+=(const char *str)
Appends a C-style string.
Definition: String.cpp:49
+
unsigned get_length() const
Returns number of characters in string.
Definition: String.cpp:39
+
void write(std::ostream &ostr) const
Writes String to stream.
Definition: String.cpp:135
+
friend std::ostream & operator<<(std::ostream &ostr, const String &event)
Writes String to stream with << operator.
Definition: String.cpp:165
+
void read(std::istream &istr)
Reads String from stream.
Definition: String.cpp:122
+
+ + + + -- cgit v1.3.1-23-gd82d