Skip to content

Commit

Permalink
Merge pull request #12 from OverheadTransmissionLineSoftware/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bretzel12 authored Dec 24, 2016
2 parents 3b5ea0b + 3fcc301 commit 6f8d4d7
Show file tree
Hide file tree
Showing 51 changed files with 1,494 additions and 539 deletions.
4 changes: 4 additions & 0 deletions build/codeblocks/SpanAnalyzer.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
<Unit filename="../../include/span_editor_dialog.h" />
<Unit filename="../../include/span_unit_converter.h" />
<Unit filename="../../include/span_xml_handler.h" />
<Unit filename="../../include/status_bar_log.h" />
<Unit filename="../../include/timer.h" />
<Unit filename="../../include/vector_xml_handler.h" />
<Unit filename="../../include/weather_load_case_editor_dialog.h" />
<Unit filename="../../include/weather_load_case_manager_dialog.h" />
Expand Down Expand Up @@ -150,6 +152,8 @@
<Unit filename="../../src/span_editor_dialog.cc" />
<Unit filename="../../src/span_unit_converter.cc" />
<Unit filename="../../src/span_xml_handler.cc" />
<Unit filename="../../src/status_bar_log.cc" />
<Unit filename="../../src/timer.cc" />
<Unit filename="../../src/vector_xml_handler.cc" />
<Unit filename="../../src/weather_load_case_editor_dialog.cc" />
<Unit filename="../../src/weather_load_case_manager_dialog.cc" />
Expand Down
4 changes: 4 additions & 0 deletions build/msvc/SpanAnalyzer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
<ClInclude Include="..\..\include\span_editor_dialog.h" />
<ClInclude Include="..\..\include\span_unit_converter.h" />
<ClInclude Include="..\..\include\span_xml_handler.h" />
<ClInclude Include="..\..\include\status_bar_log.h" />
<ClInclude Include="..\..\include\timer.h" />
<ClInclude Include="..\..\include\vector_xml_handler.h" />
<ClInclude Include="..\..\include\weather_load_case_editor_dialog.h" />
<ClInclude Include="..\..\include\weather_load_case_manager_dialog.h" />
Expand Down Expand Up @@ -138,6 +140,8 @@
<ClCompile Include="..\..\src\span_editor_dialog.cc" />
<ClCompile Include="..\..\src\span_unit_converter.cc" />
<ClCompile Include="..\..\src\span_xml_handler.cc" />
<ClCompile Include="..\..\src\status_bar_log.cc" />
<ClCompile Include="..\..\src\timer.cc" />
<ClCompile Include="..\..\src\vector_xml_handler.cc" />
<ClCompile Include="..\..\src\weather_load_case_editor_dialog.cc" />
<ClCompile Include="..\..\src\weather_load_case_manager_dialog.cc" />
Expand Down
12 changes: 12 additions & 0 deletions build/msvc/SpanAnalyzer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@
<ClInclude Include="..\..\include\analysis_filter_xml_handler.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\timer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\status_bar_log.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\analysis_controller.cc">
Expand Down Expand Up @@ -263,6 +269,12 @@
<ClCompile Include="..\..\src\analysis_filter_xml_handler.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\timer.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\status_bar_log.cc">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\test\test.spananalyzer">
Expand Down
38 changes: 19 additions & 19 deletions include/analysis_filter_xml_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AnalysisFilterXmlHandler : public XmlHandler {
/// \param[in] name
/// The name of the XML node. This will be an attribute for the created
/// node. If empty, no attribute will be created.
/// \return An XML node for the document.
/// \return An XML node for the analysis filter.
static wxXmlNode* CreateNode(const AnalysisFilter& filter,
const std::string& name);

Expand All @@ -48,15 +48,15 @@ class AnalysisFilterXmlHandler : public XmlHandler {
/// weathercase.
/// \param[out] filter
/// The filter.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNode(const wxXmlNode* root,
const std::string& filepath,
const std::list<WeatherLoadCase*>* weathercases,
AnalysisFilter& filter);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNode(const wxXmlNode* root,
const std::string& filepath,
const std::list<WeatherLoadCase*>* weathercases,
AnalysisFilter& filter);

private:
/// \brief Parses a version 1 XML node and populates an analysis filter
Expand All @@ -72,15 +72,15 @@ class AnalysisFilterXmlHandler : public XmlHandler {
/// weathercase.
/// \param[out] filter
/// The filter.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
const std::list<WeatherLoadCase*>* weathercases,
AnalysisFilter& filter);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
const std::list<WeatherLoadCase*>* weathercases,
AnalysisFilter& filter);
};

#endif // OTLS_SPANANALYZER_ANALYSISFILTERXMLHANDLER_H_
36 changes: 18 additions & 18 deletions include/cable_constraint_xml_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ class CableConstraintXmlHandler : public XmlHandler {
/// weathercase.
/// \param[out] constraint
/// The cable constraint that is populated.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNode(const wxXmlNode* root,
const std::string& filepath,
const std::list<WeatherLoadCase*>* weathercases,
CableConstraint& constraint);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNode(const wxXmlNode* root,
const std::string& filepath,
const std::list<WeatherLoadCase*>* weathercases,
CableConstraint& constraint);

