Open CASCADE Technology  7.1.0.beta
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

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