Lines 48-60
Link Here
|
48 |
|
48 |
|
49 |
#define C_MAX_SPRINTF_LENGTH 128 |
49 |
#define C_MAX_SPRINTF_LENGTH 128 |
50 |
|
50 |
|
|
|
51 |
class CTPP2DECL CDTConstIterator; |
52 |
class CTPP2DECL CDTIterator; |
53 |
|
51 |
/** |
54 |
/** |
52 |
@class CDT CDT.hpp <CDT.hpp> |
55 |
@class CDT CDT.hpp <CDT.hpp> |
53 |
@brief Common Data Type |
56 |
@brief Common Data Type |
54 |
*/ |
57 |
*/ |
55 |
class CTPP2DECL CDT |
58 |
class CTPP2DECL CDT |
56 |
{ |
59 |
{ |
57 |
private: |
60 |
public: |
58 |
/** |
61 |
/** |
59 |
@var typedef STLW::string<CDT> String |
62 |
@var typedef STLW::string<CDT> String |
60 |
@brief internal string definition |
63 |
@brief internal string definition |
Lines 72-78
Link Here
|
72 |
@brief internal hash definition |
75 |
@brief internal hash definition |
73 |
*/ |
76 |
*/ |
74 |
typedef STLW::map<String, CDT> Map; |
77 |
typedef STLW::map<String, CDT> Map; |
75 |
public: |
78 |
|
76 |
/** |
79 |
/** |
77 |
@enum eValType CDT.hpp <CDT.hpp> |
80 |
@enum eValType CDT.hpp <CDT.hpp> |
78 |
@brief Describes type of stored value |
81 |
@brief Describes type of stored value |
Lines 1768-1939
Link Here
|
1768 |
virtual ~SortingComparator() throw(); |
1771 |
virtual ~SortingComparator() throw(); |
1769 |
}; |
1772 |
}; |
1770 |
|
1773 |
|
1771 |
// FWD |
|
|
1772 |
class CTPP2DECL ConstIterator; |
1773 |
|
1774 |
/** |
1775 |
@class Iterator CDT.hpp <CDT.hpp> |
1776 |
@brief CDT[HASH] forward iterator |
1777 |
*/ |
1778 |
class CTPP2DECL Iterator |
1779 |
{ |
1780 |
private: |
1781 |
friend class CDT; |
1782 |
friend class ConstIterator; |
1783 |
|
1784 |
/** Hash iterator */ |
1785 |
CDT::Map::iterator itMap; |
1786 |
|
1787 |
/** |
1788 |
@brief Constructor |
1789 |
@param itIMap - map iterator |
1790 |
*/ |
1791 |
Iterator(CDT::Map::iterator itIMap); |
1792 |
public: |
1793 |
/** |
1794 |
@brief Copy constructor |
1795 |
@param oRhs - object to copy |
1796 |
*/ |
1797 |
Iterator(const Iterator & oRhs); |
1798 |
|
1799 |
/** |
1800 |
@brief Operator = |
1801 |
@param oRhs - object to copy |
1802 |
*/ |
1803 |
Iterator & operator=(const Iterator & oRhs); |
1804 |
|
1805 |
/** |
1806 |
@brief Pre-increment operator ++ |
1807 |
*/ |
1808 |
Iterator & operator++(); |
1809 |
|
1810 |
/** |
1811 |
@brief Post-increment operator ++ |
1812 |
*/ |
1813 |
Iterator operator++(int); |
1814 |
|
1815 |
/** |
1816 |
@brief Access operator |
1817 |
@return Pair of key => value |
1818 |
*/ |
1819 |
STLW::pair<const STLW::string, CDT> * operator->(); |
1820 |
|
1821 |
/** |
1822 |
@brief Comparison operator |
1823 |
@param oRhs - object to compare |
1824 |
@return true if objects are equal |
1825 |
*/ |
1826 |
bool operator ==(const Iterator & oRhs); |
1827 |
|
1828 |
/** |
1829 |
@brief Comparison operator |
1830 |
@param oRhs - object to compare |
1831 |
@return true if objects are NOT equal |
1832 |
*/ |
1833 |
bool operator !=(const Iterator & oRhs); |
1834 |
}; |
1835 |
|
1836 |
/** |
1774 |
/** |
1837 |
@brief Get iterator pointed to start of hash |
1775 |
@brief Get iterator pointed to start of hash |
1838 |
*/ |
1776 |
*/ |
1839 |
Iterator Begin(); |
1777 |
CDTIterator Begin(); |
1840 |
|
1778 |
|
1841 |
/** |
1779 |
/** |
1842 |
@brief Get iterator pointed to end of hash |
1780 |
@brief Get iterator pointed to end of hash |
1843 |
*/ |
1781 |
*/ |
1844 |
Iterator End(); |
1782 |
CDTIterator End(); |
1845 |
|
1783 |
|
1846 |
/** |
1784 |
/** |
1847 |
@brief Find element in hash |
1785 |
@brief Find element in hash |
1848 |
@param sKey - element name |
1786 |
@param sKey - element name |
1849 |
@return Iterator pointed to element or to end of hash if nothing found |
1787 |
@return Iterator pointed to element or to end of hash if nothing found |
1850 |
*/ |
1788 |
*/ |
1851 |
Iterator Find(const STLW::string & sKey); |
1789 |
CDTIterator Find(const STLW::string & sKey); |
1852 |
|
|
|
1853 |
/** |
1854 |
@class ConstIterator CDT.hpp <CDT.hpp> |
1855 |
@brief CDT[HASH] forward constant iterator |
1856 |
*/ |
1857 |
class CTPP2DECL ConstIterator |
1858 |
{ |
1859 |
private: |
1860 |
friend class CDT; |
1861 |
|
1862 |
/** Hash iterator */ |
1863 |
CDT::Map::const_iterator itMap; |
1864 |
|
1865 |
public: |
1866 |
/** |
1867 |
@brief Copy constructor |
1868 |
@param oRhs - object to copy |
1869 |
*/ |
1870 |
ConstIterator(const ConstIterator & oRhs); |
1871 |
|
1872 |
/** |
1873 |
@brief Type cast constructor |
1874 |
@param oRhs - object to copy |
1875 |
*/ |
1876 |
ConstIterator(const Iterator & oRhs); |
1877 |
|
1878 |
/** |
1879 |
@brief Operator = |
1880 |
@param oRhs - object to copy |
1881 |
*/ |
1882 |
ConstIterator & operator=(const ConstIterator & oRhs); |
1883 |
|
1884 |
/** |
1885 |
@brief Operator = |
1886 |
@param oRhs - object to copy |
1887 |
*/ |
1888 |
ConstIterator & operator=(const Iterator & oRhs); |
1889 |
|
1890 |
/** |
1891 |
@brief Pre-increment operator ++ |
1892 |
*/ |
1893 |
ConstIterator & operator++(); |
1894 |
|
1895 |
/** |
1896 |
@brief Post-increment operator ++ |
1897 |
*/ |
1898 |
ConstIterator operator++(int); |
1899 |
|
1900 |
/** |
1901 |
@brief Access operator |
1902 |
@return Pair of key => value |
1903 |
*/ |
1904 |
const STLW::pair<const STLW::string, CDT> * operator->() const; |
1905 |
|
1906 |
/** |
1907 |
@brief Comparison operator |
1908 |
@param oRhs - object to compare |
1909 |
@return true if objects are equal |
1910 |
*/ |
1911 |
bool operator ==(const ConstIterator & oRhs) const; |
1912 |
|
1913 |
/** |
1914 |
@brief Comparison operator |
1915 |
@param oRhs - object to compare |
1916 |
@return true if objects are NOT equal |
1917 |
*/ |
1918 |
bool operator !=(const ConstIterator & oRhs) const; |
1919 |
}; |
1920 |
|
1790 |
|
1921 |
/** |
1791 |
/** |
1922 |
@brief Get constant iterator pointed to start of hash |
1792 |
@brief Get constant iterator pointed to start of hash |
1923 |
*/ |
1793 |
*/ |
1924 |
ConstIterator Begin() const; |
1794 |
CDTConstIterator Begin() const; |
1925 |
|
1795 |
|
1926 |
/** |
1796 |
/** |
1927 |
@brief Get constant iterator pointed to end of hash |
1797 |
@brief Get constant iterator pointed to end of hash |
1928 |
*/ |
1798 |
*/ |
1929 |
ConstIterator End() const; |
1799 |
CDTConstIterator End() const; |
1930 |
|
1800 |
|
1931 |
/** |
1801 |
/** |
1932 |
@brief Find element in hash |
1802 |
@brief Find element in hash |
1933 |
@param sKey - element name |
1803 |
@param sKey - element name |
1934 |
@return Iterator pointed to element or to end of hash if nothing found |
1804 |
@return Iterator pointed to element or to end of hash if nothing found |
1935 |
*/ |
1805 |
*/ |
1936 |
ConstIterator Find(const STLW::string & sKey) const; |
1806 |
CDTConstIterator Find(const STLW::string & sKey) const; |
1937 |
|
1807 |
|
1938 |
/** |
1808 |
/** |
1939 |
@brief Try to cast value to integer or to IEEE floating point value |
1809 |
@brief Try to cast value to integer or to IEEE floating point value |
Lines 2009-2014
Link Here
|
2009 |
|
1879 |
|
2010 |
}; |
1880 |
}; |
2011 |
|
1881 |
|
|
|
1882 |
|
1883 |
/** |
1884 |
@class CDTIterator CDT.hpp <CDT.hpp> |
1885 |
@brief CDT[HASH] forward iterator |
1886 |
*/ |
1887 |
class CTPP2DECL CDTIterator |
1888 |
{ |
1889 |
private: |
1890 |
friend class CDT; |
1891 |
friend class CDTConstIterator; |
1892 |
|
1893 |
/** Hash iterator */ |
1894 |
CDT::Map::iterator itMap; |
1895 |
|
1896 |
/** |
1897 |
@brief Constructor |
1898 |
@param itIMap - map iterator |
1899 |
*/ |
1900 |
CDTIterator(CDT::Map::iterator itIMap); |
1901 |
public: |
1902 |
/** |
1903 |
@brief Copy constructor |
1904 |
@param oRhs - object to copy |
1905 |
*/ |
1906 |
CDTIterator(const CDTIterator & oRhs); |
1907 |
|
1908 |
/** |
1909 |
@brief Operator = |
1910 |
@param oRhs - object to copy |
1911 |
*/ |
1912 |
CDTIterator & operator=(const CDTIterator & oRhs); |
1913 |
|
1914 |
/** |
1915 |
@brief Pre-increment operator ++ |
1916 |
*/ |
1917 |
CDTIterator & operator++(); |
1918 |
|
1919 |
/** |
1920 |
@brief Post-increment operator ++ |
1921 |
*/ |
1922 |
CDTIterator operator++(int); |
1923 |
|
1924 |
/** |
1925 |
@brief Access operator |
1926 |
@return Pair of key => value |
1927 |
*/ |
1928 |
STLW::pair<const STLW::string, CDT> * operator->(); |
1929 |
|
1930 |
/** |
1931 |
@brief Comparison operator |
1932 |
@param oRhs - object to compare |
1933 |
@return true if objects are equal |
1934 |
*/ |
1935 |
bool operator ==(const CDTIterator & oRhs); |
1936 |
|
1937 |
/** |
1938 |
@brief Comparison operator |
1939 |
@param oRhs - object to compare |
1940 |
@return true if objects are NOT equal |
1941 |
*/ |
1942 |
bool operator !=(const CDTIterator & oRhs); |
1943 |
}; |
1944 |
|
1945 |
|
1946 |
/** |
1947 |
@class CDTConstIterator CDT.hpp <CDT.hpp> |
1948 |
@brief CDT[HASH] forward constant iterator |
1949 |
*/ |
1950 |
class CTPP2DECL CDTConstIterator |
1951 |
{ |
1952 |
private: |
1953 |
friend class CDT; |
1954 |
|
1955 |
/** Hash iterator */ |
1956 |
CDT::Map::const_iterator itMap; |
1957 |
|
1958 |
public: |
1959 |
/** |
1960 |
@brief Copy constructor |
1961 |
@param oRhs - object to copy |
1962 |
*/ |
1963 |
CDTConstIterator(const CDTConstIterator & oRhs); |
1964 |
|
1965 |
/** |
1966 |
@brief Type cast constructor |
1967 |
@param oRhs - object to copy |
1968 |
*/ |
1969 |
CDTConstIterator(const CDTIterator & oRhs); |
1970 |
|
1971 |
/** |
1972 |
@brief Operator = |
1973 |
@param oRhs - object to copy |
1974 |
*/ |
1975 |
CDTConstIterator & operator=(const CDTConstIterator & oRhs); |
1976 |
|
1977 |
/** |
1978 |
@brief Operator = |
1979 |
@param oRhs - object to copy |
1980 |
*/ |
1981 |
CDTConstIterator & operator=(const CDTIterator & oRhs); |
1982 |
|
1983 |
/** |
1984 |
@brief Pre-increment operator ++ |
1985 |
*/ |
1986 |
CDTConstIterator & operator++(); |
1987 |
|
1988 |
/** |
1989 |
@brief Post-increment operator ++ |
1990 |
*/ |
1991 |
CDTConstIterator operator++(int); |
1992 |
|
1993 |
/** |
1994 |
@brief Access operator |
1995 |
@return Pair of key => value |
1996 |
*/ |
1997 |
const STLW::pair<const STLW::string, CDT> * operator->() const; |
1998 |
|
1999 |
/** |
2000 |
@brief Comparison operator |
2001 |
@param oRhs - object to compare |
2002 |
@return true if objects are equal |
2003 |
*/ |
2004 |
bool operator ==(const CDTConstIterator & oRhs) const; |
2005 |
|
2006 |
/** |
2007 |
@brief Comparison operator |
2008 |
@param oRhs - object to compare |
2009 |
@return true if objects are NOT equal |
2010 |
*/ |
2011 |
bool operator !=(const CDTConstIterator & oRhs) const; |
2012 |
}; |
2013 |
|
2014 |
|
2012 |
// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2015 |
// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2013 |
// |
2016 |
// |
2014 |
// Realization |
2017 |
// Realization |