Obj ElmRecHandler ( Obj self, Obj rec, Obj rnam ) { return ELM_REC( rec, INT_INTOBJ(rnam) ); }
Obj GAP_ElmRecord(Obj rec, Obj name) { UInt rnam = RNamObj(name); if (ISB_REC(rec, rnam)) return ELM_REC(rec, rnam); return 0; }
int getOrbitStart() const { // printf("getOrbitStart."); Obj o = ELM_REC(sc, RName_orbit); // ELM_REC(sc, RName_orbit); printf("!\n"); return GAP_get<int>(ELM_LIST(o, 1)); }
Obj get(const char* c) { UInt n = RNamName(c); if(!has(c)) throw GAPException("field not in record"); return ELM_REC(record, n); }
Obj GAP_get_rec(Obj rec, UInt n) { if(!IS_REC(rec)) throw GAPException("Invalid attempt to read record"); if(!ISB_REC(rec, n)) throw GAPException(std::string("Unable to read value from rec")); return ELM_REC(rec, n); }
static Obj ElmRecError(Obj rec, UInt rnam) { rec = ErrorReturnObj( "Record Element: <rec> must be a record (not a %s)", (Int)TNAM_OBJ(rec), 0L, "you can replace <rec> via 'return <rec>;'" ); return ELM_REC( rec, rnam ); }
// This is a special method. It gets a boolean from a record, and assumes // it is 'false' if not present bool GAP_get_maybe_bool_rec(Obj rec, UInt n) { if(!IS_REC(rec)) throw GAPException("Invalid attempt to read record"); if(!ISB_REC(rec, n)) return false; Obj b = ELM_REC(rec, n); if(b == True) return true; if(b == False) return false; throw GAPException("Record element is not a boolean"); }
vec1<int> getOrbit() const { //printf("GetOrbit."); ELM_REC(sc, RName_orbit); printf("!\n"); return GAP_get<vec1<int> >(ELM_REC(sc, RName_orbit)); }
vec1<Permutation> getLabels() const { return GAP_get<vec1<Permutation> >(ELM_REC(sc, RName_labels)); }
vec1<optional<int> > getTranslabels() const { return GAP_get<vec1<optional<int> > >(ELM_REC(sc, RName_translabels)); }
GAPStabChainWrapper getNextLevel() const { return GAPStabChainWrapper(ELM_REC(sc, RName_stabilizer)); }
int transversalSize() const { return LEN_LIST(ELM_REC(sc, RName_transversal)); }