Changeset 10477


Ignore:
Timestamp:
Apr 28, 2011, 11:08:19 AM (9 years ago)
Author:
tbretz
Message:
Added descriptions for the service itself and for the default Dim services.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/DimDescriptionService.cc

    r10350 r10477  
    6868DimDescriptionService::DimDescriptionService(const std::string &name, const std::string &desc)
    6969{
    70     string service = DimServer::itsName;
    71     if (service.empty())
     70    string server = DimServer::itsName;
     71    if (server.empty())
    7272    {
    7373        const size_t p = name.find_first_of('/');
     
    7575            throw logic_error("Could not determine server name");
    7676
    77         service = name.substr(0, p);
     77        server = name.substr(0, p);
    7878    }
    7979
     
    8181            throw logic_error("Description for "+name+" contains '\\n'");
    8282
    83     service += "/SERVICE_DESC";
    8483    if (!fService)
    85         fService = new DimService(service.c_str(), const_cast<char*>(""));
     84    {
     85        fService = new DimService((server+"/SERVICE_DESC").c_str(), const_cast<char*>(""));
     86        fData =
     87            server + "/SERVICE_DESC"
     88            "=This service holds a descriptions for services or command "
     89            "and there arguments|Description[string]:For a detailed "
     90            "explanation of the descriptive string see the class reference "
     91            "of DimDescriptionService.\n" +
     92            server + "/CLIENT_LIST"
     93            "=This is a native Dim service. It contains a list "
     94            "of all clients currently connected.\n" +
     95            server + "/VERSION_NUMBER"
     96            "=This is a native Dim service. It contains the version number "
     97            "of Dim in use and can be used to check if a client is connected."
     98            "|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917)\n" +
     99            server + "/EXIT"
     100            "=This is a native Dim service. It allows to exit the program "
     101            "remotely. FACT++ programs use the given number as return code."
     102            "|Rc[int]:Return code (42 will call exit() directly, 0x4242 will call abort() directly.\n" +
     103            server + "/SERVICE_LIST"
     104            "=This is a native Dim service. It provides a list of all "
     105            "commands and services together with their formats currently "
     106            "provided by the server."
     107            "|ServiceList[string]:For details see the Dim manual.\n";
     108    }
     109
    86110
    87111    fCount++;
Note: See TracChangeset for help on using the changeset viewer.