/* * * ProLinga-Validate * * Copyright (C) 2002-2008 Xobas Software. * All rights reserved. * * This file is part of ProLinga-Validate. * * ProLinga-Validate is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * ProLinga-Validate is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ProLinga-Validate. If not, see . * * More information is available at the following addresses: * * Website : http://www.prolinga.org * * Email : prolinga-list@prolinga.org * * */ #ifndef __VALIDATE_DOCUMENT_HPP #define __VALIDATE_DOCUMENT_HPP /* Proto Types */ xmlDocPtr ValidateDoc(const bool transformOnly, const char *applicationName, const char *fname); /* Loop List */ class LoopList { public: LoopList(); ~LoopList(); int getLoopStep(LoopList **loopPtr, int step); void putLoopStep(LoopList **loopPtr, int step, int value); void deleteList(LoopList **loopPtr); void printList(LoopList *loopPtr) const; private: int stepNo; int stepValue; LoopList *nextPtr; }; typedef LoopList *LoopListPtr; /* Control IF, ELSEIF, ELSE structure */ class ValIfElseStack { public: ValIfElseStack(); ~ValIfElseStack(); void push(ValIfElseStack **topPtr, int step); int pop(ValIfElseStack **topPtr); private: int stepNo; ValIfElseStack *nextPtr; }; typedef ValIfElseStack *ValIfElseStackPtr; /* Control ENDIF reference point */ class ValEndifStack { public: ValEndifStack(); ~ValEndifStack(); void push(ValEndifStack **topPtr, int step); int pop(ValEndifStack **topPtr); int getStep(ValEndifStack *topPtr); private: int stepNo; ValEndifStack *nextPtr; }; typedef ValEndifStack *ValEndifStackPtr; /* For/Forever/Foreach loop */ class ValForStack { public: ValForStack(); ~ValForStack(); void push(ValForStack **topPtr, int step); int pop(ValForStack **topPtr); int getValue(ValForStack **topPtr); private: int stepNo; ValForStack *nextPtr; }; typedef ValForStack *ValForStackPtr; /* Break (for) stack */ class ValBreakStack { public: ValBreakStack(); ~ValBreakStack(); void push(ValBreakStack **topPtr, int step); int pop(ValBreakStack **topPtr); int getValue(ValBreakStack **topPtr); private: int stepNo; ValBreakStack *nextPtr; }; typedef ValBreakStack *ValBreakStackPtr; /* Endfor loop */ class ValEndforStack { public: ValEndforStack(); ~ValEndforStack(); void push(ValEndforStack **topPtr, int step); int pop(ValEndforStack **topPtr); int getValue(ValEndforStack **topPtr); private: int stepNo; ValEndforStack *nextPtr; }; typedef ValEndforStack *ValEndforStackPtr; #endif /* __VALIDATE_DOCUMENT_HPP */