Local storage for the applied description.
When the constructor is first called, a service with the name SERVER/SERVICE_DESC is created. The server name SERVER is retrieved from DimServer::itsName. If DimServer::itsName is empty, the server name is extracted from the given name as the part before the first '/'. A string "name=format\n" is added to fData and stored in fDescription.
A counter fCount for the number of instantiations is increased.
- Parameters
-
name | The name of the service or command to be described, e.g. SERVER/COMMAND |
desc | A description string. For details see class reference |
- Exceptions
-
If | a server name couldn't be reliably determined a logic_error exception is thrown; if the given description contains a '
' also a logic_error is thrown. |
Definition at line 71 of file DimDescriptionService.cc.
References fData, DimServer::itsName, Time::ms(), t, and Time::Time_t().
76 const size_t p = name.find_first_of(
'/');
78 throw logic_error(
"Could not determine server name");
80 server = name.substr(0, p);
83 if (desc.find_first_of(
'\n')!=string::npos)
84 throw logic_error(
"Description for "+name+
" contains '\\n'");
90 server +
"/SERVICE_DESC" 91 "=Descriptions of services or commands and there arguments" 92 "|Description[string]:For a detailed " 93 "explanation of the descriptive string see the class reference " 94 "of DimDescriptionService.\n" +
95 server +
"/CLIENT_LIST" 96 "=Native Dim service: A list of all connected clients\n" +
97 server +
"/VERSION_NUMBER" 98 "=Native Dim service: Version number of Dim in use" 99 "|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917)\n" +
101 "=This is a native Dim command: Exit program" 102 "remotely. FACT++ programs use the given number as return code." 103 "|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly.\n" +
104 server +
"/SERVICE_LIST" 105 "=Native Dim service: List of services, commands and formats" 106 "|ServiceList[string]:For details see the Dim manual.\n";
Adds some functionality to boost::posix_time::ptime for our needs.
static DimService * fService
Counter to count the number of instatiations.
void setTimestamp(int secs, int millisecs)
std::string fDescription
Data to be distributed with the service.
void setData(void *data, int size)
static std::string fData
Pointer to the DimService distributing the desscriptions.