ZNC  trunk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ret.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2004-2014 ZNC, see the NOTICE file for details.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 class CPyRetString {
20 public:
22  CPyRetString(CString& S) : s(S) {}
23  static PyObject* wrap(CString& S) {
24  CPyRetString* x = new CPyRetString(S);
25  return SWIG_NewInstanceObj(x, SWIG_TypeQuery("CPyRetString*"), SWIG_POINTER_OWN);
26  }
27 };
28 
29 class CPyRetBool {
30 public:
31  bool& b;
32  CPyRetBool(bool& B) : b(B) {}
33  static PyObject* wrap(bool& B) {
34  CPyRetBool* x = new CPyRetBool(B);
35  return SWIG_NewInstanceObj(x, SWIG_TypeQuery("CPyRetBool*"), SWIG_POINTER_OWN);
36  }
37 };
Definition: ret.h:29
Definition: ret.h:19
CPyRetBool(bool &B)
Definition: ret.h:32
CString & s
Definition: ret.h:21
static PyObject * wrap(CString &S)
Definition: ret.h:23
String class that is used inside ZNC.
Definition: ZNCString.h:67
bool & b
Definition: ret.h:31
CPyRetString(CString &S)
Definition: ret.h:22
static PyObject * wrap(bool &B)
Definition: ret.h:33