// FileParser.h: interface for the CFileParser class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_FILEPARSER_H__AA0B3902_B81D_4D73_A292_F59F271DB794__INCLUDED_) #define AFX_FILEPARSER_H__AA0B3902_B81D_4D73_A292_F59F271DB794__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "GameEngine.h" class CFileParser { private: int getConditionType(char *sz); struct File{ char * fileName; char * content; int count; }; struct Property{ char name[16]; char value[16]; }; struct Object{ char name[16]; Property ** properties; int countProperties; char *content; }; File ** files; int filesCount; OrgCompound** resultCompounds; int countResultCompounds; OrgCompound** originalCompounds; int countOriginalCompounds; int currentlyEditingCompound; int currentlyEditingCompoundEarlyElemementsCount; void condensate(char *content, int fromObject, OrgCompound *fromCompound, int toObject, OrgCompound *toCompound); bool searchToCondensate(void * orgObject,char * content,char *rules,void *objectPassedThrough); void removeFromCompound(void *orgObject,void *fromObject,int type); void addToCompound(void* object,char* content); bool loadContent(char *szName,File *file); bool CheckNReplaceInner(void *orgObject, OrgElement **elements, char *content,void *fromObject); bool CheckNReplace(void *orgObject, OrgElement **elements, char *content,void *fromObject); bool justCheck(void *orgObject, OrgElement **elements, char *content,void *fromObject); public: int getInorgType(char *sz); void startReaction(CompoundCollection*** collections,int * countCollections,Entity **inorgCompounds,int countInorgCompounds,Entity ** conditions,int countConditions,int* &alreadyDone,int startFrom=1); int getElementType(char *szType); OrgElement* getConnectedElementIndex(OrgElement* from, OrgBond* bond,OrgCompound* compound); bool setLinks(int indexElement,Link*** links,int *countLinks,OrgCompound* compound); void setNumberForLevel(int indexOfElement,OrgElement *orgElement, OrgChain *chain, int *levels, OrgElement **elements,int countElements,OrgBond** bonds,int countBonds); bool CheckForExist(void *orgObject,OrgElement ** elements,char* content); void getProperties(char* content,Object ** &object,int* countObjects); void SetLevels(OrgElement *orgElement,int* levels,OrgElement** elements,int countElements,OrgBond** bonds,int countBonds); CFileParser(char * szFileName,char* szPath); virtual ~CFileParser(); }; #endif // !defined(AFX_FILEPARSER_H__AA0B3902_B81D_4D73_A292_F59F271DB794__INCLUDED_)