private:
/// \brief Parses a version 1 XML node and populates a cable constraint.
Expand All @@ -81,15 +81,15 @@ class CableConstraintXmlHandler : public XmlHandler {
/// weathercase.
/// \param[out] constraint
/// The cable constraint that is populated.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
const std::list<WeatherLoadCase*>* weathercases,
CableConstraint& constraint);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
const std::list<WeatherLoadCase*>* weathercases,
CableConstraint& constraint);
};

#endif // OTLS_SPANANALYZER_CABLECONSTRAINTXMLHANDLER_H_
64 changes: 32 additions & 32 deletions include/cable_xml_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ class CableComponentXmlHandler : public XmlHandler {
/// purposes only and can be left blank.
/// \param[out] component
/// The cable component that is populated.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNode(const wxXmlNode* root,
const std::string& filepath,
CableComponent& component);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNode(const wxXmlNode* root,
const std::string& filepath,
CableComponent& component);

private:
/// \brief Parses a version 1 XML node and populates a cable component.
Expand All @@ -73,14 +73,14 @@ class CableComponentXmlHandler : public XmlHandler {
/// purposes only and can be left blank.
/// \param[out] component
/// The cable component that is populated.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
CableComponent& component);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
CableComponent& component);
};

/// \par OVERVIEW
Expand Down Expand Up @@ -126,14 +126,14 @@ class CableXmlHandler : public XmlHandler {
/// purposes only and can be left blank.
/// \param[out] cable
/// The cable that is populated.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNode(const wxXmlNode* root,
const std::string& filepath,
Cable& cable);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNode(const wxXmlNode* root,
const std::string& filepath,
Cable& cable);

private:
/// \brief Parses a version 1 XML node and populates a cable.
Expand All @@ -144,14 +144,14 @@ class CableXmlHandler : public XmlHandler {
/// purposes only and can be left blank.
/// \param[out] cable
/// The cable that is populated.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
Cable& cable);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
Cable& cable);
};

#endif // OTLS_SPANANALYZER_CABLEXMLHANDLER_H_
17 changes: 9 additions & 8 deletions include/file_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ class FileHandler {
/// The unit system to convert to.
/// \param[out] data
/// The application data that is populated.
/// \return 0 if no errors were encountered, -1 if the file did not exist, or
/// the line number if an error was encountered in the file.
/// \return 0 if no errors, -1 if file related errors, or 1 if parsing
/// errors are encountered.
/// All errors are logged to the active application log target.
static int LoadAppData(const std::string& filepath,
const units::UnitSystem& units,
SpanAnalyzerData& data);
Expand All @@ -50,10 +51,9 @@ class FileHandler {
/// The unit system to convert to.
/// \param[out] cable
/// The cable that is populated.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the loading to abort, but are not logged.
/// Non-critical errors are directed to the active application log target.
/// \return 0 if no errors, -1 if file related errors, or 1 if parsing
/// errors are encountered.
/// All errors are logged to the active application log target.
static int LoadCable(const std::string& filepath,
const units::UnitSystem& units,
Cable& cable);
Expand All @@ -63,8 +63,9 @@ class FileHandler {
/// The filepath.
/// \param[out] config
/// The application configuration settings.
/// \return 0 if no errors were encountered, -1 if the file did not exist, or
/// the line number if an error was encountered in the file.
/// \return 0 if no errors, -1 if file related errors, or 1 if parsing
/// errors are encountered.
/// All errors are logged to the active application log target.
static int LoadConfigFile(const std::string& filepath,
SpanAnalyzerConfig& config);

Expand Down
40 changes: 20 additions & 20 deletions include/line_cable_xml_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ class LineCableXmlHandler : public XmlHandler {
/// weathercase.
/// \param[out] linecable
/// The linecable that is populated.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNode(const wxXmlNode* root,
const std::string& filepath,
const std::list<const Cable*>* cables,
const std::list<WeatherLoadCase*>* weathercases,
LineCable& linecable);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNode(const wxXmlNode* root,
const std::string& filepath,
const std::list<const Cable*>* cables,
const std::list<WeatherLoadCase*>* weathercases,
LineCable& linecable);

private:
/// \brief Parses a version 1 XML node and populates a linecable.
Expand All @@ -88,16 +88,16 @@ class LineCableXmlHandler : public XmlHandler {
/// weathercase.
/// \param[out] linecable
/// The linecable that is populated.
/// \return The file line number of a critical error. Returns 0 if no critical
/// errors were encountered.
/// Critical errors cause the parsing to abort, but are not logged.
/// Non-critical errors are directed to the active application log target. If
/// the property is recognized, it is set to an invalid state.
static int ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
const std::list<const Cable*>* cables,
const std::list<WeatherLoadCase*>* weathercases,
LineCable& linecable);
/// \return The status of the xml node parse. If any errors are encountered
/// false is returned.
/// All errors are logged to the active application log target. Critical
/// errors cause the parsing to abort. Non-critical errors set the object
/// property to an invalid state (if applicable).
static bool ParseNodeV1(const wxXmlNode* root,
const std::string& filepath,
const std::list<const Cable*>* cables,
const std::list<WeatherLoadCase*>* weathercases,
LineCable& linecable);
};

# endif // OTLS_SPANANALYZER_LINECABLEXMLHANDLER_H_
Loading

0 comments on commit 6f8d4d7

Please sign in to comment.