Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 31, 2015, 12:43:34 AM (8 years ago)
Author:
landauf
Message:

made some enums in core library strongly typed. for other enums in core (especially in the input library) this isn't possible because enums are often used like flags (converted to int and compared with binary operators).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/XMLPort.h

    r10990 r11007  
    324324    {
    325325    public:
    326         enum ParseResult
     326        enum class ParseResult
    327327        {
    328             PR_not_started,
    329             PR_finished,
    330             PR_waiting_for_default_values
     328            not_started,
     329            finished,
     330            waiting_for_default_values
    331331        };
    332332
    333333        public:
    334334            XMLPortParamContainer()
    335                 { this->parseResult_ = PR_not_started; }
     335                { this->parseResult_ = ParseResult::not_started; }
    336336            virtual ~XMLPortParamContainer() = default;
    337337
     
    415415                            this->loadexecutor_->parse(object, attributeValue, &error, ",");
    416416                            if (!error || (mode  == XMLPort::ExpandObject))
    417                                 this->parseResult_ = PR_finished;
     417                                this->parseResult_ = ParseResult::finished;
    418418                            else
    419                                 this->parseResult_ = PR_waiting_for_default_values;
     419                                this->parseResult_ = ParseResult::waiting_for_default_values;
    420420                        }
    421421                        else if (mode == XMLPort::ExpandObject)
    422                             this->parseResult_ = PR_finished;
     422                            this->parseResult_ = ParseResult::finished;
    423423                        else
    424                             this->parseResult_ = PR_waiting_for_default_values;
     424                            this->parseResult_ = ParseResult::waiting_for_default_values;
    425425                    }
    426426                    catch (ticpp::Exception& ex)
     
    449449            XMLPortParamContainer& portIfWaitingForDefaultValues(const ParseResult& result, const ParseParams& params)
    450450            {
    451                 if (result == PR_waiting_for_default_values)
     451                if (result == ParseResult::waiting_for_default_values)
    452452                    return this->port(this->owner_, params);
    453453                else
Note: See TracChangeset for help on using the changeset viewer.