StdInCommand.h
branchv_0
changeset 17 f543468a7e49
parent 16 70af16946466
child 18 9e543fd0254c
equal deleted inserted replaced
16:70af16946466 17:f543468a7e49
    46 				char ch;
    46 				char ch;
    47 				input.get(ch);
    47 				input.get(ch);
    48 				if (ch == 0 || input.eof() || input.fail()) break;
    48 				if (ch == 0 || input.eof() || input.fail()) break;
    49 				else value << ch;
    49 				else value << ch;
    50 			}
    50 			}
       
    51 			
       
    52 			if (required && value.str().empty()) throw RelpipeCLIException(L"Missing value on STDIN.", CLI::EXIT_CODE_BAD_SYNTAX);
    51 
    53 
    52 			return convertor.from_bytes(value.str());
    54 			return convertor.from_bytes(value.str());
    53 		}
    55 		}
    54 	}
    56 	}
    55 
    57 
    78 
    80 
    79 		while (true) {
    81 		while (true) {
    80 			string_t value = readNext(input, arguments, i, false);
    82 			string_t value = readNext(input, arguments, i, false);
    81 			if (value.empty() && (input.eof() || input.fail())) break;
    83 			if (value.empty() && (input.eof() || input.fail())) break;
    82 			else writer->writeAttribute(value);
    84 			else writer->writeAttribute(value);
       
    85 			// TODO: check attribute count (avoid unfinished records)
    83 		}
    86 		}
    84 	}
    87 	}
    85 };
    88 };
    86 
    89 
    87 }
    90 }