Ignore:
Timestamp:
Jul 2, 2015, 6:49:13 PM (4 years ago)
Author:
cameron
Message:

Add ExtensionPropertyObject? for scx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/PropertyObjects.cpp

    r4631 r4633  
    77
    88#include "PropertyObjects.h"
     9#include "PropertyObjectTable.h"
    910#include <sstream>
    1011#include <algorithm>
     
    6667}
    6768
     69const UnicodeSet & ExtensionPropertyObject::GetCodepointSet(const std::string & value_spec) {
     70    int property_enum_val = GetPropertyValueEnumCode(value_spec);
     71    if (property_enum_val == -1) {
     72        throw std::runtime_error("Extension Property " + UCD::property_full_name[the_property] +  ": unknown value: " + value_spec);
     73    }
     74    return GetCodepointSet(property_enum_val);
     75}
     76
     77const UnicodeSet & ExtensionPropertyObject::GetCodepointSet(const int property_enum_val) const {
     78    assert (property_enum_val >= 0);
     79    return *(property_value_sets[property_enum_val]);
     80}
     81
     82int ExtensionPropertyObject::GetPropertyValueEnumCode(const std::string & value_spec) {
     83    int c = property_object_table[base_property]->GetPropertyValueEnumCode(value_spec);
     84    return c;
     85}
     86
    6887UnicodeSet BinaryPropertyObject::GetCodepointSet(const std::string & value_spec) const {
    6988    if (value_spec.length() != 0) {
Note: See TracChangeset for help on using the changeset viewer.