tool/CommandDomains.cpp
changeset 1869 14f634f5b613
parent 1827 489be2180f71
child 1955 09c2bd224d3f
child 1984 02c8728bf9e4
equal deleted inserted replaced
1868:489ea0becd74 1869:14f634f5b613
    90 
    90 
    91 /****************************************************************************/
    91 /****************************************************************************/
    92 
    92 
    93 void CommandDomains::execute(const StringVector &args)
    93 void CommandDomains::execute(const StringVector &args)
    94 {
    94 {
       
    95 	MasterIndexList masterIndices;
       
    96     bool doIndent;
    95     DomainList domains;
    97     DomainList domains;
    96     DomainList::const_iterator di;
    98     DomainList::const_iterator di;
    97     bool doIndent;
       
    98 
    99 
    99     if (args.size()) {
   100     if (args.size()) {
   100         stringstream err;
   101         stringstream err;
   101         err << "'" << getName() << "' takes no arguments!";
   102         err << "'" << getName() << "' takes no arguments!";
   102         throwInvalidUsageException(err);
   103         throwInvalidUsageException(err);
   103     }
   104     }
   104 
   105 
   105     doIndent = getMasterIndices().size() > 1;
   106 	masterIndices = getMasterIndices();
       
   107     doIndent = masterIndices.size() > 1;
   106     MasterIndexList::const_iterator mi;
   108     MasterIndexList::const_iterator mi;
   107     for (mi = getMasterIndices().begin();
   109     for (mi = masterIndices.begin();
   108             mi != getMasterIndices().end(); mi++) {
   110             mi != masterIndices.end(); mi++) {
   109         MasterDevice m(*mi);
   111         MasterDevice m(*mi);
   110         m.open(MasterDevice::Read);
   112         m.open(MasterDevice::Read);
   111         domains = selectedDomains(m);
   113         domains = selectedDomains(m);
   112 
   114 
   113         if (domains.size() && doIndent) {
   115         if (domains.size() && doIndent) {