R-Type  2
Doom but in better
Loading...
Searching...
No Matches
No.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2024
3** rtype (Workspace)
4** File description:
5** No.hpp
6*/
7
14#pragma once
15#include <string>
16#include <exception>
17
18#include "Recoded.hpp"
19
20
21namespace CustomExceptions
22{
28 class NoFlagParameter : public std::exception {
29 public:
35 NoFlagParameter(const std::string &error = "");
45 const char *what() const noexcept;
46
47 private:
48 std::string _msg;
49 const char *_buffer;
50 };
51
57 class NoWindow : public std::exception {
58 public:
65 NoWindow(const std::string &exceptionDetail = "");
70 ~NoWindow();
75 const char *what() const noexcept;
76
77 private:
78 std::string _msg;
79 const char *_buffer;
80 };
81
87 class NoEventManager : public std::exception {
88 public:
95 NoEventManager(const std::string &exceptionDetail = "");
105 const char *what() const noexcept;
106
107 private:
108 std::string _msg;
109 const char *_buffer;
110 };
111
117 class NoSpriteSheet : public std::exception {
118 public:
125 NoSpriteSheet(const std::string &exceptionDetail = "");
135 const char *what() const noexcept;
136
137 private:
138 std::string _msg;
139 const char *_buffer;
140 };
141
147 class NoIcon : public std::exception {
148 public:
155 NoIcon(const std::string &exceptionDetail = "");
160 ~NoIcon();
165 const char *what() const noexcept;
166
167 private:
168 std::string _msg;
169 const char *_buffer;
170 };
171
177 class NoBackground : public std::exception {
178 public:
185 NoBackground(const std::string &exceptionDetail = "");
195 const char *what() const noexcept;
196
197 private:
198 std::string _msg;
199 const char *_buffer;
200 };
201
207 class NoCollision : public std::exception {
208 public:
216 NoCollision(const std::string &exceptionDetail = "");
221 ~NoCollision();
226 const char *what() const noexcept;
227
228 private:
229 std::string _msg;
230 const char *_buffer;
231 };
232
238 class NoAnimation : public std::exception {
239 public:
246 NoAnimation(const std::string &exceptionDetail = "");
251 ~NoAnimation();
256 const char *what() const noexcept;
257
258 private:
259 std::string _msg;
260 const char *_buffer;
261 };
262
268 class NoAnimationFrames : public std::exception {
269 public:
276 NoAnimationFrames(const std::string &exceptionDetail = "");
286 const char *what() const noexcept;
287
288 private:
289 std::string _msg;
290 const char *_buffer;
291 };
292
298 class NoSprite : public std::exception {
299 public:
306 NoSprite(const std::string &exceptionDetail = "");
311 ~NoSprite();
316 const char *what() const noexcept;
317
318 private:
319 std::string _msg;
320 const char *_buffer;
321 };
322
328 class NoButton : public std::exception {
329 public:
336 NoButton(const std::string &exceptionDetail = "");
341 ~NoButton();
346 const char *what() const noexcept;
347
348 private:
349 std::string _msg;
350 const char *_buffer;
351 };
352
358 class NoFont : public std::exception {
359 public:
366 NoFont(const std::string &fontName = "", const std::string &exceptionDetail = "");
371 ~NoFont();
376 const char *what() const noexcept;
377
378 private:
379 std::string _msg;
380 const char *_buffer;
381 };
382
388 class NoColour : public std::exception {
389 public:
395 NoColour(const std::string &exceptionDetail = "");
400 ~NoColour();
405 const char *what() const noexcept;
406
407 private:
408 std::string _msg;
409 const char *_buffer;
410 };
411
417 class NoText : public std::exception {
418 public:
424 NoText(const std::string &errorReason = "");
429 ~NoText();
434 const char *what() const noexcept;
435
436 private:
437 std::string _msg;
438 const char *_buffer;
439 };
440
446 class NoTexture : public std::exception {
447 public:
453 NoTexture(const std::string &errorReason = "");
458 ~NoTexture();
463 const char *what() const noexcept;
464
465 private:
466 std::string _msg;
467 const char *_buffer;
468 };
469
475 class NoRenderableText : public std::exception {
476 public:
483 NoRenderableText(const std::string &errorReason = "");
493 const char *what() const noexcept;
494
495 private:
496 std::string _msg;
497 const char *_buffer;
498 };
499
505 class NoRenderableShape : public std::exception {
506 public:
512 NoRenderableShape(const std::string &errorReason = "");
522 const char *what() const noexcept;
523
524 private:
525 std::string _msg;
526 const char *_buffer;
527 };
528
534 class NoRenderableImage : public std::exception {
535 public:
541 NoRenderableImage(const std::string &errorReason = "");
551 const char *what() const noexcept;
552
553 private:
554 std::string _msg;
555 const char *_buffer;
556 };
557
563 class NoRenderableSprite : public std::exception {
564 public:
570 NoRenderableSprite(const std::string &errorReason = "");
580 const char *what() const noexcept;
581
582 private:
583 std::string _msg;
584 const char *_buffer;
585 };
586
592 class NoRenderableButton : public std::exception {
593 public:
599 NoRenderableButton(const std::string &errorReason = "");
609 const char *what() const noexcept;
610
611 private:
612 std::string _msg;
613 const char *_buffer;
614 };
615
616
623 class NoTitleFontConfiguration : public std::exception {
624 public:
630 NoTitleFontConfiguration(const std::string &tomlPath = "");
640 const char *what() const noexcept;
641
642 private:
643 std::string _msg;
644 const char *_buffer;
645 };
646
653 class NoBodyFontConfiguration : public std::exception {
654 public:
660 NoBodyFontConfiguration(const std::string &tomlPath = "");
670 const char *what() const noexcept;
671
672 private:
673 std::string _msg;
674 const char *_buffer;
675 };
676
683 class NoDefaultFontConfiguration : public std::exception {
684 public:
690 NoDefaultFontConfiguration(const std::string &tomlPath = "");
700 const char *what() const noexcept;
701
702 private:
703 std::string _msg;
704 const char *_buffer;
705 };
706
713 class NoButtonFontConfiguration : public std::exception {
714 public:
720 NoButtonFontConfiguration(const std::string &tomlPath = "");
730 const char *what() const noexcept;
731
732 private:
733 std::string _msg;
734 const char *_buffer;
735 };
736
742 class NoTOML : public std::exception {
743 public:
749 NoTOML(const std::string &tomlPath = "");
754 ~NoTOML();
759 const char *what() const noexcept;
760
761 private:
762 std::string _msg;
763 const char *_buffer;
764 };
765
766
772 class NoTOMLKey : public std::exception {
773 public:
780 NoTOMLKey(const std::string &tomlPath = "", const std::string &tomlKey = "");
785 ~NoTOMLKey();
790 const char *what() const noexcept;
791
792 private:
793 std::string _msg;
794 const char *_buffer;
795 };
801 class NoSpritesInConfigFile : public std::exception {
802 public:
809 NoSpritesInConfigFile(const std::string &tomlPath = "", const std::string &tomlKey = "");
819 const char *what() const noexcept;
820
821 private:
822 std::string _msg;
823 const char *_buffer;
824 };
825
831 class NoMusicInConfigFile : public std::exception {
832 public:
839 NoMusicInConfigFile(const std::string &tomlPath = "", const std::string &tomlKey = "");
849 const char *what() const noexcept;
850
851 private:
852 std::string _msg;
853 const char *_buffer;
854 };
855
861 class NoFontInConfigFile : public std::exception {
862 public:
869 NoFontInConfigFile(const std::string &tomlPath = "", const std::string &tomlKey = "");
875 const char *what() const noexcept;
876
877 private:
878 std::string _msg;
879 const char *_buffer;
880 };
881
887 class NoIconInConfigFile : public std::exception {
888 public:
895 NoIconInConfigFile(const std::string &tomlPath = "", const std::string &tomlKey = "");
901 const char *what() const noexcept;
902
903 private:
904 std::string _msg;
905 const char *_buffer;
906 };
907
913 class NoBackgroundInConfigFile : public std::exception {
914 public:
921 NoBackgroundInConfigFile(const std::string &tomlPath = "", const std::string &tomlKey = "");
927 const char *what() const noexcept;
928
929 private:
930 std::string _msg;
931 const char *_buffer;
932 };
933
939 class NoActiveNetworkThread : public std::exception {
940 public:
946 NoActiveNetworkThread(const std::string &exceptionDetails = "");
952 const char *what() const noexcept;
953
954 private:
955 std::string _msg;
956 const char *_buffer;
957 };
958
964 class NoNetworkClass : public std::exception {
965 public:
971 NoNetworkClass(const std::string &exceptionDetails = "");
977 const char *what() const noexcept;
978
979 private:
980 std::string _msg;
981 const char *_buffer;
982 };
983}
This is an agglomerator in which all the files from Recoded folder will be included.
This is the class in charge of informing the user that the program could not find any active threads ...
Definition No.hpp:939
NoActiveNetworkThread(const std::string &exceptionDetails="")
Construct a new No Active Network Thread object.
Definition No.cpp:548
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:559
This is the class in charge of informing the user that there are no frames for the animation.
Definition No.hpp:268
~NoAnimationFrames()
Destroy the No Animation Frames object.
Definition No.cpp:161
NoAnimationFrames(const std::string &exceptionDetail="")
Construct a new No Animation Frames object.
Definition No.cpp:152
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:163
This is the class in charge of informing the user that they tried to access a non-existant animation ...
Definition No.hpp:238
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:147
NoAnimation(const std::string &exceptionDetail="")
Construct a new No Animation object.
Definition No.cpp:136
~NoAnimation()
Destroy the No Animation object.
Definition No.cpp:145
This is the class in charge of informing the user that the program could not find the Background sect...
Definition No.hpp:913
NoBackgroundInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Background In Config File object.
Definition No.cpp:529
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:543
This is the class in charge of informing the user that they tried to access a non-existant background...
Definition No.hpp:177
NoBackground(const std::string &exceptionDetail="")
Construct a new No Sprite Sheet object.
Definition No.cpp:102
~NoBackground()
Destroy the No Sprite Sheet object.
Definition No.cpp:113
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:115
This is the class in charge of informing the user that there is no configuration for the font in char...
Definition No.hpp:653
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:377
NoBodyFontConfiguration(const std::string &tomlPath="")
Construct a new No Body Font Configuration object.
Definition No.cpp:365
~NoBodyFontConfiguration()
Destroy the No Body Font Configuration object.
Definition No.cpp:375
This is the class in charge of informing the user that there is no configuration for the font in char...
Definition No.hpp:713
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:411
~NoButtonFontConfiguration()
Destroy the No Default Font Configuration object.
Definition No.cpp:409
NoButtonFontConfiguration(const std::string &tomlPath="")
Construct a new No Default Font Configuration object.
Definition No.cpp:399
This is the class in charge of informing the user that they tried to access a non-existant Button cla...
Definition No.hpp:328
~NoButton()
Destroy the No Button object.
Definition No.cpp:193
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:195
NoButton(const std::string &exceptionDetail="")
Construct a new No Button object.
Definition No.cpp:184
This is the class in charge of informing the user that they tried to access a non-existant collision ...
Definition No.hpp:207
NoCollision(const std::string &exceptionDetail="")
Construct a new No Collision object.
Definition No.cpp:120
~NoCollision()
Destroy the No Collision object.
Definition No.cpp:129
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:131
This is the class in charge of informing the user that they tried to access a non-existant colour ins...
Definition No.hpp:388
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:231
~NoColour()
Destroy the No Colour object.
Definition No.cpp:229
NoColour(const std::string &exceptionDetail="")
Construct a new No Colour object.
Definition No.cpp:220
This is the class in charge of informing the user that there is no configuration for the font in char...
Definition No.hpp:683
~NoDefaultFontConfiguration()
Destroy the No Default Font Configuration object.
Definition No.cpp:392
NoDefaultFontConfiguration(const std::string &tomlPath="")
Construct a new No Default Font Configuration object.
Definition No.cpp:382
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:394
This is the class in charge of informing the user that they tried to access a non-existant Event Mana...
Definition No.hpp:87
~NoEventManager()
Destroy the No Event Manager object.
Definition No.cpp:59
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:61
NoEventManager(const std::string &exceptionDetail="")
Construct a new No Event Manager object.
Definition No.cpp:50
This is the class in charge of informing the user was supposed to pass a parameter along with the fla...
Definition No.hpp:28
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:29
NoFlagParameter(const std::string &error="")
Construct a new No Flag Parameter object.
Definition No.cpp:19
~NoFlagParameter()
Destroy the No Flag Parameter object.
Definition No.cpp:27
This is the class in charge of informing the user that the program could not find the font section in...
Definition No.hpp:861
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:505
NoFontInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Font In Config File object.
Definition No.cpp:491
This is the class in charge of informing the user that they tried to access a non-existant font insta...
Definition No.hpp:358
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:215
~NoFont()
Destroy the No Font object.
Definition No.cpp:213
NoFont(const std::string &fontName="", const std::string &exceptionDetail="")
Construct a new No Font object.
Definition No.cpp:200
This is the class in charge of informing the user that the program could not find the Icon section in...
Definition No.hpp:887
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:524
NoIconInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Icon In Config File object.
Definition No.cpp:510
This is the class in charge of informing the user that they tried to access a non-existant Icon.
Definition No.hpp:147
NoIcon(const std::string &exceptionDetail="")
Construct a new No Sprite Sheet object.
Definition No.cpp:84
~NoIcon()
Destroy the No Sprite Sheet object.
Definition No.cpp:95
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:97
This is the class in charge of informing the user that the program could not find the music section i...
Definition No.hpp:831
~NoMusicInConfigFile()
Destroy the No Music In Config File object.
Definition No.cpp:484
NoMusicInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Music In Config File object.
Definition No.cpp:472
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:486
This is the class in charge of informing the user that the program could not find any network class i...
Definition No.hpp:964
NoNetworkClass(const std::string &exceptionDetails="")
Construct a new No Network Class object.
Definition No.cpp:564
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:575
This is the class in charge of informing the user that they tried to render a non-existing Button com...
Definition No.hpp:592
~NoRenderableButton()
Destroy the No Renderable Button object.
Definition No.cpp:341
NoRenderableButton(const std::string &errorReason="")
Construct a new No Renderable Button object.
Definition No.cpp:332
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:343
This is the class in charge of informing the user that they tried to render a non-existing Image comp...
Definition No.hpp:534
NoRenderableImage(const std::string &errorReason="")
Construct a new No Renderable Image object.
Definition No.cpp:300
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:311
~NoRenderableImage()
Destroy the No Renderable Image object.
Definition No.cpp:309
This is the class in charge of informing the user that they tried to render a non-existing Shape comp...
Definition No.hpp:505
NoRenderableShape(const std::string &errorReason="")
Construct a new No Renderable Shape object.
Definition No.cpp:284
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:295
~NoRenderableShape()
Destroy the No Renderable Shape object.
Definition No.cpp:293
This is the class in charge of informing the user that they tried to render a non-existing Sprite com...
Definition No.hpp:563
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:327
~NoRenderableSprite()
Destroy the No Renderable Sprite object.
Definition No.cpp:325
NoRenderableSprite(const std::string &errorReason="")
Construct a new No Renderable Sprite object.
Definition No.cpp:316
This is the class in charge of informing the user that they tried to render a non-existing text compo...
Definition No.hpp:475
~NoRenderableText()
Destroy the No Renderable Text object.
Definition No.cpp:277
NoRenderableText(const std::string &errorReason="")
Construct a new No Renderable Text object.
Definition No.cpp:268
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:279
This is the class in charge of informing the user that they tried to access a non-existant spriteshee...
Definition No.hpp:117
~NoSpriteSheet()
Destroy the No Sprite Sheet object.
Definition No.cpp:77
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:79
NoSpriteSheet(const std::string &exceptionDetail="")
Construct a new No Sprite Sheet object.
Definition No.cpp:66
This is the class in charge of informing the user that they tried to access a non-existant animation ...
Definition No.hpp:298
~NoSprite()
Destroy the No Sprite object.
Definition No.cpp:177
NoSprite(const std::string &exceptionDetail="")
Construct a new No Sprite object.
Definition No.cpp:168
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:179
This is the class in charge of informing the user that the program could not find the sprite section ...
Definition No.hpp:801
~NoSpritesInConfigFile()
Destroy the No Sprites In Config File object.
Definition No.cpp:465
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:467
NoSpritesInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Sprites In Config File object.
Definition No.cpp:453
This is the class in charge of informing the user that they tried to access a non-existant toml key i...
Definition No.hpp:772
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:448
~NoTOMLKey()
Destroy the No toml Key object.
Definition No.cpp:446
NoTOMLKey(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No toml Key object.
Definition No.cpp:433
This is the class in charge of informing the user that they tried to access a non-existant toml insta...
Definition No.hpp:742
NoTOML(const std::string &tomlPath="")
Construct a new No toml object.
Definition No.cpp:416
~NoTOML()
Destroy the No toml object.
Definition No.cpp:426
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:428
This is the class in charge of informing the user that they tried to access a non-existant text insta...
Definition No.hpp:417
~NoText()
Destroy the No Text object.
Definition No.cpp:245
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:247
NoText(const std::string &errorReason="")
Construct a new No Text object.
Definition No.cpp:236
This is the class in charge of informing the user that they tried to access a non-existant texture in...
Definition No.hpp:446
~NoTexture()
Destroy the No Texture object.
Definition No.cpp:261
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:263
NoTexture(const std::string &errorReason="")
Construct a new No Texture object.
Definition No.cpp:252
This is the class in charge of informing the user that there is no configuration for the font in char...
Definition No.hpp:623
~NoTitleFontConfiguration()
Destroy the No Title Font Configuration object.
Definition No.cpp:358
NoTitleFontConfiguration(const std::string &tomlPath="")
Construct a new No Title Font Configuration object.
Definition No.cpp:348
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:360
This is the class in charge of informing the user that they tried to access a non-existant window.
Definition No.hpp:57
~NoWindow()
Destroy the No Window object.
Definition No.cpp:43
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:45
NoWindow(const std::string &exceptionDetail="")
Construct a new No Window object.
Definition No.cpp:34