//! constructor CTextureAnim::CTextureAnim() : FirstTime(true), m_Format(ETF_TEXTURE_2D) { #if MY_DEBUG_MODE setClassName("CTextureAnim"); #endif }
XGLException::XGLException(const char *m) { #ifdef USE_EMBEDDED_CLASSNAMES setClassName(__xvr2_GL_XGLException); #endif drv = 0; description = (char *)m; }
void IPLMorphologyHitMiss::init() { // init _result = NULL; // basic settings setClassName("IPLMorphologyHitMiss"); setTitle("Hit-Miss Morphology"); setCategory(IPLProcess::CATEGORY_MORPHOLOGY); // default value // 0 0 0 // 0 1 0 // 0 0 0 int nrElements = 9; _kernel.clear(); for(int i=0; i<nrElements; i++) { _kernel.push_back((i==4 ? 1 : 0)); } // inputs and outputs addInput("Image", IPL_IMAGE_BW); addOutput("Image", IPL_IMAGE_BW); // properties addProcessPropertyVectorInt("kernel", "Kernel", "", _kernel, IPL_WIDGET_BINARY_MORPHOLOGY_TRISTATE); }
XGLException::XGLException() { #ifdef USE_EMBEDDED_CLASSNAMES setClassName(__xvr2_GL_XGLException); #endif drv = 0; description = (char *)_xvr2gl_excep; }
//! constructor CWin32CursorControl::CWin32CursorControl() : m_IsVisible(true), m_InvWindowSize(0.0, 0.0), m_BorderX(0), m_BorderY(0), m_CursorTexture(NULL), m_CenteredCursor(true), m_CursorOffset(0.0f, 0.0f), m_CursorOveralOffset(0.0f, 0.0f), m_CursorSize(1, 1), m_Sensitivity(0.25f), m_CurCursorIdx(-1) { #if MY_DEBUG_MODE setClassName("CWin32CursorControl"); #endif const dev::SExposedDeviceData& data = DEVICE.getExposedDeviceData(); bool fullscreen = data.Video.FullScreen; m_WindowSize = data.Video.WindowSize; m_HWnd = reinterpret_cast<HWND>(data.Video.Win32.HWnd); if (m_WindowSize.Width!=0) m_InvWindowSize.Width = 1.0 / m_WindowSize.Width; if (m_WindowSize.Height!=0) m_InvWindowSize.Height = 1.0 / m_WindowSize.Height; setRelativeSize(core::dimension2d<f32>(0.1f, 0.1f)); if (!fullscreen) { m_BorderX = GetSystemMetrics(SM_CXDLGFRAME); m_BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYDLGFRAME); } }
// constructor Taxi::Taxi( double f ) : Vehicle( 4, 6, "yellow", f, 5 ) { customers = false; setClassName( "Taxi" ); } // end class Taxi constructor
/* * Constructor. */ Perturbation::Perturbation(int size, int rank) : ParamComposite(), size_(size), rank_(rank), nParameters_(0), mode_(0) { setClassName("Perturbation"); }
HippoCanvas::HippoCanvas() : canvasWidthReq_(0), canvasHeightReq_(0), canvasX_(0), canvasY_(0), hscrollNeeded_(false), vscrollNeeded_(false), hscrollbarPolicy_(HIPPO_SCROLLBAR_NEVER), vscrollbarPolicy_(HIPPO_SCROLLBAR_NEVER), containsMouse_(false), pointer_(HIPPO_CANVAS_POINTER_UNSET), lastMoveX_(-1), lastMoveY_(-1) { HippoCanvasContextWin *context; setClassName(L"HippoCanvasClass"); setClassStyle(CS_HREDRAW | CS_VREDRAW); setTitle(L"Canvas"); context = hippo_canvas_context_win_new(this); context_ = context; g_object_unref((void*) context); // lose the extra reference g_assert(HIPPO_IS_CANVAS_CONTEXT(context_)); hscroll_ = new HippoScrollbar(); hscroll_->Release(); // lose extra ref hscroll_->setOrientation(HIPPO_ORIENTATION_HORIZONTAL); vscroll_ = new HippoScrollbar(); vscroll_->Release(); hscroll_->setParent(this); vscroll_->setParent(this); tooltip_ = new HippoToolTip(); tooltip_->Release(); }
void IPLCanny::init() { // init _result = NULL; _binaryImage = NULL; _orientedImage = NULL; // basic settings setClassName("IPLCanny"); setTitle("Canny Edge Detector"); setCategory(IPLProcess::CATEGORY_LOCALOPERATIONS); setOpenCVSupport(IPLOpenCVSupport::OPENCV_ONLY); setDescription("The Canny edge detector delivers the magnitude and the gradient of the edge " "image. Thresholding has to be done by an appropriate operator. The σ value " "is used for both, smoothing and derivation operation."); // inputs and outputs addInput("Image", IPLData::IMAGE_COLOR); addOutput("Magnitude", IPLImage::IMAGE_GRAYSCALE); addOutput("Edge", IPLImage::IMAGE_GRAYSCALE); addOutput("Gradient", IPLImage::IMAGE_GRAYSCALE); // properties addProcessPropertyInt("window", "Window", "", 3, IPL_WIDGET_SLIDER_ODD, 3, 7); addProcessPropertyDouble("sigma", "Sigma", "", 1.5, IPL_WIDGET_SLIDER, 0.5, 10); addProcessPropertyDouble("lowThreshold", "Low Threshold", "", 0.3, IPL_WIDGET_SLIDER, 0.0, 1.0); addProcessPropertyDouble("highThreshold", "Hight Threshold", "Thresholds for the hysteresis procedure", 0.6, IPL_WIDGET_SLIDER, 0.0, 1.0); }
OldUDPSocket::OldUDPSocket(const String &_addrs, int _port){ #ifdef USE_EMBEDDED_CLASSNAMES setClassName(__xvr2_Net_OldUDPSocket); #endif IPv4Address addr(_addrs); flags = MSG_NOSIGNAL; port = _port; bzero(&ipv4addr, sizeof(struct ::sockaddr_in)); ipv4addr.sin_family = AF_INET; ipv4addr.sin_port = htons(_port); ipv4addr.sin_addr = *addr.address(); tsock = socket(AF_INET, SOCK_DGRAM, 0); if(tsock < 0){ switch(errno){ case EMFILE: throw ProcOutOfFileDescriptors(); break; case ENFILE: throw SysOutOfFileDescriptors(); break; default: throw IOException(); } } }
SSLContextCreation::SSLContextCreation(){ #ifdef USE_EMBEDDED_CLASSNAMES setClassName((char *)__xvr2_Net_SSLContextCreation); #endif //description = _desc_SSLContextCreation; description = (char *)ERR_lib_error_string(ERR_get_error()); }
SSLGeneric::SSLGeneric(){ #ifdef USE_EMBEDDED_CLASSNAMES setClassName((char *)__xvr2_Net_SSLGeneric); #endif //description = (char *)_desc_SSLGeneric; description = (char *)ERR_lib_error_string(ERR_get_error()); }
AccessClass::AccessClass(RubyValue className, RubyValue methodInfos, RubyValue signalInfos, RubyValue propertyInfos) { setClassName(className.to<QByteArray>()); protect([&] { rb_check_array_type(methodInfos); rb_check_array_type(signalInfos); rb_check_array_type(propertyInfos); }); for (int i = 0; i < RARRAY_LEN(VALUE(methodInfos)); ++i) { RubyValue info = RARRAY_AREF(VALUE(methodInfos), i); auto nameSym = info.send("name"); addMethod(nameSym.to<QByteArray>(), nameSym.toID(), info.send("params").to<QList<QByteArray>>()); } for (int i = 0; i < RARRAY_LEN(VALUE(signalInfos)); ++i) { RubyValue info = RARRAY_AREF(VALUE(signalInfos), i); auto nameSym = info.send("name"); addSignal(nameSym.to<QByteArray>(), nameSym.toID(), info.send("params").to<QList<QByteArray>>()); } for (int i = 0; i < RARRAY_LEN(VALUE(propertyInfos)); ++i) { RubyValue info = RARRAY_AREF(VALUE(propertyInfos), i); addProperty(info.send("name").to<QByteArray>(), info.send("getter").toID(), info.send("setter").toID(), Property::Flag::Readable | Property::Flag::Writable, true, info.send("notifier").toID()); } }
void IPLSynthesize::init() { // init _result = NULL; _type = 0; _width = 512; _height = 512; _amplitude = 0.5f; _offset = 0.5f; _wavelength = 8; _direction = 0; _decay = 0; // basic settings setClassName("IPLSynthesize"); setTitle("Synthesize Image"); setCategory(IPLProcess::CATEGORY_IO); setIsSource(true); // inputs and outputs addOutput("Image", IPL_IMAGE_GRAYSCALE); // all properties which can later be changed by gui addProcessPropertyInt("type", "Type:Flat|Plane Wave|Center Wave","flat|plane|radial", _type, IPL_WIDGET_GROUP); addProcessPropertyInt("width", "Width","", _width, IPL_WIDGET_SLIDER, 1, 1024); addProcessPropertyInt("height", "Height","", _height, IPL_WIDGET_SLIDER, 1, 1024); addProcessPropertyDouble("amplitude", "Amptlitude","", _amplitude, IPL_WIDGET_SLIDER, 0.0f, 1.0f); addProcessPropertyDouble("offset", "Offset","", _offset, IPL_WIDGET_SLIDER, 0.0f, 1.0f); addProcessPropertyInt("wavelength", "Wavelength","", _wavelength, IPL_WIDGET_SLIDER, 1, 1024); addProcessPropertyInt("plane_direction", "Direction","", _direction, IPL_WIDGET_SLIDER, 0, 360); addProcessPropertyInt("decay", "Decay","", _decay, IPL_WIDGET_SLIDER, 0, 1024); addProcessPropertyColor("flat_color", "Color","", IPLColor(0,0,0), IPL_WIDGET_COLOR_RGB); }
void IPLMergePlanes::init() { // init _result = NULL; _inputA = NULL; _inputB = NULL; _inputC = NULL; _inputType = 0; // basic settings setClassName("IPLMergePlanes"); setTitle("Merge Planes"); setCategory(IPLProcess::CATEGORY_CONVERSIONS); setDescription("Converts color planes into a color image. The input planes may be images in" "the RGB, HSI, HLS, or HSV color system"); // properties addProcessPropertyInt("input_type", "Color Model:RGB|HSV|HSL", "", _inputType, IPL_WIDGET_RADIOBUTTONS); // inputs and outputs addInput("Plane 1", IPLData::IMAGE_GRAYSCALE); addInput("Plane 2", IPLData::IMAGE_GRAYSCALE); addInput("Plane 3", IPLData::IMAGE_GRAYSCALE); addOutput("Image", IPLData::IMAGE_COLOR); }
//! constructor CGameTasksManager::CGameTasksManager() : GameTasksCount(0) { #if MY_DEBUG_MODE setClassName("CGameTasksManager"); #endif }
PrepareInput::PrepareInput(Buffer* dataMean, bool useCenterOnly, bool needsFlip, bool doRandomSample, int imageSize, int rescaledSize, bool isMeanChanneled) : _useCenterOnly(useCenterOnly), _needsFlip(needsFlip), _doRandomSample(doRandomSample), _imageSize(imageSize), _rescaledSize(rescaledSize) { assert(dataMean != NULL); Dimensions expectedDims(_rescaledSize, _rescaledSize, kOutputChannels); dataMean->reshape(expectedDims); Dimensions outputDims(_imageSize, _imageSize, kOutputChannels); _dataMean = new Buffer(outputDims); const int deltaX = (_rescaledSize - _imageSize); const int deltaY = (_rescaledSize - _imageSize); const int marginX = (deltaX / 2); const int marginY = (deltaY / 2); if (isMeanChanneled) { Buffer* fromChanneled = convert_from_channeled_rgb_image(dataMean); crop_and_flip_image(_dataMean, fromChanneled, marginX, marginY, false); delete fromChanneled; } else { crop_and_flip_image(_dataMean, dataMean, marginX, marginY, false); } _dataMean->setName("_dataMean"); setClassName("PrepareInput"); }
void IPLUndistort::init() { // init _result = NULL; // basic settings setClassName("IPLUndistort"); setTitle("Undistort Image"); setDescription("The function transforms an image to compensate radial and tangential lens distortion."); setCategory(IPLProcess::CATEGORY_GEOMETRY); setOpenCVSupport(IPLProcess::OPENCV_ONLY); setKeywords("distortion, undistortion, barrel, lens correction"); // inputs and outputs addInput("Image", IPL_IMAGE_COLOR); addOutput("Image", IPL_IMAGE_COLOR); // properties addProcessPropertyInt("f", "f", "Focal Length", 1000, IPL_WIDGET_SLIDER, 0, 10000.0); addProcessPropertyDouble("p1", "p1", "", 0.0, IPL_WIDGET_SLIDER, -10.0, 10.0); addProcessPropertyDouble("p2", "p2", "Tangential Distortion", 0.0, IPL_WIDGET_SLIDER, -10.0, 10.0); addProcessPropertyDouble("k1", "k1", "", 0.0, IPL_WIDGET_SLIDER, -100.0, 100.0); addProcessPropertyDouble("k2", "k2", "", 0.0, IPL_WIDGET_SLIDER, -100.0, 100.0); addProcessPropertyDouble("k3", "k3", "Radial Distortion", 0.0, IPL_WIDGET_SLIDER, -100.0, 100.0); }
void SoUnknownEngine::copyContents(const SoFieldContainer *fromFC, SbBool copyConnections) // //////////////////////////////////////////////////////////////////////// { // Make sure the copy has the correct class name const SoUnknownEngine *fromUnk = (const SoUnknownEngine *) fromFC; setClassName(fromUnk->className); // For each input in the original engine, create a new input and add // it to the new engine // NOTE: We can't use SoEngine::copyContents() to copy the field // data, since that uses SoFieldData::overlay(), which assumes the // fields have the same offsets in both engines. Instead, we just // copy the field values ourselves. const SoFieldData *fromData = fromUnk->getFieldData(); SoFieldData *toData = (SoFieldData *) getFieldData(); int i; for (i = 0; i < fromData->getNumFields(); i++) { SoField *fromField = fromData->getField(fromUnk, i); const SbName fieldName = fromData->getFieldName(i); SoType fieldType = fromField->getTypeId(); SoField *toField = (SoField *) (fieldType.createInstance()); toField->enableNotify(FALSE); toField->setContainer(this); toField->setDefault(TRUE); toField->enableNotify(TRUE); toData->addField(this, fieldName.getString(), toField); toField->setContainer(this); toField->copyFrom(*fromField); toField->setIgnored(fromField->isIgnored()); toField->setDefault(fromField->isDefault()); toField->fixCopy(copyConnections); if (fromField->isConnected() && copyConnections) toField->copyConnection(fromField); } // Copy the outputs SoEngineOutputData *toOutData = (SoEngineOutputData *) getOutputData(); SoEngineOutputList outList; fromUnk->getOutputs(outList); for(i = 0; i < outList.getLength(); i++) { SoEngineOutput *newOut = new SoEngineOutput; const SoType outType = outList[i]->getConnectionType(); SbName outName; getOutputName( outList[i], outName ); toOutData->addOutput(this, outName.getString(), newOut, outType); newOut->setContainer(this); } }
Vector2::Vector2(const Scalar x, const Scalar y){ #ifdef USE_EMBEDDED_CLASSNAMES setClassName(__xvr2_Math_Vector2); #endif c[0] = x; c[1] = y; mag = -1; }
Vector2::Vector2(const Vector2 &v){ #ifdef USE_EMBEDDED_CLASSNAMES setClassName(__xvr2_Math_Vector2); #endif c[0] = v.c[0]; c[1] = v.c[1]; mag = v.mag; }
//! constructor CCriticalSection::CCriticalSection() { #if MY_DEBUG_MODE setClassName("CCriticalSection"); #endif InitializeCriticalSection(&CriticalSection); }
//! constructor CGameNodeItem::CGameNodeItem( scn::ISceneNode* n, SGameNodeParams ¶ms ) : IGameNodeItem(n, SGameNodeParams(params, EGNT_ITEM)) { #if MY_DEBUG_MODE setClassName("CGameNodeItem"); #endif }
//! constructor CSceneNodeAnimatorRotation::CSceneNodeAnimatorRotation( u32 time, const core::vector3df& rotation ) : ISceneNodeAnimator(time), Rotation(rotation) { #if MY_DEBUG_MODE setClassName("CSceneNodeAnimatorRotation"); #endif }
/* * Default constructor. */ Distribution::Distribution() : histogram_(), min_(0.0), max_(0.0), binWidth_(0.0), nBin_(0), nSample_(0), nReject_(0) { setClassName("Distribution"); }
//! constructor CGameNodeLight::CGameNodeLight( scn::ISceneNode* n, SGameNodeParams ¶ms ) : IGameNodeLight(n, SGameNodeParams(params, EGNT_LIGHT)) { #if MY_DEBUG_MODE setClassName("CGameNodeLight"); #endif }
WinGui::EditBox::EditBox(unsigned int _type){ type = _type; setClassName("RICHEDIT"); newClassReg(false); setType(type); memset(&format, NULL, sizeof(CHARFORMAT2)); format.cbSize = sizeof(CHARFORMAT2); text = new char; }
SSLContext::SSLContext(int _method){ #ifdef USE_EMBEDDED_CLASSNAMES setClassName(__xvr2_Net_SSLContext); #endif __init_ssl_library(this); pem = 0; method = _method; ctx = 0; mydata = 0; switch(method){ case SSL_V2: ctx = SSL_CTX_new(SSLv2_method()); break; case SSL_V2_CLIENT: ctx = SSL_CTX_new(SSLv2_client_method()); break; case SSL_V2_SERVER: ctx = SSL_CTX_new(SSLv2_server_method()); break; case SSL_V3: ctx = SSL_CTX_new(SSLv3_method()); break; case SSL_V3_CLIENT: ctx = SSL_CTX_new(SSLv3_client_method()); break; case SSL_V3_SERVER: ctx = SSL_CTX_new(SSLv3_server_method()); break; case SSL_V23_CLIENT: ctx = SSL_CTX_new(SSLv23_client_method()); break; case SSL_V23_SERVER: ctx = SSL_CTX_new(SSLv23_server_method()); break; case SSL_V23: default: ctx = SSL_CTX_new(SSLv23_method()); } if(ctx == 0){ throw SSLContextCreation(); } //Initialize password callback __ssl_ctx_cb_args *x; x = new __ssl_ctx_cb_args(this, 0, 0); mydata = x; #ifdef USE_DEBUG debugmsgln(this, "Initializing password callback..."); #endif SSL_CTX_set_default_passwd_cb((SSL_CTX *)ctx, passwdCB); #ifdef USE_DEBUG debugmsgln(this, "Initializing default password callback userdata..."); #endif SSL_CTX_set_default_passwd_cb_userdata((SSL_CTX *)ctx, mydata); }
CTextSceneNode::CTextSceneNode( ISceneNode* parent, s32 id, vid::IFont* font, const c8* text, img::SColor color ) : ITextSceneNode(parent, id), m_Text(text), m_TextColor(color), m_Font(font) { #ifdef _DEBUG setClassName("CTextSceneNode"); #endif SAFE_GRAB(m_Font); }
AMetaObject::AMetaObject(const QString &objectclass, const QString &objectname, AMetaObject *parent) :QObject( parent ) { setObjectName( objectname ); setClassName( objectclass ); setDescription(""); setId( 0 ); if ( parent ) parent->addChild( this ); }