private TableFeatures(OFTableFeatures tf) { /* * First, get the properties. */ List<OFTableFeatureProp> properties = tf.getProperties(); for (OFTableFeatureProp p : properties) { OFTableFeaturePropType pt = getTableFeaturePropType(p); switch (pt) { case APPLY_ACTIONS: aa = (OFTableFeaturePropApplyActions) p; break; case APPLY_ACTIONS_MISS: aam = (OFTableFeaturePropApplyActionsMiss) p; break; case APPLY_SETFIELD: asf = (OFTableFeaturePropApplySetfield) p; break; case APPLY_SETFIELD_MISS: asfm = (OFTableFeaturePropApplySetfieldMiss) p; break; case EXPERIMENTER: e = (OFTableFeaturePropExperimenter) p; break; case EXPERIMENTER_MISS: em = (OFTableFeaturePropExperimenterMiss) p; break; case INSTRUCTIONS: i = (OFTableFeaturePropInstructions) p; break; case INSTRUCTIONS_MISS: im = (OFTableFeaturePropInstructionsMiss) p; break; case MATCH: m = (OFTableFeaturePropMatch) p; break; case NEXT_TABLES: nt = (OFTableFeaturePropNextTables) p; break; case NEXT_TABLES_MISS: ntm = (OFTableFeaturePropNextTablesMiss) p; break; case TABLE_SYNC_FROM: tsf = (OFTableFeaturePropTableSyncFrom) p; break; case WILDCARDS: w = (OFTableFeaturePropWildcards) p; break; case WRITE_ACTIONS: wa = (OFTableFeaturePropWriteActions) p; break; case WRITE_ACTIONS_MISS: wam = (OFTableFeaturePropWriteActionsMiss) p; break; case WRITE_SETFIELD: wsf = (OFTableFeaturePropWriteSetfield) p; break; case WRITE_SETFIELD_MISS: wsfm = (OFTableFeaturePropWriteSetfieldMiss) p; break; default: throw new UnsupportedOperationException("OFTableFeaturePropType " + pt.toString() + " not accounted for in " + this.getClass().getCanonicalName()); } } /* * Next, get the other info e.g. name, ID, etc. */ config = tf.getConfig(); maxEntries = tf.getMaxEntries(); metadataMatch = tf.getMetadataMatch(); metadataWrite = tf.getMetadataWrite(); tableId = tf.getTableId(); tableName = tf.getName(); }
public OFTableFeaturePropWriteActions getPropWriteActions() { return wa; }