source: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XMLLightFunctors.h @ 88

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1#ifndef _XMLLIGHT_FUNCTORS
2#define _XMLLIGHT_FUNCTORS
3
4#include "Behavioural/include/IXMLLight.h"
5
6namespace morpheo {
7        namespace XMLUtils {
8               
9        //******************************************CLASS DECLARATION**************************************//
10       
11                // enum to enumerate some XML tags playing a part within parsing process.
12                enum EXML_DELIMITOR {
13                        BEGIN_TAG = '<', 
14                        SECOND_TAG = '/',
15                        END_TAG = '>'
16                };
17
18                // functor class used inside XML parsing algorithm
19                class XMLLightComparator {
20                public:
21                        bool operator () ( char firstChar, char secondChar ) ; 
22               
23                };
24               
25                // Deleter is a functor to handle deletion algorithm of XMLLightVector
26                                       
27                template<typename T> class XMLLightDeleter {
28                public: 
29                        inline T * operator() ( T *);
30                };
31               
32        //*********************************** INLINE DEFINITION*********************************************//
33       
34                //definition of Deleter functor
35                template <typename T> T* XMLLightDeleter<T>::operator() ( T * xmlLightPointer )
36                {
37                        xmlLightPointer -> detach();
38                        //delete xmlLightPointer ;
39                        return NULL; 
40                }
41
42        } // end of namespace XMLUtils.
43} // end of morpheo's namespace.
44
45#endif // _XMLLIGHT_FUNCTORS
46
Note: See TracBrowser for help on using the repository browser.