added Environment::processorCount()

This commit is contained in:
Guenter Obiltschnig
2009-06-01 08:50:54 +00:00
parent 589de05652
commit 60fc5b6e28
10 changed files with 103 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
//
// Environment.h
//
// $Id: //poco/1.3/Foundation/include/Poco/Environment.h#2 $
// $Id: //poco/1.3/Foundation/include/Poco/Environment.h#3 $
//
// Library: Foundation
// Package: Core
@@ -94,6 +94,11 @@ public:
/// of the first Ethernet adapter found on the system.
///
/// Throws a SystemException if no Ethernet adapter is available.
static unsigned processorCount();
/// Returns the number of processors installed in the system.
///
/// If the number of processors cannot be determined, returns 1.
};

View File

@@ -1,7 +1,7 @@
//
// Environment_UNIX.h
//
// $Id: //poco/1.3/Foundation/include/Poco/Environment_UNIX.h#2 $
// $Id: //poco/1.3/Foundation/include/Poco/Environment_UNIX.h#3 $
//
// Library: Foundation
// Package: Core
@@ -61,6 +61,7 @@ public:
static std::string osArchitectureImpl();
static std::string nodeNameImpl();
static void nodeIdImpl(NodeId& id);
static unsigned processorCountImpl();
private:
typedef std::map<std::string, std::string> StringMap;

View File

@@ -1,7 +1,7 @@
//
// Environment_VMS.h
//
// $Id: //poco/1.3/Foundation/include/Poco/Environment_VMS.h#2 $
// $Id: //poco/1.3/Foundation/include/Poco/Environment_VMS.h#3 $
//
// Library: Foundation
// Package: Core
@@ -60,6 +60,7 @@ public:
static std::string osArchitectureImpl();
static std::string nodeNameImpl();
static void nodeIdImpl(NodeId& id);
static unsigned processorCountImpl();
static std::string getsyi(unsigned short code);
/// a wrapper for $GETSYIW

View File

@@ -1,7 +1,7 @@
//
// Environment_WIN32.h
//
// $Id: //poco/1.3/Foundation/include/Poco/Environment_WIN32.h#2 $
// $Id: //poco/1.3/Foundation/include/Poco/Environment_WIN32.h#3 $
//
// Library: Foundation
// Package: Core
@@ -59,6 +59,7 @@ public:
static std::string osArchitectureImpl();
static std::string nodeNameImpl();
static void nodeIdImpl(NodeId& id);
static unsigned processorCountImpl();
};

View File

@@ -1,7 +1,7 @@
//
// Environment_WIN32U.h
//
// $Id: //poco/1.3/Foundation/include/Poco/Environment_WIN32U.h#2 $
// $Id: //poco/1.3/Foundation/include/Poco/Environment_WIN32U.h#3 $
//
// Library: Foundation
// Package: Core
@@ -59,6 +59,7 @@ public:
static std::string osArchitectureImpl();
static std::string nodeNameImpl();
static void nodeIdImpl(NodeId& id);
static unsigned processorCountImpl();
};