/* Copyright 2009 Virginia Polytechnic Institute and State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ %module cross %{ #include "vtcross/libvtcross.h" #include "vtcross/containers.h" %} %typemap(in) uint32_t = int; %include "std_string.i" %include "vtcross/containers.h" %include "vtcross/libvtcross.h" %apply const std::string & { std::string * }; %extend Parameter { Parameter(int nparameters) { Parameter * p = new Parameter[nparameters]; return p; }; ~Parameter() { delete [] $self; }; Parameter *__getitem__(int i) { return self+i; }; }; %extend Observable { Observable(int nobservables) { Observable * o = new Observable[nobservables]; return o; }; ~Observable() { delete [] $self; }; Observable *__getitem__(int i) { return self+i; }; }; %extend Utility { Utility(int nutilities) { Utility * u = new Utility[nutilities]; return u; }; ~Utility() { delete [] $self; }; Utility *__getitem__(int i) { return self+i; }; };