Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef LINE2DATA_H
- #define LINE2DATA_H
- #include <string> //strings
- #include <vector> //vectors
- #include <set>
- #include <unordered_set>
- #include <unordered_map>
- #include "../EntityHandler/EntityHandler.h"
- class line2data
- {
- public:
- //MEMBER VARIABLES
- //id of the thread
- size_t parentID;
- //contains the current entity string (which gets created character by character)
- std::string stepLine;
- //DEBUG/STATISTICS
- //this set contains all Ifclabels that will be found during the parsing
- std::set<std::string> LINELabels;
- //CON-/DESTRUCTORS
- line2data();
- ~line2data();
- //METHODS
- void parseBlock(std::vector<std::string>);
- private:
- //MEMBER VARIABLES
- EntityHandler entityHandler;
- //used to identify needed line entities
- bool interesting = false;
- //used to identity needed parameters within needed line entities
- std::vector<int8_t> interestingPositions;
- //used to map strings onto enums (for switch use)
- std::unordered_map<std::string, eLINEEntities> interestingEntities;
- //stores needed/interesting entities
- std::unordered_map<std::string, std::unique_ptr<classPtr>> foundEntities;
- //current entity id string used for index access
- std::string currentIndex = "";
- //
- //std::unordered_map<std::string, classPtr>
- int entities = 0;
- const char * cursorPosition;
- //METHODS
- //parse line
- void parseLine();
- //iterates over a string, positioning cursor at the end (captures string in the process)
- void parseEntityParameters();
- //handles strings properly
- void handleStrings();
- //get line id and position properly
- std::string getId();
- //get line entity and position properly
- std::string getEntity();
- //handles line entity parameters
- size_t handleEntityParameters();
- //gets the complete string (from ' till ')
- std::string finalizeString(bool);
- //get the complete number as string (all digits +1x occurence of a dot)
- std::string finalizeInt();
- //get the complete ENUM data as string
- std::string finalizeEnum();
- //get set of something as a string (everything except sets of references)
- std::string finalizeSet(size_t);
- //finalize line subentity
- std::string finalizeIfcSubentity();
- };
- #endif // LINE2DATA_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement