# Interface_Translates.hxx File Reference

## Defines

#define | SeqToArrayFrom(seq, arr, typarr, lowind)
#define | SeqToArray(seq, arr, typarr)
#define | SeqToArrayCast(seq, arr, typarr, typent)
#define | ArrayToSeq

## Define Documentation

#define ArrayToSeq

Value:

    (arr,seq)\
      {\
        Standard_Integer nument, numlow = arr->Lower() , numup = arr->Upper();\
        for (nument = numlow; nument <= numup; nument ++)\
          seq->Append(arr->Value(nument));\
      }

#define SeqToArray | ( | seq,
|  | arr,
|  | typarr |  | ) |

Value:

    if (!seq.IsNull()) {\
        Standard_Integer numseq, lenseq = seq->Length();\
        if (lenseq > 0) {\
          arr = new typarr (1,lenseq);\
          for (numseq = 1; numseq <= lenseq; numseq ++)\
            arr->SetValue (numseq, seq->Value(numseq));\
        }\
      }

#define SeqToArrayCast | ( | seq,
|  | arr,
|  | typarr,
|  | typent |  | ) |

Value:

    if (!seq.IsNull()) {\
        Standard_Integer numseq, lenseq = seq->Length();\
        if (lenseq > 0) {\
          arr = new typarr (1,lenseq);\
          for (numseq = 1; numseq <= lenseq; numseq ++)\
            arr->SetValue (numseq, Handle(typent)::DownCast(seq->Value(numseq)));\
        }\
      }

#define SeqToArrayFrom | ( | seq,
|  | arr,
|  | typarr,
|  | lowind |  | ) |

Value:

    if (!seq.IsNull()) {\
        Standard_Integer numseq, lenseq = seq->Length();\
        if (lenseq > 0) {\
          arr = new typarr (lowind,lenseq+1-lowind);\
          for (numseq = 1; numseq <= lenseq; numseq ++)\
            arr->SetValue (numseq+1-lowind, seq->Value(numseq));\
        }\
      }