doxygen @ tags replaced to \
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pifft_p.h
|
/*! \file pifft_p.h
|
||||||
* @brief Class for FFT, IFFT and Hilbert transformations
|
* \brief Class for FFT, IFFT and Hilbert transformations
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include "pibroadcast.h"
|
#include "pibroadcast.h"
|
||||||
|
|
||||||
/** \class PIBroadcast
|
/** \class PIBroadcast
|
||||||
* @brief Broadcast for all interfaces, including loopback
|
* \brief Broadcast for all interfaces, including loopback
|
||||||
*
|
*
|
||||||
* \section PIBroadcast_synopsis Synopsis
|
* \section PIBroadcast_synopsis Synopsis
|
||||||
* %PIBroadcast used as multichannel IO device. It can use
|
* %PIBroadcast used as multichannel IO device. It can use
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \class PIEthUtilBase
|
/** \class PIEthUtilBase
|
||||||
* @brief Base class for ethernet utils
|
* \brief Base class for ethernet utils
|
||||||
*
|
*
|
||||||
* \section PIEthUtilBase_synopsis Synopsis
|
* \section PIEthUtilBase_synopsis Synopsis
|
||||||
* %PIEthUtilBase provides crypt layer for derived classes:
|
* %PIEthUtilBase provides crypt layer for derived classes:
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \class PIStreamPacker
|
/** \class PIStreamPacker
|
||||||
* @brief Simple packet wrap aroud any PIIODevice
|
* \brief Simple packet wrap aroud any PIIODevice
|
||||||
*
|
*
|
||||||
* \section PIStreamPacker_synopsis Synopsis
|
* \section PIStreamPacker_synopsis Synopsis
|
||||||
* %PIStreamPacker provides simple pack/unpack logic for any data packets.
|
* %PIStreamPacker provides simple pack/unpack logic for any data packets.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picloudbase.h
|
/*! \file picloudbase.h
|
||||||
* @brief PICloud Base - Base class for PICloudClient and PICloud Server
|
* \brief PICloud Base - Base class for PICloudClient and PICloud Server
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picloudclient.h
|
/*! \file picloudclient.h
|
||||||
* @brief PICloud Client
|
* \brief PICloud Client
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
#include "piconditionvar.h"
|
#include "piconditionvar.h"
|
||||||
|
|
||||||
|
|
||||||
//! @brief PICloudClient
|
//! \brief PICloudClient
|
||||||
|
|
||||||
class PIP_CLOUD_EXPORT PICloudClient: public PIIODevice, public PICloudBase
|
class PIP_CLOUD_EXPORT PICloudClient: public PIIODevice, public PICloudBase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picloudserver.h
|
/*! \file picloudserver.h
|
||||||
* @brief PICloud Server
|
* \brief PICloud Server
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picloudtcp.h
|
/*! \file picloudtcp.h
|
||||||
* @brief PICloud TCP transport
|
* \brief PICloud TCP transport
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picodeinfo.h
|
/*! \file picodeinfo.h
|
||||||
* @brief C++ code info structs
|
* \brief C++ code info structs
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picodeparser.h
|
/*! \file picodeparser.h
|
||||||
* @brief C++ code parser
|
* \brief C++ code parser
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picompress.h
|
/*! \file picompress.h
|
||||||
* @brief Compress class using zlib
|
* \brief Compress class using zlib
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \class PIKbdListener
|
/** \class PIKbdListener
|
||||||
* @brief Keyboard console input listener
|
* \brief Keyboard console input listener
|
||||||
* \details This class provide listening of console keyboard input.
|
* \details This class provide listening of console keyboard input.
|
||||||
* There is two ways to receive pressed key:
|
* There is two ways to receive pressed key:
|
||||||
* * external static function with format "void func(char key, void * data_)"
|
* * external static function with format "void func(char key, void * data_)"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pikbdlistener.h
|
/*! \file pikbdlistener.h
|
||||||
* @brief Keyboard console input listener
|
* \brief Keyboard console input listener
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -181,20 +181,20 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void enableExitCapture(int key = 'Q')
|
//! \fn void enableExitCapture(int key = 'Q')
|
||||||
//! @brief Enable exit key "key" awaiting
|
//! \brief Enable exit key "key" awaiting
|
||||||
|
|
||||||
//! \fn void disableExitCapture()
|
//! \fn void disableExitCapture()
|
||||||
//! @brief Disable exit key awaiting
|
//! \brief Disable exit key awaiting
|
||||||
|
|
||||||
//! \fn void setActive(bool yes = true)
|
//! \fn void setActive(bool yes = true)
|
||||||
//! @brief Set keyboard listening is active or not
|
//! \brief Set keyboard listening is active or not
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
//! \events
|
//! \events
|
||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void keyPressed(PIKbdListener::KeyEvent key, void * data)
|
//! \fn void keyPressed(PIKbdListener::KeyEvent key, void * data)
|
||||||
//! @brief Raise on key "key" pressed, "data" is custom data
|
//! \brief Raise on key "key" pressed, "data" is custom data
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piscreen.h
|
/*! \file piscreen.h
|
||||||
* @brief Console GUI class
|
* \brief Console GUI class
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -80,23 +80,23 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void waitForFinish()
|
//! \fn void waitForFinish()
|
||||||
//! @brief block until finished (exit key will be pressed)
|
//! \brief block until finished (exit key will be pressed)
|
||||||
|
|
||||||
//! \fn void start(bool wait = false)
|
//! \fn void start(bool wait = false)
|
||||||
//! @brief Start console output and if "wait" block until finished (exit key will be pressed)
|
//! \brief Start console output and if "wait" block until finished (exit key will be pressed)
|
||||||
|
|
||||||
//! \fn void stop(bool clear = false)
|
//! \fn void stop(bool clear = false)
|
||||||
//! @brief Stop console output and if "clear" clear the screen
|
//! \brief Stop console output and if "clear" clear the screen
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
//! \events
|
//! \events
|
||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void keyPressed(PIKbdListener::KeyEvent key, void * data)
|
//! \fn void keyPressed(PIKbdListener::KeyEvent key, void * data)
|
||||||
//! @brief Raise on key "key" pressed, "data" is pointer to %PIConsole object
|
//! \brief Raise on key "key" pressed, "data" is pointer to %PIConsole object
|
||||||
|
|
||||||
//! \fn void tileEvent(PIScreenTile * tile, PIScreenTypes::TileEvent e)
|
//! \fn void tileEvent(PIScreenTile * tile, PIScreenTypes::TileEvent e)
|
||||||
//! @brief Raise on some event "e" from tile "tile"
|
//! \brief Raise on some event "e" from tile "tile"
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piscreenconsole.h
|
/*! \file piscreenconsole.h
|
||||||
* @brief Tile for PIScreen with PIConsole API
|
* \brief Tile for PIScreen with PIConsole API
|
||||||
*
|
*
|
||||||
* This file declares TileVars
|
* This file declares TileVars
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piscreendrawer.h
|
/*! \file piscreendrawer.h
|
||||||
* @brief Drawer for PIScreen
|
* \brief Drawer for PIScreen
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piscreentile.h
|
/*! \file piscreentile.h
|
||||||
* @brief Basic PIScreen tile
|
* \brief Basic PIScreen tile
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piscreentiles.h
|
/*! \file piscreentiles.h
|
||||||
* @brief Various tiles for PIScreen
|
* \brief Various tiles for PIScreen
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piscreentypes.h
|
/*! \file piscreentypes.h
|
||||||
* @brief Types for PIScreen
|
* \brief Types for PIScreen
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piterminal.h
|
/*! \file piterminal.h
|
||||||
* @brief Virtual terminal
|
* \brief Virtual terminal
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
/*!@brief Macro for iterate any container
|
/*!\brief Macro for iterate any container
|
||||||
* \details Use this macros instead of standard "for"
|
* \details Use this macros instead of standard "for"
|
||||||
* to get read/write access to each element of container.
|
* to get read/write access to each element of container.
|
||||||
* Pass direction is direct \n
|
* Pass direction is direct \n
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
*/
|
*/
|
||||||
# define piForeach(i,c)
|
# define piForeach(i,c)
|
||||||
|
|
||||||
/*!@brief Macro for iterate any container only for read
|
/*!\brief Macro for iterate any container only for read
|
||||||
* \details Use this macros instead of standard "for"
|
* \details Use this macros instead of standard "for"
|
||||||
* to get read access to each element of container.
|
* to get read access to each element of container.
|
||||||
* Pass direction is direct \n
|
* Pass direction is direct \n
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
*/
|
*/
|
||||||
# define piForeachC(i,c)
|
# define piForeachC(i,c)
|
||||||
|
|
||||||
/*!@brief Macro for iterate any container with reverse direction
|
/*!\brief Macro for iterate any container with reverse direction
|
||||||
* \details Use this macros instead of standard "for"
|
* \details Use this macros instead of standard "for"
|
||||||
* to get read/write access to each element of container.
|
* to get read/write access to each element of container.
|
||||||
* Pass direction is reverse \n
|
* Pass direction is reverse \n
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
*/
|
*/
|
||||||
# define piForeachR(i,c)
|
# define piForeachR(i,c)
|
||||||
|
|
||||||
/*!@brief Macro for iterate any container only for read with reverse direction
|
/*!\brief Macro for iterate any container only for read with reverse direction
|
||||||
* \details Use this macros instead of standard "for"
|
* \details Use this macros instead of standard "for"
|
||||||
* to get read access to each element of container.
|
* to get read access to each element of container.
|
||||||
* Pass direction is reverse \n
|
* Pass direction is reverse \n
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pideque.h
|
/*! \file pideque.h
|
||||||
* @brief Dynamic array of any type
|
* \brief Dynamic array of any type
|
||||||
*
|
*
|
||||||
* This file declares PIDeque
|
* This file declares PIDeque
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/** \class PIMap
|
/** \class PIMap
|
||||||
* @brief Associative array
|
* \brief Associative array
|
||||||
* \details This class used to store Key = Value array of any
|
* \details This class used to store Key = Value array of any
|
||||||
* type of data. \a value() returns value for key and leave map
|
* type of data. \a value() returns value for key and leave map
|
||||||
* unchaged in any case. \a operator [] create entry in map if
|
* unchaged in any case. \a operator [] create entry in map if
|
||||||
@@ -9,97 +9,97 @@
|
|||||||
* \a makeIterator() and \a makeReverseIterator().
|
* \a makeIterator() and \a makeReverseIterator().
|
||||||
|
|
||||||
* \fn PIMap::PIMap();
|
* \fn PIMap::PIMap();
|
||||||
* @brief Contructs an empty map
|
* \brief Contructs an empty map
|
||||||
|
|
||||||
* \fn PIMap::PIMap(const PIMap & other);
|
* \fn PIMap::PIMap(const PIMap & other);
|
||||||
* @brief Contructs a copy of "other"
|
* \brief Contructs a copy of "other"
|
||||||
|
|
||||||
* \fn PIMap & PIMap::operator =(const PIMap & other);
|
* \fn PIMap & PIMap::operator =(const PIMap & other);
|
||||||
* @brief Copy operator
|
* \brief Copy operator
|
||||||
|
|
||||||
* \fn PIMap::PIMap(const PIMap & other);
|
* \fn PIMap::PIMap(const PIMap & other);
|
||||||
* @brief Contructs a copy of "other"
|
* \brief Contructs a copy of "other"
|
||||||
|
|
||||||
* \fn PIMapIterator PIMap::makeIterator() const
|
* \fn PIMapIterator PIMap::makeIterator() const
|
||||||
* @brief Returns PIMapIterator for this map
|
* \brief Returns PIMapIterator for this map
|
||||||
|
|
||||||
* \fn PIMapIterator PIMap::makeReverseIterator() const
|
* \fn PIMapIterator PIMap::makeReverseIterator() const
|
||||||
* @brief Returns reverse PIMapIterator for this map
|
* \brief Returns reverse PIMapIterator for this map
|
||||||
|
|
||||||
|
|
||||||
* \fn size_t PIMap::size() const
|
* \fn size_t PIMap::size() const
|
||||||
* @brief Returns entries count
|
* \brief Returns entries count
|
||||||
|
|
||||||
* \fn int PIMap::size_s() const
|
* \fn int PIMap::size_s() const
|
||||||
* @brief Returns entries count
|
* \brief Returns entries count
|
||||||
|
|
||||||
* \fn size_t PIMap::length() const
|
* \fn size_t PIMap::length() const
|
||||||
* @brief Returns entries count
|
* \brief Returns entries count
|
||||||
|
|
||||||
* \fn bool PIMap::isEmpty() const
|
* \fn bool PIMap::isEmpty() const
|
||||||
* @brief Returns if map is empty
|
* \brief Returns if map is empty
|
||||||
|
|
||||||
|
|
||||||
* \fn T & PIMap::operator [](const Key & key)
|
* \fn T & PIMap::operator [](const Key & key)
|
||||||
* @brief Returns value for key "key". If there is no key in map, create one.
|
* \brief Returns value for key "key". If there is no key in map, create one.
|
||||||
|
|
||||||
* \fn const T PIMap::operator [](const Key & key) const
|
* \fn const T PIMap::operator [](const Key & key) const
|
||||||
* @brief Returns value for key "key". If there is no key in map, returns default T().
|
* \brief Returns value for key "key". If there is no key in map, returns default T().
|
||||||
|
|
||||||
* \fn T & PIMap::at(const Key & key)
|
* \fn T & PIMap::at(const Key & key)
|
||||||
* @brief Equivalent to operator []
|
* \brief Equivalent to operator []
|
||||||
|
|
||||||
* \fn const T PIMap::at(const Key & key) const
|
* \fn const T PIMap::at(const Key & key) const
|
||||||
* @brief Equivalent to operator []
|
* \brief Equivalent to operator []
|
||||||
|
|
||||||
|
|
||||||
* \fn PIMap & PIMap::operator <<(const PIMap & other)
|
* \fn PIMap & PIMap::operator <<(const PIMap & other)
|
||||||
* @brief Insert all etries of "other" to this map. Override existing values.
|
* \brief Insert all etries of "other" to this map. Override existing values.
|
||||||
|
|
||||||
* \fn bool PIMap::operator ==(const PIMap & t) const
|
* \fn bool PIMap::operator ==(const PIMap & t) const
|
||||||
* @brief Compare operator
|
* \brief Compare operator
|
||||||
|
|
||||||
* \fn bool PIMap::operator !=(const PIMap & t) const
|
* \fn bool PIMap::operator !=(const PIMap & t) const
|
||||||
* @brief Compare operator
|
* \brief Compare operator
|
||||||
|
|
||||||
* \fn bool PIMap::contains(const Key & key) const
|
* \fn bool PIMap::contains(const Key & key) const
|
||||||
* @brief Returns "true" if map contains entry with key "key"
|
* \brief Returns "true" if map contains entry with key "key"
|
||||||
|
|
||||||
|
|
||||||
* \fn PIMap & PIMap::reserve(size_t new_size)
|
* \fn PIMap & PIMap::reserve(size_t new_size)
|
||||||
* @brief Reserve space for "new_size" entries
|
* \brief Reserve space for "new_size" entries
|
||||||
|
|
||||||
* \fn PIMap & PIMap::removeOne(const Key & key)
|
* \fn PIMap & PIMap::removeOne(const Key & key)
|
||||||
* @brief Remove entry with key "key"
|
* \brief Remove entry with key "key"
|
||||||
|
|
||||||
* \fn PIMap & PIMap::remove(const Key & key)
|
* \fn PIMap & PIMap::remove(const Key & key)
|
||||||
* @brief Equivalent \a removeOne(key)
|
* \brief Equivalent \a removeOne(key)
|
||||||
|
|
||||||
* \fn PIMap & PIMap::erase(const Key & key)
|
* \fn PIMap & PIMap::erase(const Key & key)
|
||||||
* @brief Equivalent \a removeOne(key)
|
* \brief Equivalent \a removeOne(key)
|
||||||
|
|
||||||
* \fn PIMap & PIMap::clear()
|
* \fn PIMap & PIMap::clear()
|
||||||
* @brief Clear map
|
* \brief Clear map
|
||||||
|
|
||||||
|
|
||||||
* \fn void PIMap::swap(PIMap & other)
|
* \fn void PIMap::swap(PIMap & other)
|
||||||
* @brief Swap map with "other"
|
* \brief Swap map with "other"
|
||||||
|
|
||||||
|
|
||||||
* \fn PIMap & PIMap::insert(const Key & key, const T & value)
|
* \fn PIMap & PIMap::insert(const Key & key, const T & value)
|
||||||
* @brief Insert or rewrite entry with key "key" and value "value"
|
* \brief Insert or rewrite entry with key "key" and value "value"
|
||||||
|
|
||||||
* \fn const T PIMap::value(const Key & key, const T & default = T())
|
* \fn const T PIMap::value(const Key & key, const T & default = T())
|
||||||
* @brief Returns value for key "key". If there is no key in map, returns "default".
|
* \brief Returns value for key "key". If there is no key in map, returns "default".
|
||||||
|
|
||||||
* \fn PIVector<T> PIMap::values() const
|
* \fn PIVector<T> PIMap::values() const
|
||||||
* @brief Returns all values as PIVector
|
* \brief Returns all values as PIVector
|
||||||
|
|
||||||
* \fn Key PIMap::key(const T & value, const Key & default = Key()) const
|
* \fn Key PIMap::key(const T & value, const Key & default = Key()) const
|
||||||
* @brief Returns key for first founded value "value". If there is no such value in map, returns "default".
|
* \brief Returns key for first founded value "value". If there is no such value in map, returns "default".
|
||||||
|
|
||||||
* \fn PIVector<Key> PIMap::keys() const
|
* \fn PIVector<Key> PIMap::keys() const
|
||||||
* @brief Returns all keys as PIVector
|
* \brief Returns all keys as PIVector
|
||||||
|
|
||||||
* */
|
* */
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/** \class PIMapIterator
|
/** \class PIMapIterator
|
||||||
* @brief Helper class to iterate over PIMap
|
* \brief Helper class to iterate over PIMap
|
||||||
* \details This class used to access keys and values in PIMap.
|
* \details This class used to access keys and values in PIMap.
|
||||||
* You can use constructor to create iterator, or use \a PIMap::makeIterator()
|
* You can use constructor to create iterator, or use \a PIMap::makeIterator()
|
||||||
* and \a PIMap::makeReverseIterator() methods.
|
* and \a PIMap::makeReverseIterator() methods.
|
||||||
@@ -164,24 +164,24 @@
|
|||||||
* \endcode
|
* \endcode
|
||||||
|
|
||||||
* \fn PIMapIterator(const PIMap & map, bool reverse = false)
|
* \fn PIMapIterator(const PIMap & map, bool reverse = false)
|
||||||
* @brief Contructs iterator for "map". Current position is invalid.
|
* \brief Contructs iterator for "map". Current position is invalid.
|
||||||
|
|
||||||
* \fn const Key & PIMapIterator::key() const
|
* \fn const Key & PIMapIterator::key() const
|
||||||
* @brief Returns current entry key
|
* \brief Returns current entry key
|
||||||
|
|
||||||
* \fn const T & PIMapIterator::value() const
|
* \fn const T & PIMapIterator::value() const
|
||||||
* @brief Returns current entry value
|
* \brief Returns current entry value
|
||||||
|
|
||||||
* \fn T & PIMapIterator::valueRef() const
|
* \fn T & PIMapIterator::valueRef() const
|
||||||
* @brief Returns reference to current entry value
|
* \brief Returns reference to current entry value
|
||||||
|
|
||||||
* \fn bool PIMapIterator::hasNext()
|
* \fn bool PIMapIterator::hasNext()
|
||||||
* @brief Returns if iterator can jump to next entry
|
* \brief Returns if iterator can jump to next entry
|
||||||
|
|
||||||
* \fn bool PIMapIterator::next()
|
* \fn bool PIMapIterator::next()
|
||||||
* @brief Jump to next entry and return if new position is valid.
|
* \brief Jump to next entry and return if new position is valid.
|
||||||
|
|
||||||
* \fn void PIMapIterator::reset()
|
* \fn void PIMapIterator::reset()
|
||||||
* @brief Reset iterator to initial position.
|
* \brief Reset iterator to initial position.
|
||||||
|
|
||||||
* */
|
* */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pimap.h
|
/*! \file pimap.h
|
||||||
* @brief Associative array with custom types of key and value
|
* \brief Associative array with custom types of key and value
|
||||||
*
|
*
|
||||||
* This file declares PIMap
|
* This file declares PIMap
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pipair.h
|
/*! \file pipair.h
|
||||||
* @brief pair
|
* \brief pair
|
||||||
*
|
*
|
||||||
* This file declare PIPair
|
* This file declare PIPair
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pideque.h
|
/*! \file pideque.h
|
||||||
* @brief Queue container
|
* \brief Queue container
|
||||||
*
|
*
|
||||||
* This file declare PIQueue
|
* This file declare PIQueue
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piset.h
|
/*! \file piset.h
|
||||||
* @brief Set container
|
* \brief Set container
|
||||||
*
|
*
|
||||||
* This file declare PISet
|
* This file declare PISet
|
||||||
*/
|
*/
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include "pimap.h"
|
#include "pimap.h"
|
||||||
|
|
||||||
/*! @brief Set of any type
|
/*! \brief Set of any type
|
||||||
* \details This class used to store collection of unique elements
|
* \details This class used to store collection of unique elements
|
||||||
* of any type. You can only add values to set with \a operator<< or
|
* of any type. You can only add values to set with \a operator<< or
|
||||||
* with function \a insert(). You can discover if value already in
|
* with function \a insert(). You can discover if value already in
|
||||||
@@ -129,16 +129,16 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PISet @brief Returns unite of two sets
|
//! \relatesalso PISet \brief Returns unite of two sets
|
||||||
template <typename T> PISet<T> operator +(const PISet<T> & v0, const PISet<T> & v1) {PISet<T> ret(v0); ret.unite(v1); return ret;}
|
template <typename T> PISet<T> operator +(const PISet<T> & v0, const PISet<T> & v1) {PISet<T> ret(v0); ret.unite(v1); return ret;}
|
||||||
|
|
||||||
//! \relatesalso PISet @brief Returns subtraction of two sets
|
//! \relatesalso PISet \brief Returns subtraction of two sets
|
||||||
template <typename T> PISet<T> operator -(const PISet<T> & v0, const PISet<T> & v1) {PISet<T> ret(v0); ret.subtract(v1); return ret;}
|
template <typename T> PISet<T> operator -(const PISet<T> & v0, const PISet<T> & v1) {PISet<T> ret(v0); ret.subtract(v1); return ret;}
|
||||||
|
|
||||||
//! \relatesalso PISet @brief Returns unite of two sets
|
//! \relatesalso PISet \brief Returns unite of two sets
|
||||||
template <typename T> PISet<T> operator |(const PISet<T> & v0, const PISet<T> & v1) {PISet<T> ret(v0); ret.unite(v1); return ret;}
|
template <typename T> PISet<T> operator |(const PISet<T> & v0, const PISet<T> & v1) {PISet<T> ret(v0); ret.unite(v1); return ret;}
|
||||||
|
|
||||||
//! \relatesalso PISet @brief Returns intersetion of two sets
|
//! \relatesalso PISet \brief Returns intersetion of two sets
|
||||||
template <typename T> PISet<T> operator &(const PISet<T> & v0, const PISet<T> & v1) {PISet<T> ret(v0); ret.intersect(v1); return ret;}
|
template <typename T> PISet<T> operator &(const PISet<T> & v0, const PISet<T> & v1) {PISet<T> ret(v0); ret.intersect(v1); return ret;}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pistack.h
|
/*! \file pistack.h
|
||||||
* @brief Stack container
|
* \brief Stack container
|
||||||
*
|
*
|
||||||
* This file declare PIStack
|
* This file declare PIStack
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/** \class PIVector
|
/** \class PIVector
|
||||||
* @brief Dynamic array of any type
|
* \brief Dynamic array of any type
|
||||||
* \details This class used to store dynamic array of any
|
* \details This class used to store dynamic array of any
|
||||||
* type of data. In memory data stored linear. You can insert
|
* type of data. In memory data stored linear. You can insert
|
||||||
* item in any place of remove some items from any place.
|
* item in any place of remove some items from any place.
|
||||||
@@ -9,162 +9,162 @@
|
|||||||
* Contructs an empty vector
|
* Contructs an empty vector
|
||||||
|
|
||||||
* \fn PIVector::PIVector(size_t size, const T & value = T());
|
* \fn PIVector::PIVector(size_t size, const T & value = T());
|
||||||
* @brief Contructs vector with size "size" filled elements "value"
|
* \brief Contructs vector with size "size" filled elements "value"
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::PIVector
|
* \details Example: \snippet picontainers.cpp PIVector::PIVector
|
||||||
|
|
||||||
* \fn PIVector::PIVector(std::initializer_list list);
|
* \fn PIVector::PIVector(std::initializer_list list);
|
||||||
* @brief Contructs vector from C++11 initializer list
|
* \brief Contructs vector from C++11 initializer list
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::PIVector
|
* \details Example: \snippet picontainers.cpp PIVector::PIVector
|
||||||
|
|
||||||
* \fn const T & PIVector::at(size_t index) const;
|
* \fn const T & PIVector::at(size_t index) const;
|
||||||
* @brief Read-only access to element by index "index"
|
* \brief Read-only access to element by index "index"
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::at_c
|
* \details Example: \snippet picontainers.cpp PIVector::at_c
|
||||||
* \sa \a operator[]
|
* \sa \a operator[]
|
||||||
|
|
||||||
* \fn T & PIVector::at(size_t index);
|
* \fn T & PIVector::at(size_t index);
|
||||||
* @brief Full access to element by index "index"
|
* \brief Full access to element by index "index"
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::at
|
* \details Example: \snippet picontainers.cpp PIVector::at
|
||||||
* \sa \a operator[]
|
* \sa \a operator[]
|
||||||
|
|
||||||
* \fn const T * PIVector::data(size_t index = 0) const;
|
* \fn const T * PIVector::data(size_t index = 0) const;
|
||||||
* @brief Read-only pointer to element by index "index"
|
* \brief Read-only pointer to element by index "index"
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::data_c
|
* \details Example: \snippet picontainers.cpp PIVector::data_c
|
||||||
|
|
||||||
* \fn T * PIVector::data(size_t index = 0);
|
* \fn T * PIVector::data(size_t index = 0);
|
||||||
* @brief Pointer to element by index "index"
|
* \brief Pointer to element by index "index"
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::data
|
* \details Example: \snippet picontainers.cpp PIVector::data
|
||||||
|
|
||||||
* \fn size_t PIVector::size() const;
|
* \fn size_t PIVector::size() const;
|
||||||
* @brief Elements count
|
* \brief Elements count
|
||||||
|
|
||||||
* \fn ssize_t PIVector::size_s() const;
|
* \fn ssize_t PIVector::size_s() const;
|
||||||
* @brief Elements count
|
* \brief Elements count
|
||||||
|
|
||||||
* \fn bool PIVector::isEmpty() const;
|
* \fn bool PIVector::isEmpty() const;
|
||||||
* @brief Return \c "true" if vector is empty, i.e. size = 0
|
* \brief Return \c "true" if vector is empty, i.e. size = 0
|
||||||
|
|
||||||
* \fn bool PIVector::has(const T & t) const;
|
* \fn bool PIVector::has(const T & t) const;
|
||||||
|
|
||||||
* \fn bool PIVector::contains(const T & v) const;
|
* \fn bool PIVector::contains(const T & v) const;
|
||||||
* @brief Return \c "true" if vector has at least one element equal "t"
|
* \brief Return \c "true" if vector has at least one element equal "t"
|
||||||
|
|
||||||
* \fn int PIVector::etries(const T & t) const;
|
* \fn int PIVector::etries(const T & t) const;
|
||||||
* @brief Return how many times element "t" appears in vector
|
* \brief Return how many times element "t" appears in vector
|
||||||
|
|
||||||
* \fn ssize_t PIVector::indexOf(const T & t) const;
|
* \fn ssize_t PIVector::indexOf(const T & t) const;
|
||||||
* @brief Return index of first element equal "t" or -1 if there is no such element
|
* \brief Return index of first element equal "t" or -1 if there is no such element
|
||||||
|
|
||||||
* \fn ssize_t PIVector::lastIndexOf(const T & t) const;
|
* \fn ssize_t PIVector::lastIndexOf(const T & t) const;
|
||||||
* @brief Return index of last element equal "t" or -1 if there is no such element
|
* \brief Return index of last element equal "t" or -1 if there is no such element
|
||||||
|
|
||||||
* \fn static int PIVector::compare_func(const T * t0, const T * t1);
|
* \fn static int PIVector::compare_func(const T * t0, const T * t1);
|
||||||
* @brief Standard compare function for type "T". Return 0 if t0 = t1, -1 if t0 < t1 and 1 if t0 > t1.
|
* \brief Standard compare function for type "T". Return 0 if t0 = t1, -1 if t0 < t1 and 1 if t0 > t1.
|
||||||
|
|
||||||
* \fn void PIVector::resize(size_t size, const T & new_type = T());
|
* \fn void PIVector::resize(size_t size, const T & new_type = T());
|
||||||
* @brief Resize vector to size "size"
|
* \brief Resize vector to size "size"
|
||||||
* \details Elements removed from end of vector if new size < old size, or added new elements = "new_type" if new size > old size.\n
|
* \details Elements removed from end of vector if new size < old size, or added new elements = "new_type" if new size > old size.\n
|
||||||
* Example: \snippet picontainers.cpp PIVector::resize
|
* Example: \snippet picontainers.cpp PIVector::resize
|
||||||
* \sa \a size(), \a clear()
|
* \sa \a size(), \a clear()
|
||||||
|
|
||||||
* \fn PIVector & PIVector::enlarge(size_t size);
|
* \fn PIVector & PIVector::enlarge(size_t size);
|
||||||
* @brief Increase vector size with "size" elements
|
* \brief Increase vector size with "size" elements
|
||||||
|
|
||||||
* \fn void PIVector::clear();
|
* \fn void PIVector::clear();
|
||||||
* @brief Clear vector. Equivalent to call <tt>"resize(0)"</tt>
|
* \brief Clear vector. Equivalent to call <tt>"resize(0)"</tt>
|
||||||
|
|
||||||
* \fn PIVector & PIVector::sort(CompareFunc compare = compare_func);
|
* \fn PIVector & PIVector::sort(CompareFunc compare = compare_func);
|
||||||
* @brief Sort vector using quick sort algorithm and standard compare function
|
* \brief Sort vector using quick sort algorithm and standard compare function
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::sort_0
|
* \details Example: \snippet picontainers.cpp PIVector::sort_0
|
||||||
* With custom compare function: \snippet picontainers.cpp PIVector::sort_1
|
* With custom compare function: \snippet picontainers.cpp PIVector::sort_1
|
||||||
|
|
||||||
* \fn PIVector & PIVector::fill(const T & t);
|
* \fn PIVector & PIVector::fill(const T & t);
|
||||||
* @brief Fill vector with elements "t" leave size is unchanged and return reference to vector
|
* \brief Fill vector with elements "t" leave size is unchanged and return reference to vector
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::fill
|
* \details Example: \snippet picontainers.cpp PIVector::fill
|
||||||
|
|
||||||
* \fn PIVector & PIVector::assign(const T & t = T());
|
* \fn PIVector & PIVector::assign(const T & t = T());
|
||||||
* @brief Synonym of \a fill(t)
|
* \brief Synonym of \a fill(t)
|
||||||
|
|
||||||
* \fn PIVector & PIVector::assign(size_t new_size, const T & t);
|
* \fn PIVector & PIVector::assign(size_t new_size, const T & t);
|
||||||
* @brief Resize to "new_size", then fill with "t"
|
* \brief Resize to "new_size", then fill with "t"
|
||||||
|
|
||||||
* \fn T & PIVector::back();
|
* \fn T & PIVector::back();
|
||||||
* @brief Last element of the vector
|
* \brief Last element of the vector
|
||||||
|
|
||||||
* \fn const T & PIVector::back() const;
|
* \fn const T & PIVector::back() const;
|
||||||
* @brief Last element of the vector
|
* \brief Last element of the vector
|
||||||
|
|
||||||
* \fn T & PIVector::front();
|
* \fn T & PIVector::front();
|
||||||
* @brief First element of the vector
|
* \brief First element of the vector
|
||||||
|
|
||||||
* \fn const T & PIVector::front() const;
|
* \fn const T & PIVector::front() const;
|
||||||
* @brief First element of the vector
|
* \brief First element of the vector
|
||||||
|
|
||||||
* \fn PIVector & PIVector::push_back(const T & t);
|
* \fn PIVector & PIVector::push_back(const T & t);
|
||||||
* @brief Add new element "t" at the end of vector and return reference to vector
|
* \brief Add new element "t" at the end of vector and return reference to vector
|
||||||
|
|
||||||
* \fn PIVector & PIVector::push_front(const T & t);
|
* \fn PIVector & PIVector::push_front(const T & t);
|
||||||
* @brief Add new element "t" at the beginning of vector and return reference to vector
|
* \brief Add new element "t" at the beginning of vector and return reference to vector
|
||||||
|
|
||||||
* \fn PIVector & PIVector::pop_back();
|
* \fn PIVector & PIVector::pop_back();
|
||||||
* @brief Remove one element from the end of vector and return reference to vector
|
* \brief Remove one element from the end of vector and return reference to vector
|
||||||
|
|
||||||
* \fn PIVector & PIVector::pop_front();
|
* \fn PIVector & PIVector::pop_front();
|
||||||
* @brief Remove one element from the beginning of vector and return reference to vector
|
* \brief Remove one element from the beginning of vector and return reference to vector
|
||||||
|
|
||||||
* \fn T PIVector::take_back();
|
* \fn T PIVector::take_back();
|
||||||
* @brief Remove one element from the end of vector and return it
|
* \brief Remove one element from the end of vector and return it
|
||||||
|
|
||||||
* \fn T PIVector::take_front();
|
* \fn T PIVector::take_front();
|
||||||
* @brief Remove one element from the beginning of vector and return it
|
* \brief Remove one element from the beginning of vector and return it
|
||||||
|
|
||||||
* \fn PIVector & PIVector::remove(size_t index);
|
* \fn PIVector & PIVector::remove(size_t index);
|
||||||
* @brief Remove one element by index "index" and return reference to vector
|
* \brief Remove one element by index "index" and return reference to vector
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::remove_0
|
* \details Example: \snippet picontainers.cpp PIVector::remove_0
|
||||||
* \sa \a removeOne(), \a removeAll()
|
* \sa \a removeOne(), \a removeAll()
|
||||||
|
|
||||||
* \fn PIVector & PIVector::remove(size_t index, size_t count);
|
* \fn PIVector & PIVector::remove(size_t index, size_t count);
|
||||||
* @brief Remove "count" elements by first index "index" and return reference to vector
|
* \brief Remove "count" elements by first index "index" and return reference to vector
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::remove_1
|
* \details Example: \snippet picontainers.cpp PIVector::remove_1
|
||||||
* \sa \a removeOne(), \a removeAll()
|
* \sa \a removeOne(), \a removeAll()
|
||||||
|
|
||||||
* \fn PIVector & PIVector::removeOne(const T & v);
|
* \fn PIVector & PIVector::removeOne(const T & v);
|
||||||
* @brief Remove no more than one element equal "v" and return reference to vector
|
* \brief Remove no more than one element equal "v" and return reference to vector
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::removeOne
|
* \details Example: \snippet picontainers.cpp PIVector::removeOne
|
||||||
* \sa \a remove(), \a removeAll()
|
* \sa \a remove(), \a removeAll()
|
||||||
|
|
||||||
* \fn PIVector & PIVector::removeAll(const T & v);
|
* \fn PIVector & PIVector::removeAll(const T & v);
|
||||||
* @brief Remove all elements equal "v" and return reference to vector
|
* \brief Remove all elements equal "v" and return reference to vector
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::removeAll
|
* \details Example: \snippet picontainers.cpp PIVector::removeAll
|
||||||
* \sa \a remove(), \a removeOne()
|
* \sa \a remove(), \a removeOne()
|
||||||
|
|
||||||
* \fn PIVector & PIVector::insert(size_t pos, const T & t);
|
* \fn PIVector & PIVector::insert(size_t pos, const T & t);
|
||||||
* @brief Insert element "t" after index "pos" and return reference to vector
|
* \brief Insert element "t" after index "pos" and return reference to vector
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::insert_0
|
* \details Example: \snippet picontainers.cpp PIVector::insert_0
|
||||||
|
|
||||||
* \fn PIVector & PIVector::insert(size_t pos, const PIVector & t);
|
* \fn PIVector & PIVector::insert(size_t pos, const PIVector & t);
|
||||||
* @brief Insert other vector "t" after index "pos" and return reference to vector
|
* \brief Insert other vector "t" after index "pos" and return reference to vector
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::insert_1
|
* \details Example: \snippet picontainers.cpp PIVector::insert_1
|
||||||
|
|
||||||
* \fn T & PIVector::operator [](size_t index);
|
* \fn T & PIVector::operator [](size_t index);
|
||||||
* @brief Full access to element by index "index"
|
* \brief Full access to element by index "index"
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::()
|
* \details Example: \snippet picontainers.cpp PIVector::()
|
||||||
* \sa \a at()
|
* \sa \a at()
|
||||||
|
|
||||||
* \fn const T & PIVector::operator [](size_t index) const;
|
* \fn const T & PIVector::operator [](size_t index) const;
|
||||||
* @brief Read-only access to element by index "index"
|
* \brief Read-only access to element by index "index"
|
||||||
* \details Example: \snippet picontainers.cpp PIVector::()_c
|
* \details Example: \snippet picontainers.cpp PIVector::()_c
|
||||||
* \sa \a at()
|
* \sa \a at()
|
||||||
|
|
||||||
* \fn PIVector & PIVector::operator <<(const T & t);
|
* \fn PIVector & PIVector::operator <<(const T & t);
|
||||||
* @brief Add new element "t" at the end of vector and return reference to vector
|
* \brief Add new element "t" at the end of vector and return reference to vector
|
||||||
|
|
||||||
* \fn PIVector & PIVector::operator <<(const PIVector & t);
|
* \fn PIVector & PIVector::operator <<(const PIVector & t);
|
||||||
* @brief Add vector "t" at the end of vector and return reference to vector
|
* \brief Add vector "t" at the end of vector and return reference to vector
|
||||||
|
|
||||||
* \fn bool PIVector::operator ==(const PIVector & t);
|
* \fn bool PIVector::operator ==(const PIVector & t);
|
||||||
* @brief Compare with vector "t"
|
* \brief Compare with vector "t"
|
||||||
|
|
||||||
* \fn bool PIVector::operator !=(const PIVector & t);
|
* \fn bool PIVector::operator !=(const PIVector & t);
|
||||||
* @brief Compare with vector "t"
|
* \brief Compare with vector "t"
|
||||||
|
|
||||||
* */
|
* */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pivector.h
|
/*! \file pivector.h
|
||||||
* @brief Dynamic array of any type
|
* \brief Dynamic array of any type
|
||||||
*
|
*
|
||||||
* This file declares PIVector
|
* This file declares PIVector
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pivector2d.h
|
/*! \file pivector2d.h
|
||||||
* @brief 2D wrapper around PIVector
|
* \brief 2D wrapper around PIVector
|
||||||
*
|
*
|
||||||
* This file declares PIVector
|
* This file declares PIVector
|
||||||
*/
|
*/
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include "pivector.h"
|
#include "pivector.h"
|
||||||
|
|
||||||
/*! @brief 2D array,
|
/*! \brief 2D array,
|
||||||
* \details This class used to store 2D array of any type elements as plain vector.
|
* \details This class used to store 2D array of any type elements as plain vector.
|
||||||
* You can read/write any element via operators [][], first dimension - row, second - column.
|
* You can read/write any element via operators [][], first dimension - row, second - column.
|
||||||
* The first dimension is Row, and you can operate with Row as PIVector<T>: modify any element, assign to another Row and etc.
|
* The first dimension is Row, and you can operate with Row as PIVector<T>: modify any element, assign to another Row and etc.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*! \file pibase.h
|
/*! \file pibase.h
|
||||||
* \brief
|
* \~\brief
|
||||||
* \~english Base types and functions
|
* \~english Base types and functions
|
||||||
* \~russian Базовые типы и методы
|
* \~russian Базовые типы и методы
|
||||||
*
|
*
|
||||||
* \details
|
* \~\details
|
||||||
* \~english
|
* \~english
|
||||||
* This file implements first layer above the system and
|
* This file implements first layer above the system and
|
||||||
* declares some basic useful functions
|
* declares some basic useful functions
|
||||||
@@ -52,142 +52,142 @@
|
|||||||
|
|
||||||
#ifdef DOXYGEN
|
#ifdef DOXYGEN
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Major value of PIP version
|
//! \~english Major value of PIP version
|
||||||
//! \~russian Мажорная версия PIP
|
//! \~russian Мажорная версия PIP
|
||||||
# define PIP_VERSION_MAJOR
|
# define PIP_VERSION_MAJOR
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Minor value of PIP version
|
//! \~english Minor value of PIP version
|
||||||
//! \~russian Минорная версия PIP
|
//! \~russian Минорная версия PIP
|
||||||
# define PIP_VERSION_MINOR
|
# define PIP_VERSION_MINOR
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Revision value of PIP version
|
//! \~english Revision value of PIP version
|
||||||
//! \~russian Ревизия версии PIP
|
//! \~russian Ревизия версии PIP
|
||||||
# define PIP_VERSION_REVISION
|
# define PIP_VERSION_REVISION
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Suffix of PIP version
|
//! \~english Suffix of PIP version
|
||||||
//! \~russian Суффикс версии PIP
|
//! \~russian Суффикс версии PIP
|
||||||
# define PIP_VERSION_SUFFIX
|
# define PIP_VERSION_SUFFIX
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Version of PIP in hex - 0x##(Major)##(Minor)##(Revision)
|
//! \~english Version of PIP in hex - 0x##(Major)##(Minor)##(Revision)
|
||||||
//! \~russian Версия PIP в hex - 0x##(Major)##(Minor)##(Revision)
|
//! \~russian Версия PIP в hex - 0x##(Major)##(Minor)##(Revision)
|
||||||
# define PIP_VERSION
|
# define PIP_VERSION
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when compile-time debug is enabled
|
//! \~english Macro is defined when compile-time debug is enabled
|
||||||
//! \~russian Макрос объявлен когда включена compile-time отладка
|
//! \~russian Макрос объявлен когда включена compile-time отладка
|
||||||
# define PIP_DEBUG
|
# define PIP_DEBUG
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when operation system is any Windows
|
//! \~english Macro is defined when operation system is any Windows
|
||||||
//! \~russian Макрос объявлен когда операционная система Windows
|
//! \~russian Макрос объявлен когда операционная система Windows
|
||||||
# define WINDOWS
|
# define WINDOWS
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when operation system is QNX or Blackberry
|
//! \~english Macro is defined when operation system is QNX or Blackberry
|
||||||
//! \~russian Макрос объявлен когда операционная система QNX или Blackberry
|
//! \~russian Макрос объявлен когда операционная система QNX или Blackberry
|
||||||
# define QNX
|
# define QNX
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when operation system is Blackberry
|
//! \~english Macro is defined when operation system is Blackberry
|
||||||
//! \~russian Макрос объявлен когда операционная система Blackberry
|
//! \~russian Макрос объявлен когда операционная система Blackberry
|
||||||
# define BLACKBERRY
|
# define BLACKBERRY
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when operation system is FreeBSD
|
//! \~english Macro is defined when operation system is FreeBSD
|
||||||
//! \~russian Макрос объявлен когда операционная система FreeBSD
|
//! \~russian Макрос объявлен когда операционная система FreeBSD
|
||||||
# define FREE_BSD
|
# define FREE_BSD
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when operation system is Mac OS
|
//! \~english Macro is defined when operation system is Mac OS
|
||||||
//! \~russian Макрос объявлен когда операционная система Mac OS
|
//! \~russian Макрос объявлен когда операционная система Mac OS
|
||||||
# define MAC_OS
|
# define MAC_OS
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when operation system is Android
|
//! \~english Macro is defined when operation system is Android
|
||||||
//! \~russian Макрос объявлен когда операционная система Android
|
//! \~russian Макрос объявлен когда операционная система Android
|
||||||
# define ANDROID
|
# define ANDROID
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when operation system is any Linux
|
//! \~english Macro is defined when operation system is any Linux
|
||||||
//! \~russian Макрос объявлен когда операционная система Linux
|
//! \~russian Макрос объявлен когда операционная система Linux
|
||||||
# define LINUX
|
# define LINUX
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when operation system is FreeRTOS
|
//! \~english Macro is defined when operation system is FreeRTOS
|
||||||
//! \~russian Макрос объявлен когда операционная система FreeRTOS
|
//! \~russian Макрос объявлен когда операционная система FreeRTOS
|
||||||
# define FREERTOS
|
# define FREERTOS
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when compiler is GCC or MinGW
|
//! \~english Macro is defined when compiler is GCC or MinGW
|
||||||
//! \~russian Макрос объявлен когда компилятор GCC или MinGW
|
//! \~russian Макрос объявлен когда компилятор GCC или MinGW
|
||||||
# define CC_GCC
|
# define CC_GCC
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when PIP is decided that host is support language
|
//! \~english Macro is defined when PIP is decided that host is support language
|
||||||
//! \~russian Макрос объявлен когда PIP решил что система поддерживает локализацию
|
//! \~russian Макрос объявлен когда PIP решил что система поддерживает локализацию
|
||||||
# define HAS_LOCALE
|
# define HAS_LOCALE
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when PIP is building for embedded systems
|
//! \~english Macro is defined when PIP is building for embedded systems
|
||||||
//! \~russian Макрос объявлен когда PIP собирается для встраиваемых систем
|
//! \~russian Макрос объявлен когда PIP собирается для встраиваемых систем
|
||||||
# define MICRO_PIP
|
# define MICRO_PIP
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when compiler is Visual Studio
|
//! \~english Macro is defined when compiler is Visual Studio
|
||||||
//! \~russian Макрос объявлен когда компилятор Visual Studio
|
//! \~russian Макрос объявлен когда компилятор Visual Studio
|
||||||
# define CC_VC
|
# define CC_VC
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when compiler is AVR GCC
|
//! \~english Macro is defined when compiler is AVR GCC
|
||||||
//! \~russian Макрос объявлен когда компилятор AVR GCC
|
//! \~russian Макрос объявлен когда компилятор AVR GCC
|
||||||
# define CC_AVR_GCC
|
# define CC_AVR_GCC
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when compiler is unknown
|
//! \~english Macro is defined when compiler is unknown
|
||||||
//! \~russian Макрос объявлен когда компилятор неизвестен
|
//! \~russian Макрос объявлен когда компилятор неизвестен
|
||||||
# define CC_OTHER
|
# define CC_OTHER
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro is defined when PIP can use "rt" library for \a PITimer::ThreadRT timers implementation
|
//! \~english Macro is defined when PIP can use "rt" library for \a PITimer::ThreadRT timers implementation
|
||||||
//! \~russian Макрос объявлен когда PIP может использовать библиотеку "rt" для \a PITimer::ThreadRT реализации таймера
|
//! \~russian Макрос объявлен когда PIP может использовать библиотеку "rt" для \a PITimer::ThreadRT реализации таймера
|
||||||
# define PIP_TIMER_RT
|
# define PIP_TIMER_RT
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro to declare private section, "export" is optional
|
//! \~english Macro to declare private section, "export" is optional
|
||||||
//! \~russian Макрос для объявления частной секции, "export" необязателен
|
//! \~russian Макрос для объявления частной секции, "export" необязателен
|
||||||
# define PRIVATE_DECLARATION(export)
|
# define PRIVATE_DECLARATION(export)
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro to start definition of private section
|
//! \~english Macro to start definition of private section
|
||||||
//! \~russian Макрос для начала реализации частной секции
|
//! \~russian Макрос для начала реализации частной секции
|
||||||
# define PRIVATE_DEFINITION_START(Class)
|
# define PRIVATE_DEFINITION_START(Class)
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro to end definition of private section
|
//! \~english Macro to end definition of private section
|
||||||
//! \~russian Макрос для окончания реализации частной секции
|
//! \~russian Макрос для окончания реализации частной секции
|
||||||
# define PRIVATE_DEFINITION_END(Class)
|
# define PRIVATE_DEFINITION_END(Class)
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro to access private section by pointer
|
//! \~english Macro to access private section by pointer
|
||||||
//! \~russian Макрос для доступа к частной секции
|
//! \~russian Макрос для доступа к частной секции
|
||||||
# define PRIVATE
|
# define PRIVATE
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro to access private section by pointer without brakes ()
|
//! \~english Macro to access private section by pointer without brakes ()
|
||||||
//! \~russian Макрос для доступа к частной секции без обрамляющих скобок ()
|
//! \~russian Макрос для доступа к частной секции без обрамляющих скобок ()
|
||||||
# define PRIVATEWB
|
# define PRIVATEWB
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro to start static initializer
|
//! \~english Macro to start static initializer
|
||||||
//! \~russian Макрос для начала статической инициализации
|
//! \~russian Макрос для начала статической инициализации
|
||||||
# define STATIC_INITIALIZER_BEGIN
|
# define STATIC_INITIALIZER_BEGIN
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro to end static initializer
|
//! \~english Macro to end static initializer
|
||||||
//! \~russian Макрос для окончания статической инициализации
|
//! \~russian Макрос для окончания статической инициализации
|
||||||
# define STATIC_INITIALIZER_END
|
# define STATIC_INITIALIZER_END
|
||||||
@@ -359,10 +359,10 @@
|
|||||||
} _PIP_ADD_COUNTER(_pip_initializer_);
|
} _PIP_ADD_COUNTER(_pip_initializer_);
|
||||||
|
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Minimal sleep in milliseconds for internal PIP using
|
//! \~english Minimal sleep in milliseconds for internal PIP using
|
||||||
//! \~russian Минимальное значание задержки в милисекундах для внутреннего использования в библиотеке PIP
|
//! \~russian Минимальное значание задержки в милисекундах для внутреннего использования в библиотеке PIP
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english Using in \a piMinSleep(), \a PIThread, \a PITimer::Pool. By default 1ms.
|
//! \~english Using in \a piMinSleep(), \a PIThread, \a PITimer::Pool. By default 1ms.
|
||||||
//! \~russian Используется в \a piMinSleep(), \a PIThread, \a PITimer::Pool. По умолчанию равна 1мс.
|
//! \~russian Используется в \a piMinSleep(), \a PIThread, \a PITimer::Pool. По умолчанию равна 1мс.
|
||||||
#ifndef PIP_MIN_MSLEEP
|
#ifndef PIP_MIN_MSLEEP
|
||||||
@@ -374,28 +374,28 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro used for infinite loop
|
//! \~english Macro used for infinite loop
|
||||||
//! \~russian Макрос для бесконечного цикла
|
//! \~russian Макрос для бесконечного цикла
|
||||||
#define FOREVER for (;;)
|
#define FOREVER for (;;)
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro used for infinite wait
|
//! \~english Macro used for infinite wait
|
||||||
//! \~russian Макрос для бесконечного ожидания
|
//! \~russian Макрос для бесконечного ожидания
|
||||||
#define FOREVER_WAIT FOREVER piMinSleep;
|
#define FOREVER_WAIT FOREVER piMinSleep;
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Macro used for infinite wait
|
//! \~english Macro used for infinite wait
|
||||||
//! \~russian Макрос для бесконечного ожидания
|
//! \~russian Макрос для бесконечного ожидания
|
||||||
#define WAIT_FOREVER FOREVER piMinSleep;
|
#define WAIT_FOREVER FOREVER piMinSleep;
|
||||||
|
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Global variable enabling output to piCout, default is true
|
//! \~english Global variable enabling output to piCout, default is true
|
||||||
//! \~russian Глобальная переменная, включающая вывод в piCout, при старте true
|
//! \~russian Глобальная переменная, включающая вывод в piCout, при старте true
|
||||||
extern PIP_EXPORT bool piDebug;
|
extern PIP_EXPORT bool piDebug;
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Global variable that set minimum real update interval
|
//! \~english Global variable that set minimum real update interval
|
||||||
//! for function PIInit::mountInfo(), default is 10000 ms
|
//! for function PIInit::mountInfo(), default is 10000 ms
|
||||||
//! \~russian Глобальная переменная минимального ожидания между реальным обновлением
|
//! \~russian Глобальная переменная минимального ожидания между реальным обновлением
|
||||||
@@ -410,18 +410,18 @@ typedef unsigned long long ullong;
|
|||||||
typedef long long llong;
|
typedef long long llong;
|
||||||
typedef long double ldouble;
|
typedef long double ldouble;
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function for swap two values
|
//! \~english Templated function for swap two values
|
||||||
//! \~russian Шаблонный метод для перестановки двух значений
|
//! \~russian Шаблонный метод для перестановки двух значений
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english Example:\n \snippet piincludes.cpp swap
|
//! \~english Example:\n \snippet piincludes.cpp swap
|
||||||
//! \~russian Пример:\n \snippet piincludes.cpp swap
|
//! \~russian Пример:\n \snippet piincludes.cpp swap
|
||||||
template<typename T> inline void piSwap(T & f, T & s) {T t(std::move(f)); f = std::move(s); s = std::move(t);}
|
template<typename T> inline void piSwap(T & f, T & s) {T t(std::move(f)); f = std::move(s); s = std::move(t);}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function for swap two values without "="
|
//! \~english Templated function for swap two values without "="
|
||||||
//! \~russian Шаблонный метод для перестановки двух значений без использования "="
|
//! \~russian Шаблонный метод для перестановки двух значений без использования "="
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english Example:\n \snippet piincludes.cpp swapBinary
|
//! \~english Example:\n \snippet piincludes.cpp swapBinary
|
||||||
//! \~russian Пример:\n \snippet piincludes.cpp swapBinary
|
//! \~russian Пример:\n \snippet piincludes.cpp swapBinary
|
||||||
template<typename T> inline void piSwapBinary(T & f, T & s) {
|
template<typename T> inline void piSwapBinary(T & f, T & s) {
|
||||||
@@ -458,10 +458,10 @@ template<> inline void piSwapBinary(const void *& f, const void *& s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Function for compare two values without "==" by raw content
|
//! \~english Function for compare two values without "==" by raw content
|
||||||
//! \~russian Метод для сравнения двух значений без использования "==" (по сырому содержимому)
|
//! \~russian Метод для сравнения двух значений без использования "==" (по сырому содержимому)
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english Example:\n \snippet piincludes.cpp compareBinary
|
//! \~english Example:\n \snippet piincludes.cpp compareBinary
|
||||||
//! \~russian Пример:\n \snippet piincludes.cpp compareBinary
|
//! \~russian Пример:\n \snippet piincludes.cpp compareBinary
|
||||||
inline bool piCompareBinary(const void * f, const void * s, size_t size) {
|
inline bool piCompareBinary(const void * f, const void * s, size_t size) {
|
||||||
@@ -471,10 +471,10 @@ inline bool piCompareBinary(const void * f, const void * s, size_t size) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function return round of float falue
|
//! \~english Templated function return round of float falue
|
||||||
//! \~russian Шаблонный метод, возвращающий округленное значение
|
//! \~russian Шаблонный метод, возвращающий округленное значение
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! Round is the nearest integer value \n
|
//! Round is the nearest integer value \n
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
@@ -493,10 +493,10 @@ inline bool piCompareBinary(const void * f, const void * s, size_t size) {
|
|||||||
//! \snippet piincludes.cpp round
|
//! \snippet piincludes.cpp round
|
||||||
template<typename T> inline constexpr int piRound(const T & v) {return int(v >= T(0.) ? v + T(0.5) : v - T(0.5));}
|
template<typename T> inline constexpr int piRound(const T & v) {return int(v >= T(0.) ? v + T(0.5) : v - T(0.5));}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function return floor of float falue
|
//! \~english Templated function return floor of float falue
|
||||||
//! \~russian Шаблонный метод, возвращающий floor значение
|
//! \~russian Шаблонный метод, возвращающий floor значение
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! Floor is the largest integer that is not greater than "v" \n
|
//! Floor is the largest integer that is not greater than "v" \n
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
@@ -515,10 +515,10 @@ template<typename T> inline constexpr int piRound(const T & v) {return int(v >=
|
|||||||
//! \snippet piincludes.cpp floor
|
//! \snippet piincludes.cpp floor
|
||||||
template<typename T> inline constexpr int piFloor(const T & v) {return v < T(0) ? int(v) - 1 : int(v);}
|
template<typename T> inline constexpr int piFloor(const T & v) {return v < T(0) ? int(v) - 1 : int(v);}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function return ceil of float falue
|
//! \~english Templated function return ceil of float falue
|
||||||
//! \~russian Шаблонный метод, возвращающий ceil значение
|
//! \~russian Шаблонный метод, возвращающий ceil значение
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! Ceil is the smallest integer that is not less than "v" \n
|
//! Ceil is the smallest integer that is not less than "v" \n
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
@@ -537,10 +537,10 @@ template<typename T> inline constexpr int piFloor(const T & v) {return v < T(0)
|
|||||||
//! \snippet piincludes.cpp ceil
|
//! \snippet piincludes.cpp ceil
|
||||||
template<typename T> inline constexpr int piCeil(const T & v) {return v < T(0) ? int(v) : int(v) + 1;}
|
template<typename T> inline constexpr int piCeil(const T & v) {return v < T(0) ? int(v) : int(v) + 1;}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function return absolute of numeric falue
|
//! \~english Templated function return absolute of numeric falue
|
||||||
//! \~russian Шаблонный метод, возвращающий модуль числового значения
|
//! \~russian Шаблонный метод, возвращающий модуль числового значения
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! Absolute is the positive or equal 0 value \n
|
//! Absolute is the positive or equal 0 value \n
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
@@ -567,10 +567,10 @@ template<typename T> inline constexpr int piCeil(const T & v) {return v < T(0) ?
|
|||||||
//! \snippet piincludes.cpp abs
|
//! \snippet piincludes.cpp abs
|
||||||
template<typename T> inline constexpr T piAbs(const T & v) {return (v >= T(0) ? v : -v);}
|
template<typename T> inline constexpr T piAbs(const T & v) {return (v >= T(0) ? v : -v);}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function return minimum of two values
|
//! \~english Templated function return minimum of two values
|
||||||
//! \~russian Шаблонный метод, возвращающий минимум из двух значений
|
//! \~russian Шаблонный метод, возвращающий минимум из двух значений
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
//! - \c piMins for "short"
|
//! - \c piMins for "short"
|
||||||
@@ -595,10 +595,10 @@ template<typename T> inline constexpr T piAbs(const T & v) {return (v >= T(0) ?
|
|||||||
//! \snippet piincludes.cpp min2
|
//! \snippet piincludes.cpp min2
|
||||||
template<typename T> inline constexpr T piMin(const T & f, const T & s) {return ((f > s) ? s : f);}
|
template<typename T> inline constexpr T piMin(const T & f, const T & s) {return ((f > s) ? s : f);}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function return minimum of tree values
|
//! \~english Templated function return minimum of tree values
|
||||||
//! \~russian Шаблонный метод, возвращающий минимум из трех значений
|
//! \~russian Шаблонный метод, возвращающий минимум из трех значений
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
//! - \c piMins for "short"
|
//! - \c piMins for "short"
|
||||||
@@ -623,10 +623,10 @@ template<typename T> inline constexpr T piMin(const T & f, const T & s) {return
|
|||||||
//! \snippet piincludes.cpp min3
|
//! \snippet piincludes.cpp min3
|
||||||
template<typename T> inline constexpr T piMin(const T & f, const T & s, const T & t) {return ((f < s && f < t) ? f : ((s < t) ? s : t));}
|
template<typename T> inline constexpr T piMin(const T & f, const T & s, const T & t) {return ((f < s && f < t) ? f : ((s < t) ? s : t));}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function return maximum of two values
|
//! \~english Templated function return maximum of two values
|
||||||
//! \~russian Шаблонный метод, возвращающий максимум из двух значений
|
//! \~russian Шаблонный метод, возвращающий максимум из двух значений
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
//! - \c piMaxs for "short"
|
//! - \c piMaxs for "short"
|
||||||
@@ -651,10 +651,10 @@ template<typename T> inline constexpr T piMin(const T & f, const T & s, const T
|
|||||||
//! \snippet piincludes.cpp max2
|
//! \snippet piincludes.cpp max2
|
||||||
template<typename T> inline constexpr T piMax(const T & f, const T & s) {return ((f < s) ? s : f);}
|
template<typename T> inline constexpr T piMax(const T & f, const T & s) {return ((f < s) ? s : f);}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function return maximum of tree values
|
//! \~english Templated function return maximum of tree values
|
||||||
//! \~russian Шаблонный метод, возвращающий максимум из трех значений
|
//! \~russian Шаблонный метод, возвращающий максимум из трех значений
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
//! - \c piMaxs for "short"
|
//! - \c piMaxs for "short"
|
||||||
@@ -679,10 +679,10 @@ template<typename T> inline constexpr T piMax(const T & f, const T & s) {return
|
|||||||
//! \snippet piincludes.cpp max3
|
//! \snippet piincludes.cpp max3
|
||||||
template<typename T> inline constexpr T piMax(const T & f, const T & s, const T & t) {return ((f > s && f > t) ? f : ((s > t) ? s : t));}
|
template<typename T> inline constexpr T piMax(const T & f, const T & s, const T & t) {return ((f > s && f > t) ? f : ((s > t) ? s : t));}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function return clamped value
|
//! \~english Templated function return clamped value
|
||||||
//! \~russian Шаблонный метод, возвращающий ограниченное значение
|
//! \~russian Шаблонный метод, возвращающий ограниченное значение
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! Clamped is the not greater than "max" and not lesser than "min" value \n
|
//! Clamped is the not greater than "max" and not lesser than "min" value \n
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
@@ -709,7 +709,7 @@ template<typename T> inline constexpr T piMax(const T & f, const T & s, const T
|
|||||||
//! \snippet piincludes.cpp clamp
|
//! \snippet piincludes.cpp clamp
|
||||||
template<typename T> inline constexpr T piClamp(const T & v, const T & min, const T & max) {return (v > max ? max : (v < min ? min : v));}
|
template<typename T> inline constexpr T piClamp(const T & v, const T & min, const T & max) {return (v > max ? max : (v < min ? min : v));}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Function inverse byte order in memory block ([1..N] -> [N..1])
|
//! \~english Function inverse byte order in memory block ([1..N] -> [N..1])
|
||||||
//! \~russian Метод для смены порядка байт в блоке памяти ([1..N] -> [N..1])
|
//! \~russian Метод для смены порядка байт в блоке памяти ([1..N] -> [N..1])
|
||||||
inline void piLetobe(void * data, int size) {
|
inline void piLetobe(void * data, int size) {
|
||||||
@@ -717,10 +717,10 @@ inline void piLetobe(void * data, int size) {
|
|||||||
piSwap<uchar>(((uchar*)data)[size - i - 1], ((uchar*)data)[i]);
|
piSwap<uchar>(((uchar*)data)[size - i - 1], ((uchar*)data)[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Function for compare two numeric values with epsilon
|
//! \~english Function for compare two numeric values with epsilon
|
||||||
//! \~russian Метод для сравнения двух чисел с порогом
|
//! \~russian Метод для сравнения двух чисел с порогом
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
//! - \c piComparef for "float"
|
//! - \c piComparef for "float"
|
||||||
@@ -740,15 +740,15 @@ inline bool piCompare(const T & a, const T & b, const T & epsilon = std::numeric
|
|||||||
return piAbs(a - b) <= epsilon;
|
return piAbs(a - b) <= epsilon;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function that inverse byte order of value "v"
|
//! \~english Templated function that inverse byte order of value "v"
|
||||||
//! \~russian Шаблонный метод, меняющий порядок байт в переменной "v"
|
//! \~russian Шаблонный метод, меняющий порядок байт в переменной "v"
|
||||||
template<typename T> inline void piLetobe(T * v) {piLetobe(v, sizeof(T));}
|
template<typename T> inline void piLetobe(T * v) {piLetobe(v, sizeof(T));}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Templated function that returns "v" with inversed byte order
|
//! \~english Templated function that returns "v" with inversed byte order
|
||||||
//! \~russian Шаблонный метод, возвращающий переменную "v" с измененным порядком байт
|
//! \~russian Шаблонный метод, возвращающий переменную "v" с измененным порядком байт
|
||||||
//! \details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! This function used to convert values between little and big endian \n
|
//! This function used to convert values between little and big endian \n
|
||||||
//! There are some macros:
|
//! There are some macros:
|
||||||
@@ -785,7 +785,7 @@ template<> inline float piLetobe(const float & v) {
|
|||||||
return a.f;
|
return a.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief
|
//! \~\brief
|
||||||
//! \~english Generic hash function, implements murmur3/32 algorithm
|
//! \~english Generic hash function, implements murmur3/32 algorithm
|
||||||
//! \~russian Хэш-функция общего назначения, по алгоритму murmur3/32
|
//! \~russian Хэш-функция общего назначения, по алгоритму murmur3/32
|
||||||
inline uint piHashData(const uchar * data, uint len, uint seed = 0) {
|
inline uint piHashData(const uchar * data, uint len, uint seed = 0) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pibitarray.h
|
/*! \file pibitarray.h
|
||||||
* @brief Bit array
|
* \brief Bit array
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pibytearray.h
|
/*! \file pibytearray.h
|
||||||
* @brief Byte array
|
* \brief Byte array
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -39,16 +39,16 @@ class PIString;
|
|||||||
class PIByteArray;
|
class PIByteArray;
|
||||||
|
|
||||||
|
|
||||||
/*! @class PIByteArray
|
/*! \class PIByteArray
|
||||||
* @brief The PIByteArray class provides an array of bytes
|
* \brief The PIByteArray class provides an array of bytes
|
||||||
* @details PIByteArray used to store raw bytes.
|
* \details PIByteArray used to store raw bytes.
|
||||||
* It can be constructed from any data and size.
|
* It can be constructed from any data and size.
|
||||||
* You can use PIByteArray as binary stream
|
* You can use PIByteArray as binary stream
|
||||||
* to serialize/deserialize any objects and data.
|
* to serialize/deserialize any objects and data.
|
||||||
* This class based on PIDeque<uchar> and provide some handle function
|
* This class based on PIDeque<uchar> and provide some handle function
|
||||||
* to manipulate it.
|
* to manipulate it.
|
||||||
*
|
*
|
||||||
* @section PIByteArray_sec0 Usage
|
* \section PIByteArray_sec0 Usage
|
||||||
* %PIByteArray can be used to store custom data and manipulate it. There are many
|
* %PIByteArray can be used to store custom data and manipulate it. There are many
|
||||||
* stream operators to store/restore common types to byte array. Store operators
|
* stream operators to store/restore common types to byte array. Store operators
|
||||||
* places data at the end of array, restore operators takes data from the beginning
|
* places data at the end of array, restore operators takes data from the beginning
|
||||||
@@ -57,22 +57,22 @@ class PIByteArray;
|
|||||||
*
|
*
|
||||||
* One of the major usage of %PIByteArray is stream functions. You can form binary
|
* One of the major usage of %PIByteArray is stream functions. You can form binary
|
||||||
* packet from many types (also dynamic types, e.g. PIVector) with one line:
|
* packet from many types (also dynamic types, e.g. PIVector) with one line:
|
||||||
* @snippet pibytearray.cpp 0
|
* \snippet pibytearray.cpp 0
|
||||||
*
|
*
|
||||||
* Or you can descibe stream operator of your own type and store/restore vectors of
|
* Or you can descibe stream operator of your own type and store/restore vectors of
|
||||||
* your type:
|
* your type:
|
||||||
* @snippet pibytearray.cpp 1
|
* \snippet pibytearray.cpp 1
|
||||||
*
|
*
|
||||||
* For store/restore custom data blocks there is PIByteArray::RawData class. Stream
|
* For store/restore custom data blocks there is PIByteArray::RawData class. Stream
|
||||||
* operators of this class simply store/restore data block to/from byte array.
|
* operators of this class simply store/restore data block to/from byte array.
|
||||||
* @snippet pibytearray.cpp 2
|
* \snippet pibytearray.cpp 2
|
||||||
*
|
*
|
||||||
* @section PIByteArray_sec1 Attention
|
* \section PIByteArray_sec1 Attention
|
||||||
* Stream operator of %PIByteArray store byte array as vector, not simply append
|
* Stream operator of %PIByteArray store byte array as vector, not simply append
|
||||||
* content of byte array. This operators useful to transmit custom data as %PIByteArray
|
* content of byte array. This operators useful to transmit custom data as %PIByteArray
|
||||||
* packed into parent byte array, e.g. to form packet from %PIByteArray.
|
* packed into parent byte array, e.g. to form packet from %PIByteArray.
|
||||||
* To append one byte array to another use funtion \a append().
|
* To append one byte array to another use funtion \a append().
|
||||||
* @snippet pibytearray.cpp 3
|
* \snippet pibytearray.cpp 3
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -196,7 +196,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Byte arrays compare operator
|
//! \relatesalso PIByteArray \brief Byte arrays compare operator
|
||||||
inline bool operator <(const PIByteArray & v0, const PIByteArray & v1) {
|
inline bool operator <(const PIByteArray & v0, const PIByteArray & v1) {
|
||||||
if (v0.size() == v1.size()) {
|
if (v0.size() == v1.size()) {
|
||||||
if (v0.isEmpty()) return false;
|
if (v0.isEmpty()) return false;
|
||||||
@@ -205,7 +205,7 @@ inline bool operator <(const PIByteArray & v0, const PIByteArray & v1) {
|
|||||||
return v0.size() < v1.size();
|
return v0.size() < v1.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Byte arrays compare operator
|
//! \relatesalso PIByteArray \brief Byte arrays compare operator
|
||||||
inline bool operator >(const PIByteArray & v0, const PIByteArray & v1) {
|
inline bool operator >(const PIByteArray & v0, const PIByteArray & v1) {
|
||||||
if (v0.size() == v1.size()) {
|
if (v0.size() == v1.size()) {
|
||||||
if (v0.isEmpty()) return false;
|
if (v0.isEmpty()) return false;
|
||||||
@@ -214,7 +214,7 @@ inline bool operator >(const PIByteArray & v0, const PIByteArray & v1) {
|
|||||||
return v0.size() > v1.size();
|
return v0.size() > v1.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Byte arrays compare operator
|
//! \relatesalso PIByteArray \brief Byte arrays compare operator
|
||||||
inline bool operator ==(const PIByteArray & v0, const PIByteArray & v1) {
|
inline bool operator ==(const PIByteArray & v0, const PIByteArray & v1) {
|
||||||
if (v0.size() == v1.size()) {
|
if (v0.size() == v1.size()) {
|
||||||
if (v0.isEmpty()) return true;
|
if (v0.isEmpty()) return true;
|
||||||
@@ -223,7 +223,7 @@ inline bool operator ==(const PIByteArray & v0, const PIByteArray & v1) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Byte arrays compare operator
|
//! \relatesalso PIByteArray \brief Byte arrays compare operator
|
||||||
inline bool operator !=(const PIByteArray & v0, const PIByteArray & v1) {
|
inline bool operator !=(const PIByteArray & v0, const PIByteArray & v1) {
|
||||||
if (v0.size() == v1.size()) {
|
if (v0.size() == v1.size()) {
|
||||||
if (v0.isEmpty()) return false;
|
if (v0.isEmpty()) return false;
|
||||||
@@ -233,11 +233,11 @@ inline bool operator !=(const PIByteArray & v0, const PIByteArray & v1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PIP_STD_IOSTREAM
|
#ifdef PIP_STD_IOSTREAM
|
||||||
//! \relatesalso PIByteArray @brief Output to std::ostream operator
|
//! \relatesalso PIByteArray \brief Output to std::ostream operator
|
||||||
inline std::ostream & operator <<(std::ostream & s, const PIByteArray & ba);
|
inline std::ostream & operator <<(std::ostream & s, const PIByteArray & ba);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Output to PICout operator
|
//! \relatesalso PIByteArray \brief Output to PICout operator
|
||||||
PIP_EXPORT PICout operator <<(PICout s, const PIByteArray & ba);
|
PIP_EXPORT PICout operator <<(PICout s, const PIByteArray & ba);
|
||||||
|
|
||||||
|
|
||||||
@@ -246,16 +246,16 @@ PIP_EXPORT PICout operator <<(PICout s, const PIByteArray & ba);
|
|||||||
// store operators for basic types
|
// store operators for basic types
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator
|
//! \relatesalso PIByteArray \brief Store operator
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const bool v) {s.push_back(v); return s;}
|
inline PIByteArray & operator <<(PIByteArray & s, const bool v) {s.push_back(v); return s;}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator
|
//! \relatesalso PIByteArray \brief Store operator
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const char v) {s.push_back(v); return s;}
|
inline PIByteArray & operator <<(PIByteArray & s, const char v) {s.push_back(v); return s;}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator
|
//! \relatesalso PIByteArray \brief Store operator
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const uchar v) {s.push_back(v); return s;}
|
inline PIByteArray & operator <<(PIByteArray & s, const uchar v) {s.push_back(v); return s;}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator for any trivial copyable type
|
//! \relatesalso PIByteArray \brief Store operator for any trivial copyable type
|
||||||
template<typename T, typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0>
|
||||||
inline PIByteArray::StreamRef operator <<(PIByteArray & s, const T & v) {
|
inline PIByteArray::StreamRef operator <<(PIByteArray & s, const T & v) {
|
||||||
int os = s.size_s();
|
int os = s.size_s();
|
||||||
@@ -264,10 +264,10 @@ inline PIByteArray::StreamRef operator <<(PIByteArray & s, const T & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator, see \ref PIByteArray_sec1 for details
|
//! \relatesalso PIByteArray \brief Store operator, see \ref PIByteArray_sec1 for details
|
||||||
PIP_EXPORT PIByteArray & operator <<(PIByteArray & s, const PIByteArray & v);
|
PIP_EXPORT PIByteArray & operator <<(PIByteArray & s, const PIByteArray & v);
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator, see \ref PIByteArray_sec1 for details
|
//! \relatesalso PIByteArray \brief Store operator, see \ref PIByteArray_sec1 for details
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const PIByteArray::RawData & v) {
|
inline PIByteArray & operator <<(PIByteArray & s, const PIByteArray::RawData & v) {
|
||||||
int os = s.size_s();
|
int os = s.size_s();
|
||||||
if (v.s > 0) {
|
if (v.s > 0) {
|
||||||
@@ -277,7 +277,7 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIByteArray::RawData & v
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator for PIVector of any trivial copyable type
|
//! \relatesalso PIByteArray \brief Store operator for PIVector of any trivial copyable type
|
||||||
template<typename T,
|
template<typename T,
|
||||||
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
||||||
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
||||||
@@ -299,7 +299,7 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIVector<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator for PIDeque of any trivial copyable type
|
//! \relatesalso PIByteArray \brief Store operator for PIDeque of any trivial copyable type
|
||||||
template<typename T,
|
template<typename T,
|
||||||
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
||||||
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
||||||
@@ -321,7 +321,7 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIDeque<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator for PIVector2D of any trivial copyable type
|
//! \relatesalso PIByteArray \brief Store operator for PIVector2D of any trivial copyable type
|
||||||
template<typename T,
|
template<typename T,
|
||||||
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
||||||
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
||||||
@@ -342,10 +342,10 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIVector2D<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator
|
//! \relatesalso PIByteArray \brief Store operator
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const PIBitArray & v) {s << v.size_ << v.data_; return s;}
|
inline PIByteArray & operator <<(PIByteArray & s, const PIBitArray & v) {s << v.size_ << v.data_; return s;}
|
||||||
|
|
||||||
//! \relatesalso PIPair @brief Store operator
|
//! \relatesalso PIPair \brief Store operator
|
||||||
template<typename Type0, typename Type1>
|
template<typename Type0, typename Type1>
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const PIPair<Type0, Type1> & v) {s << v.first << v.second; return s;}
|
inline PIByteArray & operator <<(PIByteArray & s, const PIPair<Type0, Type1> & v) {s << v.first << v.second; return s;}
|
||||||
|
|
||||||
@@ -355,16 +355,16 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIPair<Type0, Type1> & v
|
|||||||
// restore operators for basic types
|
// restore operators for basic types
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator
|
//! \relatesalso PIByteArray \brief Restore operator
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, bool & v) {assert(s.size() >= 1u); v = s.take_front(); return s;}
|
inline PIByteArray & operator >>(PIByteArray & s, bool & v) {assert(s.size() >= 1u); v = s.take_front(); return s;}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator
|
//! \relatesalso PIByteArray \brief Restore operator
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, char & v) {assert(s.size() >= 1u); v = s.take_front(); return s;}
|
inline PIByteArray & operator >>(PIByteArray & s, char & v) {assert(s.size() >= 1u); v = s.take_front(); return s;}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator
|
//! \relatesalso PIByteArray \brief Restore operator
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, uchar & v) {assert(s.size() >= 1u); v = s.take_front(); return s;}
|
inline PIByteArray & operator >>(PIByteArray & s, uchar & v) {assert(s.size() >= 1u); v = s.take_front(); return s;}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator for any trivial copyable type
|
//! \relatesalso PIByteArray \brief Restore operator for any trivial copyable type
|
||||||
template<typename T, typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0>
|
||||||
inline PIByteArray::StreamRef operator >>(PIByteArray & s, T & v) {
|
inline PIByteArray::StreamRef operator >>(PIByteArray & s, T & v) {
|
||||||
if (s.size() < sizeof(v)) {
|
if (s.size() < sizeof(v)) {
|
||||||
@@ -376,10 +376,10 @@ inline PIByteArray::StreamRef operator >>(PIByteArray & s, T & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator, see \ref PIByteArray_sec1 for details
|
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
|
||||||
PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PIByteArray & v);
|
PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PIByteArray & v);
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator, see \ref PIByteArray_sec1 for details
|
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIByteArray::RawData v) {
|
inline PIByteArray & operator >>(PIByteArray & s, PIByteArray::RawData v) {
|
||||||
if (s.size_s() < v.s) {
|
if (s.size_s() < v.s) {
|
||||||
printf("error with RawData %d < %d\n", (int)s.size_s(), v.s);
|
printf("error with RawData %d < %d\n", (int)s.size_s(), v.s);
|
||||||
@@ -392,7 +392,7 @@ inline PIByteArray & operator >>(PIByteArray & s, PIByteArray::RawData v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator for PIVector of any trivial copyable type
|
//! \relatesalso PIByteArray \brief Restore operator for PIVector of any trivial copyable type
|
||||||
template<typename T,
|
template<typename T,
|
||||||
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
||||||
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
||||||
@@ -423,7 +423,7 @@ inline PIByteArray & operator >>(PIByteArray & s, PIVector<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator for PIDeque of any trivial copyable type
|
//! \relatesalso PIByteArray \brief Restore operator for PIDeque of any trivial copyable type
|
||||||
template<typename T,
|
template<typename T,
|
||||||
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
||||||
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
||||||
@@ -454,7 +454,7 @@ inline PIByteArray & operator >>(PIByteArray & s, PIDeque<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator for PIVector2D of any trivial copyable type
|
//! \relatesalso PIByteArray \brief Restore operator for PIVector2D of any trivial copyable type
|
||||||
template<typename T,
|
template<typename T,
|
||||||
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
typename std::enable_if< std::is_trivially_copyable<T>::value, int>::type = 0,
|
||||||
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
typename std::enable_if< std::is_same<decltype(std::declval<PIByteArray&>() << std::declval<const T &>()), PIByteArray::StreamRef>::value, int>::type = 0>
|
||||||
@@ -487,10 +487,10 @@ inline PIByteArray & operator >>(PIByteArray & s, PIVector2D<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator
|
//! \relatesalso PIByteArray \brief Restore operator
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIBitArray & v) {assert(s.size_s() >= 8); s >> v.size_ >> v.data_; return s;}
|
inline PIByteArray & operator >>(PIByteArray & s, PIBitArray & v) {assert(s.size_s() >= 8); s >> v.size_ >> v.data_; return s;}
|
||||||
|
|
||||||
//! \relatesalso PIPair @brief Restore operator
|
//! \relatesalso PIPair \brief Restore operator
|
||||||
template<typename Type0, typename Type1>
|
template<typename Type0, typename Type1>
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIPair<Type0, Type1> & v) {s >> v.first >> v.second; return s;}
|
inline PIByteArray & operator >>(PIByteArray & s, PIPair<Type0, Type1> & v) {s >> v.first >> v.second; return s;}
|
||||||
|
|
||||||
@@ -500,7 +500,7 @@ inline PIByteArray & operator >>(PIByteArray & s, PIPair<Type0, Type1> & v) {s >
|
|||||||
// store operators for complex types
|
// store operators for complex types
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator for PIVector of any compound type
|
//! \relatesalso PIByteArray \brief Store operator for PIVector of any compound type
|
||||||
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const PIVector<T> & v) {
|
inline PIByteArray & operator <<(PIByteArray & s, const PIVector<T> & v) {
|
||||||
s << int(v.size_s());
|
s << int(v.size_s());
|
||||||
@@ -508,7 +508,7 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIVector<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator for PIDeque of any compound type
|
//! \relatesalso PIByteArray \brief Store operator for PIDeque of any compound type
|
||||||
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const PIDeque<T> & v) {
|
inline PIByteArray & operator <<(PIByteArray & s, const PIDeque<T> & v) {
|
||||||
s << int(v.size_s());
|
s << int(v.size_s());
|
||||||
@@ -516,7 +516,7 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIDeque<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Store operator for PIVector2D of any compound type
|
//! \relatesalso PIByteArray \brief Store operator for PIVector2D of any compound type
|
||||||
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const PIVector2D<T> & v) {
|
inline PIByteArray & operator <<(PIByteArray & s, const PIVector2D<T> & v) {
|
||||||
s << int(v.rows()) << int(v.cols()) << v.toPlainVector();
|
s << int(v.rows()) << int(v.cols()) << v.toPlainVector();
|
||||||
@@ -529,7 +529,7 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIVector2D<T> & v) {
|
|||||||
// restore operators for complex types
|
// restore operators for complex types
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator for PIVector of any compound type
|
//! \relatesalso PIByteArray \brief Restore operator for PIVector of any compound type
|
||||||
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIVector<T> & v) {
|
inline PIByteArray & operator >>(PIByteArray & s, PIVector<T> & v) {
|
||||||
if (s.size_s() < 4) {
|
if (s.size_s() < 4) {
|
||||||
@@ -542,7 +542,7 @@ inline PIByteArray & operator >>(PIByteArray & s, PIVector<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator for PIDeque of any compound type
|
//! \relatesalso PIByteArray \brief Restore operator for PIDeque of any compound type
|
||||||
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIDeque<T> & v) {
|
inline PIByteArray & operator >>(PIByteArray & s, PIDeque<T> & v) {
|
||||||
if (s.size_s() < 4) {
|
if (s.size_s() < 4) {
|
||||||
@@ -555,7 +555,7 @@ inline PIByteArray & operator >>(PIByteArray & s, PIDeque<T> & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Restore operator for PIVector2D of any compound type
|
//! \relatesalso PIByteArray \brief Restore operator for PIVector2D of any compound type
|
||||||
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if<!std::is_trivially_copyable<T>::value, int>::type = 0>
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIVector2D<T> & v) {
|
inline PIByteArray & operator >>(PIByteArray & s, PIVector2D<T> & v) {
|
||||||
if (s.size_s() < 8) {
|
if (s.size_s() < 8) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pichar.h
|
/*! \file pichar.h
|
||||||
* @brief Unicode char
|
* \brief Unicode char
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -46,7 +46,7 @@ char * __utf8name__ = 0;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \class PIChar
|
/*! \class PIChar
|
||||||
* @brief Unicode char
|
* \brief Unicode char
|
||||||
* \details This class is wrapper around \c "uint".
|
* \details This class is wrapper around \c "uint".
|
||||||
* There are many contructors and information functions
|
* There are many contructors and information functions
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pichar.h
|
/*! \file pichar.h
|
||||||
* @brief Unicode char
|
* \brief Unicode char
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include "pichunkstream.h"
|
#include "pichunkstream.h"
|
||||||
|
|
||||||
/*! \class PIChunkStream
|
/*! \class PIChunkStream
|
||||||
* @brief Class for binary serialization
|
* \brief Class for binary serialization
|
||||||
*
|
*
|
||||||
* \section PIChunkStream_sec0 Synopsis
|
* \section PIChunkStream_sec0 Synopsis
|
||||||
* This class provides very handly mechanism to store and restore values to and from
|
* This class provides very handly mechanism to store and restore values to and from
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pichunkstream.h
|
/*! \file pichunkstream.h
|
||||||
* @brief Binary markup serializator
|
* \brief Binary markup serializator
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PICLI
|
/*! \class PICLI
|
||||||
* @brief Command-line arguments parser
|
* \brief Command-line arguments parser
|
||||||
*
|
*
|
||||||
* \section PICLI_sec0 Synopsis
|
* \section PICLI_sec0 Synopsis
|
||||||
* This class provide handy parsing of command-line arguments. First you should add
|
* This class provide handy parsing of command-line arguments. First you should add
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picli.h
|
/*! \file picli.h
|
||||||
* @brief Command-Line parser
|
* \brief Command-Line parser
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/** \class PICollection
|
/** \class PICollection
|
||||||
* @brief Interface to discover element groups
|
* \brief Interface to discover element groups
|
||||||
* \details
|
* \details
|
||||||
* \section PICollection_sec0 Synopsis
|
* \section PICollection_sec0 Synopsis
|
||||||
* This class has only static functions so no need to create instance of the
|
* This class has only static functions so no need to create instance of the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picollection.h
|
/*! \file picollection.h
|
||||||
* @brief Custom elements collection
|
* \brief Custom elements collection
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#ifdef DOXYGEN
|
#ifdef DOXYGEN
|
||||||
|
|
||||||
/** @brief Add existing element "object" in group with name "group"
|
/** \brief Add existing element "object" in group with name "group"
|
||||||
* \relatesalso PICollection
|
* \relatesalso PICollection
|
||||||
* \details If there is no group with name "group" it will be created.
|
* \details If there is no group with name "group" it will be created.
|
||||||
* Only one element of the class "object" can be in group "group". If
|
* Only one element of the class "object" can be in group "group". If
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
* be pointer to object based on PIObject. */
|
* be pointer to object based on PIObject. */
|
||||||
# define ADD_TO_COLLECTION(group, object)
|
# define ADD_TO_COLLECTION(group, object)
|
||||||
|
|
||||||
/** @brief Add new element of class "class" in group with name "group"
|
/** \brief Add new element of class "class" in group with name "group"
|
||||||
* \relatesalso PICollection
|
* \relatesalso PICollection
|
||||||
* \details If there is no group with name "group" it will be created.
|
* \details If there is no group with name "group" it will be created.
|
||||||
* Only one element of the class "class" can be in group "group". If
|
* Only one element of the class "class" can be in group "group". If
|
||||||
@@ -65,10 +65,10 @@ class PIP_EXPORT PICollection
|
|||||||
public:
|
public:
|
||||||
PICollection() {;}
|
PICollection() {;}
|
||||||
|
|
||||||
//! @brief Returns all existing groups by their names
|
//! \brief Returns all existing groups by their names
|
||||||
static PIStringList groups();
|
static PIStringList groups();
|
||||||
|
|
||||||
//! @brief Returns all elements of group "group"
|
//! \brief Returns all elements of group "group"
|
||||||
static PIVector<const PIObject * > groupElements(const PIString & group);
|
static PIVector<const PIObject * > groupElements(const PIString & group);
|
||||||
|
|
||||||
static bool addToGroup(const PIString & group, const PIObject * element);
|
static bool addToGroup(const PIString & group, const PIObject * element);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picout.h
|
/*! \file picout.h
|
||||||
* @brief Universal output to console class
|
* \brief Universal output to console class
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -27,10 +27,10 @@
|
|||||||
|
|
||||||
#ifdef DOXYGEN
|
#ifdef DOXYGEN
|
||||||
|
|
||||||
//! @brief Macro used for conditional (piDebug) output to PICout
|
//! \brief Macro used for conditional (piDebug) output to PICout
|
||||||
# define piCout
|
# define piCout
|
||||||
|
|
||||||
//! \relatesalso PIObject @brief Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject
|
//! \relatesalso PIObject \brief Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject
|
||||||
# define piCoutObj
|
# define piCoutObj
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -42,10 +42,10 @@
|
|||||||
class PIObject;
|
class PIObject;
|
||||||
|
|
||||||
|
|
||||||
//! @brief Namespace contains enums controlled PICout
|
//! \brief Namespace contains enums controlled PICout
|
||||||
namespace PICoutManipulators {
|
namespace PICoutManipulators {
|
||||||
|
|
||||||
//! @brief Enum contains special characters
|
//! \brief Enum contains special characters
|
||||||
enum PICoutSpecialChar {
|
enum PICoutSpecialChar {
|
||||||
Null /*! Null-character, '\\0' */,
|
Null /*! Null-character, '\\0' */,
|
||||||
NewLine /*! New line character, '\\n' */,
|
NewLine /*! New line character, '\\n' */,
|
||||||
@@ -54,7 +54,7 @@ namespace PICoutManipulators {
|
|||||||
Quote /*! Quote character, '"' */
|
Quote /*! Quote character, '"' */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Enum contains immediate action
|
//! \brief Enum contains immediate action
|
||||||
enum PICoutAction {
|
enum PICoutAction {
|
||||||
Flush /*! Flush the output */,
|
Flush /*! Flush the output */,
|
||||||
Backspace /*! Remove last symbol */,
|
Backspace /*! Remove last symbol */,
|
||||||
@@ -66,7 +66,7 @@ namespace PICoutManipulators {
|
|||||||
RestoreControl /*! Restore control flags, equivalent to \a restoreControl() */
|
RestoreControl /*! Restore control flags, equivalent to \a restoreControl() */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Enum contains control of PICout
|
//! \brief Enum contains control of PICout
|
||||||
enum PICoutControl {
|
enum PICoutControl {
|
||||||
AddNone /*! No controls */ = 0x0,
|
AddNone /*! No controls */ = 0x0,
|
||||||
AddSpaces /*! Spaces will be appear after each output */ = 0x1,
|
AddSpaces /*! Spaces will be appear after each output */ = 0x1,
|
||||||
@@ -77,7 +77,7 @@ namespace PICoutManipulators {
|
|||||||
NoLock /*! Don`t use mutex for output */ = 0x100,
|
NoLock /*! Don`t use mutex for output */ = 0x100,
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Enum contains output format
|
//! \brief Enum contains output format
|
||||||
enum PICoutFormat {
|
enum PICoutFormat {
|
||||||
Bin /*! Binary representation of integers */ = 0x01,
|
Bin /*! Binary representation of integers */ = 0x01,
|
||||||
Oct /*! Octal representation of integers */ = 0x02,
|
Oct /*! Octal representation of integers */ = 0x02,
|
||||||
@@ -112,7 +112,7 @@ namespace PICoutManipulators {
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PICout
|
/*! \class PICout
|
||||||
* @brief Class for formatted output similar std::cout
|
* \brief Class for formatted output similar std::cout
|
||||||
*
|
*
|
||||||
* \section PICout_sec0 Synopsis
|
* \section PICout_sec0 Synopsis
|
||||||
* This class provide many stream operators for output with some features.
|
* This class provide many stream operators for output with some features.
|
||||||
@@ -150,7 +150,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PICout::Notifier
|
/*! \class PICout::Notifier
|
||||||
* @brief Class for emit notifications of PICout
|
* \brief Class for emit notifications of PICout
|
||||||
*
|
*
|
||||||
* \section PICout_sec0 Synopsis
|
* \section PICout_sec0 Synopsis
|
||||||
* This class used as PICout events emitter. When
|
* This class used as PICout events emitter. When
|
||||||
@@ -170,7 +170,7 @@ public:
|
|||||||
PIObject * o;
|
PIObject * o;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Enum contains output devices of PICout
|
//! \brief Enum contains output devices of PICout
|
||||||
enum OutputDevice {
|
enum OutputDevice {
|
||||||
NoDevices /** PICout is disabled */ = 0x0,
|
NoDevices /** PICout is disabled */ = 0x0,
|
||||||
StdOut /** Standard console output */ = 0x1,
|
StdOut /** Standard console output */ = 0x1,
|
||||||
@@ -292,17 +292,17 @@ public:
|
|||||||
//! Restore control flags from internal stack \sa \a saveControl()
|
//! Restore control flags from internal stack \sa \a saveControl()
|
||||||
PICout & restoreControl();
|
PICout & restoreControl();
|
||||||
|
|
||||||
/*! @brief Conditional put space character to output
|
/*! \brief Conditional put space character to output
|
||||||
* \details If it is not a first output and control \a AddSpaces is set
|
* \details If it is not a first output and control \a AddSpaces is set
|
||||||
* space character is put \sa \a quote(), \a newLine() */
|
* space character is put \sa \a quote(), \a newLine() */
|
||||||
PICout & space();
|
PICout & space();
|
||||||
|
|
||||||
/*! @brief Conditional put quote character to output
|
/*! \brief Conditional put quote character to output
|
||||||
* \details If control \a AddQuotes is set
|
* \details If control \a AddQuotes is set
|
||||||
* quote character is put \sa \a space(), \a newLine() */
|
* quote character is put \sa \a space(), \a newLine() */
|
||||||
PICout & quote();
|
PICout & quote();
|
||||||
|
|
||||||
/*! @brief Conditional put new line character to output
|
/*! \brief Conditional put new line character to output
|
||||||
* \details If control \a AddNewLine is set
|
* \details If control \a AddNewLine is set
|
||||||
* new line character is put \sa \a space(), \a quote() */
|
* new line character is put \sa \a space(), \a quote() */
|
||||||
PICout & newLine();
|
PICout & newLine();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piflags.h
|
/*! \file piflags.h
|
||||||
* @brief General flags class
|
* \brief General flags class
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "pip_export.h"
|
#include "pip_export.h"
|
||||||
|
|
||||||
/*! @brief This class used as container for bit flags
|
/*! \brief This class used as container for bit flags
|
||||||
* \details PIFlags is wrapper around \c "int". There are many
|
* \details PIFlags is wrapper around \c "int". There are many
|
||||||
* bit-wise operators, native conversion to int and function
|
* bit-wise operators, native conversion to int and function
|
||||||
* to test flag. \n Example:
|
* to test flag. \n Example:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piinit.h
|
/*! \file piinit.h
|
||||||
* @brief Initialization
|
* \brief Initialization
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -51,7 +51,7 @@ class PIP_EXPORT PIInit {
|
|||||||
public:
|
public:
|
||||||
~PIInit();
|
~PIInit();
|
||||||
|
|
||||||
//! @brief Build options which PIP library was built
|
//! \brief Build options which PIP library was built
|
||||||
enum BuildOption {
|
enum BuildOption {
|
||||||
boICU /*! Unicode support */ = 0x01,
|
boICU /*! Unicode support */ = 0x01,
|
||||||
boUSB /*! USB support */ = 0x02,
|
boUSB /*! USB support */ = 0x02,
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \class PIObject
|
/** \class PIObject
|
||||||
* @brief This is base class for any classes which use events -> handlers mechanism.
|
* \brief This is base class for any classes which use events -> handlers mechanism.
|
||||||
* \details
|
* \details
|
||||||
* \section PIObject_sec0 Events and Event handlers
|
* \section PIObject_sec0 Events and Event handlers
|
||||||
* %PIObject provide notification mechanism similar Qt but implemented
|
* %PIObject provide notification mechanism similar Qt but implemented
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piobject.h
|
/*! \file piobject.h
|
||||||
* @brief Base object
|
* \brief Base object
|
||||||
*
|
*
|
||||||
* This file declare PIObject class
|
* This file declare PIObject class
|
||||||
*/
|
*/
|
||||||
@@ -445,15 +445,15 @@ public:
|
|||||||
};
|
};
|
||||||
typedef PIPair<const void * , __MetaFunc> __EHPair;
|
typedef PIPair<const void * , __MetaFunc> __EHPair;
|
||||||
|
|
||||||
//! @brief Execute all posted events from CONNECTU_QUEUED connections
|
//! \brief Execute all posted events from CONNECTU_QUEUED connections
|
||||||
void callQueuedEvents();
|
void callQueuedEvents();
|
||||||
|
|
||||||
//! @brief Check if any CONNECTU_QUEUED connections to this object and execute them
|
//! \brief Check if any CONNECTU_QUEUED connections to this object and execute them
|
||||||
//! \details This function is more optimized than \a callQueuedEvents() for objects that doesn`t
|
//! \details This function is more optimized than \a callQueuedEvents() for objects that doesn`t
|
||||||
//! appears as \"performer\" target at CONNECTU_QUEUED
|
//! appears as \"performer\" target at CONNECTU_QUEUED
|
||||||
bool maybeCallQueuedEvents() {if (proc_event_queue) callQueuedEvents(); return proc_event_queue;}
|
bool maybeCallQueuedEvents() {if (proc_event_queue) callQueuedEvents(); return proc_event_queue;}
|
||||||
|
|
||||||
//! @brief Mark object to delete
|
//! \brief Mark object to delete
|
||||||
//! \details On first call background thread started to delete objects.
|
//! \details On first call background thread started to delete objects.
|
||||||
//! Each object deletes when it`s outside from any events and hadlers.
|
//! Each object deletes when it`s outside from any events and hadlers.
|
||||||
void deleteLater();
|
void deleteLater();
|
||||||
@@ -475,7 +475,7 @@ protected:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
/** \fn void deleted(PIObject * o)
|
/** \fn void deleted(PIObject * o)
|
||||||
* @brief Raise before object delete
|
* \brief Raise before object delete
|
||||||
* \note This event raised from destructor, so use only "o" value,
|
* \note This event raised from destructor, so use only "o" value,
|
||||||
* don`t try to cast deleted object to some subclass! */
|
* don`t try to cast deleted object to some subclass! */
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piobject_macros.h
|
/*! \file piobject_macros.h
|
||||||
* @brief Base object
|
* \brief Base object
|
||||||
*
|
*
|
||||||
* This file declare macros for PIObject
|
* This file declare macros for PIObject
|
||||||
*/
|
*/
|
||||||
@@ -29,67 +29,67 @@
|
|||||||
#ifdef DOXYGEN
|
#ifdef DOXYGEN
|
||||||
|
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output
|
/// \relatesalso PIObject \brief you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output
|
||||||
#define PIOBJECT(name)
|
#define PIOBJECT(name)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and \a scopeList()
|
/// \relatesalso PIObject \brief you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and \a scopeList()
|
||||||
#define PIOBJECT_SUBCLASS(name, parent)
|
#define PIOBJECT_SUBCLASS(name, parent)
|
||||||
|
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name()
|
/// \relatesalso PIObject \brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name()
|
||||||
#define EVENT_HANDLER0(ret, name) ret name()
|
#define EVENT_HANDLER0(ret, name) ret name()
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name(type0 var0)
|
/// \relatesalso PIObject \brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name(type0 var0)
|
||||||
#define EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0)
|
#define EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name(type0 var0, type1 var1)
|
/// \relatesalso PIObject \brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name(type0 var0, type1 var1)
|
||||||
#define EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1)
|
#define EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name(type0 var0, type1 var1, type2 var2)
|
/// \relatesalso PIObject \brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name(type0 var0, type1 var1, type2 var2)
|
||||||
#define EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2)
|
#define EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name(type0 var0, type1 var1, type2 var2, type3 var3)
|
/// \relatesalso PIObject \brief declare event handler \"event\" with name \"name\" and return type \"ret\", ret name(type0 var0, type1 var1, type2 var2, type3 var3)
|
||||||
#define EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3)
|
#define EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief EVENT_HANDLER is synonym of EVENT_HANDLER0
|
/// \relatesalso PIObject \brief EVENT_HANDLER is synonym of EVENT_HANDLER0
|
||||||
#define EVENT_HANDLER EVENT_HANDLER0
|
#define EVENT_HANDLER EVENT_HANDLER0
|
||||||
|
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name()
|
/// \relatesalso PIObject \brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name()
|
||||||
#define EVENT_VHANDLER0(ret, name) virtual ret name()
|
#define EVENT_VHANDLER0(ret, name) virtual ret name()
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name(type0 var0)
|
/// \relatesalso PIObject \brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name(type0 var0)
|
||||||
#define EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0)
|
#define EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name(type0 var0, type1 var1)
|
/// \relatesalso PIObject \brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name(type0 var0, type1 var1)
|
||||||
#define EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1)
|
#define EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name(type0 var0, type1 var1, type2 var2)
|
/// \relatesalso PIObject \brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name(type0 var0, type1 var1, type2 var2)
|
||||||
#define EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2)
|
#define EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3)
|
/// \relatesalso PIObject \brief declare virtual event handler \"event\" with name \"name\" and return type \"ret\", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3)
|
||||||
#define EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3)
|
#define EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief EVENT_VHANDLER is synonym of EVENT_VHANDLER0
|
/// \relatesalso PIObject \brief EVENT_VHANDLER is synonym of EVENT_VHANDLER0
|
||||||
#define EVENT_VHANDLER EVENT_VHANDLER0
|
#define EVENT_VHANDLER EVENT_VHANDLER0
|
||||||
|
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event \"event\" with name \"name\", void name();
|
/// \relatesalso PIObject \brief declare event \"event\" with name \"name\", void name();
|
||||||
#define EVENT0(name) void name();
|
#define EVENT0(name) void name();
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event \"event\" with name \"name\", void name(type0 var0);
|
/// \relatesalso PIObject \brief declare event \"event\" with name \"name\", void name(type0 var0);
|
||||||
#define EVENT1(name, type0, var0) void name(type0 var0);
|
#define EVENT1(name, type0, var0) void name(type0 var0);
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event \"event\" with name \"name\", void name(type0 var0, type1 var1);
|
/// \relatesalso PIObject \brief declare event \"event\" with name \"name\", void name(type0 var0, type1 var1);
|
||||||
#define EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1);
|
#define EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1);
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event \"event\" with name \"name\", void name(type0 var0, type1 var1, type2 var2);
|
/// \relatesalso PIObject \brief declare event \"event\" with name \"name\", void name(type0 var0, type1 var1, type2 var2);
|
||||||
#define EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2);
|
#define EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2);
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief declare event \"event\" with name \"name\", void name(type0 var0, type1 var1, type2 var2, type3 var3);
|
/// \relatesalso PIObject \brief declare event \"event\" with name \"name\", void name(type0 var0, type1 var1, type2 var2, type3 var3);
|
||||||
#define EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3);
|
#define EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3);
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief EVENT is synonym of EVENT0
|
/// \relatesalso PIObject \brief EVENT is synonym of EVENT0
|
||||||
#define EVENT EVENT0
|
#define EVENT EVENT0
|
||||||
|
|
||||||
|
|
||||||
@@ -101,82 +101,82 @@
|
|||||||
#define RAISE_EVENT RAISE_EVENT0
|
#define RAISE_EVENT RAISE_EVENT0
|
||||||
|
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\". \"Event\" and \"handler\" must has equal argument lists.
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\". \"Event\" and \"handler\" must has equal argument lists.
|
||||||
/// Returns PIObject::Connection
|
/// Returns PIObject::Connection
|
||||||
#define CONNECTU(src, event, dest, handler)
|
#define CONNECTU(src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\".
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\".
|
||||||
/// Event handler will be executed by \"performer\". \"Event\" and \"handler\" must has equal argument lists.
|
/// Event handler will be executed by \"performer\". \"Event\" and \"handler\" must has equal argument lists.
|
||||||
/// Returns PIObject::Connection
|
/// Returns PIObject::Connection
|
||||||
#define CONNECTU_QUEUED(src, event, dest, handler, performer)
|
#define CONNECTU_QUEUED(src, event, dest, handler, performer)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to lambda-expression \"functor\". \"Event\" and \"functor\" must has equal argument lists.
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to lambda-expression \"functor\". \"Event\" and \"functor\" must has equal argument lists.
|
||||||
/// Returns PIObject::Connection
|
/// Returns PIObject::Connection
|
||||||
#define CONNECTL(src, event, functor)
|
#define CONNECTL(src, event, functor)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists
|
||||||
/// Returns PIObject::Connection
|
/// Returns PIObject::Connection
|
||||||
#define CONNECT0(ret, src, event, dest, handler)
|
#define CONNECT0(ret, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists
|
||||||
/// Returns PIObject::Connection
|
/// Returns PIObject::Connection
|
||||||
#define CONNECT1(ret, type0, src, event, dest, handler)
|
#define CONNECT1(ret, type0, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists
|
||||||
/// Returns PIObject::Connection
|
/// Returns PIObject::Connection
|
||||||
#define CONNECT2(ret, type0, type1, src, event, dest, handler)
|
#define CONNECT2(ret, type0, type1, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists
|
||||||
/// Returns PIObject::Connection
|
/// Returns PIObject::Connection
|
||||||
#define CONNECT3(ret, type0, type1, type2, src, event, dest, handler)
|
#define CONNECT3(ret, type0, type1, type2, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists.
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" with check of event and handler exists.
|
||||||
/// Returns PIObject::Connection
|
/// Returns PIObject::Connection
|
||||||
#define CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler)
|
#define CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief CONNECT is synonym of CONNECT0
|
/// \relatesalso PIObject \brief CONNECT is synonym of CONNECT0
|
||||||
#define CONNECT CONNECT0
|
#define CONNECT CONNECT0
|
||||||
|
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
||||||
#define WEAK_CONNECT0(ret, src, event, dest, handler)
|
#define WEAK_CONNECT0(ret, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
||||||
#define WEAK_CONNECT1(ret, type0, src, event, dest, handler)
|
#define WEAK_CONNECT1(ret, type0, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
||||||
#define WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler)
|
#define WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
||||||
#define WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler)
|
#define WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
/// \relatesalso PIObject \brief connect event \"event\" from object \"src\" to event handler \"handler\" with return type \"ret\" from object \"dest\" without check of event exists
|
||||||
#define WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler)
|
#define WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief WEAK_CONNECT is synonym of WEAK_CONNECT0
|
/// \relatesalso PIObject \brief WEAK_CONNECT is synonym of WEAK_CONNECT0
|
||||||
#define WEAK_CONNECT WEAK_CONNECT0
|
#define WEAK_CONNECT WEAK_CONNECT0
|
||||||
|
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
/// \relatesalso PIObject \brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
||||||
#define DISCONNECT0(ret, src, event, dest, handler)
|
#define DISCONNECT0(ret, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
/// \relatesalso PIObject \brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
||||||
#define DISCONNECT1(ret, type0, src, event, dest, handler)
|
#define DISCONNECT1(ret, type0, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
/// \relatesalso PIObject \brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
||||||
#define DISCONNECT2(ret, type0, type1, src, event, dest, handler)
|
#define DISCONNECT2(ret, type0, type1, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
/// \relatesalso PIObject \brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
||||||
#define DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler)
|
#define DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
/// \relatesalso PIObject \brief piDisconnect event \"event\" from object \"src\" from event handler \"handler\" with return type \"ret\" from object \"dest\"
|
||||||
#define DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler)
|
#define DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler)
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief DISCONNECT is synonym of DISCONNECT0
|
/// \relatesalso PIObject \brief DISCONNECT is synonym of DISCONNECT0
|
||||||
#define DISCONNECT DISCONNECT0
|
#define DISCONNECT DISCONNECT0
|
||||||
|
|
||||||
|
|
||||||
/// \relatesalso PIObject @brief Returns pointer to events handler \"handler\"
|
/// \relatesalso PIObject \brief Returns pointer to events handler \"handler\"
|
||||||
#define HANDLER(handler)
|
#define HANDLER(handler)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pipropertystorage.h
|
/*! \file pipropertystorage.h
|
||||||
* @brief Storage of properties for GUI usage
|
* \brief Storage of properties for GUI usage
|
||||||
*
|
*
|
||||||
* This file declare PIPropertyStorage
|
* This file declare PIPropertyStorage
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
#include "pivariant.h"
|
#include "pivariant.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Key-value storage, based on PIVector with PIPropertyStorage::Property elements. Each element in vector
|
* \brief Key-value storage, based on PIVector with PIPropertyStorage::Property elements. Each element in vector
|
||||||
* contains unique name and you can identify property by name with propertyValueByName(), propertyByName().
|
* contains unique name and you can identify property by name with propertyValueByName(), propertyByName().
|
||||||
* You can add property using addProperty(const Property&), addProperty(const PIString&, const PIVariant&, const PIString&, int).
|
* You can add property using addProperty(const Property&), addProperty(const PIString&, const PIVariant&, const PIString&, int).
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,7 @@ public:
|
|||||||
PIPropertyStorage() {}
|
PIPropertyStorage() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief PIPropertyStorage element.
|
* \brief PIPropertyStorage element.
|
||||||
*/
|
*/
|
||||||
struct PIP_EXPORT Property {
|
struct PIP_EXPORT Property {
|
||||||
Property(const PIString & n = PIString(), const PIString & c = PIString(), const PIVariant & v = PIVariant(), int f = 0):
|
Property(const PIString & n = PIString(), const PIString & c = PIString(), const PIVariant & v = PIVariant(), int f = 0):
|
||||||
@@ -112,18 +112,18 @@ public:
|
|||||||
const PIPropertyStorage & propertyStorage() const {return *this;}
|
const PIPropertyStorage & propertyStorage() const {return *this;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if property with \a name exists
|
* \brief Check if property with \a name exists
|
||||||
* @return "true" if property exists
|
* @return "true" if property exists
|
||||||
*/
|
*/
|
||||||
bool isPropertyExists(const PIString & _name) const;
|
bool isPropertyExists(const PIString & _name) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Remove all properties
|
* \brief Remove all properties
|
||||||
*/
|
*/
|
||||||
void clearProperties() {props.clear();}
|
void clearProperties() {props.clear();}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add property if name isn't present in storage, otherwrise update existing property with same name.
|
* \brief Add property if name isn't present in storage, otherwrise update existing property with same name.
|
||||||
* @return "true" if new property added, else if update existing property return "false"
|
* @return "true" if new property added, else if update existing property return "false"
|
||||||
* @param p to copy in storage
|
* @param p to copy in storage
|
||||||
*/
|
*/
|
||||||
@@ -131,32 +131,32 @@ public:
|
|||||||
bool addProperty(Property && p);
|
bool addProperty(Property && p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief First of all construct Property with method params. After then add property if name isn't present
|
* \brief First of all construct Property with method params. After then add property if name isn't present
|
||||||
* in storage, otherwrise update existing property with same name.
|
* in storage, otherwrise update existing property with same name.
|
||||||
* @return "true" if new property added, else if update existing property return "false"
|
* @return "true" if new property added, else if update existing property return "false"
|
||||||
*/
|
*/
|
||||||
bool addProperty(const PIString & _name, const PIVariant & _def_value, const PIString & _comment = PIString(), int _flags = 0);
|
bool addProperty(const PIString & _name, const PIVariant & _def_value, const PIString & _comment = PIString(), int _flags = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Remove property with \a name
|
* \brief Remove property with \a name
|
||||||
* @return "true" if property exists and removed
|
* @return "true" if property exists and removed
|
||||||
*/
|
*/
|
||||||
bool removeProperty(const PIString & _name);
|
bool removeProperty(const PIString & _name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Remove properties wich has \a flag set
|
* \brief Remove properties wich has \a flag set
|
||||||
* @return removed properties count
|
* @return removed properties count
|
||||||
*/
|
*/
|
||||||
int removePropertiesByFlag(int flag);
|
int removePropertiesByFlag(int flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Merge other \a properties_ into this
|
* \brief Merge other \a properties_ into this
|
||||||
* @param flag_ignore - properties wich has this flag set will be ignored in merge
|
* @param flag_ignore - properties wich has this flag set will be ignored in merge
|
||||||
*/
|
*/
|
||||||
void updateProperties(const PIVector<Property> & properties_, int flag_ignore = 0);
|
void updateProperties(const PIVector<Property> & properties_, int flag_ignore = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Search property by name and return it.
|
* \brief Search property by name and return it.
|
||||||
*
|
*
|
||||||
* @param name of property
|
* @param name of property
|
||||||
* @return property value or default constructed Property
|
* @return property value or default constructed Property
|
||||||
@@ -164,7 +164,7 @@ public:
|
|||||||
Property propertyByName(const PIString & name) const;
|
Property propertyByName(const PIString & name) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Search property by name and return property value.
|
* \brief Search property by name and return property value.
|
||||||
*
|
*
|
||||||
* @param name of property
|
* @param name of property
|
||||||
* @return property value or invalid PIVariant if name unknown
|
* @return property value or invalid PIVariant if name unknown
|
||||||
@@ -172,7 +172,7 @@ public:
|
|||||||
PIVariant propertyValueByName(const PIString & name) const;
|
PIVariant propertyValueByName(const PIString & name) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set value of property with specific name if name is present in storage.
|
* \brief Set value of property with specific name if name is present in storage.
|
||||||
*
|
*
|
||||||
* @param name of property to set value
|
* @param name of property to set value
|
||||||
* @param value to set
|
* @param value to set
|
||||||
@@ -181,7 +181,7 @@ public:
|
|||||||
bool setPropertyValue(const PIString & name, const PIVariant & value);
|
bool setPropertyValue(const PIString & name, const PIVariant & value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set comment of property with specific name if name is present in storage.
|
* \brief Set comment of property with specific name if name is present in storage.
|
||||||
*
|
*
|
||||||
* @param name of property to set comment
|
* @param name of property to set comment
|
||||||
* @param comment to set
|
* @param comment to set
|
||||||
@@ -190,7 +190,7 @@ public:
|
|||||||
bool setPropertyComment(const PIString & name, const PIString & comment);
|
bool setPropertyComment(const PIString & name, const PIString & comment);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set flags of property with specific name if name is present in storage.
|
* \brief Set flags of property with specific name if name is present in storage.
|
||||||
*
|
*
|
||||||
* @param name of property to set flags
|
* @param name of property to set flags
|
||||||
* @param flags to set
|
* @param flags to set
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \class PIString
|
/*! \class PIString
|
||||||
* @brief String class
|
* \brief String class
|
||||||
* \details PIP use this class for use string information.
|
* \details PIP use this class for use string information.
|
||||||
*
|
*
|
||||||
* \section PIString_sec0 Synopsis
|
* \section PIString_sec0 Synopsis
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
/*! \fn int versionCompare(const PIString & v0, const PIString & v1, int components = 6)
|
/*! \fn int versionCompare(const PIString & v0, const PIString & v1, int components = 6)
|
||||||
* \relatesalso PIString
|
* \relatesalso PIString
|
||||||
* @brief Compare two version strings in free notation and returns 0, -1 or 1
|
* \brief Compare two version strings in free notation and returns 0, -1 or 1
|
||||||
* \details This function parse version to number codes and labels. Then it
|
* \details This function parse version to number codes and labels. Then it
|
||||||
* compare no more than "components" codes. If there is no difference, compare
|
* compare no more than "components" codes. If there is no difference, compare
|
||||||
* labels. Each label has corresponding integer value, so
|
* labels. Each label has corresponding integer value, so
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
*
|
*
|
||||||
* \fn PIString versionNormalize(const PIString & v)
|
* \fn PIString versionNormalize(const PIString & v)
|
||||||
* \relatesalso PIString
|
* \relatesalso PIString
|
||||||
* @brief Converts version string in free notation to classic view
|
* \brief Converts version string in free notation to classic view
|
||||||
* \details Parse version as described in \a versionCompare() and
|
* \details Parse version as described in \a versionCompare() and
|
||||||
* returns classic view of codes and labels: major.minor.revision[-build][_label].
|
* returns classic view of codes and labels: major.minor.revision[-build][_label].
|
||||||
* Example:
|
* Example:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pistring.h
|
/*! \file pistring.h
|
||||||
* @brief String
|
* \brief String
|
||||||
*
|
*
|
||||||
* This file declare string and string list classes
|
* This file declare string and string list classes
|
||||||
*/
|
*/
|
||||||
@@ -59,12 +59,12 @@ public:
|
|||||||
PIString(const PIChar c): PIDeque<PIChar>() {*this += c;}
|
PIString(const PIChar c): PIDeque<PIChar>() {*this += c;}
|
||||||
PIString(const char c): PIDeque<PIChar>() {*this += PIChar(c);}
|
PIString(const char c): PIDeque<PIChar>() {*this += PIChar(c);}
|
||||||
|
|
||||||
/*! @brief Contructs string from c-string "str"
|
/*! \brief Contructs string from c-string "str"
|
||||||
* \details "str" should be null-terminated\n
|
* \details "str" should be null-terminated\n
|
||||||
* Example: \snippet pistring.cpp PIString(char * ) */
|
* Example: \snippet pistring.cpp PIString(char * ) */
|
||||||
PIString(const char * str): PIDeque<PIChar>() {*this += str;}
|
PIString(const char * str): PIDeque<PIChar>() {*this += str;}
|
||||||
|
|
||||||
/*! @brief Contructs string from \c wchar_t c-string "str"
|
/*! \brief Contructs string from \c wchar_t c-string "str"
|
||||||
* \details "str" should be null-terminated\n
|
* \details "str" should be null-terminated\n
|
||||||
* Example: \snippet pistring.cpp PIString(wchar_t * ) */
|
* Example: \snippet pistring.cpp PIString(wchar_t * ) */
|
||||||
PIString(const wchar_t * str): PIDeque<PIChar>() {*this += str;}
|
PIString(const wchar_t * str): PIDeque<PIChar>() {*this += str;}
|
||||||
@@ -72,18 +72,18 @@ public:
|
|||||||
//! Contructs string from byte array "ba"
|
//! Contructs string from byte array "ba"
|
||||||
PIString(const PIByteArray & ba): PIDeque<PIChar>() {*this += ba;}
|
PIString(const PIByteArray & ba): PIDeque<PIChar>() {*this += ba;}
|
||||||
|
|
||||||
//! @brief Contructs string from "len" characters of buffer "str"
|
//! \brief Contructs string from "len" characters of buffer "str"
|
||||||
PIString(const PIChar * str, const int len): PIDeque<PIChar>(str, size_t(len)) {}
|
PIString(const PIChar * str, const int len): PIDeque<PIChar>(str, size_t(len)) {}
|
||||||
|
|
||||||
/*! @brief Contructs string from "len" characters of buffer "str"
|
/*! \brief Contructs string from "len" characters of buffer "str"
|
||||||
* \details Example: \snippet pistring.cpp PIString(char * , int) */
|
* \details Example: \snippet pistring.cpp PIString(char * , int) */
|
||||||
PIString(const char * str, const int len): PIDeque<PIChar>() {appendFromChars(str, len);}
|
PIString(const char * str, const int len): PIDeque<PIChar>() {appendFromChars(str, len);}
|
||||||
|
|
||||||
/*! @brief Contructs string as sequence of characters "c" of buffer with length "len"
|
/*! \brief Contructs string as sequence of characters "c" of buffer with length "len"
|
||||||
* \details Example: \snippet pistring.cpp PIString(int, char) */
|
* \details Example: \snippet pistring.cpp PIString(int, char) */
|
||||||
PIString(const int len, const char c): PIDeque<PIChar>() {for (int i = 0; i < len; ++i) push_back(c);}
|
PIString(const int len, const char c): PIDeque<PIChar>() {for (int i = 0; i < len; ++i) push_back(c);}
|
||||||
|
|
||||||
/*! @brief Contructs string as sequence of symbols "c" of buffer with length "len"
|
/*! \brief Contructs string as sequence of symbols "c" of buffer with length "len"
|
||||||
* \details Example: \snippet pistring.cpp PIString(int, PIChar) */
|
* \details Example: \snippet pistring.cpp PIString(int, PIChar) */
|
||||||
PIString(const int len, const PIChar c): PIDeque<PIChar>() {for (int i = 0; i < len; ++i) push_back(c);}
|
PIString(const int len, const PIChar c): PIDeque<PIChar>() {for (int i = 0; i < len; ++i) push_back(c);}
|
||||||
|
|
||||||
@@ -148,32 +148,32 @@ public:
|
|||||||
//! Compare operator
|
//! Compare operator
|
||||||
bool operator >=(const char * str) const {return *this >= PIString(str);}
|
bool operator >=(const char * str) const {return *this >= PIString(str);}
|
||||||
|
|
||||||
/*! @brief Append string "str" at the end of string
|
/*! \brief Append string "str" at the end of string
|
||||||
* \details Example: \snippet pistring.cpp PIString::<<(PIString) */
|
* \details Example: \snippet pistring.cpp PIString::<<(PIString) */
|
||||||
PIString & operator <<(const PIString & str) {*this += str; return *this;}
|
PIString & operator <<(const PIString & str) {*this += str; return *this;}
|
||||||
|
|
||||||
/*! @brief Append symbol "c" at the end of string
|
/*! \brief Append symbol "c" at the end of string
|
||||||
* \details Example: \snippet pistring.cpp PIString::<<(PIChar) */
|
* \details Example: \snippet pistring.cpp PIString::<<(PIChar) */
|
||||||
PIString & operator <<(const PIChar c) {*this += c; return *this;}
|
PIString & operator <<(const PIChar c) {*this += c; return *this;}
|
||||||
|
|
||||||
/*! @brief Append symbol "c" at the end of string
|
/*! \brief Append symbol "c" at the end of string
|
||||||
* \details Example: \snippet pistring.cpp PIString::<<(PIChar) */
|
* \details Example: \snippet pistring.cpp PIString::<<(PIChar) */
|
||||||
PIString & operator <<(const char c) {*this += PIChar(c); return *this;}
|
PIString & operator <<(const char c) {*this += PIChar(c); return *this;}
|
||||||
|
|
||||||
/*! @brief Append c-string "str" at the end of string
|
/*! \brief Append c-string "str" at the end of string
|
||||||
* \details Example: \snippet pistring.cpp PIString::<<(char * ) */
|
* \details Example: \snippet pistring.cpp PIString::<<(char * ) */
|
||||||
PIString & operator <<(const char * str) {*this += str; return *this;}
|
PIString & operator <<(const char * str) {*this += str; return *this;}
|
||||||
|
|
||||||
/*! @brief Append \c wchar_t c-string "str" at the end of string
|
/*! \brief Append \c wchar_t c-string "str" at the end of string
|
||||||
* \details Example: \snippet pistring.cpp PIString::<<(wchar_t * ) */
|
* \details Example: \snippet pistring.cpp PIString::<<(wchar_t * ) */
|
||||||
PIString & operator <<(const wchar_t * str) {*this += str; return *this;}
|
PIString & operator <<(const wchar_t * str) {*this += str; return *this;}
|
||||||
|
|
||||||
/*! @brief Append string representation of "num" at the end of string
|
/*! \brief Append string representation of "num" at the end of string
|
||||||
* \details Example: \snippet pistring.cpp PIString::<<(int) */
|
* \details Example: \snippet pistring.cpp PIString::<<(int) */
|
||||||
PIString & operator <<(const int & num) {*this += PIString::fromNumber(num); return *this;}
|
PIString & operator <<(const int & num) {*this += PIString::fromNumber(num); return *this;}
|
||||||
PIString & operator <<(const uint & num) {*this += PIString::fromNumber(num); return *this;}
|
PIString & operator <<(const uint & num) {*this += PIString::fromNumber(num); return *this;}
|
||||||
|
|
||||||
/*! @brief Append string representation of "num" at the end of string
|
/*! \brief Append string representation of "num" at the end of string
|
||||||
* \details Example: \snippet pistring.cpp PIString::<<(int) */
|
* \details Example: \snippet pistring.cpp PIString::<<(int) */
|
||||||
PIString & operator <<(const long & num) {*this += PIString::fromNumber(num); return *this;}
|
PIString & operator <<(const long & num) {*this += PIString::fromNumber(num); return *this;}
|
||||||
PIString & operator <<(const ulong & num) {*this += PIString::fromNumber(num); return *this;}
|
PIString & operator <<(const ulong & num) {*this += PIString::fromNumber(num); return *this;}
|
||||||
@@ -181,101 +181,101 @@ public:
|
|||||||
PIString & operator <<(const llong & num) {*this += PIString::fromNumber(num); return *this;}
|
PIString & operator <<(const llong & num) {*this += PIString::fromNumber(num); return *this;}
|
||||||
PIString & operator <<(const ullong & num) {*this += PIString::fromNumber(num); return *this;}
|
PIString & operator <<(const ullong & num) {*this += PIString::fromNumber(num); return *this;}
|
||||||
|
|
||||||
/*! @brief Append string representation of "num" at the end of string
|
/*! \brief Append string representation of "num" at the end of string
|
||||||
* \details Example: \snippet pistring.cpp PIString::<<(int) */
|
* \details Example: \snippet pistring.cpp PIString::<<(int) */
|
||||||
PIString & operator <<(const float & num) {*this += PIString::fromNumber(num); return *this;}
|
PIString & operator <<(const float & num) {*this += PIString::fromNumber(num); return *this;}
|
||||||
|
|
||||||
/*! @brief Append string representation of "num" at the end of string
|
/*! \brief Append string representation of "num" at the end of string
|
||||||
* \details Example: \snippet pistring.cpp PIString::<<(int) */
|
* \details Example: \snippet pistring.cpp PIString::<<(int) */
|
||||||
PIString & operator <<(const double & num) {*this += PIString::fromNumber(num); return *this;}
|
PIString & operator <<(const double & num) {*this += PIString::fromNumber(num); return *this;}
|
||||||
|
|
||||||
|
|
||||||
//! @brief Insert string "str" at the begin of string
|
//! \brief Insert string "str" at the begin of string
|
||||||
PIString & prepend(const PIString & str) {insert(0, str); return *this;}
|
PIString & prepend(const PIString & str) {insert(0, str); return *this;}
|
||||||
|
|
||||||
//! @brief Insert string "str" at the end of string
|
//! \brief Insert string "str" at the end of string
|
||||||
PIString & append(const PIString & str) {*this += str; return *this;}
|
PIString & append(const PIString & str) {*this += str; return *this;}
|
||||||
|
|
||||||
|
|
||||||
/*! @brief Return part of string from symbol at index "start" and maximum length "len"
|
/*! \brief Return part of string from symbol at index "start" and maximum length "len"
|
||||||
* \details All variants demonstrated in example: \snippet pistring.cpp PIString::mid
|
* \details All variants demonstrated in example: \snippet pistring.cpp PIString::mid
|
||||||
* \sa \a left(), \a right() */
|
* \sa \a left(), \a right() */
|
||||||
PIString mid(const int start, const int len = -1) const;
|
PIString mid(const int start, const int len = -1) const;
|
||||||
|
|
||||||
/*! @brief Return sub-string of string from symbol at index "start" and maximum length "len" */
|
/*! \brief Return sub-string of string from symbol at index "start" and maximum length "len" */
|
||||||
PIString subString(const int start, const int len = -1) const {return mid(start, len);}
|
PIString subString(const int start, const int len = -1) const {return mid(start, len);}
|
||||||
|
|
||||||
/*! @brief Return part of string from left and maximum length "len"
|
/*! \brief Return part of string from left and maximum length "len"
|
||||||
* \details Example: \snippet pistring.cpp PIString::left
|
* \details Example: \snippet pistring.cpp PIString::left
|
||||||
* \sa \a mid(), \a right() */
|
* \sa \a mid(), \a right() */
|
||||||
PIString left(const int len) const {return len <= 0 ? PIString() : mid(0, len);}
|
PIString left(const int len) const {return len <= 0 ? PIString() : mid(0, len);}
|
||||||
|
|
||||||
/*! @brief Return part of string from right and maximum length "len"
|
/*! \brief Return part of string from right and maximum length "len"
|
||||||
* \details Example: \snippet pistring.cpp PIString::right
|
* \details Example: \snippet pistring.cpp PIString::right
|
||||||
* \sa \a mid(), \a left() */
|
* \sa \a mid(), \a left() */
|
||||||
PIString right(const int len) const {return len <= 0 ? PIString() : mid(size() - len, len);}
|
PIString right(const int len) const {return len <= 0 ? PIString() : mid(size() - len, len);}
|
||||||
|
|
||||||
/*! @brief Remove part of string from symbol as index "start" and maximum length "len"
|
/*! \brief Remove part of string from symbol as index "start" and maximum length "len"
|
||||||
* and return this string
|
* and return this string
|
||||||
* \details All variants demonstrated in example: \snippet pistring.cpp PIString::cutMid
|
* \details All variants demonstrated in example: \snippet pistring.cpp PIString::cutMid
|
||||||
* \sa \a cutLeft(), \a cutRight() */
|
* \sa \a cutLeft(), \a cutRight() */
|
||||||
PIString & cutMid(const int start, const int len);
|
PIString & cutMid(const int start, const int len);
|
||||||
|
|
||||||
/*! @brief Remove part of string from left and maximum length "len" and return this string
|
/*! \brief Remove part of string from left and maximum length "len" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::cutLeft
|
* \details Example: \snippet pistring.cpp PIString::cutLeft
|
||||||
* \sa \a cutMid(), \a cutRight() */
|
* \sa \a cutMid(), \a cutRight() */
|
||||||
PIString & cutLeft(const int len) {return len <= 0 ? *this : cutMid(0, len);}
|
PIString & cutLeft(const int len) {return len <= 0 ? *this : cutMid(0, len);}
|
||||||
|
|
||||||
/*! @brief Remove part of string from right and maximum length "len" and return this string
|
/*! \brief Remove part of string from right and maximum length "len" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::cutRight
|
* \details Example: \snippet pistring.cpp PIString::cutRight
|
||||||
* \sa \a cutMid(), \a cutLeft() */
|
* \sa \a cutMid(), \a cutLeft() */
|
||||||
PIString & cutRight(const int len) {return len <= 0 ? *this : cutMid(size() - len, len);}
|
PIString & cutRight(const int len) {return len <= 0 ? *this : cutMid(size() - len, len);}
|
||||||
|
|
||||||
/*! @brief Remove spaces at the start and at the end of string and return this string
|
/*! \brief Remove spaces at the start and at the end of string and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::trim
|
* \details Example: \snippet pistring.cpp PIString::trim
|
||||||
* \sa \a trimmed() */
|
* \sa \a trimmed() */
|
||||||
PIString & trim();
|
PIString & trim();
|
||||||
|
|
||||||
/*! @brief Return copy of this string without spaces at the start and at the end
|
/*! \brief Return copy of this string without spaces at the start and at the end
|
||||||
* \details Example: \snippet pistring.cpp PIString::trimmed
|
* \details Example: \snippet pistring.cpp PIString::trimmed
|
||||||
* \sa \a trim() */
|
* \sa \a trim() */
|
||||||
PIString trimmed() const;
|
PIString trimmed() const;
|
||||||
|
|
||||||
/*! @brief Replace part of string from index "from" and maximum length "len"
|
/*! \brief Replace part of string from index "from" and maximum length "len"
|
||||||
* with string "with" and return this string
|
* with string "with" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::replace_0
|
* \details Example: \snippet pistring.cpp PIString::replace_0
|
||||||
* \sa \a replaced(), \a replaceAll() */
|
* \sa \a replaced(), \a replaceAll() */
|
||||||
PIString & replace(const int from, const int count, const PIString & with);
|
PIString & replace(const int from, const int count, const PIString & with);
|
||||||
|
|
||||||
/*! @brief Replace part copy of this string from index "from" and maximum length "len"
|
/*! \brief Replace part copy of this string from index "from" and maximum length "len"
|
||||||
* with string "with" and return copied string
|
* with string "with" and return copied string
|
||||||
* \details Example: \snippet pistring.cpp PIString::replaced_0
|
* \details Example: \snippet pistring.cpp PIString::replaced_0
|
||||||
* \sa \a replace(), \a replaceAll() */
|
* \sa \a replace(), \a replaceAll() */
|
||||||
PIString replaced(const int from, const int count, const PIString & with) const {PIString str(*this); str.replace(from, count, with); return str;}
|
PIString replaced(const int from, const int count, const PIString & with) const {PIString str(*this); str.replace(from, count, with); return str;}
|
||||||
|
|
||||||
/*! @brief Replace first founded substring "what" with string "with" and return this string
|
/*! \brief Replace first founded substring "what" with string "with" and return this string
|
||||||
* \details If "ok" is not null, it set to "true" if something was replaced\n
|
* \details If "ok" is not null, it set to "true" if something was replaced\n
|
||||||
* Example: \snippet pistring.cpp PIString::replace_1
|
* Example: \snippet pistring.cpp PIString::replace_1
|
||||||
* \sa \a replaced(), \a replaceAll() */
|
* \sa \a replaced(), \a replaceAll() */
|
||||||
PIString & replace(const PIString & what, const PIString & with, bool * ok = 0);
|
PIString & replace(const PIString & what, const PIString & with, bool * ok = 0);
|
||||||
|
|
||||||
/*! @brief Replace first founded substring "what" with string "with" and return copied string
|
/*! \brief Replace first founded substring "what" with string "with" and return copied string
|
||||||
* \details If "ok" is not null, it set to "true" if something was replaced\n
|
* \details If "ok" is not null, it set to "true" if something was replaced\n
|
||||||
* Example: \snippet pistring.cpp PIString::replaced_1
|
* Example: \snippet pistring.cpp PIString::replaced_1
|
||||||
* \sa \a replaced(), \a replaceAll() */
|
* \sa \a replaced(), \a replaceAll() */
|
||||||
PIString replaced(const PIString & what, const PIString & with, bool * ok = 0) const {PIString str(*this); str.replace(what, with, ok); return str;}
|
PIString replaced(const PIString & what, const PIString & with, bool * ok = 0) const {PIString str(*this); str.replace(what, with, ok); return str;}
|
||||||
|
|
||||||
/*! @brief Replace all founded substrings "what" with strings "with" and return this string
|
/*! \brief Replace all founded substrings "what" with strings "with" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::replaceAll
|
* \details Example: \snippet pistring.cpp PIString::replaceAll
|
||||||
* \sa \a replace(), \a replaced() */
|
* \sa \a replace(), \a replaced() */
|
||||||
PIString & replaceAll(const PIString & what, const PIString & with);
|
PIString & replaceAll(const PIString & what, const PIString & with);
|
||||||
|
|
||||||
/*! @brief Replace all founded substrings "what" with symbol "with" and return this string
|
/*! \brief Replace all founded substrings "what" with symbol "with" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::replaceAll
|
* \details Example: \snippet pistring.cpp PIString::replaceAll
|
||||||
* \sa \a replace(), \a replaced() */
|
* \sa \a replace(), \a replaced() */
|
||||||
PIString & replaceAll(const PIString & what, const char with);
|
PIString & replaceAll(const PIString & what, const char with);
|
||||||
|
|
||||||
/*! @brief Replace all founded symbols "what" with symbol "with" and return this string
|
/*! \brief Replace all founded symbols "what" with symbol "with" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::replaceAll
|
* \details Example: \snippet pistring.cpp PIString::replaceAll
|
||||||
* \sa \a replace(), \a replaced() */
|
* \sa \a replace(), \a replaced() */
|
||||||
PIString & replaceAll(const char what, const char with);
|
PIString & replaceAll(const char what, const char with);
|
||||||
@@ -288,119 +288,119 @@ public:
|
|||||||
|
|
||||||
PIString & removeAll(char c) {PIDeque<PIChar>::removeAll(PIChar(c)); return *this;}
|
PIString & removeAll(char c) {PIDeque<PIChar>::removeAll(PIChar(c)); return *this;}
|
||||||
|
|
||||||
/*! @brief Repeat content of string "times" times and return this string
|
/*! \brief Repeat content of string "times" times and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::repeat */
|
* \details Example: \snippet pistring.cpp PIString::repeat */
|
||||||
PIString & repeat(int times) {PIString ss(*this); times--; piForTimes (times) *this += ss; return *this;}
|
PIString & repeat(int times) {PIString ss(*this); times--; piForTimes (times) *this += ss; return *this;}
|
||||||
|
|
||||||
/*! @brief Returns repeated "times" times string
|
/*! \brief Returns repeated "times" times string
|
||||||
* \details Example: \snippet pistring.cpp PIString::repeated */
|
* \details Example: \snippet pistring.cpp PIString::repeated */
|
||||||
PIString repeated(int times) const {PIString ss(*this); return ss.repeat(times);}
|
PIString repeated(int times) const {PIString ss(*this); return ss.repeat(times);}
|
||||||
|
|
||||||
/*! @brief Insert symbol "c" after index "index" and return this string
|
/*! \brief Insert symbol "c" after index "index" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::insert_0 */
|
* \details Example: \snippet pistring.cpp PIString::insert_0 */
|
||||||
PIString & insert(const int index, const PIChar c) {PIDeque<PIChar>::insert(index, c); return *this;}
|
PIString & insert(const int index, const PIChar c) {PIDeque<PIChar>::insert(index, c); return *this;}
|
||||||
|
|
||||||
/*! @brief Insert symbol "c" after index "index" and return this string
|
/*! \brief Insert symbol "c" after index "index" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::insert_1 */
|
* \details Example: \snippet pistring.cpp PIString::insert_1 */
|
||||||
PIString & insert(const int index, const char c) {return insert(index, PIChar(c));}
|
PIString & insert(const int index, const char c) {return insert(index, PIChar(c));}
|
||||||
|
|
||||||
/*! @brief Insert string "str" after index "index" and return this string
|
/*! \brief Insert string "str" after index "index" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::insert_2 */
|
* \details Example: \snippet pistring.cpp PIString::insert_2 */
|
||||||
PIString & insert(const int index, const PIString & str);
|
PIString & insert(const int index, const PIString & str);
|
||||||
|
|
||||||
/*! @brief Insert string "str" after index "index" and return this string
|
/*! \brief Insert string "str" after index "index" and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::insert_2 */
|
* \details Example: \snippet pistring.cpp PIString::insert_2 */
|
||||||
PIString & insert(const int index, const char * c) {return insert(index, PIString(c));}
|
PIString & insert(const int index, const char * c) {return insert(index, PIString(c));}
|
||||||
|
|
||||||
/*! @brief Enlarge string to length "len" by addition sequence of symbols
|
/*! \brief Enlarge string to length "len" by addition sequence of symbols
|
||||||
* "c" at the end of string, and return this string
|
* "c" at the end of string, and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::expandRightTo
|
* \details Example: \snippet pistring.cpp PIString::expandRightTo
|
||||||
* \sa \a expandLeftTo() */
|
* \sa \a expandLeftTo() */
|
||||||
PIString & expandRightTo(const int len, const PIChar c) {if (len > length()) resize(len, c); return *this;}
|
PIString & expandRightTo(const int len, const PIChar c) {if (len > length()) resize(len, c); return *this;}
|
||||||
|
|
||||||
/*! @brief Enlarge string to length "len" by addition sequence of symbols
|
/*! \brief Enlarge string to length "len" by addition sequence of symbols
|
||||||
* "c" at the beginning of string, and return this string
|
* "c" at the beginning of string, and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::expandLeftTo
|
* \details Example: \snippet pistring.cpp PIString::expandLeftTo
|
||||||
* \sa \a expandRightTo() */
|
* \sa \a expandRightTo() */
|
||||||
PIString & expandLeftTo(const int len, const PIChar c) {if (len > length()) insert(0, PIString(len - length(), c)); return *this;}
|
PIString & expandLeftTo(const int len, const PIChar c) {if (len > length()) insert(0, PIString(len - length(), c)); return *this;}
|
||||||
|
|
||||||
/*! @brief Enlarge and returns copy of this string to length "len"
|
/*! \brief Enlarge and returns copy of this string to length "len"
|
||||||
* by addition sequence of symbols "c" at the end of string
|
* by addition sequence of symbols "c" at the end of string
|
||||||
* \sa \a expandRightTo() */
|
* \sa \a expandRightTo() */
|
||||||
PIString expandedRightTo(const int len, const PIChar c) const {return PIString(*this).expandRightTo(len, c);}
|
PIString expandedRightTo(const int len, const PIChar c) const {return PIString(*this).expandRightTo(len, c);}
|
||||||
|
|
||||||
/*! @brief Enlarge and returns copy of this string to length "len"
|
/*! \brief Enlarge and returns copy of this string to length "len"
|
||||||
* by addition sequence of symbols "c" at the beginning of string
|
* by addition sequence of symbols "c" at the beginning of string
|
||||||
* \sa \a expandLeftTo() */
|
* \sa \a expandLeftTo() */
|
||||||
PIString expandedLeftTo(const int len, const PIChar c) const {return PIString(*this).expandLeftTo(len, c);}
|
PIString expandedLeftTo(const int len, const PIChar c) const {return PIString(*this).expandLeftTo(len, c);}
|
||||||
|
|
||||||
/*! @brief Add "c" symbols at the beginning and end of the string, and return this string
|
/*! \brief Add "c" symbols at the beginning and end of the string, and return this string
|
||||||
* \sa \a quoted() */
|
* \sa \a quoted() */
|
||||||
PIString & quote(PIChar c = PIChar('"')) {insert(0, c); *this += c; return *this;}
|
PIString & quote(PIChar c = PIChar('"')) {insert(0, c); *this += c; return *this;}
|
||||||
|
|
||||||
/*! @brief Return quoted copy of this string
|
/*! \brief Return quoted copy of this string
|
||||||
* \sa \a quote() */
|
* \sa \a quote() */
|
||||||
PIString quoted(PIChar c = PIChar('"')) {return PIString(*this).quote(c);}
|
PIString quoted(PIChar c = PIChar('"')) {return PIString(*this).quote(c);}
|
||||||
|
|
||||||
/*! @brief Reverse string and return this string
|
/*! \brief Reverse string and return this string
|
||||||
* \details Example: \snippet pistring.cpp PIString::reverse
|
* \details Example: \snippet pistring.cpp PIString::reverse
|
||||||
* \sa \a reversed() */
|
* \sa \a reversed() */
|
||||||
PIString & reverse() {PIString str(*this); clear(); piForeachCR (PIChar c, str) push_back(c); return *this;}
|
PIString & reverse() {PIString str(*this); clear(); piForeachCR (PIChar c, str) push_back(c); return *this;}
|
||||||
|
|
||||||
/*! @brief Reverse copy of this string and return it
|
/*! \brief Reverse copy of this string and return it
|
||||||
* \details Example: \snippet pistring.cpp PIString::reversed
|
* \details Example: \snippet pistring.cpp PIString::reversed
|
||||||
* \sa \a reverse() */
|
* \sa \a reverse() */
|
||||||
PIString reversed() const {PIString str(*this); str.reverse(); return str;}
|
PIString reversed() const {PIString str(*this); str.reverse(); return str;}
|
||||||
|
|
||||||
/*! @brief Elide string to maximum size \"size\" and return this string
|
/*! \brief Elide string to maximum size \"size\" and return this string
|
||||||
* \sa \a elided() */
|
* \sa \a elided() */
|
||||||
PIString & elide(int size, float pos = ElideCenter);
|
PIString & elide(int size, float pos = ElideCenter);
|
||||||
|
|
||||||
/*! @brief Elide copy of this string to maximum size \"size\" and return it
|
/*! \brief Elide copy of this string to maximum size \"size\" and return it
|
||||||
* \details Example: \snippet pistring.cpp PIString::elided
|
* \details Example: \snippet pistring.cpp PIString::elided
|
||||||
* \sa \a elide() */
|
* \sa \a elide() */
|
||||||
PIString elided(int size, float pos = ElideCenter) const {PIString str(*this); str.elide(size, pos); return str;}
|
PIString elided(int size, float pos = ElideCenter) const {PIString str(*this); str.elide(size, pos); return str;}
|
||||||
|
|
||||||
|
|
||||||
/*! @brief Take a part of string from symbol at index "start" and maximum length "len" and return it
|
/*! \brief Take a part of string from symbol at index "start" and maximum length "len" and return it
|
||||||
* \sa \a takeLeft, \a takeRight() */
|
* \sa \a takeLeft, \a takeRight() */
|
||||||
PIString takeMid(const int start, const int len = -1) {PIString ret(mid(start, len)); cutMid(start, len); return ret;}
|
PIString takeMid(const int start, const int len = -1) {PIString ret(mid(start, len)); cutMid(start, len); return ret;}
|
||||||
|
|
||||||
/*! @brief Take a part from the begin of string with maximum length "len" and return it
|
/*! \brief Take a part from the begin of string with maximum length "len" and return it
|
||||||
* \sa \a takeMid(), \a takeRight() */
|
* \sa \a takeMid(), \a takeRight() */
|
||||||
PIString takeLeft(const int len) {PIString ret(left(len)); cutLeft(len); return ret;}
|
PIString takeLeft(const int len) {PIString ret(left(len)); cutLeft(len); return ret;}
|
||||||
|
|
||||||
/*! @brief Take a part from the end of string with maximum length "len" and return it
|
/*! \brief Take a part from the end of string with maximum length "len" and return it
|
||||||
* \sa \a takeMid(), \a takeLeft() */
|
* \sa \a takeMid(), \a takeLeft() */
|
||||||
PIString takeRight(const int len) {PIString ret(right(len)); cutRight(len); return ret;}
|
PIString takeRight(const int len) {PIString ret(right(len)); cutRight(len); return ret;}
|
||||||
|
|
||||||
/*! @brief Take a symbol from the begin of this string and return it
|
/*! \brief Take a symbol from the begin of this string and return it
|
||||||
* \details Example: \snippet pistring.cpp PIString::takeSymbol
|
* \details Example: \snippet pistring.cpp PIString::takeSymbol
|
||||||
* \sa \a takeWord(), \a takeCWord(), \a takeLine(), \a takeNumber(), \a takeRange() */
|
* \sa \a takeWord(), \a takeCWord(), \a takeLine(), \a takeNumber(), \a takeRange() */
|
||||||
PIString takeSymbol();
|
PIString takeSymbol();
|
||||||
|
|
||||||
/*! @brief Take a word from the begin of this string and return it
|
/*! \brief Take a word from the begin of this string and return it
|
||||||
* \details Example: \snippet pistring.cpp PIString::takeWord
|
* \details Example: \snippet pistring.cpp PIString::takeWord
|
||||||
* \sa \a takeSymbol(), \a takeCWord(), \a takeLine(), \a takeNumber(), \a takeRange() */
|
* \sa \a takeSymbol(), \a takeCWord(), \a takeLine(), \a takeNumber(), \a takeRange() */
|
||||||
PIString takeWord();
|
PIString takeWord();
|
||||||
|
|
||||||
/*! @brief Take a word with letters, numbers and '_' symbols from the
|
/*! \brief Take a word with letters, numbers and '_' symbols from the
|
||||||
* begin of this string and return it
|
* begin of this string and return it
|
||||||
* \details Example: \snippet pistring.cpp PIString::takeCWord
|
* \details Example: \snippet pistring.cpp PIString::takeCWord
|
||||||
* \sa \a takeSymbol(), \a takeWord(), \a takeLine(), \a takeNumber(), \a takeRange() */
|
* \sa \a takeSymbol(), \a takeWord(), \a takeLine(), \a takeNumber(), \a takeRange() */
|
||||||
PIString takeCWord();
|
PIString takeCWord();
|
||||||
|
|
||||||
/*! @brief Take a line from the begin of this string and return it
|
/*! \brief Take a line from the begin of this string and return it
|
||||||
* \details Example: \snippet pistring.cpp PIString::takeLine
|
* \details Example: \snippet pistring.cpp PIString::takeLine
|
||||||
* \sa \a takeSymbol(), \a takeWord(), \a takeCWord(), \a takeNumber(), \a takeRange() */
|
* \sa \a takeSymbol(), \a takeWord(), \a takeCWord(), \a takeNumber(), \a takeRange() */
|
||||||
PIString takeLine();
|
PIString takeLine();
|
||||||
|
|
||||||
/*! @brief Take a number with C-format from the begin of this string and return it
|
/*! \brief Take a number with C-format from the begin of this string and return it
|
||||||
* \details Example: \snippet pistring.cpp PIString::takeNumber
|
* \details Example: \snippet pistring.cpp PIString::takeNumber
|
||||||
* \sa \a takeSymbol(), \a takeWord(), \a takeCWord(), \a takeLine(), \a takeRange() */
|
* \sa \a takeSymbol(), \a takeWord(), \a takeCWord(), \a takeLine(), \a takeRange() */
|
||||||
PIString takeNumber();
|
PIString takeNumber();
|
||||||
|
|
||||||
/*! @brief Take a range between "start" and "end" symbols from the begin of this
|
/*! \brief Take a range between "start" and "end" symbols from the begin of this
|
||||||
* string and return it.
|
* string and return it.
|
||||||
* \details "Shield" symbol prevent analysis of the next symbol.
|
* \details "Shield" symbol prevent analysis of the next symbol.
|
||||||
* Example: \snippet pistring.cpp PIString::takeRange
|
* Example: \snippet pistring.cpp PIString::takeRange
|
||||||
@@ -408,19 +408,19 @@ public:
|
|||||||
PIString takeRange(const PIChar start, const PIChar end, const PIChar shield = '\\');
|
PIString takeRange(const PIChar start, const PIChar end, const PIChar shield = '\\');
|
||||||
|
|
||||||
|
|
||||||
/*! @brief Return a string in brackets "start" and "end" symbols from the begin of this
|
/*! \brief Return a string in brackets "start" and "end" symbols from the begin of this
|
||||||
* string and return it.
|
* string and return it.
|
||||||
* \details Example: string = "a(b(c)d)e"; inBrackets('(', ')') = "b(c)d"; */
|
* \details Example: string = "a(b(c)d)e"; inBrackets('(', ')') = "b(c)d"; */
|
||||||
PIString inBrackets(const PIChar start, const PIChar end) const;
|
PIString inBrackets(const PIChar start, const PIChar end) const;
|
||||||
|
|
||||||
/*! @brief Return real bytes count of this string
|
/*! \brief Return real bytes count of this string
|
||||||
* \details It`s equivalent length of char sequence
|
* \details It`s equivalent length of char sequence
|
||||||
* returned by function \a data() - 1, without terminating null-char \n
|
* returned by function \a data() - 1, without terminating null-char \n
|
||||||
* Example: \snippet pistring.cpp PIString::lengthAscii
|
* Example: \snippet pistring.cpp PIString::lengthAscii
|
||||||
* \sa \a data() */
|
* \sa \a data() */
|
||||||
int lengthAscii() const {buildData(__syslocname__); return data_.size_s() - 1;}
|
int lengthAscii() const {buildData(__syslocname__); return data_.size_s() - 1;}
|
||||||
|
|
||||||
/*! @brief Return \c char * representation of this string in system codepage
|
/*! \brief Return \c char * representation of this string in system codepage
|
||||||
* \details This function fill buffer by sequence
|
* \details This function fill buffer by sequence
|
||||||
* of chars. Minimum length of this buffer is count
|
* of chars. Minimum length of this buffer is count
|
||||||
* of symbols. Returned \c char * is valid until next
|
* of symbols. Returned \c char * is valid until next
|
||||||
@@ -429,7 +429,7 @@ public:
|
|||||||
* \sa \a dataConsole(), \a dataUTF8() */
|
* \sa \a dataConsole(), \a dataUTF8() */
|
||||||
const char * data() const {buildData(__syslocname__); return (const char *)(data_.data());}
|
const char * data() const {buildData(__syslocname__); return (const char *)(data_.data());}
|
||||||
|
|
||||||
/*! @brief Return \c char * representation of this string in terminal codepage
|
/*! \brief Return \c char * representation of this string in terminal codepage
|
||||||
* \details This function fill buffer by sequence
|
* \details This function fill buffer by sequence
|
||||||
* of chars. Minimum length of this buffer is count
|
* of chars. Minimum length of this buffer is count
|
||||||
* of symbols. Returned \c char * is valid until next
|
* of symbols. Returned \c char * is valid until next
|
||||||
@@ -437,7 +437,7 @@ public:
|
|||||||
* \sa \a data(), \a dataUTF8() */
|
* \sa \a data(), \a dataUTF8() */
|
||||||
const char * dataConsole() const;
|
const char * dataConsole() const;
|
||||||
|
|
||||||
/*! @brief Return \c char * representation of this string in UTF-8
|
/*! \brief Return \c char * representation of this string in UTF-8
|
||||||
* \details This function fill buffer by sequence
|
* \details This function fill buffer by sequence
|
||||||
* of chars. Minimum length of this buffer is count
|
* of chars. Minimum length of this buffer is count
|
||||||
* of symbols. Returned \c char * is valid until next
|
* of symbols. Returned \c char * is valid until next
|
||||||
@@ -445,7 +445,7 @@ public:
|
|||||||
* \sa \a data(), \a dataConsole() */
|
* \sa \a data(), \a dataConsole() */
|
||||||
const char * dataUTF8() const;
|
const char * dataUTF8() const;
|
||||||
|
|
||||||
/*! @brief Return \c char * representation of this string in ASCII
|
/*! \brief Return \c char * representation of this string in ASCII
|
||||||
* \details This function fill buffer by sequence
|
* \details This function fill buffer by sequence
|
||||||
* of chars. Minimum length of this buffer is count
|
* of chars. Minimum length of this buffer is count
|
||||||
* of symbols. Returned \c char * is valid until next
|
* of symbols. Returned \c char * is valid until next
|
||||||
@@ -455,277 +455,277 @@ public:
|
|||||||
//! Returns hash
|
//! Returns hash
|
||||||
uint hash() const;
|
uint hash() const;
|
||||||
|
|
||||||
//! @brief Return \a PIByteArray contains \a data() of this string without terminating null-char
|
//! \brief Return \a PIByteArray contains \a data() of this string without terminating null-char
|
||||||
PIByteArray toByteArray() const {buildData(__utf8name__); return data_.resized(data_.size_s() - 1);}
|
PIByteArray toByteArray() const {buildData(__utf8name__); return data_.resized(data_.size_s() - 1);}
|
||||||
|
|
||||||
//! @brief Return \a PIByteArray contains UTF-8 \a data() of this string without terminating null-char
|
//! \brief Return \a PIByteArray contains UTF-8 \a data() of this string without terminating null-char
|
||||||
PIByteArray toUTF8() const;
|
PIByteArray toUTF8() const;
|
||||||
|
|
||||||
//! @brief Return \a PIByteArray contains custom charset representation of this string without terminating null-char
|
//! \brief Return \a PIByteArray contains custom charset representation of this string without terminating null-char
|
||||||
PIByteArray toCharset(const char * c) const;
|
PIByteArray toCharset(const char * c) const;
|
||||||
|
|
||||||
/*! @brief Split string with delimiter "delim" to \a PIStringList and return it
|
/*! \brief Split string with delimiter "delim" to \a PIStringList and return it
|
||||||
* \details Example: \snippet pistring.cpp PIString::split */
|
* \details Example: \snippet pistring.cpp PIString::split */
|
||||||
PIStringList split(const PIString & delim) const;
|
PIStringList split(const PIString & delim) const;
|
||||||
|
|
||||||
|
|
||||||
//! @brief Convert each symbol in copyed string to upper case and return it
|
//! \brief Convert each symbol in copyed string to upper case and return it
|
||||||
PIString toUpperCase() const;
|
PIString toUpperCase() const;
|
||||||
|
|
||||||
//! @brief Convert each symbol in copyed string to lower case and return it
|
//! \brief Convert each symbol in copyed string to lower case and return it
|
||||||
PIString toLowerCase() const;
|
PIString toLowerCase() const;
|
||||||
|
|
||||||
PIString toNativeDecimalPoints() const;
|
PIString toNativeDecimalPoints() const;
|
||||||
|
|
||||||
|
|
||||||
//! @brief Returns if string contains "c"
|
//! \brief Returns if string contains "c"
|
||||||
bool contains(const char c) const {return PIDeque<PIChar>::contains(PIChar(c));}
|
bool contains(const char c) const {return PIDeque<PIChar>::contains(PIChar(c));}
|
||||||
|
|
||||||
//! @brief Returns if string contains "str"
|
//! \brief Returns if string contains "str"
|
||||||
bool contains(const char * str) const {return contains(PIString(str));}
|
bool contains(const char * str) const {return contains(PIString(str));}
|
||||||
|
|
||||||
//! @brief Returns if string contains "str"
|
//! \brief Returns if string contains "str"
|
||||||
bool contains(const PIString & str) const {return find(str) >= 0;}
|
bool contains(const PIString & str) const {return find(str) >= 0;}
|
||||||
|
|
||||||
|
|
||||||
//! @brief Search symbol "c" from symbol at index "start" and return first occur position
|
//! \brief Search symbol "c" from symbol at index "start" and return first occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::find
|
//! \details Example: \snippet pistring.cpp PIString::find
|
||||||
int find(const char c, const int start = 0) const;
|
int find(const char c, const int start = 0) const;
|
||||||
|
|
||||||
//! @brief Search substring "str" from symbol at index "start" and return first occur position
|
//! \brief Search substring "str" from symbol at index "start" and return first occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::find
|
//! \details Example: \snippet pistring.cpp PIString::find
|
||||||
int find(const PIString & str, const int start = 0) const;
|
int find(const PIString & str, const int start = 0) const;
|
||||||
|
|
||||||
//! @brief Search substring "str" from symbol at index "start" and return first occur position
|
//! \brief Search substring "str" from symbol at index "start" and return first occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::find
|
//! \details Example: \snippet pistring.cpp PIString::find
|
||||||
int find(const char * str, const int start = 0) const {return find(PIString(str), start);}
|
int find(const char * str, const int start = 0) const {return find(PIString(str), start);}
|
||||||
|
|
||||||
//! @brief Search symbol "c" from symbol at index "start" and return last occur position
|
//! \brief Search symbol "c" from symbol at index "start" and return last occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findLast
|
//! \details Example: \snippet pistring.cpp PIString::findLast
|
||||||
int findLast(const char c, const int start = 0) const;
|
int findLast(const char c, const int start = 0) const;
|
||||||
|
|
||||||
//! @brief Search substring "str" from symbol at index "start" and return last occur position
|
//! \brief Search substring "str" from symbol at index "start" and return last occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findLast
|
//! \details Example: \snippet pistring.cpp PIString::findLast
|
||||||
int findLast(const PIString & str, const int start = 0) const;
|
int findLast(const PIString & str, const int start = 0) const;
|
||||||
|
|
||||||
//! @brief Search substring "str" from symbol at index "start" and return last occur position
|
//! \brief Search substring "str" from symbol at index "start" and return last occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findLast
|
//! \details Example: \snippet pistring.cpp PIString::findLast
|
||||||
int findLast(const char * str, const int start = 0) const {return findLast(PIString(str), start);}
|
int findLast(const char * str, const int start = 0) const {return findLast(PIString(str), start);}
|
||||||
|
|
||||||
//! @brief Search word "word" from symbol at index "start" and return first occur position.
|
//! \brief Search word "word" from symbol at index "start" and return first occur position.
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findWord
|
//! \details Example: \snippet pistring.cpp PIString::findWord
|
||||||
int findWord(const PIString & word, const int start = 0) const;
|
int findWord(const PIString & word, const int start = 0) const;
|
||||||
|
|
||||||
//! @brief Search C-style word "word" from symbol at index "start" and return first occur position.
|
//! \brief Search C-style word "word" from symbol at index "start" and return first occur position.
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findCWord
|
//! \details Example: \snippet pistring.cpp PIString::findCWord
|
||||||
int findCWord(const PIString & word, const int start = 0) const;
|
int findCWord(const PIString & word, const int start = 0) const;
|
||||||
|
|
||||||
//! @brief Search range between "start" and "end" symbols at index "start_index" and return first occur position.
|
//! \brief Search range between "start" and "end" symbols at index "start_index" and return first occur position.
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findRange
|
//! \details Example: \snippet pistring.cpp PIString::findRange
|
||||||
int findRange(const PIChar start, const PIChar end, const PIChar shield = '\\', const int start_index = 0, int * len = 0) const;
|
int findRange(const PIChar start, const PIChar end, const PIChar shield = '\\', const int start_index = 0, int * len = 0) const;
|
||||||
|
|
||||||
//! @brief Search any symbol of "str" from symbol at index "start" and return first occur position
|
//! \brief Search any symbol of "str" from symbol at index "start" and return first occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findAny
|
//! \details Example: \snippet pistring.cpp PIString::findAny
|
||||||
int findAny(const PIString & str, const int start = 0) const;
|
int findAny(const PIString & str, const int start = 0) const;
|
||||||
|
|
||||||
//! @brief Search any symbol of "str" from symbol at index "start" and return first occur position
|
//! \brief Search any symbol of "str" from symbol at index "start" and return first occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findAny
|
//! \details Example: \snippet pistring.cpp PIString::findAny
|
||||||
int findAny(const char * str, const int start = 0) const {return findAny(PIString(str), start);}
|
int findAny(const char * str, const int start = 0) const {return findAny(PIString(str), start);}
|
||||||
|
|
||||||
//! @brief Search any symbol of "str" from symbol at index "start" and return last occur position
|
//! \brief Search any symbol of "str" from symbol at index "start" and return last occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findAnyLast
|
//! \details Example: \snippet pistring.cpp PIString::findAnyLast
|
||||||
int findAnyLast(const PIString & str, const int start = 0) const;
|
int findAnyLast(const PIString & str, const int start = 0) const;
|
||||||
|
|
||||||
//! @brief Search any symbol of "str" from symbol at index "start" and return last occur position
|
//! \brief Search any symbol of "str" from symbol at index "start" and return last occur position
|
||||||
//! \details Example: \snippet pistring.cpp PIString::findAnyLast
|
//! \details Example: \snippet pistring.cpp PIString::findAnyLast
|
||||||
int findAnyLast(const char * str, const int start = 0) const {return findAnyLast(PIString(str), start);}
|
int findAnyLast(const char * str, const int start = 0) const {return findAnyLast(PIString(str), start);}
|
||||||
|
|
||||||
//! @brief Returns number of occurrences of symbol "c"
|
//! \brief Returns number of occurrences of symbol "c"
|
||||||
int entries(const PIChar c) const;
|
int entries(const PIChar c) const;
|
||||||
|
|
||||||
//! @brief Returns number of occurrences of symbol "c"
|
//! \brief Returns number of occurrences of symbol "c"
|
||||||
int entries(char c) const {return entries(PIChar(c));}
|
int entries(char c) const {return entries(PIChar(c));}
|
||||||
|
|
||||||
//! @brief Return if string starts with "str"
|
//! \brief Return if string starts with "str"
|
||||||
bool startsWith(const PIString & str) const;
|
bool startsWith(const PIString & str) const;
|
||||||
|
|
||||||
//! @brief Return if string ends with "str"
|
//! \brief Return if string ends with "str"
|
||||||
bool endsWith(const PIString & str) const;
|
bool endsWith(const PIString & str) const;
|
||||||
|
|
||||||
//! @brief Return symbols length of string
|
//! \brief Return symbols length of string
|
||||||
int length() const {return size();}
|
int length() const {return size();}
|
||||||
|
|
||||||
//! @brief Return \c true if string is empty, i.e. length = 0
|
//! \brief Return \c true if string is empty, i.e. length = 0
|
||||||
bool isEmpty() const {return (size() == 0 || *this == "");}
|
bool isEmpty() const {return (size() == 0 || *this == "");}
|
||||||
|
|
||||||
|
|
||||||
//! @brief Return \c true if string equal "true", "yes", "on" or positive not null numeric value
|
//! \brief Return \c true if string equal "true", "yes", "on" or positive not null numeric value
|
||||||
bool toBool() const;
|
bool toBool() const;
|
||||||
|
|
||||||
//! @brief Return \c char numeric value of string
|
//! \brief Return \c char numeric value of string
|
||||||
char toChar() const;
|
char toChar() const;
|
||||||
|
|
||||||
//! @brief Return \c short numeric value of string in base "base"
|
//! \brief Return \c short numeric value of string in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
||||||
short toShort(int base = -1, bool * ok = 0) const {return short(toNumberBase(*this, base, ok));}
|
short toShort(int base = -1, bool * ok = 0) const {return short(toNumberBase(*this, base, ok));}
|
||||||
|
|
||||||
//! @brief Return \c ushort numeric value of string in base "base"
|
//! \brief Return \c ushort numeric value of string in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
||||||
ushort toUShort(int base = -1, bool * ok = 0) const {return ushort(toNumberBase(*this, base, ok));}
|
ushort toUShort(int base = -1, bool * ok = 0) const {return ushort(toNumberBase(*this, base, ok));}
|
||||||
|
|
||||||
//! @brief Return \c int numeric value of string in base "base"
|
//! \brief Return \c int numeric value of string in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
||||||
int toInt(int base = -1, bool * ok = 0) const {return int(toNumberBase(*this, base, ok));}
|
int toInt(int base = -1, bool * ok = 0) const {return int(toNumberBase(*this, base, ok));}
|
||||||
|
|
||||||
//! @brief Return \c uint numeric value of string in base "base"
|
//! \brief Return \c uint numeric value of string in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
||||||
uint toUInt(int base = -1, bool * ok = 0) const {return uint(toNumberBase(*this, base, ok));}
|
uint toUInt(int base = -1, bool * ok = 0) const {return uint(toNumberBase(*this, base, ok));}
|
||||||
|
|
||||||
//! @brief Return \c long numeric value of string in base "base"
|
//! \brief Return \c long numeric value of string in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
||||||
long toLong(int base = -1, bool * ok = 0) const {return long(toNumberBase(*this, base, ok));}
|
long toLong(int base = -1, bool * ok = 0) const {return long(toNumberBase(*this, base, ok));}
|
||||||
|
|
||||||
//! @brief Return \c ulong numeric value of string in base "base"
|
//! \brief Return \c ulong numeric value of string in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
||||||
ulong toULong(int base = -1, bool * ok = 0) const {return ulong(toNumberBase(*this, base, ok));}
|
ulong toULong(int base = -1, bool * ok = 0) const {return ulong(toNumberBase(*this, base, ok));}
|
||||||
|
|
||||||
//! @brief Return \c llong numeric value of string in base "base"
|
//! \brief Return \c llong numeric value of string in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
||||||
llong toLLong(int base = -1, bool * ok = 0) const {return toNumberBase(*this, base, ok);}
|
llong toLLong(int base = -1, bool * ok = 0) const {return toNumberBase(*this, base, ok);}
|
||||||
|
|
||||||
//! @brief Return \c ullong numeric value of string in base "base"
|
//! \brief Return \c ullong numeric value of string in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
//! \details Example: \snippet pistring.cpp PIString::toNumber
|
||||||
ullong toULLong(int base = -1, bool * ok = 0) const {return ullong(toNumberBase(*this, base, ok));}
|
ullong toULLong(int base = -1, bool * ok = 0) const {return ullong(toNumberBase(*this, base, ok));}
|
||||||
|
|
||||||
//! @brief Return \c float numeric value of string
|
//! \brief Return \c float numeric value of string
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toFloat
|
//! \details Example: \snippet pistring.cpp PIString::toFloat
|
||||||
float toFloat() const;
|
float toFloat() const;
|
||||||
|
|
||||||
//! @brief Return \c double numeric value of string
|
//! \brief Return \c double numeric value of string
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toFloat
|
//! \details Example: \snippet pistring.cpp PIString::toFloat
|
||||||
double toDouble() const;
|
double toDouble() const;
|
||||||
|
|
||||||
//! @brief Return \c ldouble numeric value of string
|
//! \brief Return \c ldouble numeric value of string
|
||||||
//! \details Example: \snippet pistring.cpp PIString::toFloat
|
//! \details Example: \snippet pistring.cpp PIString::toFloat
|
||||||
ldouble toLDouble() const;
|
ldouble toLDouble() const;
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value" in base "base"
|
//! \brief Set string content to numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
||||||
PIString & setNumber(const short value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
PIString & setNumber(const short value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value" in base "base"
|
//! \brief Set string content to numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
||||||
PIString & setNumber(const ushort value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
PIString & setNumber(const ushort value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value" in base "base"
|
//! \brief Set string content to numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
||||||
PIString & setNumber(const int value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
PIString & setNumber(const int value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value" in base "base"
|
//! \brief Set string content to numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
||||||
PIString & setNumber(const uint value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
PIString & setNumber(const uint value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value" in base "base"
|
//! \brief Set string content to numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
||||||
PIString & setNumber(const long value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
PIString & setNumber(const long value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value" in base "base"
|
//! \brief Set string content to numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
||||||
PIString & setNumber(const ulong value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
PIString & setNumber(const ulong value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value" in base "base"
|
//! \brief Set string content to numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
||||||
PIString & setNumber(const llong & value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
PIString & setNumber(const llong & value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value" in base "base"
|
//! \brief Set string content to numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
//! \details Example: \snippet pistring.cpp PIString::setNumber
|
||||||
PIString & setNumber(const ullong & value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
PIString & setNumber(const ullong & value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value"
|
//! \brief Set string content to numeric representation of "value"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setFloat
|
//! \details Example: \snippet pistring.cpp PIString::setFloat
|
||||||
PIString & setNumber(const float value, char format = 'f', int precision = 8) {clear(); *this += PIString::fromNumber(value, format, precision); return *this;}
|
PIString & setNumber(const float value, char format = 'f', int precision = 8) {clear(); *this += PIString::fromNumber(value, format, precision); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value"
|
//! \brief Set string content to numeric representation of "value"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setFloat
|
//! \details Example: \snippet pistring.cpp PIString::setFloat
|
||||||
PIString & setNumber(const double & value, char format = 'f', int precision = 8) {clear(); *this += PIString::fromNumber(value, format, precision); return *this;}
|
PIString & setNumber(const double & value, char format = 'f', int precision = 8) {clear(); *this += PIString::fromNumber(value, format, precision); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to numeric representation of "value"
|
//! \brief Set string content to numeric representation of "value"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setFloat
|
//! \details Example: \snippet pistring.cpp PIString::setFloat
|
||||||
PIString & setNumber(const ldouble & value, char format = 'f', int precision = 8) {clear(); *this += PIString::fromNumber(value, format, precision); return *this;}
|
PIString & setNumber(const ldouble & value, char format = 'f', int precision = 8) {clear(); *this += PIString::fromNumber(value, format, precision); return *this;}
|
||||||
|
|
||||||
//! @brief Set string content to human readable size in B/kB/MB/GB/TB
|
//! \brief Set string content to human readable size in B/kB/MB/GB/TB
|
||||||
//! \details Example: \snippet pistring.cpp PIString::setReadableSize
|
//! \details Example: \snippet pistring.cpp PIString::setReadableSize
|
||||||
PIString & setReadableSize(llong bytes);
|
PIString & setReadableSize(llong bytes);
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value" in base "base"
|
//! \brief Return string contains numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
||||||
static PIString fromNumber(const short value, int base = 10, bool * ok = 0) {return fromNumberBaseS(llong(value), base, ok);}
|
static PIString fromNumber(const short value, int base = 10, bool * ok = 0) {return fromNumberBaseS(llong(value), base, ok);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value" in base "base"
|
//! \brief Return string contains numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
||||||
static PIString fromNumber(const ushort value, int base = 10, bool * ok = 0) {return fromNumberBaseU(ullong(value), base, ok);}
|
static PIString fromNumber(const ushort value, int base = 10, bool * ok = 0) {return fromNumberBaseU(ullong(value), base, ok);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value" in base "base"
|
//! \brief Return string contains numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
||||||
static PIString fromNumber(const int value, int base = 10, bool * ok = 0) {return fromNumberBaseS(llong(value), base, ok);}
|
static PIString fromNumber(const int value, int base = 10, bool * ok = 0) {return fromNumberBaseS(llong(value), base, ok);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value" in base "base"
|
//! \brief Return string contains numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
||||||
static PIString fromNumber(const uint value, int base = 10, bool * ok = 0) {return fromNumberBaseU(ullong(value), base, ok);}
|
static PIString fromNumber(const uint value, int base = 10, bool * ok = 0) {return fromNumberBaseU(ullong(value), base, ok);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value" in base "base"
|
//! \brief Return string contains numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
||||||
static PIString fromNumber(const long value, int base = 10, bool * ok = 0) {return fromNumberBaseS(llong(value), base, ok);}
|
static PIString fromNumber(const long value, int base = 10, bool * ok = 0) {return fromNumberBaseS(llong(value), base, ok);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value" in base "base"
|
//! \brief Return string contains numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
||||||
static PIString fromNumber(const ulong value, int base = 10, bool * ok = 0) {return fromNumberBaseU(ullong(value), base, ok);}
|
static PIString fromNumber(const ulong value, int base = 10, bool * ok = 0) {return fromNumberBaseU(ullong(value), base, ok);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value" in base "base"
|
//! \brief Return string contains numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
||||||
static PIString fromNumber(const llong & value, int base = 10, bool * ok = 0) {return fromNumberBaseS(value, base, ok);}
|
static PIString fromNumber(const llong & value, int base = 10, bool * ok = 0) {return fromNumberBaseS(value, base, ok);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value" in base "base"
|
//! \brief Return string contains numeric representation of "value" in base "base"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
//! \details Example: \snippet pistring.cpp PIString::fromNumber
|
||||||
static PIString fromNumber(const ullong & value, int base = 10, bool * ok = 0) {return fromNumberBaseU(value, base, ok);}
|
static PIString fromNumber(const ullong & value, int base = 10, bool * ok = 0) {return fromNumberBaseU(value, base, ok);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value"
|
//! \brief Return string contains numeric representation of "value"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromFloat
|
//! \details Example: \snippet pistring.cpp PIString::fromFloat
|
||||||
static PIString fromNumber(const float value, char format = 'f', int precision = 8) {return ftos(value, format, precision);}
|
static PIString fromNumber(const float value, char format = 'f', int precision = 8) {return ftos(value, format, precision);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value"
|
//! \brief Return string contains numeric representation of "value"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromFloat
|
//! \details Example: \snippet pistring.cpp PIString::fromFloat
|
||||||
static PIString fromNumber(const double & value, char format = 'f', int precision = 8) {return dtos(value, format, precision);}
|
static PIString fromNumber(const double & value, char format = 'f', int precision = 8) {return dtos(value, format, precision);}
|
||||||
|
|
||||||
//! @brief Return string contains numeric representation of "value"
|
//! \brief Return string contains numeric representation of "value"
|
||||||
//! \details Example: \snippet pistring.cpp PIString::fromFloat
|
//! \details Example: \snippet pistring.cpp PIString::fromFloat
|
||||||
static PIString fromNumber(const ldouble & value, char format = 'f', int precision = 8) {return dtos(value, format, precision);}
|
static PIString fromNumber(const ldouble & value, char format = 'f', int precision = 8) {return dtos(value, format, precision);}
|
||||||
|
|
||||||
//! @brief Return "true" or "false"
|
//! \brief Return "true" or "false"
|
||||||
static PIString fromBool(const bool value) {return PIString(value ? "true" : "false");}
|
static PIString fromBool(const bool value) {return PIString(value ? "true" : "false");}
|
||||||
|
|
||||||
//! @brief Return string constructed from terminal codepage
|
//! \brief Return string constructed from terminal codepage
|
||||||
static PIString fromConsole(const char * s);
|
static PIString fromConsole(const char * s);
|
||||||
|
|
||||||
//! @brief Return string constructed from system codepage
|
//! \brief Return string constructed from system codepage
|
||||||
static PIString fromSystem(const char * s);
|
static PIString fromSystem(const char * s);
|
||||||
|
|
||||||
//! @brief Return string constructed from UTF-8
|
//! \brief Return string constructed from UTF-8
|
||||||
static PIString fromUTF8(const char * s);
|
static PIString fromUTF8(const char * s);
|
||||||
|
|
||||||
//! @brief Return string constructed from UTF-8
|
//! \brief Return string constructed from UTF-8
|
||||||
static PIString fromUTF8(const PIByteArray &ba);
|
static PIString fromUTF8(const PIByteArray &ba);
|
||||||
|
|
||||||
//! @brief Return string constructed from ASCII
|
//! \brief Return string constructed from ASCII
|
||||||
static PIString fromAscii(const char * s);
|
static PIString fromAscii(const char * s);
|
||||||
|
|
||||||
//! @brief Return string constructed from "len" chars ASCII
|
//! \brief Return string constructed from "len" chars ASCII
|
||||||
static PIString fromAscii(const char * s, int len);
|
static PIString fromAscii(const char * s, int len);
|
||||||
|
|
||||||
//! @brief Return string constructed from "c" codepage
|
//! \brief Return string constructed from "c" codepage
|
||||||
static PIString fromCodepage(const char * s, const char * c);
|
static PIString fromCodepage(const char * s, const char * c);
|
||||||
|
|
||||||
//! @brief Return string contains human readable size in B/kB/MB/GB/TB
|
//! \brief Return string contains human readable size in B/kB/MB/GB/TB
|
||||||
//! \details Example: \snippet pistring.cpp PIString::readableSize
|
//! \details Example: \snippet pistring.cpp PIString::readableSize
|
||||||
static PIString readableSize(llong bytes);
|
static PIString readableSize(llong bytes);
|
||||||
|
|
||||||
@@ -751,30 +751,30 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PICout @brief Output operator to PICout
|
//! \relatesalso PICout \brief Output operator to PICout
|
||||||
PIP_EXPORT PICout operator <<(PICout s, const PIString & v);
|
PIP_EXPORT PICout operator <<(PICout s, const PIString & v);
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Output operator to PIByteArray
|
//! \relatesalso PIByteArray \brief Output operator to PIByteArray
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const PIString & v) {s << *(PIDeque<PIChar>*)&v; return s;}
|
inline PIByteArray & operator <<(PIByteArray & s, const PIString & v) {s << *(PIDeque<PIChar>*)&v; return s;}
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Input operator from PIByteArray
|
//! \relatesalso PIByteArray \brief Input operator from PIByteArray
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIString & v) {v.clear(); s >> *(PIDeque<PIChar>*)&v; return s;}
|
inline PIByteArray & operator >>(PIByteArray & s, PIString & v) {v.clear(); s >> *(PIDeque<PIChar>*)&v; return s;}
|
||||||
|
|
||||||
|
|
||||||
//! @brief Return concatenated string
|
//! \brief Return concatenated string
|
||||||
inline PIString operator +(const PIString & str, const PIString & f) {PIString s(str); s += f; return s;}
|
inline PIString operator +(const PIString & str, const PIString & f) {PIString s(str); s += f; return s;}
|
||||||
|
|
||||||
//! @brief Return concatenated string
|
//! \brief Return concatenated string
|
||||||
inline PIString operator +(const PIString & f, const char * str) {PIString s(f); s += str; return s;}
|
inline PIString operator +(const PIString & f, const char * str) {PIString s(f); s += str; return s;}
|
||||||
|
|
||||||
//! @brief Return concatenated string
|
//! \brief Return concatenated string
|
||||||
inline PIString operator +(const char * str, const PIString & f) {return PIString(str) + f;}
|
inline PIString operator +(const char * str, const PIString & f) {return PIString(str) + f;}
|
||||||
|
|
||||||
//! \relatesalso PIString @brief Return concatenated string
|
//! \relatesalso PIString \brief Return concatenated string
|
||||||
inline PIString operator +(const char c, const PIString & f) {return PIChar(c) + f;}
|
inline PIString operator +(const char c, const PIString & f) {return PIChar(c) + f;}
|
||||||
|
|
||||||
//! @brief Return concatenated string
|
//! \brief Return concatenated string
|
||||||
inline PIString operator +(const PIString & f, const char c) {return f + PIChar(c);}
|
inline PIString operator +(const PIString & f, const char c) {return f + PIChar(c);}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pistring_std.h
|
/*! \file pistring_std.h
|
||||||
* @brief STD for PIString
|
* \brief STD for PIString
|
||||||
*
|
*
|
||||||
* This file declare std operators and string conversions
|
* This file declare std operators and string conversions
|
||||||
*/
|
*/
|
||||||
@@ -70,24 +70,24 @@ inline PIString StdWString2PIString(const std::wstring & v) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PIChar @brief Output operator to \c std::ostream
|
//! \relatesalso PIChar \brief Output operator to \c std::ostream
|
||||||
inline std::ostream & operator <<(std::ostream & s, const PIChar & v) {s << v.toCharPtr(); return s;}
|
inline std::ostream & operator <<(std::ostream & s, const PIChar & v) {s << v.toCharPtr(); return s;}
|
||||||
|
|
||||||
//! \relatesalso PIString @brief Return concatenated string
|
//! \relatesalso PIString \brief Return concatenated string
|
||||||
inline PIString operator +(const PIString & f, const std::string & str) {PIString s(f); s += StdString2PIString(str); return s;}
|
inline PIString operator +(const PIString & f, const std::string & str) {PIString s(f); s += StdString2PIString(str); return s;}
|
||||||
|
|
||||||
//! \relatesalso PIString @brief Return concatenated string
|
//! \relatesalso PIString \brief Return concatenated string
|
||||||
inline PIString operator +(const std::string & str, const PIString & f) {return StdString2PIString(str) + f;}
|
inline PIString operator +(const std::string & str, const PIString & f) {return StdString2PIString(str) + f;}
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PIString @brief Output operator to std::ostream (cout)
|
//! \relatesalso PIString \brief Output operator to std::ostream (cout)
|
||||||
inline std::ostream & operator <<(std::ostream & s, const PIString & v) {for (int i = 0; i < v.length(); ++i) s << v[i]; return s;}
|
inline std::ostream & operator <<(std::ostream & s, const PIString & v) {for (int i = 0; i < v.length(); ++i) s << v[i]; return s;}
|
||||||
|
|
||||||
//! \relatesalso PIString @brief Input operator from std::istream (cin)
|
//! \relatesalso PIString \brief Input operator from std::istream (cin)
|
||||||
inline std::istream & operator >>(std::istream & s, PIString & v) {std::string ss; s >> ss; v = StdString2PIString(ss); return s;}
|
inline std::istream & operator >>(std::istream & s, PIString & v) {std::string ss; s >> ss; v = StdString2PIString(ss); return s;}
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PIStringList @brief Output operator to std::ostream (cout)
|
//! \relatesalso PIStringList \brief Output operator to std::ostream (cout)
|
||||||
inline std::ostream & operator <<(std::ostream & s, const PIStringList & v) {
|
inline std::ostream & operator <<(std::ostream & s, const PIStringList & v) {
|
||||||
s << PIChar("{");
|
s << PIChar("{");
|
||||||
for (uint i = 0; i < v.size(); ++i) {
|
for (uint i = 0; i < v.size(); ++i) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*! @brief Strings array class
|
/*! \brief Strings array class
|
||||||
* \details This class is based on \a PIDeque<PIString> and
|
* \details This class is based on \a PIDeque<PIString> and
|
||||||
* expand it functionality. */
|
* expand it functionality. */
|
||||||
/*
|
/*
|
||||||
@@ -60,22 +60,22 @@ public:
|
|||||||
PIStringList(std::initializer_list<PIString> init_list): PIDeque<PIString>(init_list) {}
|
PIStringList(std::initializer_list<PIString> init_list): PIDeque<PIString>(init_list) {}
|
||||||
|
|
||||||
|
|
||||||
//! @brief Join all strings in one with delimiter "delim" and return it
|
//! \brief Join all strings in one with delimiter "delim" and return it
|
||||||
//! \details Example: \snippet pistring.cpp PIStringList::join
|
//! \details Example: \snippet pistring.cpp PIStringList::join
|
||||||
PIString join(const PIString & delim) const {PIString s; for (uint i = 0; i < size(); ++i) {s += at(i); if (i < size() - 1) s += delim;} return s;}
|
PIString join(const PIString & delim) const {PIString s; for (uint i = 0; i < size(); ++i) {s += at(i); if (i < size() - 1) s += delim;} return s;}
|
||||||
|
|
||||||
//! @brief Remove all strings equal "value" and return this
|
//! \brief Remove all strings equal "value" and return this
|
||||||
//! \details Example: \snippet pistring.cpp PIStringList::removeStrings
|
//! \details Example: \snippet pistring.cpp PIStringList::removeStrings
|
||||||
PIStringList & removeStrings(const PIString & value) {for (uint i = 0; i < size(); ++i) {if (at(i) == value) {remove(i); --i;}} return *this;}
|
PIStringList & removeStrings(const PIString & value) {for (uint i = 0; i < size(); ++i) {if (at(i) == value) {remove(i); --i;}} return *this;}
|
||||||
|
|
||||||
PIStringList & remove(uint num) {PIDeque<PIString>::remove(num); return *this;}
|
PIStringList & remove(uint num) {PIDeque<PIString>::remove(num); return *this;}
|
||||||
PIStringList & remove(uint num, uint count) {PIDeque<PIString>::remove(num, count); return *this;}
|
PIStringList & remove(uint num, uint count) {PIDeque<PIString>::remove(num, count); return *this;}
|
||||||
|
|
||||||
//! @brief Remove duplicated strings and return this
|
//! \brief Remove duplicated strings and return this
|
||||||
//! \details Example: \snippet pistring.cpp PIStringList::removeDuplicates
|
//! \details Example: \snippet pistring.cpp PIStringList::removeDuplicates
|
||||||
PIStringList & removeDuplicates();
|
PIStringList & removeDuplicates();
|
||||||
|
|
||||||
//! @brief Trim all strings
|
//! \brief Trim all strings
|
||||||
//! \details Example: \snippet pistring.cpp PIString::trim
|
//! \details Example: \snippet pistring.cpp PIString::trim
|
||||||
PIStringList & trim() {for (uint i = 0; i < size(); ++i) (*this)[i].trim(); return *this;}
|
PIStringList & trim() {for (uint i = 0; i < size(); ++i) (*this)[i].trim(); return *this;}
|
||||||
|
|
||||||
@@ -97,13 +97,13 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//! \relatesalso PIByteArray @brief Output operator to PIByteArray
|
//! \relatesalso PIByteArray \brief Output operator to PIByteArray
|
||||||
inline PIByteArray & operator <<(PIByteArray & s, const PIStringList & v) {s << int(v.size_s()); for (int i = 0; i < v.size_s(); ++i) s << v[i]; return s;}
|
inline PIByteArray & operator <<(PIByteArray & s, const PIStringList & v) {s << int(v.size_s()); for (int i = 0; i < v.size_s(); ++i) s << v[i]; return s;}
|
||||||
|
|
||||||
//! relatesalso PIByteArray @brief Input operator from PIByteArray
|
//! relatesalso PIByteArray \brief Input operator from PIByteArray
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIStringList & v) {int sz; s >> sz; v.resize(sz); for (int i = 0; i < sz; ++i) s >> v[i]; return s;}
|
inline PIByteArray & operator >>(PIByteArray & s, PIStringList & v) {int sz; s >> sz; v.resize(sz); for (int i = 0; i < sz; ++i) s >> v[i]; return s;}
|
||||||
|
|
||||||
//! \relatesalso PICout @brief Output operator to PICout
|
//! \relatesalso PICout \brief Output operator to PICout
|
||||||
inline PICout operator <<(PICout s, const PIStringList & v) {s.space(); s.setControl(0, true); s << "{"; for (uint i = 0; i < v.size(); ++i) {s << "\"" << v[i] << "\""; if (i < v.size() - 1) s << ", ";} s << "}"; s.restoreControl(); return s;}
|
inline PICout operator <<(PICout s, const PIStringList & v) {s.space(); s.setControl(0, true); s << "{"; for (uint i = 0; i < v.size(); ++i) {s << "\"" << v[i] << "\""; if (i < v.size() - 1) s << ", ";} s << "}"; s.restoreControl(); return s;}
|
||||||
|
|
||||||
#endif // PISTRINGLIST_H
|
#endif // PISTRINGLIST_H
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \class PISystemTime
|
/*! \class PISystemTime
|
||||||
* @brief System time
|
* \brief System time
|
||||||
*
|
*
|
||||||
* \section PISystemTime_sec0 Synopsis
|
* \section PISystemTime_sec0 Synopsis
|
||||||
* This class provide arithmetic functions for POSIX system time.
|
* This class provide arithmetic functions for POSIX system time.
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PITimeMeasurer
|
/*! \class PITimeMeasurer
|
||||||
* @brief Time measurements
|
* \brief Time measurements
|
||||||
*
|
*
|
||||||
* \section PITimeMeasurer_sec0 Synopsis
|
* \section PITimeMeasurer_sec0 Synopsis
|
||||||
* Function \a reset() set time mark to current
|
* Function \a reset() set time mark to current
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pitime.h
|
/*! \file pitime.h
|
||||||
* @brief Time structs
|
* \brief Time structs
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
# include <time.h>
|
# include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! @brief Precise sleep for "usecs" microseconds
|
/*! \brief Precise sleep for "usecs" microseconds
|
||||||
* \details This function consider \c "usleep" offset
|
* \details This function consider \c "usleep" offset
|
||||||
* on QNX/Linux/Mac, which is calculated with
|
* on QNX/Linux/Mac, which is calculated with
|
||||||
* \a pip_sys_test program. If there is correct
|
* \a pip_sys_test program. If there is correct
|
||||||
@@ -38,11 +38,11 @@
|
|||||||
* wait \b exactly "usecs" microseconds. */
|
* wait \b exactly "usecs" microseconds. */
|
||||||
PIP_EXPORT void piUSleep(int usecs); // on !Windows consider constant "usleep" offset
|
PIP_EXPORT void piUSleep(int usecs); // on !Windows consider constant "usleep" offset
|
||||||
|
|
||||||
/*! @brief Precise sleep for "msecs" milliseconds
|
/*! \brief Precise sleep for "msecs" milliseconds
|
||||||
* \details This function exec \a piUSleep (msecs * 1000). */
|
* \details This function exec \a piUSleep (msecs * 1000). */
|
||||||
inline void piMSleep(double msecs) {piUSleep(int(msecs * 1000.));} // on !Windows consider constant "usleep" offset
|
inline void piMSleep(double msecs) {piUSleep(int(msecs * 1000.));} // on !Windows consider constant "usleep" offset
|
||||||
|
|
||||||
/*! @brief Precise sleep for "secs" seconds
|
/*! \brief Precise sleep for "secs" seconds
|
||||||
* \details This function exec \a piUSleep (msecs * 1000000). */
|
* \details This function exec \a piUSleep (msecs * 1000000). */
|
||||||
inline void piSleep(double secs) {piUSleep(int(secs * 1000000.));} // on !Windows consider constant "usleep" offset
|
inline void piSleep(double secs) {piUSleep(int(secs * 1000000.));} // on !Windows consider constant "usleep" offset
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! \relatesalso PICout @brief Output operator to PICout
|
//! \relatesalso PICout \brief Output operator to PICout
|
||||||
inline PICout operator <<(PICout s, const PISystemTime & v) {s.space(); s.setControl(0, true); s << "(" << v.seconds << " s, " << v.nanoseconds << " ns)"; s.restoreControl(); return s;}
|
inline PICout operator <<(PICout s, const PISystemTime & v) {s.space(); s.setControl(0, true); s << "(" << v.seconds << " s, " << v.nanoseconds << " ns)"; s.restoreControl(); return s;}
|
||||||
|
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ inline bool operator !=(const PITime & t0, const PITime & t1) {return !(t0 == t1
|
|||||||
inline bool operator <=(const PITime & t0, const PITime & t1) {return !(t0 > t1);}
|
inline bool operator <=(const PITime & t0, const PITime & t1) {return !(t0 > t1);}
|
||||||
inline bool operator >=(const PITime & t0, const PITime & t1) {return !(t0 < t1);}
|
inline bool operator >=(const PITime & t0, const PITime & t1) {return !(t0 < t1);}
|
||||||
|
|
||||||
//! \relatesalso PICout @brief Output operator to PICout
|
//! \relatesalso PICout \brief Output operator to PICout
|
||||||
PIP_EXPORT PICout operator <<(PICout s, const PITime & v);
|
PIP_EXPORT PICout operator <<(PICout s, const PITime & v);
|
||||||
|
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ inline bool operator !=(const PIDate & t0, const PIDate & t1) {return !(t0 == t1
|
|||||||
inline bool operator <=(const PIDate & t0, const PIDate & t1) {return !(t0 > t1);}
|
inline bool operator <=(const PIDate & t0, const PIDate & t1) {return !(t0 > t1);}
|
||||||
inline bool operator >=(const PIDate & t0, const PIDate & t1) {return !(t0 < t1);}
|
inline bool operator >=(const PIDate & t0, const PIDate & t1) {return !(t0 < t1);}
|
||||||
|
|
||||||
//! \relatesalso PICout @brief Output operator to PICout
|
//! \relatesalso PICout \brief Output operator to PICout
|
||||||
PIP_EXPORT PICout operator <<(PICout s, const PIDate & v);
|
PIP_EXPORT PICout operator <<(PICout s, const PIDate & v);
|
||||||
|
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ inline bool operator >=(const PIDateTime & t0, const PIDateTime & t1) {return !(
|
|||||||
inline PIByteArray & operator <<(PIByteArray & s, const PIDateTime & v) {s << v.year << v.month << v.day << v.hours << v.minutes << v.seconds << v.milliseconds; return s;}
|
inline PIByteArray & operator <<(PIByteArray & s, const PIDateTime & v) {s << v.year << v.month << v.day << v.hours << v.minutes << v.seconds << v.milliseconds; return s;}
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIDateTime & v) {s >> v.year >> v.month >> v.day >> v.hours >> v.minutes >> v.seconds >> v.milliseconds; return s;}
|
inline PIByteArray & operator >>(PIByteArray & s, PIDateTime & v) {s >> v.year >> v.month >> v.day >> v.hours >> v.minutes >> v.seconds >> v.milliseconds; return s;}
|
||||||
|
|
||||||
//! \relatesalso PICout @brief Output operator to PICout
|
//! \relatesalso PICout \brief Output operator to PICout
|
||||||
PIP_EXPORT PICout operator <<(PICout s, const PIDateTime & v);
|
PIP_EXPORT PICout operator <<(PICout s, const PIDateTime & v);
|
||||||
|
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ class PIP_EXPORT PITimeMeasurer {
|
|||||||
public:
|
public:
|
||||||
PITimeMeasurer();
|
PITimeMeasurer();
|
||||||
|
|
||||||
/** @brief Set internal time mark to current system time
|
/** \brief Set internal time mark to current system time
|
||||||
* \details This function used for set start time mark. Later
|
* \details This function used for set start time mark. Later
|
||||||
* you can find out elapsed time from this time mark to any
|
* you can find out elapsed time from this time mark to any
|
||||||
* moment of time with \a elapsed_s(), \a elapsed_m(),
|
* moment of time with \a elapsed_s(), \a elapsed_m(),
|
||||||
@@ -276,19 +276,19 @@ public:
|
|||||||
* \sa \a elapsed_s(), \a elapsed_m(), \a elapsed_u(), \a elapsed_n() */
|
* \sa \a elapsed_s(), \a elapsed_m(), \a elapsed_u(), \a elapsed_n() */
|
||||||
void reset() {t_st = PISystemTime::current(true);}
|
void reset() {t_st = PISystemTime::current(true);}
|
||||||
|
|
||||||
//! @brief Returns nanoseconds elapsed from last \a reset() execution or from timer measurer creation.
|
//! \brief Returns nanoseconds elapsed from last \a reset() execution or from timer measurer creation.
|
||||||
double elapsed_n() const;
|
double elapsed_n() const;
|
||||||
|
|
||||||
//! @brief Returns microseconds elapsed from last \a reset() execution or from timer measurer creation.
|
//! \brief Returns microseconds elapsed from last \a reset() execution or from timer measurer creation.
|
||||||
double elapsed_u() const;
|
double elapsed_u() const;
|
||||||
|
|
||||||
//! @brief Returns milliseconds elapsed from last \a reset() execution or from timer measurer creation.
|
//! \brief Returns milliseconds elapsed from last \a reset() execution or from timer measurer creation.
|
||||||
double elapsed_m() const;
|
double elapsed_m() const;
|
||||||
|
|
||||||
//! @brief Returns seconds elapsed from last \a reset() execution or from timer measurer creation.
|
//! \brief Returns seconds elapsed from last \a reset() execution or from timer measurer creation.
|
||||||
double elapsed_s() const;
|
double elapsed_s() const;
|
||||||
|
|
||||||
//! @brief Returns PISystemTime elapsed from last \a reset() execution or from timer measurer creation.
|
//! \brief Returns PISystemTime elapsed from last \a reset() execution or from timer measurer creation.
|
||||||
PISystemTime elapsed() const;
|
PISystemTime elapsed() const;
|
||||||
|
|
||||||
double reset_time_n() const {return t_st.toNanoseconds();}
|
double reset_time_n() const {return t_st.toNanoseconds();}
|
||||||
@@ -296,22 +296,22 @@ public:
|
|||||||
double reset_time_m() const {return t_st.toMilliseconds();}
|
double reset_time_m() const {return t_st.toMilliseconds();}
|
||||||
double reset_time_s() const {return t_st.toSeconds();}
|
double reset_time_s() const {return t_st.toSeconds();}
|
||||||
|
|
||||||
//! @brief Returns time mark of last \a reset() execution or timer measurer creation.
|
//! \brief Returns time mark of last \a reset() execution or timer measurer creation.
|
||||||
PISystemTime reset_time() {return t_st;}
|
PISystemTime reset_time() {return t_st;}
|
||||||
|
|
||||||
//! @brief Returns nanoseconds representation of current system time.
|
//! \brief Returns nanoseconds representation of current system time.
|
||||||
static double elapsed_system_n() {return PISystemTime::current(true).toNanoseconds();}
|
static double elapsed_system_n() {return PISystemTime::current(true).toNanoseconds();}
|
||||||
|
|
||||||
//! @brief Returns microseconds representation of current system time.
|
//! \brief Returns microseconds representation of current system time.
|
||||||
static double elapsed_system_u() {return PISystemTime::current(true).toMicroseconds();}
|
static double elapsed_system_u() {return PISystemTime::current(true).toMicroseconds();}
|
||||||
|
|
||||||
//! @brief Returns milliseconds representation of current system time.
|
//! \brief Returns milliseconds representation of current system time.
|
||||||
static double elapsed_system_m() {return PISystemTime::current(true).toMilliseconds();}
|
static double elapsed_system_m() {return PISystemTime::current(true).toMilliseconds();}
|
||||||
|
|
||||||
//! @brief Returns seconds representation of current system time.
|
//! \brief Returns seconds representation of current system time.
|
||||||
static double elapsed_system_s() {return PISystemTime::current(true).toSeconds();}
|
static double elapsed_system_s() {return PISystemTime::current(true).toSeconds();}
|
||||||
|
|
||||||
//! @brief Returns time mark of current system time.
|
//! \brief Returns time mark of current system time.
|
||||||
static PISystemTime elapsed_system() {return PISystemTime::current(true);}
|
static PISystemTime elapsed_system() {return PISystemTime::current(true);}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pitime_win.h
|
/*! \file pitime_win.h
|
||||||
* @brief PITime conversions for Windows
|
* \brief PITime conversions for Windows
|
||||||
*
|
*
|
||||||
* This file declare time conversions for Windows
|
* This file declare time conversions for Windows
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/** \class PIVariant
|
/** \class PIVariant
|
||||||
* @brief Variant type
|
* \brief Variant type
|
||||||
* \details
|
* \details
|
||||||
* \section PIVariant_sec0 Synopsis
|
* \section PIVariant_sec0 Synopsis
|
||||||
* This class provides general type that can contains all standard types, some
|
* This class provides general type that can contains all standard types, some
|
||||||
@@ -220,7 +220,7 @@ PIString PIVariant::typeName(PIVariant::Type type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as boolean
|
/** \brief Returns variant content as boolean
|
||||||
* \details In case of numeric types returns \b true if value != 0. \n
|
* \details In case of numeric types returns \b true if value != 0. \n
|
||||||
* In case of String type returns \a PIString::toBool(). \n
|
* In case of String type returns \a PIString::toBool(). \n
|
||||||
* In case of StringList type returns \b false if string list is empty,
|
* In case of StringList type returns \b false if string list is empty,
|
||||||
@@ -251,7 +251,7 @@ bool PIVariant::toBool() const {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as int
|
/** \brief Returns variant content as int
|
||||||
* \details In case of numeric types returns integer value. \n
|
* \details In case of numeric types returns integer value. \n
|
||||||
* In case of String type returns \a PIString::toInt(). \n
|
* In case of String type returns \a PIString::toInt(). \n
|
||||||
* In case of StringList type returns \b 0 if string list is empty,
|
* In case of StringList type returns \b 0 if string list is empty,
|
||||||
@@ -283,7 +283,7 @@ int PIVariant::toInt() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as long long
|
/** \brief Returns variant content as long long
|
||||||
* \details In case of numeric types returns integer value. \n
|
* \details In case of numeric types returns integer value. \n
|
||||||
* In case of String type returns \a PIString::toLLong(). \n
|
* In case of String type returns \a PIString::toLLong(). \n
|
||||||
* In case of StringList type returns \b 0L if string list is empty,
|
* In case of StringList type returns \b 0L if string list is empty,
|
||||||
@@ -314,7 +314,7 @@ llong PIVariant::toLLong() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as float
|
/** \brief Returns variant content as float
|
||||||
* \details In case of numeric types returns float value. \n
|
* \details In case of numeric types returns float value. \n
|
||||||
* In case of String type returns \a PIString::toFloat(). \n
|
* In case of String type returns \a PIString::toFloat(). \n
|
||||||
* In case of StringList type returns \b 0.f if string list is empty,
|
* In case of StringList type returns \b 0.f if string list is empty,
|
||||||
@@ -345,7 +345,7 @@ float PIVariant::toFloat() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as double
|
/** \brief Returns variant content as double
|
||||||
* \details In case of numeric types returns double value. \n
|
* \details In case of numeric types returns double value. \n
|
||||||
* In case of String type returns \a PIString::toDouble(). \n
|
* In case of String type returns \a PIString::toDouble(). \n
|
||||||
* In case of StringList type returns \b 0. if string list is empty,
|
* In case of StringList type returns \b 0. if string list is empty,
|
||||||
@@ -376,7 +376,7 @@ double PIVariant::toDouble() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as long double
|
/** \brief Returns variant content as long double
|
||||||
* \details In case of numeric types returns long double value. \n
|
* \details In case of numeric types returns long double value. \n
|
||||||
* In case of String type returns \a PIString::toLDouble(). \n
|
* In case of String type returns \a PIString::toLDouble(). \n
|
||||||
* In case of StringList type returns \b 0. if string list is empty,
|
* In case of StringList type returns \b 0. if string list is empty,
|
||||||
@@ -407,7 +407,7 @@ ldouble PIVariant::toLDouble() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as time
|
/** \brief Returns variant content as time
|
||||||
* \details In case of Time type returns time value. \n
|
* \details In case of Time type returns time value. \n
|
||||||
* In case of DateTime type returns time part of value. \n
|
* In case of DateTime type returns time part of value. \n
|
||||||
* In case of other types returns \a PITime(). */
|
* In case of other types returns \a PITime(). */
|
||||||
@@ -420,7 +420,7 @@ PITime PIVariant::toTime() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as date
|
/** \brief Returns variant content as date
|
||||||
* \details In case of Date type returns date value. \n
|
* \details In case of Date type returns date value. \n
|
||||||
* In case of DateTime type returns date part of value. \n
|
* In case of DateTime type returns date part of value. \n
|
||||||
* In case of other types returns \a PIDate(). */
|
* In case of other types returns \a PIDate(). */
|
||||||
@@ -433,7 +433,7 @@ PIDate PIVariant::toDate() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as date and time
|
/** \brief Returns variant content as date and time
|
||||||
* \details In case of Time type returns time value with null date. \n
|
* \details In case of Time type returns time value with null date. \n
|
||||||
* In case of Date type returns date value with null time. \n
|
* In case of Date type returns date value with null time. \n
|
||||||
* In case of DateTime type returns date and time. \n
|
* In case of DateTime type returns date and time. \n
|
||||||
@@ -448,7 +448,7 @@ PIDateTime PIVariant::toDateTime() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as system time
|
/** \brief Returns variant content as system time
|
||||||
* \details In case of SystemTime type returns system time. \n
|
* \details In case of SystemTime type returns system time. \n
|
||||||
* In case of other types returns \a PISystemTime::fromSeconds() from
|
* In case of other types returns \a PISystemTime::fromSeconds() from
|
||||||
* double value of variant content. */
|
* double value of variant content. */
|
||||||
@@ -460,7 +460,7 @@ PISystemTime PIVariant::toSystemTime() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as string
|
/** \brief Returns variant content as string
|
||||||
* \details In case of numeric types returns \a PIString::fromNumber(). \n
|
* \details In case of numeric types returns \a PIString::fromNumber(). \n
|
||||||
* In case of String type returns string value. \n
|
* In case of String type returns string value. \n
|
||||||
* In case of StringList type returns joined string ("(" + PIStringList::join("; ") + ")"). \n
|
* In case of StringList type returns joined string ("(" + PIStringList::join("; ") + ")"). \n
|
||||||
@@ -501,7 +501,7 @@ PIString PIVariant::toString() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as strings list
|
/** \brief Returns variant content as strings list
|
||||||
* \details In case of StringList type returns strings list value. \n
|
* \details In case of StringList type returns strings list value. \n
|
||||||
* In case of other types returns \a PIStringList with one string value of variant content. */
|
* In case of other types returns \a PIStringList with one string value of variant content. */
|
||||||
PIStringList PIVariant::toStringList() const {
|
PIStringList PIVariant::toStringList() const {
|
||||||
@@ -513,7 +513,7 @@ PIStringList PIVariant::toStringList() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as bit array
|
/** \brief Returns variant content as bit array
|
||||||
* \details In case of BitArray type returns bit array value. \n
|
* \details In case of BitArray type returns bit array value. \n
|
||||||
* In case of other types returns \a PIBitArray from \a toLLong() value. */
|
* In case of other types returns \a PIBitArray from \a toLLong() value. */
|
||||||
PIBitArray PIVariant::toBitArray() const {
|
PIBitArray PIVariant::toBitArray() const {
|
||||||
@@ -524,7 +524,7 @@ PIBitArray PIVariant::toBitArray() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as byte array
|
/** \brief Returns variant content as byte array
|
||||||
* \details In case of ByteArray type returns byte array value. \n
|
* \details In case of ByteArray type returns byte array value. \n
|
||||||
* In case of other types returns empty \a PIByteArray. */
|
* In case of other types returns empty \a PIByteArray. */
|
||||||
PIByteArray PIVariant::toByteArray() const {
|
PIByteArray PIVariant::toByteArray() const {
|
||||||
@@ -535,7 +535,7 @@ PIByteArray PIVariant::toByteArray() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as enum
|
/** \brief Returns variant content as enum
|
||||||
* \details In case of Enum type returns enum value. \n
|
* \details In case of Enum type returns enum value. \n
|
||||||
* In case of String returns Enum with one member. \n
|
* In case of String returns Enum with one member. \n
|
||||||
* In case of StringList returns Enum with corresponding members. \n
|
* In case of StringList returns Enum with corresponding members. \n
|
||||||
@@ -550,7 +550,7 @@ PIVariantTypes::Enum PIVariant::toEnum() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as file
|
/** \brief Returns variant content as file
|
||||||
* \details In case of File type returns file value. \n
|
* \details In case of File type returns file value. \n
|
||||||
* In case of String returns File with string value path. \n
|
* In case of String returns File with string value path. \n
|
||||||
* In case of other types returns empty File. */
|
* In case of other types returns empty File. */
|
||||||
@@ -563,7 +563,7 @@ PIVariantTypes::File PIVariant::toFile() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as dir
|
/** \brief Returns variant content as dir
|
||||||
* \details In case of Dir type returns dir value. \n
|
* \details In case of Dir type returns dir value. \n
|
||||||
* In case of String returns Dir with string value path. \n
|
* In case of String returns Dir with string value path. \n
|
||||||
* In case of other types returns empty Dir. */
|
* In case of other types returns empty Dir. */
|
||||||
@@ -576,7 +576,7 @@ PIVariantTypes::Dir PIVariant::toDir() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as color
|
/** \brief Returns variant content as color
|
||||||
* \details In case of Color type returns color value. \n
|
* \details In case of Color type returns color value. \n
|
||||||
* In case of int returns color with int value. \n
|
* In case of int returns color with int value. \n
|
||||||
* In case of other types returns empty Color. */
|
* In case of other types returns empty Color. */
|
||||||
@@ -589,7 +589,7 @@ PIVariantTypes::Color PIVariant::toColor() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as IODevice
|
/** \brief Returns variant content as IODevice
|
||||||
* \details In case of IODevice type returns IODevice value. \n
|
* \details In case of IODevice type returns IODevice value. \n
|
||||||
* In case of other types returns empty IODevice. */
|
* In case of other types returns empty IODevice. */
|
||||||
PIVariantTypes::IODevice PIVariant::toIODevice() const {
|
PIVariantTypes::IODevice PIVariant::toIODevice() const {
|
||||||
@@ -599,7 +599,7 @@ PIVariantTypes::IODevice PIVariant::toIODevice() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as point
|
/** \brief Returns variant content as point
|
||||||
* \details In case of PIPointd type returns point value. \n
|
* \details In case of PIPointd type returns point value. \n
|
||||||
* In case of other types returns empty PIPointd. */
|
* In case of other types returns empty PIPointd. */
|
||||||
PIPointd PIVariant::toPoint() const {
|
PIPointd PIVariant::toPoint() const {
|
||||||
@@ -609,7 +609,7 @@ PIPointd PIVariant::toPoint() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as rect
|
/** \brief Returns variant content as rect
|
||||||
* \details In case of PIRectd type returns rect value. \n
|
* \details In case of PIRectd type returns rect value. \n
|
||||||
* In case of other types returns empty PIRectd. */
|
* In case of other types returns empty PIRectd. */
|
||||||
PIRectd PIVariant::toRect() const {
|
PIRectd PIVariant::toRect() const {
|
||||||
@@ -619,7 +619,7 @@ PIRectd PIVariant::toRect() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as math vector
|
/** \brief Returns variant content as math vector
|
||||||
* \details In case of PIMathVectord type returns rect value. \n
|
* \details In case of PIMathVectord type returns rect value. \n
|
||||||
* In case of other types returns empty PIMathVectord. */
|
* In case of other types returns empty PIMathVectord. */
|
||||||
PIMathVectord PIVariant::toMathVector() const {
|
PIMathVectord PIVariant::toMathVector() const {
|
||||||
@@ -629,7 +629,7 @@ PIMathVectord PIVariant::toMathVector() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as math matrix
|
/** \brief Returns variant content as math matrix
|
||||||
* \details In case of PIMathMatrixd type returns rect value. \n
|
* \details In case of PIMathMatrixd type returns rect value. \n
|
||||||
* In case of other types returns empty PIMathMatrixd. */
|
* In case of other types returns empty PIMathMatrixd. */
|
||||||
PIMathMatrixd PIVariant::toMathMatrix() const {
|
PIMathMatrixd PIVariant::toMathMatrix() const {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pivariant.h
|
/*! \file pivariant.h
|
||||||
* @brief Variant type
|
* \brief Variant type
|
||||||
*
|
*
|
||||||
* This file declares PIVariant
|
* This file declares PIVariant
|
||||||
*/
|
*/
|
||||||
@@ -460,7 +460,7 @@ public:
|
|||||||
PIMathMatrixd toMathMatrix() const;
|
PIMathMatrixd toMathMatrix() const;
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns variant content as custom type
|
/** \brief Returns variant content as custom type
|
||||||
* \details In case of known types this function equivalent \a to<Type> function. \n
|
* \details In case of known types this function equivalent \a to<Type> function. \n
|
||||||
* Otherwise returns content as type T. */
|
* Otherwise returns content as type T. */
|
||||||
template<typename T>
|
template<typename T>
|
||||||
@@ -551,7 +551,7 @@ public:
|
|||||||
void swap(PIVariant & v);
|
void swap(PIVariant & v);
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns new variant from custom type
|
/** \brief Returns new variant from custom type
|
||||||
* \details In case of known types this function equivalent \a PIVariant(T) constructors. \n
|
* \details In case of known types this function equivalent \a PIVariant(T) constructors. \n
|
||||||
* Otherwise returns variant with content \a v and type Custom. */
|
* Otherwise returns variant with content \a v and type Custom. */
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pivariantsimple.h
|
/*! \file pivariantsimple.h
|
||||||
* @brief Variant simple type
|
* \brief Variant simple type
|
||||||
*
|
*
|
||||||
* This file declares PIVariantSimple
|
* This file declares PIVariantSimple
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pivarianttypes.h
|
/*! \file pivarianttypes.h
|
||||||
* @brief Variant type
|
* \brief Variant type
|
||||||
*
|
*
|
||||||
* This file declares PIVariant
|
* This file declares PIVariant
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ class PIPropertyStorage;
|
|||||||
namespace PIVariantTypes {
|
namespace PIVariantTypes {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief name-value pair
|
* \brief name-value pair
|
||||||
*/
|
*/
|
||||||
struct PIP_EXPORT Enumerator {
|
struct PIP_EXPORT Enumerator {
|
||||||
Enumerator(int v = 0, const PIString & n = PIString()): value(v), name(n) {}
|
Enumerator(int v = 0, const PIString & n = PIString()): value(v), name(n) {}
|
||||||
@@ -43,26 +43,26 @@ struct PIP_EXPORT Enumerator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Collection of PIVariantTypes::Enumerator. It's replace classic c-style enum.
|
* \brief Collection of PIVariantTypes::Enumerator. It's replace classic c-style enum.
|
||||||
* Contains elements with unique name and not uniqueue values.
|
* Contains elements with unique name and not uniqueue values.
|
||||||
*/
|
*/
|
||||||
struct PIP_EXPORT Enum {
|
struct PIP_EXPORT Enum {
|
||||||
Enum(const PIString & n = PIString()): enum_name(n) {}
|
Enum(const PIString & n = PIString()): enum_name(n) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Find selected value.
|
* \brief Find selected value.
|
||||||
* @return selected value, otherwrise 0
|
* @return selected value, otherwrise 0
|
||||||
*/
|
*/
|
||||||
int selectedValue() const;
|
int selectedValue() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get selected name
|
* \brief Get selected name
|
||||||
* @return selected name, otherwrise empty PIString
|
* @return selected name, otherwrise empty PIString
|
||||||
*/
|
*/
|
||||||
PIString selectedName() const {return selected;}
|
PIString selectedName() const {return selected;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Select value if exists in Enum. If Enum contains several PIVariantTypes::Enumerator with same values,
|
* \brief Select value if exists in Enum. If Enum contains several PIVariantTypes::Enumerator with same values,
|
||||||
* first PIVariantTypes::Enumerator will selected
|
* first PIVariantTypes::Enumerator will selected
|
||||||
* @param v value for selection
|
* @param v value for selection
|
||||||
* @return true if value exists in Enum, false otherwrise
|
* @return true if value exists in Enum, false otherwrise
|
||||||
@@ -70,55 +70,55 @@ struct PIP_EXPORT Enum {
|
|||||||
bool selectValue(int v);
|
bool selectValue(int v);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Select name if exists in enum
|
* \brief Select name if exists in enum
|
||||||
* @param n name for selection
|
* @param n name for selection
|
||||||
* @return true if name exists in Enum, false otherwrise
|
* @return true if name exists in Enum, false otherwrise
|
||||||
*/
|
*/
|
||||||
bool selectName(const PIString & n);
|
bool selectName(const PIString & n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Find PIVariantTypes::Enumerator with specific name and return it value
|
* \brief Find PIVariantTypes::Enumerator with specific name and return it value
|
||||||
* @param n name for search
|
* @param n name for search
|
||||||
* @return value of founded PIVariantTypes::Enumerator, 0 otherwrise
|
* @return value of founded PIVariantTypes::Enumerator, 0 otherwrise
|
||||||
*/
|
*/
|
||||||
int value(const PIString & n) const;
|
int value(const PIString & n) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Find first PIVariantTypes::Enumerator with specific value and return it name
|
* \brief Find first PIVariantTypes::Enumerator with specific value and return it name
|
||||||
* @param v value for search
|
* @param v value for search
|
||||||
* @return name of founded PIVariantTypes::Enumerator, empty string otherwrise
|
* @return name of founded PIVariantTypes::Enumerator, empty string otherwrise
|
||||||
*/
|
*/
|
||||||
PIString name(int v) const;
|
PIString name(int v) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Make vector of Enum values
|
* \brief Make vector of Enum values
|
||||||
*/
|
*/
|
||||||
PIVector<int> values() const;
|
PIVector<int> values() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Make vector of Enum names
|
* \brief Make vector of Enum names
|
||||||
*/
|
*/
|
||||||
PIStringList names() const;
|
PIStringList names() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add PIVariantTypes::Enumerator to Enum
|
* \brief Add PIVariantTypes::Enumerator to Enum
|
||||||
*/
|
*/
|
||||||
Enum & operator <<(const Enumerator & v);
|
Enum & operator <<(const Enumerator & v);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add PIVariantTypes::Enumerator element to Enum. Element contains specific name and value more per
|
* \brief Add PIVariantTypes::Enumerator element to Enum. Element contains specific name and value more per
|
||||||
* unit then last element. If the is no elements, contains zero value.
|
* unit then last element. If the is no elements, contains zero value.
|
||||||
* @param v name for new PIVariantTypes::Enumerator element
|
* @param v name for new PIVariantTypes::Enumerator element
|
||||||
*/
|
*/
|
||||||
Enum & operator <<(const PIString & v);
|
Enum & operator <<(const PIString & v);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add PIVariantTypes::Enumerator element for each name in vector
|
* \brief Add PIVariantTypes::Enumerator element for each name in vector
|
||||||
*/
|
*/
|
||||||
Enum & operator <<(const PIStringList & v);
|
Enum & operator <<(const PIStringList & v);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return true if Enum is empty
|
* \brief Return true if Enum is empty
|
||||||
*/
|
*/
|
||||||
bool isEmpty() const {return enum_list.isEmpty();}
|
bool isEmpty() const {return enum_list.isEmpty();}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piauth.h
|
/*! \file piauth.h
|
||||||
* @brief PIP Authentication API
|
* \brief PIP Authentication API
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file picrypt.h
|
/*! \file picrypt.h
|
||||||
* @brief Cryptographic class using lib Sodium
|
* \brief Cryptographic class using lib Sodium
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piellipsoidmodel.h
|
/*! \file piellipsoidmodel.h
|
||||||
* @brief Contains geo ellipsoid models
|
* \brief Contains geo ellipsoid models
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pigeoposition.h
|
/*! \file pigeoposition.h
|
||||||
* @brief Class for geo position storage and conversions
|
* \brief Class for geo position storage and conversions
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#define PIBINARYLOG_VERSION_OLD 0x31
|
#define PIBINARYLOG_VERSION_OLD 0x31
|
||||||
|
|
||||||
/*! \class PIBinaryLog
|
/*! \class PIBinaryLog
|
||||||
* @brief Class for read and write binary data to logfile, and playback this data in realtime, or custom speed
|
* \brief Class for read and write binary data to logfile, and playback this data in realtime, or custom speed
|
||||||
*
|
*
|
||||||
* \section PIBinaryLog_sec0 Synopsis
|
* \section PIBinaryLog_sec0 Synopsis
|
||||||
* Binary Log is a file with simple header, where you can read and write some binary data.
|
* Binary Log is a file with simple header, where you can read and write some binary data.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pibinarylog.h
|
/*! \file pibinarylog.h
|
||||||
* @brief Binary log
|
* \brief Binary log
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -33,14 +33,14 @@ public:
|
|||||||
explicit PIBinaryLog();
|
explicit PIBinaryLog();
|
||||||
virtual ~PIBinaryLog();
|
virtual ~PIBinaryLog();
|
||||||
|
|
||||||
//! @brief Play modes for \a PIBinaryLog
|
//! \brief Play modes for \a PIBinaryLog
|
||||||
enum PlayMode {
|
enum PlayMode {
|
||||||
PlayRealTime /*! Play in system realtime, default mode */ ,
|
PlayRealTime /*! Play in system realtime, default mode */ ,
|
||||||
PlayVariableSpeed /*! Play in software realtime with speed, set by \a setSpeed */ ,
|
PlayVariableSpeed /*! Play in software realtime with speed, set by \a setSpeed */ ,
|
||||||
PlayStaticDelay /*! Play with custom static delay, ignoring timestamp */
|
PlayStaticDelay /*! Play with custom static delay, ignoring timestamp */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Different split modes for writing \a PIBinaryLog, which can separate files by size, by time or by records count
|
//! \brief Different split modes for writing \a PIBinaryLog, which can separate files by size, by time or by records count
|
||||||
enum SplitMode {
|
enum SplitMode {
|
||||||
SplitNone /*! Without separate, default mode */ ,
|
SplitNone /*! Without separate, default mode */ ,
|
||||||
SplitTime /*! Separate files by record time */ ,
|
SplitTime /*! Separate files by record time */ ,
|
||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
SplitCount /*! Separate files by records count */
|
SplitCount /*! Separate files by records count */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Struct contains information about all records with same ID
|
//! \brief Struct contains information about all records with same ID
|
||||||
struct PIP_EXPORT BinLogRecordInfo {
|
struct PIP_EXPORT BinLogRecordInfo {
|
||||||
BinLogRecordInfo() {
|
BinLogRecordInfo() {
|
||||||
id = count = 0;
|
id = count = 0;
|
||||||
@@ -62,7 +62,7 @@ public:
|
|||||||
PISystemTime end_time;
|
PISystemTime end_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Struct contains full information about Binary Log file and about all Records using map of \a BinLogRecordInfo
|
//! \brief Struct contains full information about Binary Log file and about all Records using map of \a BinLogRecordInfo
|
||||||
struct PIP_EXPORT BinLogInfo {
|
struct PIP_EXPORT BinLogInfo {
|
||||||
PIString path;
|
PIString path;
|
||||||
int records_count;
|
int records_count;
|
||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
PIByteArray user_header;
|
PIByteArray user_header;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Struct contains position, ID and timestamp of record in file
|
//! \brief Struct contains position, ID and timestamp of record in file
|
||||||
struct PIP_EXPORT BinLogIndex {
|
struct PIP_EXPORT BinLogIndex {
|
||||||
int id;
|
int id;
|
||||||
int data_size;
|
int data_size;
|
||||||
@@ -256,7 +256,7 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn PIString createNewFile()
|
//! \fn PIString createNewFile()
|
||||||
//! @brief Create new binlog file in \a logDir, if successful returns filename, else returns empty string.
|
//! \brief Create new binlog file in \a logDir, if successful returns filename, else returns empty string.
|
||||||
//! Filename is like \a filePrefix + "yyyy_MM_dd__hh_mm_ss.binlog"
|
//! Filename is like \a filePrefix + "yyyy_MM_dd__hh_mm_ss.binlog"
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -264,13 +264,13 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void fileEnd()
|
//! \fn void fileEnd()
|
||||||
//! @brief Raise on file end while reading
|
//! \brief Raise on file end while reading
|
||||||
|
|
||||||
//! \fn void fileError()
|
//! \fn void fileError()
|
||||||
//! @brief Raise on file creation error
|
//! \brief Raise on file creation error
|
||||||
|
|
||||||
//! \fn void newFile(const PIString & filename)
|
//! \fn void newFile(const PIString & filename)
|
||||||
//! @brief Raise on new file created
|
//! \brief Raise on new file created
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
@@ -331,7 +331,7 @@ private:
|
|||||||
PIByteArray user_header;
|
PIByteArray user_header;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! \relatesalso PICout @brief Output operator PIBinaryLog::BinLogInfo to PICout
|
//! \relatesalso PICout \brief Output operator PIBinaryLog::BinLogInfo to PICout
|
||||||
inline PICout operator <<(PICout s, const PIBinaryLog::BinLogInfo & bi) {
|
inline PICout operator <<(PICout s, const PIBinaryLog::BinLogInfo & bi) {
|
||||||
s.space();
|
s.space();
|
||||||
s.setControl(0, true);
|
s.setControl(0, true);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pican.h
|
/*! \file pican.h
|
||||||
* @brief CAN device
|
* \brief CAN device
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
# include <iostream>
|
# include <iostream>
|
||||||
#endif
|
#endif
|
||||||
/*! \class PIConfig
|
/*! \class PIConfig
|
||||||
* @brief Configuration file
|
* \brief Configuration file
|
||||||
* \details This class provide handle access to configuration file.
|
* \details This class provide handle access to configuration file.
|
||||||
*
|
*
|
||||||
* \section PIConfig_sec0 Synopsis
|
* \section PIConfig_sec0 Synopsis
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \class PIConfig::Entry
|
/*! \class PIConfig::Entry
|
||||||
* @brief %Entry of configuration file
|
* \brief %Entry of configuration file
|
||||||
* \details This class is node of internal PIConfig tree.
|
* \details This class is node of internal PIConfig tree.
|
||||||
* %Entry provide access to elements of PIConfig. Each entry has
|
* %Entry provide access to elements of PIConfig. Each entry has
|
||||||
* children or next properties:
|
* children or next properties:
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \class PIConfig::Branch
|
/*! \class PIConfig::Branch
|
||||||
* @brief %Branch is a list of entries of configuration file
|
* \brief %Branch is a list of entries of configuration file
|
||||||
* \details %Branch provides some features to get entries lists.
|
* \details %Branch provides some features to get entries lists.
|
||||||
* \snippet piconfig.cpp PIConfig::Branch
|
* \snippet piconfig.cpp PIConfig::Branch
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piconfig.h
|
/*! \file piconfig.h
|
||||||
* @brief Configuration parser and writer
|
* \brief Configuration parser and writer
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -148,7 +148,7 @@ public:
|
|||||||
//! Returns comment
|
//! Returns comment
|
||||||
const PIString & comment() const {return _comment;}
|
const PIString & comment() const {return _comment;}
|
||||||
|
|
||||||
/** @brief Returns full name, i.e. name as it looks in file
|
/** \brief Returns full name, i.e. name as it looks in file
|
||||||
* \details In case of default entry full name always is empty
|
* \details In case of default entry full name always is empty
|
||||||
* \snippet piconfig.cpp fullName */
|
* \snippet piconfig.cpp fullName */
|
||||||
const PIString & fullName() const {return _full_name;}
|
const PIString & fullName() const {return _full_name;}
|
||||||
@@ -205,7 +205,7 @@ public:
|
|||||||
Entry & setValue(const double value) {setValue(PIString::fromNumber(value)); setType("f"); return *this;}
|
Entry & setValue(const double value) {setValue(PIString::fromNumber(value)); setType("f"); return *this;}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns entry with name "vname" and default value "def"
|
/** \brief Returns entry with name "vname" and default value "def"
|
||||||
* \details If there is no suitable entry found, reference to default internal entry with
|
* \details If there is no suitable entry found, reference to default internal entry with
|
||||||
* value = "def" will be returned, and if "exists" not null it will be set to \b false */
|
* value = "def" will be returned, and if "exists" not null it will be set to \b false */
|
||||||
Entry & getValue(const PIString & vname, const PIString & def = PIString(), bool * exists = 0);
|
Entry & getValue(const PIString & vname, const PIString & def = PIString(), bool * exists = 0);
|
||||||
@@ -213,43 +213,43 @@ public:
|
|||||||
PICONFIG_GET_VALUE
|
PICONFIG_GET_VALUE
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const char * def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const char * def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const char * def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const char * def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const PIStringList & def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const PIStringList & def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const bool def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const bool def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const short def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const short def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const int def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const int def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const long def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const long def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const uchar def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const uchar def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const ushort def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const ushort def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const uint def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const uint def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const ulong def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const ulong def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const float def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const float def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const double def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const double def, bool * exists = 0)
|
||||||
//! @brief Returns entry with name "vname" and default value "def"
|
//! \brief Returns entry with name "vname" and default value "def"
|
||||||
|
|
||||||
|
|
||||||
//! Find all entries with names with substrings "vname" and returns them as \a PIConfig::Branch
|
//! Find all entries with names with substrings "vname" and returns them as \a PIConfig::Branch
|
||||||
@@ -341,43 +341,43 @@ public:
|
|||||||
PICONFIG_GET_VALUE
|
PICONFIG_GET_VALUE
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const char * def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const char * def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const char * def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const char * def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const PIStringList & def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const PIStringList & def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const bool def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const bool def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const short def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const short def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const int def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const int def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const long def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const long def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const uchar def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const uchar def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const ushort def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const ushort def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const uint def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const uint def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const ulong def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const ulong def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const float def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const float def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
//! \fn Entry & getValue(const PIString & vname, const double def, bool * exists = 0)
|
//! \fn Entry & getValue(const PIString & vname, const double def, bool * exists = 0)
|
||||||
//! @brief Returns top-level entry with name "vname" and default value "def"
|
//! \brief Returns top-level entry with name "vname" and default value "def"
|
||||||
|
|
||||||
|
|
||||||
//! Returns top-level entries with names with substrings "vname"
|
//! Returns top-level entries with names with substrings "vname"
|
||||||
@@ -517,7 +517,7 @@ inline PICout operator <<(PICout s, const PIConfig::Entry & v) {
|
|||||||
|
|
||||||
|
|
||||||
/** \relatesalso PIConfig \relatesalso PIIODevice
|
/** \relatesalso PIConfig \relatesalso PIIODevice
|
||||||
* @brief Service function. useful for configuring devices
|
* \brief Service function. useful for configuring devices
|
||||||
* \details Function takes entry name "name", default value "def" and two
|
* \details Function takes entry name "name", default value "def" and two
|
||||||
* \a PIConfig::Entry sections: "em" and their parent "ep". If there is no
|
* \a PIConfig::Entry sections: "em" and their parent "ep". If there is no
|
||||||
* parent ep = 0. If "ep" is not null and entry "name" exists in "ep" function
|
* parent ep = 0. If "ep" is not null and entry "name" exists in "ep" function
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \class PIDir
|
/*! \class PIDir
|
||||||
* @brief Local directory
|
* \brief Local directory
|
||||||
*
|
*
|
||||||
* \section PIDir_sec0 Synopsis
|
* \section PIDir_sec0 Synopsis
|
||||||
* This class provide access to local file. You can manipulate
|
* This class provide access to local file. You can manipulate
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pidir.h
|
/*! \file pidir.h
|
||||||
* @brief Local directory
|
* \brief Local directory
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
//! Returns absolute path of this directory
|
//! Returns absolute path of this directory
|
||||||
PIString absolutePath() const;
|
PIString absolutePath() const;
|
||||||
|
|
||||||
/** @brief Simplify path of this directory
|
/** \brief Simplify path of this directory
|
||||||
* \details This function remove repeatedly separators and
|
* \details This function remove repeatedly separators and
|
||||||
* resolve ".." in path. E.g. "/home/.//peri4/src/../.." will
|
* resolve ".." in path. E.g. "/home/.//peri4/src/../.." will
|
||||||
* become "/home" \n This function returns reference to this %PIDir */
|
* become "/home" \n This function returns reference to this %PIDir */
|
||||||
@@ -76,7 +76,7 @@ public:
|
|||||||
bool setCurrent() {return PIDir::setCurrent(path());}
|
bool setCurrent() {return PIDir::setCurrent(path());}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Returns this directory content
|
/** \brief Returns this directory content
|
||||||
* \details Scan this directory and returns all directories
|
* \details Scan this directory and returns all directories
|
||||||
* and files in one list, sorted alphabetically. This list
|
* and files in one list, sorted alphabetically. This list
|
||||||
* contains also "." and ".." members. There are absolute
|
* contains also "." and ".." members. There are absolute
|
||||||
@@ -85,7 +85,7 @@ public:
|
|||||||
* directories! */
|
* directories! */
|
||||||
PIVector<PIFile::FileInfo> entries();
|
PIVector<PIFile::FileInfo> entries();
|
||||||
|
|
||||||
/** @brief Returns all this directory content
|
/** \brief Returns all this directory content
|
||||||
* \details Scan this directory recursively and returns all
|
* \details Scan this directory recursively and returns all
|
||||||
* directories and files in one list, sorted alphabetically.
|
* directories and files in one list, sorted alphabetically.
|
||||||
* This list doesn`t contains "." and ".." members. There
|
* This list doesn`t contains "." and ".." members. There
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/** \class PIEthernet
|
/** \class PIEthernet
|
||||||
* @brief Ethernet device
|
* \brief Ethernet device
|
||||||
* \details
|
* \details
|
||||||
* \section PIEthernet_sec0 Synopsis
|
* \section PIEthernet_sec0 Synopsis
|
||||||
* %PIEthernet designed to work with IPv4 network via two protocols:
|
* %PIEthernet designed to work with IPv4 network via two protocols:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piethernet.h
|
/*! \file piethernet.h
|
||||||
* @brief Ethernet device
|
* \brief Ethernet device
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -42,7 +42,7 @@ public:
|
|||||||
//! Contructs UDP %PIEthernet with empty read address
|
//! Contructs UDP %PIEthernet with empty read address
|
||||||
explicit PIEthernet();
|
explicit PIEthernet();
|
||||||
|
|
||||||
//! @brief Type of %PIEthernet
|
//! \brief Type of %PIEthernet
|
||||||
enum Type {
|
enum Type {
|
||||||
UDP /** UDP - User Datagram Protocol */ ,
|
UDP /** UDP - User Datagram Protocol */ ,
|
||||||
TCP_Client /** TCP client - allow connection to TCP server */ ,
|
TCP_Client /** TCP client - allow connection to TCP server */ ,
|
||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
TCP_SingleTCP /** TCP client single mode - connect & send & disconnect, on each packet */
|
TCP_SingleTCP /** TCP client single mode - connect & send & disconnect, on each packet */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Parameters of %PIEthernet
|
//! \brief Parameters of %PIEthernet
|
||||||
enum Parameters {
|
enum Parameters {
|
||||||
ReuseAddress /** Rebind address if there is already binded. Enabled by default */ = 0x1,
|
ReuseAddress /** Rebind address if there is already binded. Enabled by default */ = 0x1,
|
||||||
Broadcast /** Broadcast send. Disabled by default */ = 0x2,
|
Broadcast /** Broadcast send. Disabled by default */ = 0x2,
|
||||||
@@ -62,7 +62,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//! @brief IPv4 network address, IP and port
|
//! \brief IPv4 network address, IP and port
|
||||||
class PIP_EXPORT Address {
|
class PIP_EXPORT Address {
|
||||||
friend class PIEthernet;
|
friend class PIEthernet;
|
||||||
public:
|
public:
|
||||||
@@ -421,37 +421,37 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void newConnection(PIEthernet * client)
|
//! \fn void newConnection(PIEthernet * client)
|
||||||
//! @brief Raise on new TCP connection received
|
//! \brief Raise on new TCP connection received
|
||||||
|
|
||||||
//! \fn void connected()
|
//! \fn void connected()
|
||||||
//! @brief Raise if succesfull TCP connection
|
//! \brief Raise if succesfull TCP connection
|
||||||
|
|
||||||
//! \fn void disconnected(bool withError)
|
//! \fn void disconnected(bool withError)
|
||||||
//! @brief Raise if TCP connection was closed
|
//! \brief Raise if TCP connection was closed
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
//! \ioparams
|
//! \ioparams
|
||||||
//! \{
|
//! \{
|
||||||
#ifdef DOXYGEN
|
#ifdef DOXYGEN
|
||||||
//! @brief read ip, default ""
|
//! \brief read ip, default ""
|
||||||
string ip;
|
string ip;
|
||||||
|
|
||||||
//! @brief read port, default 0
|
//! \brief read port, default 0
|
||||||
int port;
|
int port;
|
||||||
|
|
||||||
//! @brief ethernet parameters
|
//! \brief ethernet parameters
|
||||||
int parameters;
|
int parameters;
|
||||||
|
|
||||||
//! @brief read timeout, default 1000 ms
|
//! \brief read timeout, default 1000 ms
|
||||||
double readTimeout;
|
double readTimeout;
|
||||||
|
|
||||||
//! @brief write timeout, default 1000 ms
|
//! \brief write timeout, default 1000 ms
|
||||||
double writeTimeout;
|
double writeTimeout;
|
||||||
|
|
||||||
//! @brief time-to-live, default 64
|
//! \brief time-to-live, default 64
|
||||||
int TTL;
|
int TTL;
|
||||||
|
|
||||||
//! @brief time-to-live for multicast, default 1
|
//! \brief time-to-live for multicast, default 1
|
||||||
int multicastTTL;
|
int multicastTTL;
|
||||||
#endif
|
#endif
|
||||||
//! \}
|
//! \}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \class PIFile
|
/*! \class PIFile
|
||||||
* @brief Local file
|
* \brief Local file
|
||||||
*
|
*
|
||||||
* \section PIFile_sec0 Synopsis
|
* \section PIFile_sec0 Synopsis
|
||||||
* This class provide access to local file. You can manipulate
|
* This class provide access to local file. You can manipulate
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pifile.h
|
/*! \file pifile.h
|
||||||
* @brief Local file
|
* \brief Local file
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -267,16 +267,16 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void clear()
|
//! \fn void clear()
|
||||||
//! @brief Clear content of file
|
//! \brief Clear content of file
|
||||||
|
|
||||||
//! \fn void resize(llong new_size)
|
//! \fn void resize(llong new_size)
|
||||||
//! @brief Resize file to "new_size" with "fill" filling
|
//! \brief Resize file to "new_size" with "fill" filling
|
||||||
|
|
||||||
//! \fn void resize(llong new_size, uchar fill)
|
//! \fn void resize(llong new_size, uchar fill)
|
||||||
//! @brief Resize file to "new_size" with "fill" filling
|
//! \brief Resize file to "new_size" with "fill" filling
|
||||||
|
|
||||||
//! \fn void remove()
|
//! \fn void remove()
|
||||||
//! @brief Remove file
|
//! \brief Remove file
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
//! \ioparams
|
//! \ioparams
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PIGPIO
|
/*! \class PIGPIO
|
||||||
* @brief GPIO support
|
* \brief GPIO support
|
||||||
*
|
*
|
||||||
* \section PIGPIO_sec0 Synopsis
|
* \section PIGPIO_sec0 Synopsis
|
||||||
* This class provide initialize, get/set and watch functions for GPIO.
|
* This class provide initialize, get/set and watch functions for GPIO.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pigpio.h
|
/*! \file pigpio.h
|
||||||
* @brief GPIO
|
* \brief GPIO
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -33,41 +33,41 @@ public:
|
|||||||
PIGPIO();
|
PIGPIO();
|
||||||
virtual ~PIGPIO();
|
virtual ~PIGPIO();
|
||||||
|
|
||||||
//! @brief Work mode for pin
|
//! \brief Work mode for pin
|
||||||
enum Direction {
|
enum Direction {
|
||||||
In /** Input direction (read) */,
|
In /** Input direction (read) */,
|
||||||
Out /** Output direction (write) */
|
Out /** Output direction (write) */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Returns singleton object of %PIGPIO
|
//! \brief Returns singleton object of %PIGPIO
|
||||||
static PIGPIO * instance();
|
static PIGPIO * instance();
|
||||||
|
|
||||||
//! @brief Initialize pin \"gpio_num\" for \"dir\" mode
|
//! \brief Initialize pin \"gpio_num\" for \"dir\" mode
|
||||||
void initPin(int gpio_num, Direction dir = PIGPIO::In);
|
void initPin(int gpio_num, Direction dir = PIGPIO::In);
|
||||||
|
|
||||||
//! @brief Set pin \"gpio_num\" value to \"value\"
|
//! \brief Set pin \"gpio_num\" value to \"value\"
|
||||||
void pinSet (int gpio_num, bool value);
|
void pinSet (int gpio_num, bool value);
|
||||||
|
|
||||||
//! @brief Set pin \"gpio_num\" value to \b true
|
//! \brief Set pin \"gpio_num\" value to \b true
|
||||||
void pinHigh (int gpio_num) {pinSet(gpio_num, true );}
|
void pinHigh (int gpio_num) {pinSet(gpio_num, true );}
|
||||||
|
|
||||||
//! @brief Set pin \"gpio_num\" value to \b false
|
//! \brief Set pin \"gpio_num\" value to \b false
|
||||||
void pinLow (int gpio_num) {pinSet(gpio_num, false);}
|
void pinLow (int gpio_num) {pinSet(gpio_num, false);}
|
||||||
|
|
||||||
//! @brief Returns pin \"gpio_num\" state
|
//! \brief Returns pin \"gpio_num\" state
|
||||||
bool pinState(int gpio_num);
|
bool pinState(int gpio_num);
|
||||||
|
|
||||||
//! @brief Starts watch for pin \"gpio_num\".
|
//! \brief Starts watch for pin \"gpio_num\".
|
||||||
//! \details Pins watching starts only with \a PIThread::start() function!
|
//! \details Pins watching starts only with \a PIThread::start() function!
|
||||||
//! This function doesn`t affect thread state
|
//! This function doesn`t affect thread state
|
||||||
void pinBeginWatch(int gpio_num);
|
void pinBeginWatch(int gpio_num);
|
||||||
|
|
||||||
//! @brief End watch for pin \"gpio_num\".
|
//! \brief End watch for pin \"gpio_num\".
|
||||||
//! \details Pins watching starts only with \a PIThread::start() function!
|
//! \details Pins watching starts only with \a PIThread::start() function!
|
||||||
//! This function doesn`t affect thread state
|
//! This function doesn`t affect thread state
|
||||||
void pinEndWatch (int gpio_num);
|
void pinEndWatch (int gpio_num);
|
||||||
|
|
||||||
//! @brief End watch for all pins.
|
//! \brief End watch for all pins.
|
||||||
//! \details Pins watching starts only with \a PIThread::start() function!
|
//! \details Pins watching starts only with \a PIThread::start() function!
|
||||||
//! This function doesn`t affect thread state
|
//! This function doesn`t affect thread state
|
||||||
void clearWatch();
|
void clearWatch();
|
||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void pinChanged(int gpio_num, bool new_value)
|
//! \fn void pinChanged(int gpio_num, bool new_value)
|
||||||
//! @brief Raise on pin \"gpio_num\" state changes to \"new_value\"
|
//! \brief Raise on pin \"gpio_num\" state changes to \"new_value\"
|
||||||
//! \details Important! This event will be raised only with started
|
//! \details Important! This event will be raised only with started
|
||||||
//! thread.
|
//! thread.
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PIIOByteArray
|
/*! \class PIIOByteArray
|
||||||
* @brief PIIODevice wrapper around PIByteArray
|
* \brief PIIODevice wrapper around PIByteArray
|
||||||
*
|
*
|
||||||
* \section PIIOByteArray_sec0 Synopsis
|
* \section PIIOByteArray_sec0 Synopsis
|
||||||
* This class sllow you to use PIByteArray as PIIODevice and pass it to, e.g. PIConfig
|
* This class sllow you to use PIByteArray as PIIODevice and pass it to, e.g. PIConfig
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piiobytearray.h
|
/*! \file piiobytearray.h
|
||||||
* @brief PIIODevice wrapper around PIByteArray
|
* \brief PIIODevice wrapper around PIByteArray
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PIIODevice
|
/*! \class PIIODevice
|
||||||
* @brief Base class for input/output classes
|
* \brief Base class for input/output classes
|
||||||
*
|
*
|
||||||
* \section PIIODevice_sec0 Synopsis
|
* \section PIIODevice_sec0 Synopsis
|
||||||
* This class provide open/close logic, threaded read/write and virtual input/output
|
* This class provide open/close logic, threaded read/write and virtual input/output
|
||||||
@@ -125,7 +125,7 @@ PIIODevice::PIIODevice(): PIThread() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*! @brief Constructs a PIIODevice with path and mode
|
/*! \brief Constructs a PIIODevice with path and mode
|
||||||
* \param path path to device
|
* \param path path to device
|
||||||
* \param type mode for open */
|
* \param type mode for open */
|
||||||
PIIODevice::PIIODevice(const PIString & path, PIIODevice::DeviceMode mode): PIThread() {
|
PIIODevice::PIIODevice(const PIString & path, PIIODevice::DeviceMode mode): PIThread() {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piiodevice.h
|
/*! \file piiodevice.h
|
||||||
* @brief Abstract input/output device
|
* \brief Abstract input/output device
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -35,10 +35,10 @@ typedef bool (*ReadRetFunc)(void * , uchar * , int );
|
|||||||
|
|
||||||
#ifdef DOXYGEN
|
#ifdef DOXYGEN
|
||||||
|
|
||||||
//! \relatesalso PIIODevice @brief Use this macro to enable automatic creation instances of your class with \a createFromFullPath() function
|
//! \relatesalso PIIODevice \brief Use this macro to enable automatic creation instances of your class with \a createFromFullPath() function
|
||||||
# define REGISTER_DEVICE(class)
|
# define REGISTER_DEVICE(class)
|
||||||
|
|
||||||
//! \relatesalso PIIODevice @brief Use this macro instead of PIOBJECT when describe your own PIIODevice
|
//! \relatesalso PIIODevice \brief Use this macro instead of PIOBJECT when describe your own PIIODevice
|
||||||
# define PIIODEVICE(class)
|
# define PIIODEVICE(class)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -59,20 +59,20 @@ public:
|
|||||||
//! Constructs a empty PIIODevice
|
//! Constructs a empty PIIODevice
|
||||||
explicit PIIODevice();
|
explicit PIIODevice();
|
||||||
|
|
||||||
//! @brief Open modes for PIIODevice
|
//! \brief Open modes for PIIODevice
|
||||||
enum DeviceMode {
|
enum DeviceMode {
|
||||||
ReadOnly /*! Device can only read */ = 0x01,
|
ReadOnly /*! Device can only read */ = 0x01,
|
||||||
WriteOnly /*! Device can only write */ = 0x02,
|
WriteOnly /*! Device can only write */ = 0x02,
|
||||||
ReadWrite /*! Device can both read and write */ = 0x03
|
ReadWrite /*! Device can both read and write */ = 0x03
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Options for PIIODevice, works with some devices
|
//! \brief Options for PIIODevice, works with some devices
|
||||||
enum DeviceOption {
|
enum DeviceOption {
|
||||||
BlockingRead /*! \a read block until data is received, default off */ = 0x01,
|
BlockingRead /*! \a read block until data is received, default off */ = 0x01,
|
||||||
BlockingWrite /*! \a write block until data is sent, default off */ = 0x02
|
BlockingWrite /*! \a write block until data is sent, default off */ = 0x02
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Characteristics of PIIODevice subclass
|
//! \brief Characteristics of PIIODevice subclass
|
||||||
enum DeviceInfoFlag {
|
enum DeviceInfoFlag {
|
||||||
Sequential /*! Continuous bytestream without datagrams */ = 0x01,
|
Sequential /*! Continuous bytestream without datagrams */ = 0x01,
|
||||||
Reliable /*! Channel without data errors / corruptions */ = 0x02
|
Reliable /*! Channel without data errors / corruptions */ = 0x02
|
||||||
@@ -144,7 +144,7 @@ public:
|
|||||||
int reopenTimeout() {return property(PIStringAscii("reopenTimeout")).toInt();}
|
int reopenTimeout() {return property(PIStringAscii("reopenTimeout")).toInt();}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Set "threaded read slot"
|
/** \brief Set "threaded read slot"
|
||||||
* \details Set external static function of threaded read that will be executed
|
* \details Set external static function of threaded read that will be executed
|
||||||
* at every successful threaded read. Function should have format
|
* at every successful threaded read. Function should have format
|
||||||
* "bool func(void * data, uchar * readed, int size)" */
|
* "bool func(void * data, uchar * readed, int size)" */
|
||||||
@@ -153,7 +153,7 @@ public:
|
|||||||
//! Set custom data that will be passed to "threaded read slot"
|
//! Set custom data that will be passed to "threaded read slot"
|
||||||
void setThreadedReadData(void * d) {ret_data_ = d;}
|
void setThreadedReadData(void * d) {ret_data_ = d;}
|
||||||
|
|
||||||
/** @brief Set size of threaded read buffer
|
/** \brief Set size of threaded read buffer
|
||||||
* \details Default size is 4096 bytes. If your device can read at single read
|
* \details Default size is 4096 bytes. If your device can read at single read
|
||||||
* more than 4096 bytes you should use this function to adjust buffer size */
|
* more than 4096 bytes you should use this function to adjust buffer size */
|
||||||
void setThreadedReadBufferSize(int new_size) {threaded_read_buffer_size = new_size; threadedReadBufferSizeChanged();}
|
void setThreadedReadBufferSize(int new_size) {threaded_read_buffer_size = new_size; threadedReadBufferSizeChanged();}
|
||||||
@@ -240,12 +240,12 @@ public:
|
|||||||
//! Configure device from PIVariantTypes::IODevice
|
//! Configure device from PIVariantTypes::IODevice
|
||||||
void configureFromVariant(const PIVariantTypes::IODevice & d);
|
void configureFromVariant(const PIVariantTypes::IODevice & d);
|
||||||
|
|
||||||
//! @brief Try to determine suitable device, create new one, configure it with \a configureFromFullPath() and returns it.
|
//! \brief Try to determine suitable device, create new one, configure it with \a configureFromFullPath() and returns it.
|
||||||
//! \details To function \a configureFromFullPath() "full_path" passed without \a fullPathPrefix() + "://".
|
//! \details To function \a configureFromFullPath() "full_path" passed without \a fullPathPrefix() + "://".
|
||||||
//! See \ref PIIODevice_sec7
|
//! See \ref PIIODevice_sec7
|
||||||
static PIIODevice * createFromFullPath(const PIString & full_path);
|
static PIIODevice * createFromFullPath(const PIString & full_path);
|
||||||
|
|
||||||
//! @brief Try to determine suitable device, create new one, configure it with \a configureFromVariant() and returns it.
|
//! \brief Try to determine suitable device, create new one, configure it with \a configureFromVariant() and returns it.
|
||||||
//! \details To function \a configureFromFullPath() "full_path" passed without \a fullPathPrefix() + "://".
|
//! \details To function \a configureFromFullPath() "full_path" passed without \a fullPathPrefix() + "://".
|
||||||
//! See \ref PIIODevice_sec7
|
//! See \ref PIIODevice_sec7
|
||||||
static PIIODevice * createFromVariant(const PIVariantTypes::IODevice & d);
|
static PIIODevice * createFromVariant(const PIVariantTypes::IODevice & d);
|
||||||
@@ -276,57 +276,57 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn bool open()
|
//! \fn bool open()
|
||||||
//! @brief Open device
|
//! \brief Open device
|
||||||
|
|
||||||
//! \fn bool open(const PIString & path)
|
//! \fn bool open(const PIString & path)
|
||||||
//! @brief Open device with path "path"
|
//! \brief Open device with path "path"
|
||||||
|
|
||||||
//! \fn bool open(const DeviceMode & mode)
|
//! \fn bool open(const DeviceMode & mode)
|
||||||
//! @brief Open device with mode "mode"
|
//! \brief Open device with mode "mode"
|
||||||
|
|
||||||
//! \fn bool open(const PIString & path, const DeviceMode & mode)
|
//! \fn bool open(const PIString & path, const DeviceMode & mode)
|
||||||
//! @brief Open device with path "path" and mode "mode"
|
//! \brief Open device with path "path" and mode "mode"
|
||||||
|
|
||||||
//! \fn bool close()
|
//! \fn bool close()
|
||||||
//! @brief Close device
|
//! \brief Close device
|
||||||
|
|
||||||
//! \fn int write(PIByteArray data)
|
//! \fn int write(PIByteArray data)
|
||||||
//! @brief Write "data" to device
|
//! \brief Write "data" to device
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
//! \vhandlers
|
//! \vhandlers
|
||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void flush()
|
//! \fn void flush()
|
||||||
//! @brief Immediate write all buffers
|
//! \brief Immediate write all buffers
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
//! \events
|
//! \events
|
||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void opened()
|
//! \fn void opened()
|
||||||
//! @brief Raise if succesfull open
|
//! \brief Raise if succesfull open
|
||||||
|
|
||||||
//! \fn void closed()
|
//! \fn void closed()
|
||||||
//! @brief Raise if succesfull close
|
//! \brief Raise if succesfull close
|
||||||
|
|
||||||
//! \fn void threadedReadEvent(uchar * readed, int size)
|
//! \fn void threadedReadEvent(uchar * readed, int size)
|
||||||
//! @brief Raise if read thread succesfull read some data
|
//! \brief Raise if read thread succesfull read some data
|
||||||
|
|
||||||
//! \fn void threadedWriteEvent(ullong id, int written_size)
|
//! \fn void threadedWriteEvent(ullong id, int written_size)
|
||||||
//! @brief Raise if write thread successfull write some data of task with ID "id"
|
//! \brief Raise if write thread successfull write some data of task with ID "id"
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
//! \ioparams
|
//! \ioparams
|
||||||
//! \{
|
//! \{
|
||||||
#ifdef DOXYGEN
|
#ifdef DOXYGEN
|
||||||
//! @brief setReopenEnabled, default "true"
|
//! \brief setReopenEnabled, default "true"
|
||||||
bool reopenEnabled;
|
bool reopenEnabled;
|
||||||
|
|
||||||
//! @brief setReopenTimeout in ms, default 1000
|
//! \brief setReopenTimeout in ms, default 1000
|
||||||
int reopenTimeout;
|
int reopenTimeout;
|
||||||
|
|
||||||
//! @brief setThreadedReadBufferSize in bytes, default 4096
|
//! \brief setThreadedReadBufferSize in bytes, default 4096
|
||||||
int threadedReadBufferSize;
|
int threadedReadBufferSize;
|
||||||
#endif
|
#endif
|
||||||
//! \}
|
//! \}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PIIOString
|
/*! \class PIIOString
|
||||||
* @brief PIIODevice wrapper around PIString
|
* \brief PIIODevice wrapper around PIString
|
||||||
*
|
*
|
||||||
* \section PIIOString_sec0 Synopsis
|
* \section PIIOString_sec0 Synopsis
|
||||||
* This class allow you to use PIString as PIIODevice and pass it to, e.g. PIConfig
|
* This class allow you to use PIString as PIIODevice and pass it to, e.g. PIConfig
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piiostring.h
|
/*! \file piiostring.h
|
||||||
* @brief PIIODevice wrapper around PIString
|
* \brief PIIODevice wrapper around PIString
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pipeer.h
|
/*! \file pipeer.h
|
||||||
* @brief Peering net node
|
* \brief Peering net node
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PISerial
|
/*! \class PISerial
|
||||||
* @brief Serial device
|
* \brief Serial device
|
||||||
*
|
*
|
||||||
* \section PISerial_sec0 Synopsis
|
* \section PISerial_sec0 Synopsis
|
||||||
* This class provide access to serial device, e.g. COM port. It can read,
|
* This class provide access to serial device, e.g. COM port. It can read,
|
||||||
@@ -416,7 +416,7 @@ int PISerial::convertSpeed(PISerial::Speed speed) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Advanced read function
|
/** \brief Advanced read function
|
||||||
* \details Read to pointer "read_to" no more than "max_size" and no longer
|
* \details Read to pointer "read_to" no more than "max_size" and no longer
|
||||||
* than "timeout_ms" milliseconds. If "timeout_ms" < 0 function will be
|
* than "timeout_ms" milliseconds. If "timeout_ms" < 0 function will be
|
||||||
* wait forever until "max_size" will be readed. If size <= 0 function
|
* wait forever until "max_size" will be readed. If size <= 0 function
|
||||||
@@ -454,7 +454,7 @@ bool PISerial::read(void * data, int size, double timeout_ms) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Advanced read function
|
/** \brief Advanced read function
|
||||||
* \details Read all or no more than "size" and no longer than
|
* \details Read all or no more than "size" and no longer than
|
||||||
* "timeout_ms" milliseconds. If "timeout_ms" < 0 function will be
|
* "timeout_ms" milliseconds. If "timeout_ms" < 0 function will be
|
||||||
* wait forever until "size" will be readed. If "size" <= 0
|
* wait forever until "size" will be readed. If "size" <= 0
|
||||||
@@ -506,7 +506,7 @@ PIString PISerial::read(int size, double timeout_ms) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Advanced read function
|
/** \brief Advanced read function
|
||||||
* \details Read all or no more than "size" and no longer than
|
* \details Read all or no more than "size" and no longer than
|
||||||
* "timeout_ms" milliseconds. If "timeout_ms" < 0 function will be
|
* "timeout_ms" milliseconds. If "timeout_ms" < 0 function will be
|
||||||
* wait forever until "size" will be readed. If "size" <= 0
|
* wait forever until "size" will be readed. If "size" <= 0
|
||||||
@@ -722,7 +722,7 @@ void PISerial::setTimeouts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @brief Basic read function
|
/** \brief Basic read function
|
||||||
* \details Read to pointer "read_to" no more than "max_size". If read is
|
* \details Read to pointer "read_to" no more than "max_size". If read is
|
||||||
* set to blocking this function will be wait at least one byte.
|
* set to blocking this function will be wait at least one byte.
|
||||||
* \returns Readed bytes count
|
* \returns Readed bytes count
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piserial.h
|
/*! \file piserial.h
|
||||||
* @brief Serial device
|
* \brief Serial device
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -34,14 +34,14 @@ public:
|
|||||||
//! Contructs an empty %PISerial
|
//! Contructs an empty %PISerial
|
||||||
explicit PISerial();
|
explicit PISerial();
|
||||||
|
|
||||||
//! @brief Parameters of PISerial
|
//! \brief Parameters of PISerial
|
||||||
enum Parameters {
|
enum Parameters {
|
||||||
ParityControl /*! Enable parity check and generate */ = 0x1,
|
ParityControl /*! Enable parity check and generate */ = 0x1,
|
||||||
ParityOdd /*! Parity is odd instead of even */ = 0x2,
|
ParityOdd /*! Parity is odd instead of even */ = 0x2,
|
||||||
TwoStopBits /*! Two stop bits instead of one */ = 0x4
|
TwoStopBits /*! Two stop bits instead of one */ = 0x4
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Speed of PISerial
|
//! \brief Speed of PISerial
|
||||||
enum Speed {
|
enum Speed {
|
||||||
S50 /*! 50 baud */ = 50,
|
S50 /*! 50 baud */ = 50,
|
||||||
S75 /*! 75 baud */ = 75,
|
S75 /*! 75 baud */ = 75,
|
||||||
@@ -72,26 +72,26 @@ public:
|
|||||||
S4000000 /*! 4000000 baud */ = 4000000
|
S4000000 /*! 4000000 baud */ = 4000000
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief Information about serial device
|
//! \brief Information about serial device
|
||||||
struct PIP_EXPORT DeviceInfo {
|
struct PIP_EXPORT DeviceInfo {
|
||||||
DeviceInfo();
|
DeviceInfo();
|
||||||
|
|
||||||
//! @brief String representation of USB ID in format \"xxxx:xxxx\"
|
//! \brief String representation of USB ID in format \"xxxx:xxxx\"
|
||||||
PIString id() const;
|
PIString id() const;
|
||||||
|
|
||||||
//! @brief USB Vendor ID
|
//! \brief USB Vendor ID
|
||||||
uint vID;
|
uint vID;
|
||||||
|
|
||||||
//! @brief USB Product ID
|
//! \brief USB Product ID
|
||||||
uint pID;
|
uint pID;
|
||||||
|
|
||||||
//! @brief Path to device, e.g. "COM2" or "/dev/ttyUSB0"
|
//! \brief Path to device, e.g. "COM2" or "/dev/ttyUSB0"
|
||||||
PIString path;
|
PIString path;
|
||||||
|
|
||||||
//! @brief Device description
|
//! \brief Device description
|
||||||
PIString description;
|
PIString description;
|
||||||
|
|
||||||
//! @brief Device manufacturer
|
//! \brief Device manufacturer
|
||||||
PIString manufacturer;
|
PIString manufacturer;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -187,42 +187,42 @@ public:
|
|||||||
PIString read(int size = -1, double timeout_ms = 1000.);
|
PIString read(int size = -1, double timeout_ms = 1000.);
|
||||||
PIByteArray readData(int size = -1, double timeout_ms = 1000.);
|
PIByteArray readData(int size = -1, double timeout_ms = 1000.);
|
||||||
|
|
||||||
//! @brief Write to device data "data" with maximum size "size" and wait for data written if "wait" is \b true.
|
//! \brief Write to device data "data" with maximum size "size" and wait for data written if "wait" is \b true.
|
||||||
//! \returns \b true if sended bytes count = "size"
|
//! \returns \b true if sended bytes count = "size"
|
||||||
bool send(const void * data, int size);
|
bool send(const void * data, int size);
|
||||||
|
|
||||||
//! @brief Write to device byte array "data"
|
//! \brief Write to device byte array "data"
|
||||||
//! \returns \b true if sended bytes count = size of string
|
//! \returns \b true if sended bytes count = size of string
|
||||||
bool send(const PIByteArray & data) {return send(data.data(), data.size_s());}
|
bool send(const PIByteArray & data) {return send(data.data(), data.size_s());}
|
||||||
|
|
||||||
//! @brief Returns all available speeds for serial devices
|
//! \brief Returns all available speeds for serial devices
|
||||||
static PIVector<int> availableSpeeds();
|
static PIVector<int> availableSpeeds();
|
||||||
|
|
||||||
//! @brief Returns all available system devices path. If "test" each device will be tried to open
|
//! \brief Returns all available system devices path. If "test" each device will be tried to open
|
||||||
static PIStringList availableDevices(bool test = false);
|
static PIStringList availableDevices(bool test = false);
|
||||||
|
|
||||||
//! @brief Returns all available system devices. If "test" each device will be tried to open
|
//! \brief Returns all available system devices. If "test" each device will be tried to open
|
||||||
static PIVector<DeviceInfo> availableDevicesInfo(bool test = false);
|
static PIVector<DeviceInfo> availableDevicesInfo(bool test = false);
|
||||||
|
|
||||||
//! \ioparams
|
//! \ioparams
|
||||||
//! \{
|
//! \{
|
||||||
#ifdef DOXYGEN
|
#ifdef DOXYGEN
|
||||||
//! @brief device, default ""
|
//! \brief device, default ""
|
||||||
string device;
|
string device;
|
||||||
|
|
||||||
//! @brief input/output speed, default 115200
|
//! \brief input/output speed, default 115200
|
||||||
int speed;
|
int speed;
|
||||||
|
|
||||||
//! @brief dataBitsCount, default 8
|
//! \brief dataBitsCount, default 8
|
||||||
int dataBitsCount;
|
int dataBitsCount;
|
||||||
|
|
||||||
//! @brief parityControl, default false
|
//! \brief parityControl, default false
|
||||||
bool parityControl;
|
bool parityControl;
|
||||||
|
|
||||||
//! @brief parityOdd, default false
|
//! \brief parityOdd, default false
|
||||||
bool parityOdd;
|
bool parityOdd;
|
||||||
|
|
||||||
//! @brief twoStopBits, default false
|
//! \brief twoStopBits, default false
|
||||||
bool twoStopBits;
|
bool twoStopBits;
|
||||||
#endif
|
#endif
|
||||||
//! \}
|
//! \}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PISharedMemory
|
/*! \class PISharedMemory
|
||||||
* @brief Shared memory
|
* \brief Shared memory
|
||||||
*
|
*
|
||||||
* \section PISharedMemory_sec0 Synopsis
|
* \section PISharedMemory_sec0 Synopsis
|
||||||
* This class provide access to local file. You can manipulate
|
* This class provide access to local file. You can manipulate
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pisharedmemory.h
|
/*! \file pisharedmemory.h
|
||||||
* @brief Shared memory
|
* \brief Shared memory
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pispi.h
|
/*! \file pispi.h
|
||||||
* @brief SPI device
|
* \brief SPI device
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -33,7 +33,7 @@ public:
|
|||||||
explicit PISPI(const PIString & path = PIString(), uint speed_hz = 1000000, PIIODevice::DeviceMode mode = PIIODevice::ReadWrite);
|
explicit PISPI(const PIString & path = PIString(), uint speed_hz = 1000000, PIIODevice::DeviceMode mode = PIIODevice::ReadWrite);
|
||||||
virtual ~PISPI();
|
virtual ~PISPI();
|
||||||
|
|
||||||
//! @brief Parameters of PISPI
|
//! \brief Parameters of PISPI
|
||||||
enum Parameters {
|
enum Parameters {
|
||||||
ClockInverse /*! SPI clk polarity control*/ = 0x1,
|
ClockInverse /*! SPI clk polarity control*/ = 0x1,
|
||||||
ClockPhaseShift /*! SPI clk phase control */ = 0x2,
|
ClockPhaseShift /*! SPI clk phase control */ = 0x2,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \class PITransparentDevice
|
/*! \class PITransparentDevice
|
||||||
* @brief PIIODevice that pass write to read
|
* \brief PIIODevice that pass write to read
|
||||||
*
|
*
|
||||||
* \section PITransparentDevice_sec0 Synopsis
|
* \section PITransparentDevice_sec0 Synopsis
|
||||||
* This class pass all data from \a write() function to \a read().
|
* This class pass all data from \a write() function to \a read().
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pitransparentdevice.h
|
/*! \file pitransparentdevice.h
|
||||||
* @brief PIIODevice that pass write to read
|
* \brief PIIODevice that pass write to read
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piusb.h
|
/*! \file piusb.h
|
||||||
* @brief USB device
|
* \brief USB device
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pibasetransfer.h
|
/*! \file pibasetransfer.h
|
||||||
* @brief Base class for reliable send and receive data in fixed packets with error correction, pause and resume
|
* \brief Base class for reliable send and receive data in fixed packets with error correction, pause and resume
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pibroadcast.h
|
/*! \file pibroadcast.h
|
||||||
* @brief Broadcast for all interfaces, including loopback
|
* \brief Broadcast for all interfaces, including loopback
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -117,7 +117,7 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void receiveEvent(PIByteArray data)
|
//! \fn void receiveEvent(PIByteArray data)
|
||||||
//! @brief Raise on packet received
|
//! \brief Raise on packet received
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include "piconfig.h"
|
#include "piconfig.h"
|
||||||
|
|
||||||
/** \class PIConnection
|
/** \class PIConnection
|
||||||
* @brief Complex Input/Output point
|
* \brief Complex Input/Output point
|
||||||
*
|
*
|
||||||
* \section PIConnection_synopsis Synopsis
|
* \section PIConnection_synopsis Synopsis
|
||||||
* %PIConnection provides abstract layer over physical devices,
|
* %PIConnection provides abstract layer over physical devices,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piconnection.h
|
/*! \file piconnection.h
|
||||||
* @brief Complex I/O point
|
* \brief Complex I/O point
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -43,11 +43,11 @@ public:
|
|||||||
|
|
||||||
~PIConnection();
|
~PIConnection();
|
||||||
|
|
||||||
/*! @brief Configure connection from config file "config" from section "name". Returns if configuration was successful
|
/*! \brief Configure connection from config file "config" from section "name". Returns if configuration was successful
|
||||||
* \details \b Warning: all devices, filters and channels removed before configure! */
|
* \details \b Warning: all devices, filters and channels removed before configure! */
|
||||||
bool configureFromConfig(const PIString & config, const PIString & name = PIStringAscii("connection"));
|
bool configureFromConfig(const PIString & config, const PIString & name = PIStringAscii("connection"));
|
||||||
|
|
||||||
/*! @brief Configure connection from config content "string" from section "name". Returns if configuration was successful
|
/*! \brief Configure connection from config content "string" from section "name". Returns if configuration was successful
|
||||||
* \details \b Warning: all devices, filters and channels removed before configure! */
|
* \details \b Warning: all devices, filters and channels removed before configure! */
|
||||||
bool configureFromString(PIString * string, const PIString & name = PIStringAscii("connection"));
|
bool configureFromString(PIString * string, const PIString & name = PIStringAscii("connection"));
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
PIString makeConfig() const;
|
PIString makeConfig() const;
|
||||||
|
|
||||||
|
|
||||||
/*! @brief Add device with full path "full_path", open mode "mode" to Device pool and connection
|
/*! \brief Add device with full path "full_path", open mode "mode" to Device pool and connection
|
||||||
* \details Returns pointer to device or null if device can not be created. If "start" is true,
|
* \details Returns pointer to device or null if device can not be created. If "start" is true,
|
||||||
* read thread is started immediately. Else, you can start read thread with functions \a startThreadedRead()
|
* read thread is started immediately. Else, you can start read thread with functions \a startThreadedRead()
|
||||||
* or \a startAllThreadedReads(). By default, read thread doesn`t start */
|
* or \a startAllThreadedReads(). By default, read thread doesn`t start */
|
||||||
@@ -65,12 +65,12 @@ public:
|
|||||||
|
|
||||||
PIStringList deviceNames(const PIIODevice * dev) const;
|
PIStringList deviceNames(const PIIODevice * dev) const;
|
||||||
|
|
||||||
/*! @brief Remove device with full path "full_path" from connection
|
/*! \brief Remove device with full path "full_path" from connection
|
||||||
* \details Returns if device was removed. If there is no connection bounded to this device,
|
* \details Returns if device was removed. If there is no connection bounded to this device,
|
||||||
* it will be removed from Device pool */
|
* it will be removed from Device pool */
|
||||||
bool removeDevice(const PIString & full_path);
|
bool removeDevice(const PIString & full_path);
|
||||||
|
|
||||||
/*! @brief Remove all device from connection
|
/*! \brief Remove all device from connection
|
||||||
* \details If there is no connection bounded to there devices, they removed from Device pool */
|
* \details If there is no connection bounded to there devices, they removed from Device pool */
|
||||||
void removeAllDevices();
|
void removeAllDevices();
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ public:
|
|||||||
//! Returns all devices bounded to this connection
|
//! Returns all devices bounded to this connection
|
||||||
PIVector<PIIODevice * > boundedDevices() const;
|
PIVector<PIIODevice * > boundedDevices() const;
|
||||||
|
|
||||||
/*! @brief Add filter with name "name" to device with full path "full_path_name" or filter "full_path_name"
|
/*! \brief Add filter with name "name" to device with full path "full_path_name" or filter "full_path_name"
|
||||||
* \details If there is no filter with name "name", connection create new with split mode "mode" and bound
|
* \details If there is no filter with name "name", connection create new with split mode "mode" and bound
|
||||||
* to it device "full_path_name" or filter "full_path_name". If filter with name "name" already exists,
|
* to it device "full_path_name" or filter "full_path_name". If filter with name "name" already exists,
|
||||||
* device "full_path_name" or filter "full_path_name" add to this filter.
|
* device "full_path_name" or filter "full_path_name" add to this filter.
|
||||||
@@ -100,7 +100,7 @@ public:
|
|||||||
//! Add filter with "filter" to device "dev"
|
//! Add filter with "filter" to device "dev"
|
||||||
PIPacketExtractor * addFilter(PIPacketExtractor * filter, const PIIODevice * dev) {return addFilter(filter, devFPath(dev));}
|
PIPacketExtractor * addFilter(PIPacketExtractor * filter, const PIIODevice * dev) {return addFilter(filter, devFPath(dev));}
|
||||||
|
|
||||||
/*! @brief Remove from filter with name "name" device with full path "full_path_name" or filter "full_path_name"
|
/*! \brief Remove from filter with name "name" device with full path "full_path_name" or filter "full_path_name"
|
||||||
* \details If there is no devices bounded to this filter, it will be removed. Returns if device was removed */
|
* \details If there is no devices bounded to this filter, it will be removed. Returns if device was removed */
|
||||||
bool removeFilter(const PIString & name, const PIString & full_path_name);
|
bool removeFilter(const PIString & name, const PIString & full_path_name);
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ public:
|
|||||||
//! Returns all devices bounded to filter "name"
|
//! Returns all devices bounded to filter "name"
|
||||||
PIVector<PIIODevice * > filterBoundedDevices(const PIString & name) const;
|
PIVector<PIIODevice * > filterBoundedDevices(const PIString & name) const;
|
||||||
|
|
||||||
/*! @brief Add to connection channel from "name_from" to "name_to"
|
/*! \brief Add to connection channel from "name_from" to "name_to"
|
||||||
* \details "name_from" and "name_to" can be full pathes of devices or device names or filter names.
|
* \details "name_from" and "name_to" can be full pathes of devices or device names or filter names.
|
||||||
* Returns \b false if there if no such device or filter, else create channel and returns \b true */
|
* Returns \b false if there if no such device or filter, else create channel and returns \b true */
|
||||||
bool addChannel(const PIString & name_from, const PIString & name_to);
|
bool addChannel(const PIString & name_from, const PIString & name_to);
|
||||||
@@ -139,7 +139,7 @@ public:
|
|||||||
//! Add to connection channel from "dev_from" to "dev_to"
|
//! Add to connection channel from "dev_from" to "dev_to"
|
||||||
bool addChannel(const PIIODevice * dev_from, const PIIODevice * dev_to) {return addChannel(devFPath(dev_from), devFPath(dev_to));}
|
bool addChannel(const PIIODevice * dev_from, const PIIODevice * dev_to) {return addChannel(devFPath(dev_from), devFPath(dev_to));}
|
||||||
|
|
||||||
/*! @brief Remove from connection channel from "name_from" to "name_to"
|
/*! \brief Remove from connection channel from "name_from" to "name_to"
|
||||||
* \details "name_from" and "name_to" can be full pathes of devices or filter names.
|
* \details "name_from" and "name_to" can be full pathes of devices or filter names.
|
||||||
* Returns \b false if there if no such device or filter, else remove channel and returns \b true */
|
* Returns \b false if there if no such device or filter, else remove channel and returns \b true */
|
||||||
bool removeChannel(const PIString & name_from, const PIString & name_to);
|
bool removeChannel(const PIString & name_from, const PIString & name_to);
|
||||||
@@ -153,7 +153,7 @@ public:
|
|||||||
//! Remove from connection channel from "dev_from" to "dev_to"
|
//! Remove from connection channel from "dev_from" to "dev_to"
|
||||||
bool removeChannel(const PIIODevice * dev_from, const PIIODevice * dev_to) {return removeChannel(devFPath(dev_from), devFPath(dev_to));}
|
bool removeChannel(const PIIODevice * dev_from, const PIIODevice * dev_to) {return removeChannel(devFPath(dev_from), devFPath(dev_to));}
|
||||||
|
|
||||||
/*! @brief Remove from connection all channels from "name_from"
|
/*! \brief Remove from connection all channels from "name_from"
|
||||||
* \details "name_from" can be full path of device or filter name.
|
* \details "name_from" can be full path of device or filter name.
|
||||||
* Returns \b false if there if no such device or filter, else remove channels and returns \b true */
|
* Returns \b false if there if no such device or filter, else remove channels and returns \b true */
|
||||||
bool removeChannel(const PIString & name_from);
|
bool removeChannel(const PIString & name_from);
|
||||||
@@ -167,7 +167,7 @@ public:
|
|||||||
//! Returns all channels of this connection as full pathes or filter names pair array (from, to)
|
//! Returns all channels of this connection as full pathes or filter names pair array (from, to)
|
||||||
PIVector<PIPair<PIString, PIString> > channels() const;
|
PIVector<PIPair<PIString, PIString> > channels() const;
|
||||||
|
|
||||||
/*! @brief Add to connection sender with name "name" device with full path "full_path"
|
/*! \brief Add to connection sender with name "name" device with full path "full_path"
|
||||||
* \details If there is no sender with name "name", connection create new, bound
|
* \details If there is no sender with name "name", connection create new, bound
|
||||||
* to it device "full_path_name" and start sender timer with frequency "frequency".
|
* to it device "full_path_name" and start sender timer with frequency "frequency".
|
||||||
* If sender with name "name" already exists, device "full_path_name" add to this sender
|
* If sender with name "name" already exists, device "full_path_name" add to this sender
|
||||||
@@ -179,7 +179,7 @@ public:
|
|||||||
//! Add to connection sender with name "name" device "dev"
|
//! Add to connection sender with name "name" device "dev"
|
||||||
void addSender(const PIString & name, const PIIODevice * dev, float frequency, bool start = false) {addSender(name, devFPath(dev), frequency, start);}
|
void addSender(const PIString & name, const PIIODevice * dev, float frequency, bool start = false) {addSender(name, devFPath(dev), frequency, start);}
|
||||||
|
|
||||||
/*! @brief Remove from sender with name "name" device with full path "full_path_name"
|
/*! \brief Remove from sender with name "name" device with full path "full_path_name"
|
||||||
* \details If there is no devices bounded to this sender, it will be removed. Returns if sender was removed */
|
* \details If there is no devices bounded to this sender, it will be removed. Returns if sender was removed */
|
||||||
bool removeSender(const PIString & name, const PIString & full_path_name);
|
bool removeSender(const PIString & name, const PIString & full_path_name);
|
||||||
|
|
||||||
@@ -321,13 +321,13 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void dataReceivedEvent(const PIString & from, const PIByteArray & data)
|
//! \fn void dataReceivedEvent(const PIString & from, const PIByteArray & data)
|
||||||
//! @brief Raise on data received from device with full path "from"
|
//! \brief Raise on data received from device with full path "from"
|
||||||
|
|
||||||
//! \fn void packetReceivedEvent(const PIString & from, const PIByteArray & data)
|
//! \fn void packetReceivedEvent(const PIString & from, const PIByteArray & data)
|
||||||
//! @brief Raise on packet received from filter with name "from"
|
//! \brief Raise on packet received from filter with name "from"
|
||||||
|
|
||||||
//! \fn void qualityChanged(const PIIODevice * device, PIDiagnostics::Quality new_quality, PIDiagnostics::Quality old_quality)
|
//! \fn void qualityChanged(const PIIODevice * device, PIDiagnostics::Quality new_quality, PIDiagnostics::Quality old_quality)
|
||||||
//! @brief Raise on diagnostic quality of device "device" changed from "old_quality" to "new_quality"
|
//! \brief Raise on diagnostic quality of device "device" changed from "old_quality" to "new_quality"
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pidatatransfer.h
|
/*! \file pidatatransfer.h
|
||||||
* @brief Class for send and receive PIByteArray via \a PIBaseTransfer
|
* \brief Class for send and receive PIByteArray via \a PIBaseTransfer
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/** \class PIDiagnostics
|
/** \class PIDiagnostics
|
||||||
* @brief Connection quality diagnostics
|
* \brief Connection quality diagnostics
|
||||||
* \details
|
* \details
|
||||||
* \section PIDiagnostics_sec0 Synopsis
|
* \section PIDiagnostics_sec0 Synopsis
|
||||||
* This class provide abstract connection quality diagnostics and
|
* This class provide abstract connection quality diagnostics and
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file pidiagnostics.h
|
/*! \file pidiagnostics.h
|
||||||
* @brief Connection quality diagnostics
|
* \brief Connection quality diagnostics
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -102,23 +102,23 @@ public:
|
|||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void start(double msecs = 1000.)
|
//! \fn void start(double msecs = 1000.)
|
||||||
//! @brief Start diagnostics evaluations with period "msecs" milliseconds
|
//! \brief Start diagnostics evaluations with period "msecs" milliseconds
|
||||||
|
|
||||||
//! \fn void reset()
|
//! \fn void reset()
|
||||||
//! @brief Reset diagnostics counters
|
//! \brief Reset diagnostics counters
|
||||||
|
|
||||||
//! \fn void received(int size, bool correct = true)
|
//! \fn void received(int size, bool correct = true)
|
||||||
//! @brief Notify diagnostics about "correct" corected received packet
|
//! \brief Notify diagnostics about "correct" corected received packet
|
||||||
|
|
||||||
//! \fn void sended(int size)
|
//! \fn void sended(int size)
|
||||||
//! @brief Notify diagnostics about sended packet
|
//! \brief Notify diagnostics about sended packet
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
//! \events
|
//! \events
|
||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
//! \fn void qualityChanged(PIDiagnostics::Quality new_quality, PIDiagnostics::Quality old_quality)
|
//! \fn void qualityChanged(PIDiagnostics::Quality new_quality, PIDiagnostics::Quality old_quality)
|
||||||
//! @brief Raise on change receive quality from "old_quality" to "new_quality"
|
//! \brief Raise on change receive quality from "old_quality" to "new_quality"
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*! @file piethutilbase.h
|
/*! \file piethutilbase.h
|
||||||
* @brief Base class for ethernet utils
|
* \brief Base class for ethernet utils
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
@@ -56,11 +56,11 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/*! @brief Returns encrypted data if layer enabled,
|
/*! \brief Returns encrypted data if layer enabled,
|
||||||
* otherwise returns unchanged \"data\" */
|
* otherwise returns unchanged \"data\" */
|
||||||
PIByteArray cryptData(const PIByteArray & data);
|
PIByteArray cryptData(const PIByteArray & data);
|
||||||
|
|
||||||
/*! @brief Returns decrypted data if layer enabled,
|
/*! \brief Returns decrypted data if layer enabled,
|
||||||
* otherwise returns unchanged \"data\". If decryption
|
* otherwise returns unchanged \"data\". If decryption
|
||||||
* was unsuccessfull returns empty %PIByteArray. */
|
* was unsuccessfull returns empty %PIByteArray. */
|
||||||
PIByteArray decryptData(const PIByteArray & data);
|
PIByteArray decryptData(const PIByteArray & data);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user