Open CASCADE Technology  7.3.0
Macros

Interface_Translates.hxx File Reference

Macros

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

Macro Definition Documentation

◆ ArrayToSeq

#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));\
}

◆ SeqToArray

#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));\
}\
}

◆ SeqToArrayCast

#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 Handle(Class)
Define Handle() macro.
Definition: Standard_Handle.hxx:463

◆ SeqToArrayFrom

#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));\
}\
}