FieldBuilder: typo addNested() -> endNested()
This commit is contained in:
@@ -740,7 +740,7 @@ FieldBuilderPtr FieldBuilder::addNestedUnionArray(std::string const & name)
|
||||
return FieldBuilderPtr(new FieldBuilder(shared_from_this(), name, union_, true));
|
||||
}
|
||||
|
||||
FieldBuilderPtr FieldBuilder::addNested()
|
||||
FieldBuilderPtr FieldBuilder::endNested()
|
||||
{
|
||||
if (!parentBuilder.get())
|
||||
throw std::runtime_error("this method can only be called to create nested fields");
|
||||
|
||||
@@ -711,41 +711,41 @@ public:
|
||||
|
||||
/**
|
||||
* Add new nested {@code Structure}.
|
||||
* {@code addNested()} method must be called
|
||||
* {@code endNested()} method must be called
|
||||
* to complete creation of the nested {@code Structure}.
|
||||
* @param name nested structure name.
|
||||
* @return a new instance of a {@code FieldBuilder} is returned.
|
||||
* @see #addNested()
|
||||
* @see #endNested()
|
||||
*/
|
||||
FieldBuilderPtr addNestedStructure(std::string const & name);
|
||||
|
||||
/**
|
||||
* Add new nested {@code Union}.
|
||||
* {@code addNested()} method must be called
|
||||
* {@code endNested()} method must be called
|
||||
* to complete creation of the nested {@code Union}.
|
||||
* @param name nested union name.
|
||||
* @return a new instance of a {@code FieldBuilder} is returned.
|
||||
* @see #addNested()
|
||||
* @see #endNested()
|
||||
*/
|
||||
FieldBuilderPtr addNestedUnion(std::string const & name);
|
||||
|
||||
/**
|
||||
* Add new nested {@code Structure[]}.
|
||||
* {@code addNested()} method must be called
|
||||
* {@code endNested()} method must be called
|
||||
* to complete creation of the nested {@code Structure}.
|
||||
* @param name nested structure name.
|
||||
* @return a new instance of a {@code FieldBuilder} is returned.
|
||||
* @see #addNested()
|
||||
* @see #endNested()
|
||||
*/
|
||||
FieldBuilderPtr addNestedStructureArray(std::string const & name);
|
||||
|
||||
/**
|
||||
* Add new nested {@code Union[]}.
|
||||
* {@code addNested()} method must be called
|
||||
* {@code endNested()} method must be called
|
||||
* to complete creation of the nested {@code Union}.
|
||||
* @param name nested union name.
|
||||
* @return a new instance of a {@code FieldBuilder} is returned.
|
||||
* @see #addNested()
|
||||
* @see #endNested()
|
||||
*/
|
||||
FieldBuilderPtr addNestedUnionArray(std::string const & name);
|
||||
|
||||
@@ -755,7 +755,7 @@ public:
|
||||
* @see #addNestedUnion(String)
|
||||
* @return a previous (parent) {@code FieldBuilder}.
|
||||
*/
|
||||
FieldBuilderPtr addNested();
|
||||
FieldBuilderPtr endNested();
|
||||
|
||||
private:
|
||||
FieldBuilder();
|
||||
|
||||
@@ -196,7 +196,7 @@ void testEquals() {
|
||||
setId("nestedId")->
|
||||
add("short", pvShort)->
|
||||
add("long", pvLong)->
|
||||
addNested()->
|
||||
endNested()->
|
||||
addArray("intArray", pvInt)->
|
||||
createUnion();
|
||||
PVUnionPtr union1 = factory->createPVUnion(punion);
|
||||
@@ -690,7 +690,7 @@ void testIntrospectionSerialization()
|
||||
setId("nestedId")->
|
||||
add("short", pvShort)->
|
||||
add("long", pvLong)->
|
||||
addNested()->
|
||||
endNested()->
|
||||
addArray("intArray", pvInt)->
|
||||
createUnion();
|
||||
serializatioTest(punion);
|
||||
|
||||
@@ -86,12 +86,12 @@ void test_invalid()
|
||||
{
|
||||
fieldCreate->createFieldBuilder()->
|
||||
add("f1", pvByte)->
|
||||
addNested();
|
||||
testFail("addNested() allowed in non-nested FieldBuilder");
|
||||
endNested();
|
||||
testFail("endNested() allowed in non-nested FieldBuilder");
|
||||
}
|
||||
catch (std::runtime_error& re) {
|
||||
// ok
|
||||
testPass("addNested() disallowed in non-nested FieldBuilder");
|
||||
testPass("endNested() disallowed in non-nested FieldBuilder");
|
||||
}
|
||||
|
||||
try
|
||||
@@ -123,7 +123,7 @@ void test_nestedStructure()
|
||||
setId(NESTED_ID)->
|
||||
add("short", pvShort)->
|
||||
add("long", pvLong)->
|
||||
addNested()->
|
||||
endNested()->
|
||||
addArray("intArray", pvInt)->
|
||||
createStructure();
|
||||
testOk1(s.get() != 0);
|
||||
@@ -179,7 +179,7 @@ void test_nestedStructureArray()
|
||||
setId(NESTED_ID)->
|
||||
add("short", pvShort)->
|
||||
add("long", pvLong)->
|
||||
addNested()->
|
||||
endNested()->
|
||||
addArray("intArray", pvInt)->
|
||||
createStructure();
|
||||
testOk1(s.get() != 0);
|
||||
|
||||
Reference in New Issue
Block a user