Opened 10 years ago

Closed 9 years ago

#124 closed enhancement (duplicate)

'Empty' constructors for different Element types

Reported by: jelte Owned by: jelte
Priority: low Milestone:
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: Add Hours to Ticket:
Total Hours: Internal?:

Description

Currently you can construct all forms of Elements with the Element::create factory function, but you need something to put in there (for instance a std::vector for a ListElement?). We use createFromString("[]") a lot for this, but we should really have empty constructors, both ListElement?() and Element::createType(Element::list).

And of course for other types too (for types that cannot be empty we should either throw or assign a default value)

Subtickets

Change History (2)

comment:1 Changed 10 years ago by jelte

  • Owner set to jelte
  • Status changed from new to assigned

Also remove the existing std::map constructor (and for consistency, same for vector), while we do this. This should then also fix ticket #129

comment:2 Changed 9 years ago by jelte

  • Resolution set to duplicate
  • Status changed from assigned to closed

'Accidentally' this issue got addressed in ticket #172, so I'm closing this here.

Note: See TracTickets for help on using tickets.