mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 07:23:44 +02:00
trunk/branch integration: documentation
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ExpireCache.h
|
// ExpireCache.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/svn/Foundation/include/Poco/ExpireCache.h#2 $
|
// $Id: //poco/1.4/Foundation/include/Poco/ExpireCache.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Cache
|
// Package: Cache
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_ExpireCache_INCLUDED
|
#ifndef Foundation_ExpireCache_INCLUDED
|
||||||
#define Foundation_ExpireCache_INCLUDED
|
#define Foundation_ExpireCache_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Poco/AbstractCache.h"
|
#include "Poco/AbstractCache.h"
|
||||||
@@ -53,7 +53,7 @@ template <
|
|||||||
class TMutex = FastMutex,
|
class TMutex = FastMutex,
|
||||||
class TEventMutex = FastMutex
|
class TEventMutex = FastMutex
|
||||||
>
|
>
|
||||||
class ExpireCache: public AbstractCache<TKey, TValue, ExpireStrategy<TKey, TValue>, TMutex, TEventMutex >
|
class ExpireCache: public AbstractCache<TKey, TValue, ExpireStrategy<TKey, TValue>, TMutex, TEventMutex>
|
||||||
/// An ExpireCache caches entries for a fixed time period (per default 10 minutes).
|
/// An ExpireCache caches entries for a fixed time period (per default 10 minutes).
|
||||||
/// Entries expire independently of the access pattern, i.e. after a constant time.
|
/// Entries expire independently of the access pattern, i.e. after a constant time.
|
||||||
/// If you require your objects to expire after they were not accessed for a given time
|
/// If you require your objects to expire after they were not accessed for a given time
|
||||||
@@ -84,4 +84,4 @@ private:
|
|||||||
} // namespace Poco
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif // Foundation_ExpireCache_INCLUDED
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ExpireLRUCache.h
|
// ExpireLRUCache.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/svn/Foundation/include/Poco/ExpireLRUCache.h#2 $
|
// $Id: //poco/1.4/Foundation/include/Poco/ExpireLRUCache.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Cache
|
// Package: Cache
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_ExpireLRUCache_INCLUDED
|
#ifndef Foundation_ExpireLRUCache_INCLUDED
|
||||||
#define Foundation_ExpireLRUCache_INCLUDED
|
#define Foundation_ExpireLRUCache_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Poco/AbstractCache.h"
|
#include "Poco/AbstractCache.h"
|
||||||
@@ -55,7 +55,7 @@ template <
|
|||||||
class TMutex = FastMutex,
|
class TMutex = FastMutex,
|
||||||
class TEventMutex = FastMutex
|
class TEventMutex = FastMutex
|
||||||
>
|
>
|
||||||
class ExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex >
|
class ExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex>
|
||||||
/// An ExpireLRUCache combines LRU caching and time based expire caching.
|
/// An ExpireLRUCache combines LRU caching and time based expire caching.
|
||||||
/// It cache entries for a fixed time period (per default 10 minutes)
|
/// It cache entries for a fixed time period (per default 10 minutes)
|
||||||
/// but also limits the size of the cache (per default: 1024).
|
/// but also limits the size of the cache (per default: 1024).
|
||||||
@@ -81,4 +81,4 @@ private:
|
|||||||
} // namespace Poco
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif // Foundation_ExpireLRUCache_INCLUDED
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ExpireStrategy.h
|
// ExpireStrategy.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/svn/Foundation/include/Poco/ExpireStrategy.h#3 $
|
// $Id: //poco/1.4/Foundation/include/Poco/ExpireStrategy.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Cache
|
// Package: Cache
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_ExpireStrategy_INCLUDED
|
#ifndef Foundation_ExpireStrategy_INCLUDED
|
||||||
#define Foundation_ExpireStrategy_INCLUDED
|
#define Foundation_ExpireStrategy_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Poco/KeyValueArgs.h"
|
#include "Poco/KeyValueArgs.h"
|
||||||
@@ -149,4 +149,4 @@ protected:
|
|||||||
} // namespace Poco
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif // Foundation_ExpireStrategy_INCLUDED
|
||||||
|
@@ -58,14 +58,15 @@ public:
|
|||||||
~FileStreamBuf();
|
~FileStreamBuf();
|
||||||
/// Destroys the FileStream.
|
/// Destroys the FileStream.
|
||||||
|
|
||||||
void open(const std::string& path, std::ios::openmode mode);
|
void open(const std::string& path, std::ios::openmode mode);
|
||||||
/// Opens the given file in the given mode.
|
/// Opens the given file in the given mode.
|
||||||
|
|
||||||
void close();
|
bool close();
|
||||||
/// Closes the File stream buffer
|
/// Closes the File stream buffer. Returns true if successful,
|
||||||
|
/// false otherwise.
|
||||||
|
|
||||||
std::streampos seekoff(std::streamoff off, std::ios::seekdir dir, std::ios::openmode mode = std::ios::in | std::ios::out);
|
std::streampos seekoff(std::streamoff off, std::ios::seekdir dir, std::ios::openmode mode = std::ios::in | std::ios::out);
|
||||||
/// change position by offset, according to way and mode
|
/// change position by offset, according to way and mode
|
||||||
|
|
||||||
std::streampos seekpos(std::streampos pos, std::ios::openmode mode = std::ios::in | std::ios::out);
|
std::streampos seekpos(std::streampos pos, std::ios::openmode mode = std::ios::in | std::ios::out);
|
||||||
/// change to specified position, according to mode
|
/// change to specified position, according to mode
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Format.h
|
// Format.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/svn/Foundation/include/Poco/Format.h#2 $
|
// $Id: //poco/1.4/Foundation/include/Poco/Format.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@@ -59,17 +59,20 @@ std::string Foundation_API format(const std::string& fmt, const Any& value);
|
|||||||
///
|
///
|
||||||
/// The format string can consist of any sequence of characters; certain
|
/// The format string can consist of any sequence of characters; certain
|
||||||
/// characters have a special meaning. Characters without a special meaning
|
/// characters have a special meaning. Characters without a special meaning
|
||||||
/// are copied verbatim to the result. A percent sign (%) marks the beginning
|
/// are copied verbatim to the result. A percent sign (%) marks the beginning
|
||||||
/// of a format specification. Format specifications have the following syntax:
|
/// of a format specification. Format specifications have the following syntax:
|
||||||
///
|
///
|
||||||
/// %[<flags>][<width>][.<precision>][<modifier>]<type>
|
/// %[<index>][<flags>][<width>][.<precision>][<modifier>]<type>
|
||||||
///
|
///
|
||||||
/// Flags, width, precision and prefix are optional. The only required part of
|
/// Index, flags, width, precision and prefix are optional. The only required part of
|
||||||
/// the format specification, apart from the percent sign, is the type.
|
/// the format specification, apart from the percent sign, is the type.
|
||||||
///
|
///
|
||||||
/// Following are valid type specifications and their meaning:
|
/// The optional index argument has the format "[<n>]" and allows to
|
||||||
///
|
/// address an argument by its zero-based position (see the example below).
|
||||||
/// * b boolean (true = 1, false = 0)
|
///
|
||||||
|
/// Following are valid type specifications and their meaning:
|
||||||
|
///
|
||||||
|
/// * b boolean (true = 1, false = 0)
|
||||||
/// * c character
|
/// * c character
|
||||||
/// * d signed decimal integer
|
/// * d signed decimal integer
|
||||||
/// * i signed decimal integer
|
/// * i signed decimal integer
|
||||||
@@ -83,13 +86,13 @@ std::string Foundation_API format(const std::string& fmt, const Any& value);
|
|||||||
/// * s std::string
|
/// * s std::string
|
||||||
/// * z std::size_t
|
/// * z std::size_t
|
||||||
///
|
///
|
||||||
/// The following flags are supported:
|
/// The following flags are supported:
|
||||||
///
|
///
|
||||||
/// * - left align the result within the given field width
|
/// * - left align the result within the given field width
|
||||||
/// * + prefix the output value with a sign (+ or <EFBFBD>) if the output value is of a signed type
|
/// * + prefix the output value with a sign (+ or -) if the output value is of a signed type
|
||||||
/// * 0 if width is prefixed with 0, zeros are added until the minimum width is reached
|
/// * 0 if width is prefixed with 0, zeros are added until the minimum width is reached
|
||||||
/// * # For o, x, X, the # flag prefixes any nonzero output value with 0, 0x, or 0X, respectively;
|
/// * # For o, x, X, the # flag prefixes any nonzero output value with 0, 0x, or 0X, respectively;
|
||||||
/// for e, E, f, the # flag forces the output value to contain a decimal point in all cases.
|
/// for e, E, f, the # flag forces the output value to contain a decimal point in all cases.
|
||||||
///
|
///
|
||||||
/// The following modifiers are supported:
|
/// The following modifiers are supported:
|
||||||
///
|
///
|
||||||
@@ -104,17 +107,19 @@ std::string Foundation_API format(const std::string& fmt, const Any& value);
|
|||||||
/// leading zeros are added, according to the specified flags (-, +, 0).
|
/// leading zeros are added, according to the specified flags (-, +, 0).
|
||||||
///
|
///
|
||||||
/// Precision is a nonnegative decimal integer, preceded by a period (.), which specifies the number of characters
|
/// Precision is a nonnegative decimal integer, preceded by a period (.), which specifies the number of characters
|
||||||
/// to be printed, the number of decimal places, or the number of significant digits.
|
/// to be printed, the number of decimal places, or the number of significant digits.
|
||||||
///
|
///
|
||||||
/// Throws a BadCastException if an argument does not correspond to the type of its format specification.
|
/// Throws a BadCastException if an argument does not correspond to the type of its format specification.
|
||||||
///
|
/// Throws an InvalidArgumentException if an argument index is out of range.
|
||||||
/// If there are more format specifiers than values, the format specifiers without a corresponding value
|
///
|
||||||
/// are copied verbatim to output.
|
/// If there are more format specifiers than values, the format specifiers without a corresponding value
|
||||||
///
|
/// are copied verbatim to output.
|
||||||
/// If there are more values than format specifiers, the superfluous values are ignored.
|
///
|
||||||
///
|
/// If there are more values than format specifiers, the superfluous values are ignored.
|
||||||
/// Usage Example:
|
///
|
||||||
/// std::string s = format("The answer to life, the universe, and everything is %d", 42);
|
/// Usage Examples:
|
||||||
|
/// std::string s1 = format("The answer to life, the universe, and everything is %d", 42);
|
||||||
|
/// std::string s2 = format("second: %[1]d, first: %[0]d", 1, 2);
|
||||||
|
|
||||||
std::string Foundation_API format(const std::string& fmt, const Any& value1, const Any& value2);
|
std::string Foundation_API format(const std::string& fmt, const Any& value1, const Any& value2);
|
||||||
std::string Foundation_API format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3);
|
std::string Foundation_API format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3);
|
||||||
|
Reference in New Issue
Block a user