text
stringlengths
4
6.14k
/* * Simple positive sanity test on watchdog chain. * * These tests do not ensure proper functioning of watchdog chain, just that a properly configured * watchdog chain does not interfere with normal operation. * * Copyright (C) Sierra Wireless Inc. */ #include "legato.h" #include "watchdogChain.h" // Number of times to test kicking watchdog. Needs to be such that KICK_COUNT*SLEEP_TIME is // greater than watchdog timeout (5s) #define KICK_COUNT 5 // Amount of time between kicks (in seconds) #define SLEEP_TIME 2 COMPONENT_INIT { int i; // On failure program will exit, so all tests are LE_TEST_OK(true, ...) LE_TEST_PLAN(1 + 2*KICK_COUNT); le_wdogChain_Init(4); LE_TEST_OK(true, "watchdog chain initialized"); for (i = 0; i < KICK_COUNT; ++i) { le_wdogChain_Kick((0 + i) % 4); le_wdogChain_Kick((1 + i) % 4); le_wdogChain_Kick((2 + i) % 4); le_wdogChain_Kick((3 + i) % 4); le_thread_Sleep(SLEEP_TIME); LE_TEST_OK(true, "4/4 active watchdogs: program running after %d seconds", (i+1)*2); } le_wdogChain_Stop(0); le_wdogChain_Stop(1); le_wdogChain_Stop(2); for (i = 0; i < KICK_COUNT; ++i) { le_wdogChain_Kick(3); le_thread_Sleep(SLEEP_TIME); LE_TEST_OK(true, "1/4 active watchdogs: program running after %d seconds", (i+1)*2); } LE_TEST_EXIT; }
/* * opencog/spatial/math/Plane.h * * Copyright (C) 2002-2009 Novamente LLC * All Rights Reserved * Author(s): Samir Araujo * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License v3 as * published by the Free Software Foundation and including the exceptions * at http://opencog.org/wiki/Licenses * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program; if not, write to: * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _SPATIAL_MATH_PLANE_H_ #define _SPATIAL_MATH_PLANE_H_ #include <string> #include <opencog/util/exceptions.h> #include <opencog/spatial/math/Vector3.h> #include <opencog/spatial/math/Matrix4.h> namespace opencog { /** \addtogroup grp_spatial * @{ */ namespace spatial { namespace math { class Plane { public: /** * Classifies the sides of the plane */ enum SIDE { NEGATIVE, POSITIVE, INTERSECT }; /** * Simple constructor */ Plane( void ); /** * Copy constructor * @param plane */ Plane( const Plane& plane ); /** * Use a normal and a distance from origin to build a plane * @param normal * @param distance */ Plane( const Vector3& normal, double distance ); /** * Build a plane using three arbitrary points * @param pointA * @param pointB * @param pointC */ Plane( const Vector3& pointA, const Vector3& pointB, const Vector3& pointC ); /** * Set new normal and distance values to this plane * @param normal * @param distance */ void set( const Vector3& normal, double distance ); /** * Get a 4 dimension vector that represents this plane * @return */ Vector4 getVector4( void ); /** * Get the distance between this plane and a given point * @param point * @return */ double getDistance( const Vector3& point ); /** * Identifies the side of the plane a given point is positioned * @param point * @return */ SIDE getSide( const Vector3& point ); /** * Apply a transformation matrix to this plane * @param transformation */ void transformSelf( const Matrix4& transformation ); /** * Get the intersection point between this plane and other two * @param plane2 * @param plane3 * @return */ Vector3 getIntersectionPoint( const Plane& plane2, const Plane& plane3 ); /* * */ bool operator==( const Plane& other ) const; /* * */ std::string toString(void) const; inline virtual ~Plane( void ) { } Vector3 normal; double distanceFromOrigo; }; // Plane } // math } // spatial /** @}*/ } // opencog #endif // _SPATIAL_MATH_PLANE_H_
/** * @author Olaf Radicke <briefkasten@olaf-rdicke.de> * @date 2013-2014 * @copyright * Copyright (C) 2013 Olaf Radicke <briefkasten@olaf-rdicke.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or later * version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef CORE_PROJECTRESETCONTROLLER_H #define CORE_PROJECTRESETCONTROLLER_H #include <core/model/MakefileData.h> #include <core/model/ProjectData.h> #include <core/model/UserSession.h> #include <tnt/httprequest.h> #include <tnt/httpreply.h> #include <string> namespace Tww { namespace Core { /** * @class ProjectResetController This class is the controller of the * Site core_projectreset. In this site the user can reset the project data. */ class ProjectResetController { public: ProjectResetController( Tww::Core::UserSession& _userSession, Tww::Core::ProjectData& _projectData, Tww::Core::MakefileData& _makefileData ): warning(false), makefileData( _makefileData ), projectData( _projectData ), userSession( _userSession ) {}; /** * This function is called when the site ist (re-)loaded. */ void worker ( tnt::HttpRequest& request, tnt::HttpReply& reply, tnt::QueryParams& qparam ); std::string feedback; /** * If this set true than the feeback text get a warning css stile. */ bool warning; private: /** * Represent the makefile data. */ Tww::Core::MakefileData& makefileData; /** * Class with project data. */ Tww::Core::ProjectData& projectData; /** * Session information. */ Tww::Core::UserSession& userSession; /** * Get the path to file "./tntwebwizard.pro". */ std::string getProjectFilePath(); /** * Get the path to file "./Makefile.tnt". */ std::string getMakefilePath(); }; } // namespace core } // namespace Tww #endif
/* * Copyright (c) 2005 University of Utah and the Flux Group. * * {{{EMULAB-LICENSE * * This file is part of the Emulab network testbed software. * * This file is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or (at * your option) any later version. * * This file is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public * License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this file. If not, see <http://www.gnu.org/licenses/>. * * }}} */ /** * @file test_path.c * * Path planning testing tool. */ #include "config.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "log.h" #include "obstacles.h" #include "pathPlanning.h" int debug = 0; #if defined(SIMPLE_PATH) #include "simple_path.c" #elif defined(MULTI_PATH) #include "multi_path.c" #else #error "No bounds/obstacles/robots defined!" #endif static void usage(const char *progname) { fprintf(stderr, "Usage: %s [OPTIONS]\n" "\n" "Use the path planner to move a robot from the first position\n" "to the second position and back again.\n" "\n" "Options:\n" " -h\t\tPrint this message\n" " -d\t\tIncrease debugging level and do not daemonize\n" " -i iter\tMaximum number of iterations\n" " -x float\tFirst X position for the robot\n" " -y float\tFirst Y position for the robot\n" " -u float\tSecond X position for the robot\n" " -v float\tSecond Y position for the robot\n", progname); } int main(int argc, char *argv[]) { int c, lpc, iterations = 50, retval = EXIT_SUCCESS; struct path_plan pp_init, pp; loginit(0, NULL); ob_init(); for (lpc = 0; obstacles[lpc].id != 0; lpc++) { ob_add_obstacle(&obstacles[lpc]); } pp_data.ppd_bounds = bounds; pp_data.ppd_bounds_len = 1; pp_data.ppd_max_distance = 10; memset(&pp_init, 0, sizeof(pp)); pp_init.pp_robot = &robots[0]; pp_init.pp_speed = 0.2; while ((c = getopt(argc, argv, "di:x:y:u:v:")) != -1) { switch (c) { case 'd': debug += 1; break; case 'i': sscanf(optarg, "%d", &iterations); break; case 'x': sscanf(optarg, "%f", &pp_init.pp_actual_pos.x); break; case 'y': sscanf(optarg, "%f", &pp_init.pp_actual_pos.y); break; case 'u': sscanf(optarg, "%f", &pp_init.pp_goal_pos.x); break; case 'v': sscanf(optarg, "%f", &pp_init.pp_goal_pos.y); break; case 'h': default: usage(argv[0]); exit(0); break; } } if ((pp_init.pp_actual_pos.x == pp_init.pp_goal_pos.x) && (pp_init.pp_actual_pos.y == pp_init.pp_goal_pos.y)) { usage(argv[0]); exit(0); } pp = pp_init; for (lpc = 0; (lpc < iterations) && ((pp.pp_actual_pos.x != pp.pp_goal_pos.x) || (pp.pp_actual_pos.y != pp.pp_goal_pos.y)); lpc++) { switch (pp_plot_waypoint(&pp)) { case PPC_WAYPOINT: case PPC_NO_WAYPOINT: pp.pp_actual_pos = pp.pp_waypoint; break; case PPC_BLOCKED: case PPC_GOAL_IN_OBSTACLE: lpc = iterations; break; } } info("-reverse-\n"); pp = pp_init; pp.pp_actual_pos = pp_init.pp_goal_pos; pp.pp_goal_pos = pp_init.pp_actual_pos; for (lpc = 0; (lpc < iterations) && ((pp.pp_actual_pos.x != pp.pp_goal_pos.x) || (pp.pp_actual_pos.y != pp.pp_goal_pos.y)); lpc++) { switch (pp_plot_waypoint(&pp)) { case PPC_WAYPOINT: case PPC_NO_WAYPOINT: pp.pp_actual_pos = pp.pp_waypoint; break; case PPC_BLOCKED: case PPC_GOAL_IN_OBSTACLE: lpc = iterations; break; } } return retval; }
#pragma once #include <string> #include <vector> #include <memory> #include <map> #include "BanList.h" #include "entity/SMPlayer.h" #include "plugin/PluginLoadOrder.h" #include "minecraftpe/gamemode/GameType.h" #include "minecraftpe/entity/EntityUniqueID.h" class SMLevel; class SMOptions; class BanList; class SMList; class SMPlayer; class CommandMap; class Level; class PluginManager; class Minecraft; class LocalPlayer; class SMEntity; class SMLocalPlayer; class Plugin; class PluginCommand; class Player; class Entity; class Server { private: bool started; std::string serverDir; std::string pluginDir; SMLevel *level; Minecraft *server; SMOptions *options; BanList *banByName; BanList *banByIP; SMList *operators; SMList *whitelist; CommandMap *commandMap; PluginManager *pluginManager; SMLocalPlayer *localPlayer; std::string newVersion; int newVersionCode; std::vector<std::string> newChangelog; std::map<EntityUniqueID, SMEntity *> entityList; std::vector<SMPlayer *> players; public: Server(); ~Server(); void init(Minecraft *server, const std::string &path); void load(const std::string &path); void start(LocalPlayer *localPlayer, Level *level); void stop(); SMOptions *getOptions() const; void saveOptions(); void registerPlugin(Plugin *plugin); void loadPlugins(); void enablePlugins(PluginLoadOrder type); void disablePlugins(); const std::vector<SMPlayer *> &getOnlinePlayers() const; SMPlayer *getPlayer(const std::string &name) const; std::vector<SMPlayer *> matchPlayer(const std::string &partialName) const; SMPlayer *getPlayerExact(const std::string &name) const; SMLocalPlayer *getLocalPlayer() const; void addPlayer(SMPlayer *player); void removePlayer(SMPlayer *player); SMPlayer *getPlayer(Player *player) const; void removeEntity(Entity *entity); SMEntity *getEntity(Entity *entity); void kickPlayer(SMPlayer *player, const std::string &reason); void broadcastMessage(const std::string &message); void broadcastTranslation(const std::string &message, const std::vector<std::string> &params); void broadcastTip(const std::string &message); void broadcastPopup(const std::string &message, const std::string &subtitle = ""); int getMaxPlayers() const; int getPort() const; int getViewDistance() const; std::string getServerName() const; bool hasWhitelist() const; bool getPvP() const; void setWhitelist(bool value); void setPvP(bool value); bool dispatchCommand(SMPlayer *player, const std::string &commandLine); PluginCommand *getPluginCommand(const std::string &name); SMLevel *getLevel() const; BanList *getBanList(BanList::Type type) const; SMList *getWhitelistList() const; SMList *getOPList() const; void banIP(const std::string &address); void unbanIP(const std::string &address); void addWhitelist(const std::string &name); void removeWhitelist(const std::string &name); void reloadWhitelist(); void addOp(const std::string &name); void removeOp(const std::string &name); bool isWhitelisted(const std::string &name) const; bool isOp(const std::string &name) const; CommandMap *getCommandMap() const; PluginManager *getPluginManager() const; static std::string getGamemodeString(GameType type); static GameType getGamemodeFromString(const std::string &value); Minecraft *getServer() const; private: bool updateCheck(); void setVanillaCommands(); void loadPlugin(Plugin *plugin); };
#pragma once #include <QString> #include <QByteArray> class MotorFaultsMessage { public: MotorFaultsMessage(QByteArray& messageData); unsigned char M0ErrorFlags() const; unsigned char M1ErrorFlags() const; unsigned char M0LimitFlags() const; unsigned char M1LimitFlags() const; unsigned char M0CanRxErrorCount() const; unsigned char M0CanTxErrorCount() const; unsigned char M1CanRxErrorCount() const; unsigned char M1CanTxErrorCount() const; QString toString() const; private: const QByteArray messageData_; };
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/s1ap-r16.4.0/36413-g40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER` */ #include "S1AP_HFNModified.h" int S1AP_HFNModified_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0L && value <= 131071L)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) asn_per_constraints_t asn_PER_type_S1AP_HFNModified_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 17, -1, 0, 131071 } /* (0..131071) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_S1AP_HFNModified_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_HFNModified = { "HFNModified", "HFNModified", &asn_OP_NativeInteger, asn_DEF_S1AP_HFNModified_tags_1, sizeof(asn_DEF_S1AP_HFNModified_tags_1) /sizeof(asn_DEF_S1AP_HFNModified_tags_1[0]), /* 1 */ asn_DEF_S1AP_HFNModified_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HFNModified_tags_1) /sizeof(asn_DEF_S1AP_HFNModified_tags_1[0]), /* 1 */ { #if !defined(ASN_DISABLE_OER_SUPPORT) 0, #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) &asn_PER_type_S1AP_HFNModified_constr_1, #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ S1AP_HFNModified_constraint }, 0, 0, /* No members */ 0 /* No specifics */ };
/*************************************************************************\ * Copyright (C) Michael Kerrisk, 2016. * * * * This program is free software. You may use, modify, and redistribute it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation, either version 3 or (at your option) any * * later version. This program is distributed without any warranty. See * * the file COPYING.gpl-v3 for details. * \*************************************************************************/ /* Listing 63-3 */ /* demo_sigio.c A trivial example of the use of signal-driven I/O. */ #include <signal.h> #include <ctype.h> #include <fcntl.h> #include <termios.h> #include "tty_functions.h" /* Declaration of ttySetCbreak() */ #include "tlpi_hdr.h" static volatile sig_atomic_t gotSigio = 0; /* Set nonzero on receipt of SIGIO */ static void sigioHandler(int sig) { gotSigio = 1; } int main(int argc, char *argv[]) { int flags, j, cnt; struct termios origTermios; char ch; struct sigaction sa; Boolean done; /* Establish handler for "I/O possible" signal */ sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; sa.sa_handler = sigioHandler; if (sigaction(SIGIO, &sa, NULL) == -1) errExit("sigaction"); /* Set owner process that is to receive "I/O possible" signal */ if (fcntl(STDIN_FILENO, F_SETOWN, getpid()) == -1) errExit("fcntl(F_SETOWN)"); /* Enable "I/O possible" signaling and make I/O nonblocking for file descriptor */ flags = fcntl(STDIN_FILENO, F_GETFL); if (fcntl(STDIN_FILENO, F_SETFL, flags | O_ASYNC | O_NONBLOCK) == -1) errExit("fcntl(F_SETFL)"); /* Place terminal in cbreak mode */ if (ttySetCbreak(STDIN_FILENO, &origTermios) == -1) errExit("ttySetCbreak"); for (done = FALSE, cnt = 0; !done ; cnt++) { for (j = 0; j < 100000000; j++) continue; /* Slow main loop down a little */ if (gotSigio) { /* Is input available? */ gotSigio = 0; /* Read all available input until error (probably EAGAIN) or EOF (not actually possible in cbreak mode) or a hash (#) character is read */ while (read(STDIN_FILENO, &ch, 1) > 0 && !done) { printf("cnt=%d; read %c\n", cnt, ch); done = ch == '#'; } } } /* Restore original terminal settings */ if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &origTermios) == -1) errExit("tcsetattr"); exit(EXIT_SUCCESS); }
/* * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef AVUTIL_SAMPLEFMT_H #define AVUTIL_SAMPLEFMT_H /** * all in native-endian format */ enum AVSampleFormat { AV_SAMPLE_FMT_NONE = -1, AV_SAMPLE_FMT_U8, ///< unsigned 8 bits AV_SAMPLE_FMT_S16, ///< signed 16 bits AV_SAMPLE_FMT_S32, ///< signed 32 bits AV_SAMPLE_FMT_FLT, ///< float AV_SAMPLE_FMT_DBL, ///< double AV_SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if linking dynamically }; /** * Return the name of sample_fmt, or NULL if sample_fmt is not * recognized. */ const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt); /** * Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE * on error. */ enum AVSampleFormat av_get_sample_fmt(const char *name); /** * Generate a string corresponding to the sample format with * sample_fmt, or a header if sample_fmt is negative. * * @param buf the buffer where to write the string * @param buf_size the size of buf * @param sample_fmt the number of the sample format to print the * corresponding info string, or a negative value to print the * corresponding header. * @return the pointer to the filled buffer or NULL if sample_fmt is * unknown or in case of other errors */ char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt); /** * Return sample format bits per sample. * * @param sample_fmt the sample format * @return number of bits per sample or zero if unknown for the given * sample format */ int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt); #endif /* AVUTIL_SAMPLEFMT_H */
/* * Copyright 2015 BrewPi/Elco Jacobs. * Copyright 2015 Matthew McGowan. * * This file is part of BrewPi. * * BrewPi is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * BrewPi is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with BrewPi. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include "Platform.h" #include "ActuatorInterfaces.h" class ActuatorPin final: public ActuatorDigital, public ActuatorPinMixin { private: bool invert; uint8_t pin; public: ActuatorPin(uint8_t pin, bool invert); ~ActuatorPin() = default; void accept(VisitorBase & v) final { v.visit(*this); } void setState(State state, int8_t priority = 127) override final { digitalWrite(pin, ((state == State::Active) ^ invert) ? HIGH : LOW); } State getState() const override final { return ((digitalRead(pin) != LOW) ^ invert) ? State::Active : State::Inactive; } void update() override final {} // do nothing on periodic update void fastUpdate() override final {} // do nothing on fast update friend class ActuatorPinMixin; };
/* Copyright (C) 2015-2016 Claude SIMON (http://q37.info/contact/). This file is part of 'orgnzq' software. 'orgnzq' is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 'orgnzq' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with 'orgnzq'. If not, see <http://www.gnu.org/licenses/>. */ #ifndef PROLOG_INC_ # define PROLOG_INC_ # include "base.h" namespace prolog { BASE_ACD( SwitchProjectType ); BASE_ACD( DisplayProjectFilename ); BASE_ACD( LoadProject ); inline void Register( void ) { BASE_ACR( SwitchProjectType ); BASE_ACR( DisplayProjectFilename ); BASE_ACR( LoadProject ); }; void SetLayout( core::rSession & Session ); void SetCasting( core::rSession & Session ); void Display( core::rSession &Session); } #endif
#include <stdio.h> void f(int x){ if(x>2){ } } int main(){ int a = 3, b = 2; if(a>b){f(a);} else{f(b);} return 0; }
// // LocationSelectViewController.h // HospitalFinder // // Created by Ramesh Patel on 20/04/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> #import "MapKit/MapKit.h" #import "CoreLocation/CoreLocation.h" @interface LocationSelectViewController : UIViewController<UISearchBarDelegate,MKMapViewDelegate,MKReverseGeocoderDelegate,UITableViewDelegate,UITableViewDataSource> { MKMapView *userLocationAddMapView; CLLocationManager *locationManager; NSMutableArray *arrAddress; NSMutableArray *arrLat; NSMutableArray *arrLong; CLLocationCoordinate2D cordinate; } @property (retain, nonatomic) IBOutlet UITableView *tblView; - (IBAction)btncurrentClick:(id)sender; @property (retain, nonatomic) IBOutlet UISearchBar *searchBarLocation; @property (retain, nonatomic) IBOutlet UIButton *btncurrent; -(void)findLatLong; -(void)retryGeo; @end
/* * * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see <http://www.gnu.org/licenses/>. */ #ifndef SP_POSITIONER_H_ #define SP_POSITIONER_H_ #include "include/forms.h" #include <stdio.h> FL_FORM * positioner_create_spec_form( void ); void positioner_fill_in_spec_form( FL_OBJECT * obj ); void positioner_reread_spec_form( FL_OBJECT * obj ); void positioner_emit_spec_fd_code( FILE * fp, FL_OBJECT * obj ); void positioner_emit_spec_c_code( FILE * fp, FL_OBJECT * obj ); #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef CUSTOMEXECUTABLECONFIGURATIONWIDGET_H #define CUSTOMEXECUTABLECONFIGURATIONWIDGET_H #include <QWidget> QT_BEGIN_NAMESPACE class QCheckBox; class QLineEdit; class QComboBox; class QLabel; class QAbstractButton; QT_END_NAMESPACE namespace Utils { class DetailsWidget; class PathChooser; } namespace QtSupport { class CustomExecutableRunConfiguration; namespace Internal { class CustomExecutableConfigurationWidget : public QWidget { Q_OBJECT public: enum ApplyMode { InstantApply, DelayedApply}; CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc, ApplyMode mode); void apply(); // only used for DelayedApply bool isValid() const; signals: void validChanged(); private slots: void changed(); void executableEdited(); void argumentsEdited(const QString &arguments); void workingDirectoryEdited(); void termToggled(bool); void environmentWasChanged(); private: bool m_ignoreChange; CustomExecutableRunConfiguration *m_runConfiguration; Utils::PathChooser *m_executableChooser; QLineEdit *m_commandLineArgumentsLineEdit; Utils::PathChooser *m_workingDirectory; QCheckBox *m_useTerminalCheck; Utils::DetailsWidget *m_detailsContainer; }; } // namespace Internal } // namespace QtSupport #endif // CUSTOMEXECUTABLECONFIGURATIONWIDGET_H
/** * \file * * \brief AVR XMEGA Real Time Counter driver definitions * * Copyright (C) 2010 Atmel Corporation. All rights reserved. * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. The name of Atmel may not be used to endorse or promote products derived * from this software without specific prior written permission. * * 4. This software may only be redistributed and used in connection with an * Atmel AVR product. * * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ #ifndef DRIVERS_RTC_RTC_H #define DRIVERS_RTC_RTC_H #include <compiler.h> #include <conf_rtc.h> /** * \defgroup rtc_group Real Time Counter (RTC) * * This is a driver implementation for the XMEGA RTC. * * \section rtc_min_alarm_time Minimum allowed alarm time * * If current time is close to a time unit roll over, there is a risk to miss * this when using a value of 0. * * A safe use of this can be in an alarm callback. * * @{ */ /** * \def CONFIG_RTC_COMPARE_INT_LEVEL * \brief Configuration symbol for interrupt level to use on alarm * * Possible values: * - RTC_COMPINTLVL_LO_gc * - RTC_COMPINTLVL_MED_gc * - RTC_COMPINTLVL_HI_gc */ #ifdef __DOXYGEN__ # define CONFIG_RTC_COMPARE_INT_LEVEL #endif /** * \def CONFIG_RTC_OVERFLOW_INT_LEVEL * \brief Configuration symbol for interrupt level to use on overflow * * Possible values: * - RTC_OVFINTLVL_LO_gc * - RTC_OVFINTLVL_MED_gc * - RTC_OVFINTLVL_HI_gc */ #ifdef __DOXYGEN__ # define CONFIG_RTC_OVERFLOW_INT_LEVEL #endif /** * \def CONFIG_RTC_PRESCALER * \brief Configuration symbol for prescaler to use * * Possible values: * - RTC_PRESCALER_DIV1_gc * - RTC_PRESCALER_DIV2_gc * - RTC_PRESCALER_DIV8_gc * - RTC_PRESCALER_DIV16_gc * - RTC_PRESCALER_DIV64_gc * - RTC_PRESCALER_DIV256_gc * - RTC_PRESCALER_DIV1024_gc */ #ifdef __DOXYGEN__ # define CONFIG_RTC_PRESCALER #endif /** * \def CONFIG_RTC_CLOCK_SOURCE * \brief Configuration symbol for which clock source to use * * Possible values: * - CLK_RTCSRC_ULP_gc * - CLK_RTCSRC_TOSC_gc * - CLK_RTCSRC_RCOSC_gc * - CLK_RTCSRC_TOSC32_gc */ #ifdef __DOXYGEN__ # define CONFIG_RTC_CLOCK_SOURCE #endif /** * \brief Callback definition for alarm callback * * \param time The time of the alarm */ typedef void (*rtc_callback_t)(uint32_t time); void rtc_set_callback(rtc_callback_t callback); void rtc_set_time(uint32_t time); uint32_t rtc_get_time(void); void rtc_set_alarm(uint32_t time); bool rtc_alarm_has_triggered(void); /** * \brief Set alarm relative to current time * * \param offset Offset to current time. This is minimum value, so the alarm * might happen at up to one time unit later. See also \ref * rtc_min_alarm_time * * \note Due to errata, this can be unsafe to do shortly after waking up from * sleep. */ static inline void rtc_set_alarm_relative(uint32_t offset) { rtc_set_alarm(rtc_get_time() + offset); } extern void rtc_init(void); //! @} #endif /* RTC_H */
/* * dLeyna * * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Ludovic Ferrandis <ludovic.ferrandis@intel.com> * Regis Merlino <regis.merlino@intel.com> * */ #ifndef DLS_SERVICE_TASK_H__ #define DLS_SERVICE_TASK_H__ #include <glib.h> #include <libgupnp/gupnp-service-proxy.h> #include <libdleyna/core/task-atom.h> #include "server.h" typedef struct dls_service_task_t_ dls_service_task_t; typedef GUPnPServiceProxyAction *(*dls_service_task_action) (dls_service_task_t *task, GUPnPServiceProxy *proxy, gboolean *failed); const char *dls_service_task_create_source(void); void dls_service_task_add(const dleyna_task_queue_key_t *queue_id, dls_service_task_action action, dls_device_t *device, GUPnPServiceProxy *proxy, GUPnPServiceProxyActionCallback action_cb, GDestroyNotify free_func, gpointer cb_user_data); void dls_service_task_begin_action_cb(GUPnPServiceProxy *proxy, GUPnPServiceProxyAction *action, gpointer user_data); void dls_service_task_process_cb(dleyna_task_atom_t *atom, gpointer user_data); void dls_service_task_cancel_cb(dleyna_task_atom_t *atom, gpointer user_data); void dls_service_task_delete_cb(dleyna_task_atom_t *atom, gpointer user_data); dls_device_t *dls_service_task_get_device(dls_service_task_t *task); gpointer *dls_service_task_get_user_data(dls_service_task_t *task); #endif /* DLS_SERVICE_TASK_H__ */
/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the demos of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef BROWSERWINDOW_H #define BROWSERWINDOW_H #include <QWidget> class QTimeLine; class QUrl; class BrowserView; class HomeView; class BrowserWindow : public QWidget { Q_OBJECT public: BrowserWindow(); private slots: void initialize(); void navigate(const QUrl &url); void gotoAddress(const QString &address); public slots: void showBrowserView(); void showHomeView(); void slide(int); protected: void keyReleaseEvent(QKeyEvent *event); void resizeEvent(QResizeEvent *event); private: HomeView *m_homeView; BrowserView *m_browserView; QTimeLine *m_timeLine; }; #endif // BROWSERWINDOW_H
/***************************************************************************** * VLCMediaDiscoverer.h: VLCKit.framework VLCMediaDiscoverer header ***************************************************************************** * Copyright (C) 2007 Pierre d'Herbemont * Copyright (C) 2015 Felix Paul Kühne * Copyright (C) 2007, 2015 VLC authors and VideoLAN * $Id$ * * Authors: Pierre d'Herbemont <pdherbemont # videolan.org> * Felix Paul Kühne <fkuehne # videolan.org> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #import <Foundation/Foundation.h> #import "VLCMediaList.h" @class VLCLibrary; @class VLCMediaList; @class VLCMediaDiscoverer; /** * VLCMediaDiscovererDelegate */ @protocol VLCMediaDiscovererDelegate <NSObject> @optional /** * delegate method triggered when a discoverer was started * * \param the discoverer that was started */ - (void)discovererStarted:(VLCMediaDiscoverer *)theDiscoverer; /** * delegate method triggered when a discoverer was stopped * * \param the discoverer that was stopped */ - (void)discovererStopped:(VLCMediaDiscoverer *)theDiscoverer; @end /** * VLCMediaDiscoverer */ @interface VLCMediaDiscoverer : NSObject @property (nonatomic, readonly) VLCLibrary *libraryInstance; /** * delegate property to listen to start/stop events */ @property (weak, readwrite) id<VLCMediaDiscovererDelegate> delegate; /** * Maintains a list of available media discoverers. This list is populated as new media * discoverers are created. * \return A list of available media discoverers. */ + (NSArray *)availableMediaDiscoverer; /* Initializers */ /** * Initializes new object with specified name. * \param aServiceName Name of the service for this VLCMediaDiscoverer object. * \returns Newly created media discoverer. * \note with VLCKit 3.0 and above, you need to start the discoverer explicitly after creation */ - (instancetype)initWithName:(NSString *)aServiceName; /** * start media discovery * \returns -1 if start failed, otherwise 0 */ - (int)startDiscoverer; /** * stop media discovery */ - (void)stopDiscoverer; /** * a read-only property to retrieve the list of discovered media items */ @property (weak, readonly) VLCMediaList *discoveredMedia; /** * returns the localized name of the discovery module if available, otherwise in US English */ @property (readonly, copy) NSString *localizedName; /** * read-only property to check if the discovery service is active * \return boolean value */ @property (readonly) BOOL isRunning; @end
/**************************************************************************** * Copyright 2015 Evan Drumwright * This library is distributed under the terms of the Apache V2.0 License ****************************************************************************/ #ifndef PLANARJOINT #error This class is not to be included by the user directly. Use PlanarJointd.h or PlanarJointf.h instead. #endif /// Defines a joint that constrains motion to a plane class PLANARJOINT : public virtual JOINT { public: PLANARJOINT(); virtual void update_spatial_axes(); virtual void determine_q(VECTORN& q); virtual boost::shared_ptr<const POSE3> get_induced_pose(); virtual unsigned num_dof() const { return 3; } virtual void evaluate_constraints(REAL C[]); virtual void calc_constraint_jacobian(bool inboard, MATRIXN& Cq); virtual void calc_constraint_jacobian_dot(bool inboard, MATRIXN& Cq); virtual bool is_singular_config() const { return false; } void set_normal(const VECTOR3& normal); virtual const std::vector<SVELOCITY>& get_spatial_axes_dot() { return _s_dot; } protected: void update_offset(); /// Vectors orthogonal to the normal vector in the outboard link frame VECTOR3 _vi, _vj; /// The plane normal and tangents (global frame) VECTOR3 _normal, _tan1, _tan2; /// The plane offset such that n'*x = offset REAL _offset; /// The derivative of the spatial axis std::vector<SVELOCITY> _s_dot; }; // end class
/****************************************************************** * * Test file for the XSLT Bindings Generator (XBiG) * * It handles a struct with an inner class * ******************************************************************/ #ifdef WIN32 #define EXPORT __declspec(dllexport) #else #define EXPORT #endif struct EXPORT A { A(); class EXPORT B { public: float x (int y); double z; }; int a(float b); };
#ifndef BIONET_SWIG_TYPES #define BIONET_SWIG_TYPES typedef struct { bionet_hab_t * this; } Hab; typedef struct { void * hab; void * hp; } HabUserData; typedef struct { bionet_node_t * this; } Node; typedef struct { bionet_resource_t * this; } Resource; typedef struct { bionet_datapoint_t * this; } Datapoint; typedef struct { bionet_value_t * this; } Value; typedef struct { bionet_bdm_t * this; } Bdm; typedef struct { bionet_epsilon_t * this; bionet_resource_data_type_t datatype; } Epsilon; typedef struct { bionet_stream_t * this; } Stream; typedef struct { bionet_event_t * this; } Event; #endif /* BIONET_SWIG_TYPES */
/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial Usage ** Licensees holding valid Qt Commercial licenses may use this file in ** accordance with the Qt Commercial License Agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Nokia. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QEVENT_P_H #define QEVENT_P_H #include <QtCore/qglobal.h> #include <QtCore/qurl.h> #include <QtGui/qevent.h> QT_BEGIN_NAMESPACE // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // // ### Qt 5: remove class QKeyEventEx : public QKeyEvent { public: QKeyEventEx(Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text, bool autorep, ushort count, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers); QKeyEventEx(const QKeyEventEx &other); ~QKeyEventEx(); protected: quint32 nScanCode; quint32 nVirtualKey; quint32 nModifiers; friend class QKeyEvent; }; // ### Qt 5: remove class QMouseEventEx : public QMouseEvent { public: QMouseEventEx(Type type, const QPointF &pos, const QPoint &globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); ~QMouseEventEx(); protected: QPointF posF; friend class QMouseEvent; }; class QTouchEventTouchPointPrivate { public: inline QTouchEventTouchPointPrivate(int id) : ref(1), id(id), state(Qt::TouchPointReleased), pressure(qreal(-1.)) { } inline QTouchEventTouchPointPrivate *detach() { QTouchEventTouchPointPrivate *d = new QTouchEventTouchPointPrivate(*this); d->ref = 1; if (!this->ref.deref()) delete this; return d; } QAtomicInt ref; int id; Qt::TouchPointStates state; QRectF rect, sceneRect, screenRect; QPointF normalizedPos, startPos, startScenePos, startScreenPos, startNormalizedPos, lastPos, lastScenePos, lastScreenPos, lastNormalizedPos; qreal pressure; }; class QNativeGestureEvent : public QEvent { public: enum Type { None, GestureBegin, GestureEnd, Pan, Zoom, Rotate, Swipe }; QNativeGestureEvent() : QEvent(QEvent::NativeGesture), gestureType(None), percentage(0) #ifdef Q_WS_WIN , sequenceId(0), argument(0) #endif { } Type gestureType; float percentage; QPoint position; float angle; #ifdef Q_WS_WIN ulong sequenceId; quint64 argument; #endif }; class QGestureEventPrivate { public: inline QGestureEventPrivate(const QList<QGesture *> &list) : gestures(list), widget(0) { } QList<QGesture *> gestures; QWidget *widget; QMap<Qt::GestureType, bool> accepted; QMap<Qt::GestureType, QWidget *> targetWidgets; }; class QFileOpenEventPrivate { public: inline QFileOpenEventPrivate(const QUrl &url) : url(url) { } QUrl url; }; QT_END_NAMESPACE #endif // QEVENT_P_H
/* Copyright (C) 2011 Samsung Electronics This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef WebKitDOM_EventTarget_Private_h #define WebKitDOM_EventTarget_Private_h #include "EventTarget.h" #ifdef __cplusplus extern "C" { #endif WebCore::EventTarget* _to_webcore_eventtarget(WebKitDOM_EventTarget* kitObj); WebKitDOM_EventTarget* _to_webkit_eventtarget(WebCore::EventTarget* coreObj, WebKitDOM_EventTarget* ret); #ifdef __cplusplus } #endif #endif
/****************************************************************************** * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN */ #pragma once #include "jobs/basejob.h" #include "events/eventloader.h" #include "converters.h" namespace QMatrixClient { // Operations /// Get a list of events for this room /// /// This API returns a list of message and state events for a room. It uses /// pagination query parameters to paginate history in the room. class GetRoomEventsJob : public BaseJob { public: /*! Get a list of events for this room * \param roomId * The room to get events from. * \param from * The token to start returning events from. This token can be obtained * from a ``prev_batch`` token returned for each room by the sync API, * or from a ``start`` or ``end`` token returned by a previous request * to this endpoint. * \param dir * The direction to return events from. * \param to * The token to stop returning events at. This token can be obtained from * a ``prev_batch`` token returned for each room by the sync endpoint, * or from a ``start`` or ``end`` token returned by a previous request to * this endpoint. * \param limit * The maximum number of events to return. Default: 10. * \param filter * A JSON RoomEventFilter to filter returned events with. */ explicit GetRoomEventsJob(const QString& roomId, const QString& from, const QString& dir, const QString& to = {}, Omittable<int> limit = none, const QString& filter = {}); /*! Construct a URL without creating a full-fledged job object * * This function can be used when a URL for * GetRoomEventsJob is necessary but the job * itself isn't. */ static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, const QString& from, const QString& dir, const QString& to = {}, Omittable<int> limit = none, const QString& filter = {}); ~GetRoomEventsJob() override; // Result properties /// The token the pagination starts from. If ``dir=b`` this will be /// the token supplied in ``from``. const QString& begin() const; /// The token the pagination ends at. If ``dir=b`` this token should /// be used again to request even earlier events. const QString& end() const; /// A list of room events. RoomEvents&& chunk(); protected: Status parseJson(const QJsonDocument& data) override; private: class Private; QScopedPointer<Private> d; }; } // namespace QMatrixClient
/* This file is part of the KDE project Copyright (C) 2006 Matthias Kretz <kretz@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), Nokia Corporation (or its successors, if any) and the KDE Free Qt Foundation, which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>. */ #ifndef Phonon_FAKE_BYTESTREAM_H #define Phonon_FAKE_BYTESTREAM_H #include "mediaproducer.h" #include <phonon/bytestreaminterface.h> class QTimer; namespace Phonon { namespace Fake { class ByteStream : public MediaProducer, public Phonon::ByteStreamInterface { Q_OBJECT Q_INTERFACES(Phonon::ByteStreamInterface) public: ByteStream(QObject *parent); ~ByteStream(); qint64 currentTime() const; qint64 totalTime() const; Q_INVOKABLE qint32 aboutToFinishTime() const; Q_INVOKABLE qint64 streamSize() const; Q_INVOKABLE bool streamSeekable() const; bool isSeekable() const; Q_INVOKABLE void setStreamSeekable(bool); void writeData(const QByteArray &data); Q_INVOKABLE void setStreamSize(qint64); void endOfData(); Q_INVOKABLE void setAboutToFinishTime(qint32); void play(); void pause(); void seek(qint64 time); public Q_SLOTS: virtual void stop(); Q_SIGNALS: void finished(); void aboutToFinish(qint32); void length(qint64); void needData(); void enoughData(); void seekStream(qint64); private Q_SLOTS: void consumeStream(); private: qint64 m_aboutToFinishBytes; qint64 m_streamSize; qint64 m_bufferSize; qint64 m_streamPosition; bool m_streamSeekable; bool m_eof; bool m_aboutToFinishEmitted; QTimer *m_streamConsumeTimer; }; }} //namespace Phonon::Fake // vim: sw=4 ts=4 tw=80 #endif // Phonon_FAKE_BYTESTREAM_H
/* GStreamer * Copyright (C) 2015 FIXME <fixme@example.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _GST_MPRTPPLAYOUTER_H_ #define _GST_MPRTPPLAYOUTER_H_ #include <gst/gst.h> #include "gstmprtcpbuffer.h" #include "streamjoiner.h" #include <gst/net/gstnetaddressmeta.h> #if GLIB_CHECK_VERSION (2, 35, 7) #include <gio/gnetworking.h> #else /* nicked from gnetworking.h */ #ifdef G_OS_WIN32 #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #include <winsock2.h> #undef interface #include <ws2tcpip.h> /* for socklen_t */ #endif /* G_OS_WIN32 */ #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif #endif G_BEGIN_DECLS #define GST_TYPE_MPRTPPLAYOUTER (gst_mprtpplayouter_get_type()) #define GST_MPRTPPLAYOUTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MPRTPPLAYOUTER,GstMprtpplayouter)) #define GST_MPRTPPLAYOUTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MPRTPPLAYOUTER,GstMprtpplayouterClass)) #define GST_IS_MPRTPPLAYOUTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MPRTPPLAYOUTER)) #define GST_IS_MPRTPPLAYOUTER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MPRTPPLAYOUTER)) #define GST_MPRTCP_PLAYOUTER_SENT_BYTES_STRUCTURE_NAME "GstCustomQueryMpRTCPPlayouter" #define GST_MPRTCP_PLAYOUTER_SENT_OCTET_SUM_FIELD "RTCPPlayouterSentBytes" typedef struct _GstMprtpplayouter GstMprtpplayouter; typedef struct _GstMprtpplayouterClass GstMprtpplayouterClass; struct _GstMprtpplayouter { GstElement base_mprtpreceiver; GRWLock rwmutex; guint8 mprtp_ext_header_id; guint8 abs_time_ext_header_id; guint32 pivot_ssrc; guint32 pivot_clock_rate; GSocketAddress *pivot_address; guint8 pivot_address_subflow_id; guint64 clock_base; gboolean auto_flow_riporting; gboolean rtp_passthrough; GstPad *mprtp_srcpad; GstPad *mprtp_sinkpad; GstPad *mprtcp_sr_sinkpad; GstPad *mprtcp_rr_srcpad; gboolean riport_flow_signal_sent; GHashTable *paths; StreamJoiner *joiner; gpointer controller; GstClock* sysclock; guint subflows_num; void (*controller_add_path) (gpointer, guint8, MpRTPRPath *); void (*controller_rem_path) (gpointer, guint8); void (*mprtcp_receiver) (gpointer, GstBuffer *); void (*riport_can_flow) (gpointer); guint32 rtcp_sent_octet_sum; }; struct _GstMprtpplayouterClass { GstElementClass base_mprtpreceiver_class; }; GType gst_mprtpplayouter_get_type (void); G_END_DECLS #endif //_GST_MPRTPPLAYOUTER_H_
/*! \file usbh_int.h \brief USB host mode interrupt handler header file \version 2017-02-10, V1.0.0, firmware for GD32F30x \version 2018-10-10, V1.1.0, firmware for GD32F30x \version 2018-12-25, V2.0.0, firmware for GD32F30x */ /* Copyright (c) 2018, GigaDevice Semiconductor Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef USBH_INT_H #define USBH_INT_H #include "usb_core.h" typedef struct { uint8_t (*sof) (usb_core_handle_struct *pudev); uint8_t (*device_connected) (usb_core_handle_struct *pudev); uint8_t (*device_disconnected) (usb_core_handle_struct *pudev); }usbh_hcd_int_cb_struct; extern usbh_hcd_int_cb_struct *usbh_hcd_int_fops; /* function declarations */ /* handle global host interrupt */ uint32_t usbh_isr (usb_core_handle_struct *pudev); #endif /* USBH_INT_H */
/* * Copyright (C) 2008-2021 The QXmpp developers * * Author: * Linus Jahn * * Source: * https://github.com/qxmpp-project/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPBITSOFBINARYCONTENTID_H #define QXMPPBITSOFBINARYCONTENTID_H #include "QXmppGlobal.h" #include <QCryptographicHash> #include <QSharedDataPointer> class QXmppBitsOfBinaryContentIdPrivate; class QXMPP_EXPORT QXmppBitsOfBinaryContentId { public: static QXmppBitsOfBinaryContentId fromCidUrl(const QString &input); static QXmppBitsOfBinaryContentId fromContentId(const QString &input); QXmppBitsOfBinaryContentId(); QXmppBitsOfBinaryContentId(const QXmppBitsOfBinaryContentId &cid); ~QXmppBitsOfBinaryContentId(); QXmppBitsOfBinaryContentId &operator=(const QXmppBitsOfBinaryContentId &other); QString toContentId() const; QString toCidUrl() const; QByteArray hash() const; void setHash(const QByteArray &hash); QCryptographicHash::Algorithm algorithm() const; void setAlgorithm(QCryptographicHash::Algorithm algo); bool isValid() const; static bool isBitsOfBinaryContentId(const QString &uri, bool checkIsCidUrl = false); bool operator==(const QXmppBitsOfBinaryContentId &other) const; private: QSharedDataPointer<QXmppBitsOfBinaryContentIdPrivate> d; }; #endif // QXMPPBITSOFBINARYCONTENTID_H
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* Camel * Copyright (C) 1999-2004 Jeffrey Stedfast * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. */ #ifndef __CAMEL_IMAP4_SPECIALS_H__ #define __CAMEL_IMAP4_SPECIALS_H__ #ifdef __cplusplus extern "C" { #pragma } #endif /* __cplusplus */ enum { IS_ASPECIAL = (1 << 0), IS_CTRL = (1 << 1), IS_LWSP = (1 << 2), IS_QSPECIAL = (1 << 3), IS_SPACE = (1 << 4), IS_WILDCARD = (1 << 5), }; extern unsigned char camel_imap4_specials[256]; #define is_atom(x) ((camel_imap4_specials[(unsigned char)(x)] & (IS_ASPECIAL|IS_SPACE|IS_CTRL|IS_WILDCARD|IS_QSPECIAL)) == 0) #define is_ctrl(x) ((camel_imap4_specials[(unsigned char)(x)] & IS_CTRL) != 0) #define is_lwsp(x) ((camel_imap4_specials[(unsigned char)(x)] & IS_LWSP) != 0) #define is_type(x, t) ((camel_imap4_specials[(unsigned char)(x)] & (t)) != 0) #define is_qsafe(x) ((camel_imap4_specials[(unsigned char)(x)] & (IS_QSPECIAL|IS_CTRL)) == 0) #define is_wild(x) ((camel_imap4_specials[(unsigned char)(x)] & IS_WILDCARD) != 0) void camel_imap4_specials_init (void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CAMEL_IMAP4_SPECIALS_H__ */
/// LCM release major version - the X in version X.Y.Z #define LCM_VERSION_MAJOR 1 /// LCM release minor version - the Y in version X.Y.Z #define LCM_VERSION_MINOR 3 /// LCM release patch version - the Z in version X.Y.Z #define LCM_VERSION_PATCH 95 /// LCM ABI version #define LCM_ABI_VERSION 1 // Old symbols provided for compatibility #define LCM_MAJOR_VERSION LCM_VERSION_MAJOR #define LCM_MINOR_VERSION LCM_VERSION_MINOR #define LCM_MICRO_VERSION LCM_VERSION_PATCH
/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef CHECKOUTPROGRESSWIZARDPAGE_H #define CHECKOUTPROGRESSWIZARDPAGE_H #include <QSharedPointer> #include <QWizardPage> namespace VcsBase { class Command; namespace Internal { namespace Ui { class CheckoutProgressWizardPage; } class CheckoutProgressWizardPage : public QWizardPage { Q_OBJECT public: enum State { Idle, Running, Failed, Succeeded }; explicit CheckoutProgressWizardPage(QWidget *parent = 0); ~CheckoutProgressWizardPage(); void setStartedStatus(const QString &startedStatus); void start(Command *command); virtual bool isComplete() const; bool isRunning() const{ return m_state == Running; } void terminate(); signals: void terminated(bool success); private slots: void slotFinished(bool ok, int exitCode, const QVariant &cookie); void slotOutput(const QString &text); void slotError(const QString &text); private: Ui::CheckoutProgressWizardPage *ui; Command *m_command; QString m_startedStatus; QString m_error; State m_state; }; } // namespace Internal } // namespace VcsBase #endif // CHECKOUTPROGRESSWIZARDPAGE_H
// The libMesh Finite Element Library. // Copyright (C) 2002-2021 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef LIBMESH_TREE_H #define LIBMESH_TREE_H // Local includes #include "libmesh/tree_node.h" #include "libmesh/tree_base.h" // C++ includes namespace libMesh { // Forward Declarations class MeshBase; /** * This class defines a tree that may be used for fast point * location in space. * * \author Benjamin S. Kirk * \date 2002 * \brief Tree class templated on the number of leaves on each node. */ template <unsigned int N> class Tree : public TreeBase { public: /** * Constructor. Requires a mesh and the target bin size. Optionally takes the build method. */ Tree (const MeshBase & m, unsigned int target_bin_size, Trees::BuildType bt = Trees::NODES); /** * Copy-constructor. Not currently implemented. */ Tree (const Tree<N> & other_tree); /** * Destructor. */ ~Tree() = default; /** * Prints the nodes. */ virtual void print_nodes(std::ostream & my_out=libMesh::out) const override; /** * Prints the nodes. */ virtual void print_elements(std::ostream & my_out=libMesh::out) const override; /** * \returns The number of active bins. */ virtual unsigned int n_active_bins() const override { return root.n_active_bins(); } /** * \returns A pointer to the element containing point p, * optionally restricted to a set of allowed subdomains, * optionally using a non-zero relative tolerance for searches. */ virtual const Elem * find_element(const Point & p, const std::set<subdomain_id_type> * allowed_subdomains = nullptr, Real relative_tol = TOLERANCE) const override; /** * Fills \p candidate_elements with any elements containing the * specified point \p p, * optionally restricted to a set of allowed subdomains, * optionally using a non-zero relative tolerance for searches. */ virtual void find_elements(const Point & p, std::set<const Elem *> & candidate_elements, const std::set<subdomain_id_type> * allowed_subdomains = nullptr, Real relative_tol = TOLERANCE) const override; /** * \returns A pointer to the element containing point p, * optionally restricted to a set of allowed subdomains, * optionally using a non-zero relative tolerance for searches. */ const Elem * operator() (const Point & p, const std::set<subdomain_id_type> * allowed_subdomains = nullptr, Real relative_tol = TOLERANCE) const; private: /** * The tree root. */ TreeNode<N> root; /** * How the tree is built. */ const Trees::BuildType build_type; }; /** * For convenience we define QuadTrees and OctTrees * explicitly. */ namespace Trees { /** * A BinaryTree is a tree appropriate * for 1D meshes. */ typedef Tree<2> BinaryTree; /** * A QuadTree is a tree appropriate * for 2D meshes. */ typedef Tree<4> QuadTree; /** * An OctTree is a tree appropriate * for 3D meshes. */ typedef Tree<8> OctTree; } } // namespace libMesh #endif // LIBMESH_TREE_H
/* * Copyright (C) 2000-2008 The Exult Team * * Original file by Dancer A.L Vesperman * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __IFF_H_ #define __IFF_H_ #include <vector> #include <string> #include <cstring> #include "common_types.h" #include "U7file.h" #include "exceptions.h" class DataSource; /** * The IFF class is an data reader which reads data in the IFF * file format. The actual data need not be in a file, however. */ class IFF : public U7file { public: struct IFFhdr { char form_magic[4]; uint32 size; char data_type[4]; IFFhdr() { } }; struct IFFobject { char type[4]; uint32 size; char even; }; struct u7IFFobj { char name[8]; // char data[]; // Variable }; struct Reference { size_t offset; uint32 size; Reference() : offset(0),size(0) {}; }; protected: // The IFF's header. ++++ Unused???? //IFFhdr header; /// List of objects in the IFF file. std::vector<Reference> object_list; virtual void index_file(); public: /// Basic constructor. /// @param spec File name and object index pair. IFF(const File_spec &spec) : U7file(spec) { } virtual size_t number_of_objects(void) { return object_list.size(); }; virtual char *retrieve(uint32 objnum,std::size_t &len); virtual const char *get_archive_type() { return "IFF"; }; static bool is_iff(DataSource *in); static bool is_iff(const char *fname); private: /// No default constructor IFF(); UNREPLICATABLE_CLASS_I(IFF, U7file("")); }; typedef U7DataFile<IFF> IFFFile; typedef U7DataBuffer<IFF> IFFBuffer; #endif
/**************************************************************************** ** libebml : parse EBML files, see http://embl.sourceforge.net/ ** ** <file/class description> ** ** Copyright (C) 2014 Moritz Bunkus. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** Lesser General Public License for more details. ** ** You should have received a copy of the GNU Lesser General Public ** License along with this library; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ** ** See http://www.matroska.org/license/lgpl/ for LGPL licensing information. ** ** Contact license@matroska.org if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ /*! \file \author Moritz Bunkus <moritz@bunkus.org> */ #ifndef LIBEBML_MEMREADIOCALLBACK_H #define LIBEBML_MEMREADIOCALLBACK_H #include "EbmlBinary.h" #include "IOCallback.h" START_LIBEBML_NAMESPACE class EBML_DLL_API MemReadIOCallback : public IOCallback { protected: uint8 const *mStart, *mEnd, *mPtr; public: MemReadIOCallback(void const *Ptr, size_t Size); MemReadIOCallback(EbmlBinary const &Binary); MemReadIOCallback(MemReadIOCallback const &Mem); virtual ~MemReadIOCallback() = default; uint32 read(void *Buffer, size_t Size); void setFilePointer(int64 Offset, seek_mode Mode = seek_beginning); size_t write(void const *, size_t) { return 0; } virtual uint64 getFilePointer() { return mPtr - mStart; } void close() {} binary const *GetDataBuffer() const { return mPtr; } uint64 GetDataBufferSize() const { return mEnd - mStart; } protected: void Init(void const *Ptr, size_t Size); }; END_LIBEBML_NAMESPACE #endif // LIBEBML_MEMREADIOCALLBACK_H
/* Test of <sys/file.h> substitute. Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <sys/file.h> int main (void) { switch (0) { case LOCK_SH: case LOCK_EX: case LOCK_NB: case LOCK_UN: ; } return 0; }
/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtSCriptTools module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QSCRIPTDEBUGGERCODEVIEWINTERFACE_P_P_H #define QSCRIPTDEBUGGERCODEVIEWINTERFACE_P_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #include <private/qwidget_p.h> QT_BEGIN_NAMESPACE class QScriptDebuggerCodeViewInterface; class QScriptDebuggerCodeViewInterfacePrivate : public QWidgetPrivate { Q_DECLARE_PUBLIC(QScriptDebuggerCodeViewInterface) public: QScriptDebuggerCodeViewInterfacePrivate(); ~QScriptDebuggerCodeViewInterfacePrivate(); }; QT_END_NAMESPACE #endif
/* Emacs style mode select -*- C++ -*- *----------------------------------------------------------------------------- * * * PrBoom: a Doom port merged with LxDoom and LSDLDoom * based on BOOM, a modified and improved DOOM engine * Copyright (C) 1999 by * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman * Copyright (C) 1999-2000 by * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze * Copyright 2005, 2006 by * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * DESCRIPTION: * Status bar code. * Does the face/direction indicator animatin. * Does palette indicators as well (red pain/berserk, bright pickup) * *-----------------------------------------------------------------------------*/ #ifndef __STSTUFF_H__ #define __STSTUFF_H__ #include "doomtype.h" #include "d_event.h" #include "r_defs.h" // Size of statusbar. // Now sensitive for scaling. // proff 08/18/98: Changed for high-res #define ST_HEIGHT 32 #define ST_WIDTH 320 #define ST_Y (200 - ST_HEIGHT) // e6y: wide-res extern int ST_SCALED_HEIGHT; extern int ST_SCALED_WIDTH; extern int ST_SCALED_Y; // // STATUS BAR // // Called by main loop. dboolean ST_Responder(event_t* ev); // Called by main loop. void ST_Ticker(void); // Called by main loop. void ST_Drawer(dboolean st_statusbaron, dboolean refresh); // Called when the console player is spawned on each level. void ST_Start(void); // Called by startup code. void ST_Init(void); // States for status bar code. typedef enum { AutomapState, FirstPersonState } st_stateenum_t; // States for the chat code. typedef enum { StartChatState, WaitDestState, GetChatState } st_chatstateenum_t; // killough 5/2/98: moved from m_misc.c: extern int health_red; // health amount less than which status is red extern int health_yellow; // health amount less than which status is yellow extern int health_green; // health amount above is blue, below is green extern int armor_red; // armor amount less than which status is red extern int armor_yellow; // armor amount less than which status is yellow extern int armor_green; // armor amount above is blue, below is green extern int ammo_red; // ammo percent less than which status is red extern int ammo_yellow; // ammo percent less is yellow more green extern int sts_always_red;// status numbers do not change colors extern int sts_pct_always_gray;// status percents do not change colors extern int sts_traditional_keys; // display keys the traditional way extern int st_palette; // cph 2006/04/06 - make palette visible // e6y: makes sense for wide resolutions extern patchnum_t grnrock; extern patchnum_t brdr_t, brdr_b, brdr_l, brdr_r; extern patchnum_t brdr_tl, brdr_tr, brdr_bl, brdr_br; #endif
/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists for the convenience // of other Qt classes. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #ifndef QGRAPHICSBSPTREEINDEX_H #define QGRAPHICSBSPTREEINDEX_H #include <QtCore/qglobal.h> #if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW #include "qgraphicssceneindex_p.h" #include "qgraphicsitem_p.h" #include "qgraphicsscene_bsp_p.h" #include <QtCore/qrect.h> #include <QtCore/qlist.h> QT_BEGIN_NAMESPACE static const int QGRAPHICSSCENE_INDEXTIMER_TIMEOUT = 2000; class QGraphicsScene; class QGraphicsSceneBspTreeIndexPrivate; class Q_AUTOTEST_EXPORT QGraphicsSceneBspTreeIndex : public QGraphicsSceneIndex { Q_OBJECT Q_PROPERTY(int bspTreeDepth READ bspTreeDepth WRITE setBspTreeDepth) public: QGraphicsSceneBspTreeIndex(QGraphicsScene *scene = 0); ~QGraphicsSceneBspTreeIndex(); QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const; QList<QGraphicsItem *> estimateTopLevelItems(const QRectF &rect, Qt::SortOrder order) const; QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::DescendingOrder) const; int bspTreeDepth(); void setBspTreeDepth(int depth); protected Q_SLOTS: void updateSceneRect(const QRectF &rect); protected: bool event(QEvent *event); void clear(); void addItem(QGraphicsItem *item); void removeItem(QGraphicsItem *item); void prepareBoundingRectChange(const QGraphicsItem *item); void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value); private : Q_DECLARE_PRIVATE(QGraphicsSceneBspTreeIndex) Q_DISABLE_COPY(QGraphicsSceneBspTreeIndex) Q_PRIVATE_SLOT(d_func(), void _q_updateSortCache()) Q_PRIVATE_SLOT(d_func(), void _q_updateIndex()) friend class QGraphicsScene; friend class QGraphicsScenePrivate; }; class QGraphicsSceneBspTreeIndexPrivate : public QGraphicsSceneIndexPrivate { Q_DECLARE_PUBLIC(QGraphicsSceneBspTreeIndex) public: QGraphicsSceneBspTreeIndexPrivate(QGraphicsScene *scene); QGraphicsSceneBspTree bsp; QRectF sceneRect; int bspTreeDepth; int indexTimerId; bool restartIndexTimer; bool regenerateIndex; int lastItemCount; QList<QGraphicsItem *> indexedItems; QList<QGraphicsItem *> unindexedItems; QList<QGraphicsItem *> untransformableItems; QList<int> freeItemIndexes; bool purgePending; QSet<QGraphicsItem *> removedItems; void purgeRemovedItems(); void _q_updateIndex(); void startIndexTimer(int interval = QGRAPHICSSCENE_INDEXTIMER_TIMEOUT); void resetIndex(); void _q_updateSortCache(); bool sortCacheEnabled; bool updatingSortCache; void invalidateSortCache(); void addItem(QGraphicsItem *item, bool recursive = false); void removeItem(QGraphicsItem *item, bool recursive = false, bool moveToUnindexedItems = false); QList<QGraphicsItem *> estimateItems(const QRectF &, Qt::SortOrder, bool b = false); static void climbTree(QGraphicsItem *item, int *stackingOrder); static inline bool closestItemFirst_withCache(const QGraphicsItem *item1, const QGraphicsItem *item2) { return item1->d_ptr->globalStackingOrder < item2->d_ptr->globalStackingOrder; } static inline bool closestItemLast_withCache(const QGraphicsItem *item1, const QGraphicsItem *item2) { return item1->d_ptr->globalStackingOrder >= item2->d_ptr->globalStackingOrder; } static void sortItems(QList<QGraphicsItem *> *itemList, Qt::SortOrder order, bool cached, bool onlyTopLevelItems = false); }; static inline bool QRectF_intersects(const QRectF &s, const QRectF &r) { qreal xp = s.left(); qreal yp = s.top(); qreal w = s.width(); qreal h = s.height(); qreal l1 = xp; qreal r1 = xp; if (w < 0) l1 += w; else r1 += w; qreal l2 = r.left(); qreal r2 = r.left(); if (w < 0) l2 += r.width(); else r2 += r.width(); if (l1 >= r2 || l2 >= r1) return false; qreal t1 = yp; qreal b1 = yp; if (h < 0) t1 += h; else b1 += h; qreal t2 = r.top(); qreal b2 = r.top(); if (r.height() < 0) t2 += r.height(); else b2 += r.height(); return !(t1 >= b2 || t2 >= b1); } QT_END_NAMESPACE #endif // QT_NO_GRAPHICSVIEW #endif // QGRAPHICSBSPTREEINDEX_H
/****************************************************************************** * This file is part of the Gluon Development Platform * Copyright (c) 2010 Arjen Hiemstra <ahiemstra@heimr.nl> * Copyright (C) 2010 Dan Leinir Turthra Jensen <admin@leinir.dk> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef GLUON_ENGINE_GAME_H #define GLUON_ENGINE_GAME_H #include "gameproject.h" #include "gluon_engine_export.h" #include <core/singleton.h> #include <QtCore/QObject> #include <QtCore/QSharedData> #include <QtCore/QThread> namespace GluonEngine { class GameObject; class Scene; class GamePrivate; class GLUON_ENGINE_EXPORT Game : public GluonCore::Singleton<Game> { Q_OBJECT /** * The Scene which is currently being handled by the game loop */ Q_PROPERTY( Scene* currentScene READ currentScene WRITE setCurrentScene ) /** * The GameProject containing the game which is currently being played */ Q_PROPERTY( GluonEngine::GameProject* gameProject READ gameProject WRITE setGameProject ) public: int getCurrentTick(); Scene* currentScene() const; GluonEngine::GameProject* gameProject() const; Q_INVOKABLE bool isRunning() const; Q_INVOKABLE bool isPaused() const; /** * Retrieve an object from the current scene. * * @param name The name of the object */ Q_INVOKABLE GluonEngine::GameObject* getFromScene( const QString& name ); Q_INVOKABLE GluonEngine::GameObject* clone( GluonEngine::GameObject* obj ); //TODO Implement //Q_INVOKABLE GameObject *spawn(const QString& prefabName); /** * Generate a random number between 0 and 1. * * Implemented here as a workaround for a Qt bug. * * \return The random number generated. */ Q_INVOKABLE float random(); public slots: void setGameProject( GluonEngine::GameProject* newGameProject ); void setCurrentScene( Scene* newCurrentScene ); void setCurrentScene( const QString& sceneName ); /** * Resets the current scene to its initial conditions */ void resetCurrentScene(); void runGame() { runGameFixedUpdate(); } /** * Run the game at full framerate (with an optional maximum number of skipped frames), but with a fixed game update rate, defaulting to 25 updates per second * @param int updatesPerSecond The number of updates per second * @param int maxFrameSkip The maximum number of frames that you're allowed to skip before forcing a redraw */ void runGameFixedUpdate( int updatesPerSecond = 25, int maxFrameSkip = 5 ); /** * Run the game using a fixed time between each update * @param int framesPerSecond The number of frames per second that the game will attempt to keep up with */ void runGameFixedTimestep( int framesPerSecond = 25 ); void stopGame(); void setPause( bool pause ); /** * Initialize all objects in the current scene. */ void initializeAll(); /** * Start all objects in the current scene. */ void startAll(); /** * Draw all items in the current scene. */ void drawAll( int time = 1 ); /** * Update all items in the current scene. */ void updateAll( int time = 10 ); /** * Stop all objects in the current scene. */ void stopAll(); /** * Cleanup all objects in the current scene. */ void cleanupAll(); // This allows the reset scene call to emit the Game::currentSceneChanged signal // which ensures that Creator doesn't crash when resetting the scene friend void Scene::resetScene(); signals: void showDebug( const QString& debugText ); void currentSceneChanged( GluonEngine::Scene* ); void currentProjectChanged( GluonEngine::GameProject* ); void projectLoaded( GluonEngine::GameProject* ); void initialized(); void started(); void updated( int ); void painted( int ); void stopped(); void cleaned(); private: friend class GluonCore::Singleton<Game>; friend class GamePrivate; Game( QObject* parent = 0 ); ~Game(); Q_DISABLE_COPY( Game ) QSharedDataPointer<GamePrivate> d; }; } #endif // GLUON_ENGINE_GAME_H
/* * Copyright (C) 2014 Freie Universität Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @addtogroup driver_periph * @{ * * @file * @brief Low-level CPUID driver implementation * * @author Troels Hoffmeyer <troels.d.hoffmeyer@gmail.com> */ #include <string.h> #include "cpu-conf.h" #include "periph/cpuid.h" #define SAMD21_CPUID_WORD0 (*(volatile uint32_t *)0x0080A00C) #define SAMD21_CPUID_WORD1 (*(volatile uint32_t *)0x0080A040) #define SAMD21_CPUID_WORD2 (*(volatile uint32_t *)0x0080A044) #define SAMD21_CPUID_WORD3 (*(volatile uint32_t *)0x0080A048) void cpuid_get(void *id) { uint32_t source_address[] = { SAMD21_CPUID_WORD0, SAMD21_CPUID_WORD1, SAMD21_CPUID_WORD2, SAMD21_CPUID_WORD3}; memcpy(id, (void*) source_address, CPUID_ID_LEN); }
/********************************************************* * Copyright (C) 2005 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation version 2.1 and no later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * *********************************************************/ /* * cryptoError.h -- * * Error code for cryptographic infrastructure library. * * NOTE: This header file is within the FIPS crypto boundary and * thus should not change in such a way as to break the interface * to the vmcryptolib library. See bora/make/mk/README_FIPS for * more information. */ #ifndef VMWARE_CRYPTOERROR_H #define VMWARE_CRYPTOERROR_H 1 #define INCLUDE_ALLOW_USERLEVEL #include "includeCheck.h" #include "vmware.h" typedef int CryptoError; /* * This set of errors should not be expanded beyond a maximum value of 15 * without also updating the code for AIOMgr errors, which allots only 4 bits * for sub-error codes. * * Adding a lot of error codes to describe particular errors is a bad idea * anyhow, because it can be a security hole in itself; see, for example, the * SSL vulnerability described at <http://www.openssl.org/~bodo/tls-cbc.txt>. * It is best to distinguish only those types of errors that the caller can * legitimately use to figure out how to fix the problem and try again. */ #define CRYPTO_ERROR_SUCCESS ((CryptoError) 0) #define CRYPTO_ERROR_OPERATION_FAILED ((CryptoError) 1) #define CRYPTO_ERROR_UNKNOWN_ALGORITHM ((CryptoError) 2) #define CRYPTO_ERROR_BAD_BUFFER_SIZE ((CryptoError) 3) #define CRYPTO_ERROR_INVALID_OPERATION ((CryptoError) 4) #define CRYPTO_ERROR_NOMEM ((CryptoError) 5) #define CRYPTO_ERROR_NEED_PASSWORD ((CryptoError) 6) #define CRYPTO_ERROR_BAD_PASSWORD ((CryptoError) 7) #define CRYPTO_ERROR_IO_ERROR ((CryptoError) 8) #define CRYPTO_ERROR_UNKNOWN_ERROR ((CryptoError) 9) #define CRYPTO_ERROR_NAME_NOT_FOUND ((CryptoError) 10) #define CRYPTO_ERROR_NO_CRYPTO ((CryptoError) 11) #define CRYPTO_ERROR_FIPS_SELF_TEST ((CryptoError) 12) #define CRYPTO_ERROR_FIPS_INTEGRITY ((CryptoError) 13) #define CRYPTO_ERROR_FIPS_CRNGT_FAIL ((CryptoError) 14) #define CRYPTO_ERROR_LOCK_FAILURE ((CryptoError) 15) EXTERN const char * CryptoError_ToString(CryptoError error); EXTERN const char * CryptoError_ToMsgString(CryptoError error); static INLINE int CryptoError_ToInteger(CryptoError error) { return (int) error; } static INLINE CryptoError CryptoError_FromInteger(int index) { return (CryptoError) index; } static INLINE Bool CryptoError_IsSuccess(CryptoError error) { return (CRYPTO_ERROR_SUCCESS == error); } static INLINE Bool CryptoError_IsFailure(CryptoError error) { return (CRYPTO_ERROR_SUCCESS != error); } #endif /* cryptoError.h */
#ifndef COEFFFIELD_H #define COEFFFIELD_H #include "Reaction.h" // Forward declarations class CoeffField; template <> InputParameters validParams<CoeffField>(); class CoeffField : public Reaction { public: CoeffField(const InputParameters &parameters); protected: virtual Real computeQpResidual() override; virtual Real computeQpJacobian() override; private: Real _coefficient; }; #endif /* COEFFFIELD_H */
// Virvo - Virtual Reality Volume Rendering // Copyright (C) 1999-2003 University of Stuttgart, 2004-2005 Brown University // Contact: Jurgen P. Schulze, jschulze@ucsd.edu // // This file is part of Virvo. // // Virvo is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library (see license.txt); if not, write to the // Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef VV_DYNLIB_H #define VV_DYNLIB_H #include "vvplatform.h" #ifdef __sgi #include <dlfcn.h> #endif #ifdef __hpux #include <dl.h> #endif #ifdef __hpux typedef shl_t VV_SHLIB_HANDLE; #elif _WIN32 typedef HINSTANCE VV_SHLIB_HANDLE; #else typedef void *VV_SHLIB_HANDLE; #endif #include "vvexport.h" /** This class encapsulates the functionality of dynamic library loading. @author Uwe Woessner */ class VIRVOEXPORT vvDynLib { public: static char* error(void); static VV_SHLIB_HANDLE open(const char* filename, int mode); static void* sym(VV_SHLIB_HANDLE handle, const char* symbolname); static void (*glSym(const char* symbolname))(void); static int close(VV_SHLIB_HANDLE handle); }; #endif // vim: sw=2:expandtab:softtabstop=2:ts=2:cino=\:0g0t0
/* * Copyright (C) 2008 Pierre-Luc Beaudoin <pierre-luc@pierlux.com> * Copyright (C) 2010-2012 Jiri Techet <techet@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION) #error "Only <champlain/champlain.h> can be included directly." #endif #ifndef CHAMPLAIN_VIEW_H #define CHAMPLAIN_VIEW_H #include <champlain/champlain-defines.h> #include <champlain/champlain-layer.h> #include <champlain/champlain-map-source.h> #include <champlain/champlain-license.h> #include <champlain/champlain-bounding-box.h> #include <glib.h> #include <glib-object.h> #include <clutter/clutter.h> G_BEGIN_DECLS #define CHAMPLAIN_TYPE_VIEW champlain_view_get_type () #define CHAMPLAIN_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_VIEW, ChamplainView)) #define CHAMPLAIN_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_VIEW, ChamplainViewClass)) #define CHAMPLAIN_IS_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_VIEW)) #define CHAMPLAIN_IS_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_VIEW)) #define CHAMPLAIN_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_VIEW, ChamplainViewClass)) typedef struct _ChamplainViewPrivate ChamplainViewPrivate; /** * ChamplainView: * * The #ChamplainView structure contains only private data * and should be accessed using the provided API * * Since: 0.1 */ struct _ChamplainView { ClutterActor parent; ChamplainViewPrivate *priv; }; struct _ChamplainViewClass { ClutterActorClass parent_class; }; GType champlain_view_get_type (void); ClutterActor *champlain_view_new (void); void champlain_view_center_on (ChamplainView *view, gdouble latitude, gdouble longitude); void champlain_view_go_to (ChamplainView *view, gdouble latitude, gdouble longitude); void champlain_view_stop_go_to (ChamplainView *view); gdouble champlain_view_get_center_latitude (ChamplainView *view); gdouble champlain_view_get_center_longitude (ChamplainView *view); void champlain_view_zoom_in (ChamplainView *view); void champlain_view_zoom_out (ChamplainView *view); void champlain_view_set_zoom_level (ChamplainView *view, guint zoom_level); void champlain_view_set_min_zoom_level (ChamplainView *view, guint zoom_level); void champlain_view_set_max_zoom_level (ChamplainView *view, guint zoom_level); void champlain_view_ensure_visible (ChamplainView *view, ChamplainBoundingBox *bbox, gboolean animate); void champlain_view_ensure_layers_visible (ChamplainView *view, gboolean animate); void champlain_view_set_map_source (ChamplainView *view, ChamplainMapSource *map_source); void champlain_view_set_deceleration (ChamplainView *view, gdouble rate); void champlain_view_set_kinetic_mode (ChamplainView *view, gboolean kinetic); void champlain_view_set_keep_center_on_resize (ChamplainView *view, gboolean value); void champlain_view_set_zoom_on_double_click (ChamplainView *view, gboolean value); void champlain_view_set_animate_zoom (ChamplainView *view, gboolean value); void champlain_view_add_layer (ChamplainView *view, ChamplainLayer *layer); void champlain_view_remove_layer (ChamplainView *view, ChamplainLayer *layer); guint champlain_view_get_zoom_level (ChamplainView *view); guint champlain_view_get_min_zoom_level (ChamplainView *view); guint champlain_view_get_max_zoom_level (ChamplainView *view); ChamplainMapSource *champlain_view_get_map_source (ChamplainView *view); gdouble champlain_view_get_deceleration (ChamplainView *view); gboolean champlain_view_get_kinetic_mode (ChamplainView *view); gboolean champlain_view_get_keep_center_on_resize (ChamplainView *view); gboolean champlain_view_get_zoom_on_double_click (ChamplainView *view); gboolean champlain_view_get_animate_zoom (ChamplainView *view); ChamplainState champlain_view_get_state (ChamplainView *view); void champlain_view_reload_tiles (ChamplainView *view); gdouble champlain_view_x_to_longitude (ChamplainView *view, gdouble x); gdouble champlain_view_y_to_latitude (ChamplainView *view, gdouble y); gdouble champlain_view_longitude_to_x (ChamplainView *view, gdouble longitude); gdouble champlain_view_latitude_to_y (ChamplainView *view, gdouble latitude); void champlain_view_get_viewport_origin (ChamplainView *view, gint *x, gint *y); void champlain_view_bin_layout_add (ChamplainView *view, ClutterActor *child, ClutterBinAlignment x_align, ClutterBinAlignment y_align); ChamplainLicense *champlain_view_get_license_actor (ChamplainView *view); G_END_DECLS #endif
/* $Id: crypt_win32.h 6870 2002-08-19 15:22:50Z daniel $ */ /* encrypt.h - API to 56 bit DES encryption via calls encrypt(3), setkey(3) and crypt(3) Copyright (C) 1991 Jochen Obalek This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _ENCRYPT_H_ #define _ENCRYPT_H_ #ifdef __cplusplus extern "C" { #endif #include <_ansi.h> void _EXFUN(encrypt, (char *block, int edflag)); void _EXFUN(setkey, (char *key)); char * _EXFUN(crypt, (const char *key, const char *salt)); #ifdef __cplusplus } #endif #endif /* _ENCRYPT_H_ */
/***************************************************************************** * dr_49.h * Copyright (C) 2012 VideoLAN * * Authors: rcorno (May 21, 2012) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ /*! * \file <dr_49.h> * \author Corno Roberto <corno.roberto@gmail.com> * \brief Application interface for the DVB "country availability" * descriptor decoder and generator. * * Application interface for the DVB "country availability" descriptor * decoder and generator. This descriptor's definition can be found in * ETSI EN 300 468 section 6.2.10. */ #ifndef DR_49_H_ #define DR_49_H_ #ifdef __cplusplus extern "C" { #endif /***************************************************************************** * dvbpsi_country_availability_dr_t *****************************************************************************/ /*! * \struct dvbpsi_country_availability_dr_t * \brief "country availability" descriptor structure. * * This structure is used to store a decoded "country availability" * descriptor. (ETSI EN 300 468 section 6.2.10). */ /*! * \typedef struct dvbpsi_country_availability_dr_s dvbpsi_country_availability_dr_t * \brief dvbpsi_country_availability_dr_t type definition. */ /*! * \struct dvbpsi_country_availability_dr_s * \brief dvbpsi_country_availability_dr_s type definition @see dvbpsi_country_availability_dr_t */ typedef struct dvbpsi_country_availability_dr_s { bool b_country_availability_flag; /*!< country availability flag */ uint8_t i_code_count; /*!< length of the i_iso_639_code array */ struct { iso_639_language_code_t iso_639_code; /*!< ISO_639 language code */ } code[84]; /*!< ISO_639_language_code array */ } dvbpsi_country_availability_dr_t; /***************************************************************************** * dvbpsi_DecodeCountryAvailabilityDr *****************************************************************************/ /*! * \fn dvbpsi_country_availability_dr_t * dvbpsi_DecodeCountryAvailability( dvbpsi_descriptor_t * p_descriptor) * \brief "country availability" descriptor decoder. * \param p_descriptor pointer to the descriptor structure * \return a pointer to a new "country availability" descriptor structure * which contains the decoded data. */ dvbpsi_country_availability_dr_t* dvbpsi_DecodeCountryAvailability( dvbpsi_descriptor_t * p_descriptor); /***************************************************************************** * dvbpsi_GenCountryAvailabilityDr *****************************************************************************/ /*! * \fn dvbpsi_descriptor_t * dvbpsi_GenCountryAvailabilityDr( dvbpsi_country_availability_dr_t * p_decoded, bool b_duplicate) * \brief "country availability" descriptor generator. * \param p_decoded pointer to a decoded "country availability" descriptor * structure * \param b_duplicate if true then duplicate the p_decoded structure into * the descriptor * \return a pointer to a new descriptor structure which contains encoded data. */ dvbpsi_descriptor_t * dvbpsi_GenCountryAvailabilityDr( dvbpsi_country_availability_dr_t * p_decoded, bool b_duplicate); #ifdef __cplusplus }; #endif #else #endif /* DR_49_H_ */
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* Copyright (C) 2010 Red Hat, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include "spice-widget.h" #include "spice-widget-priv.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif /* Some compatibility defines to let us build on both Gtk2 and Gtk3 */ #if GTK_CHECK_VERSION (2, 91, 0) static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh) { *ww = gdk_window_get_width(w); *wh = gdk_window_get_height(w); } #endif G_GNUC_INTERNAL int spicex_image_create(SpiceDisplay *display) { SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); if (d->ximage != NULL) return 0; if (d->format == SPICE_SURFACE_FMT_16_555 || d->format == SPICE_SURFACE_FMT_16_565) { d->convert = TRUE; d->data = g_malloc0(d->area.width * d->area.height * 4); d->ximage = cairo_image_surface_create_for_data (d->data, CAIRO_FORMAT_RGB24, d->area.width, d->area.height, d->area.width * 4); } else { d->convert = FALSE; d->ximage = cairo_image_surface_create_for_data (d->data, CAIRO_FORMAT_RGB24, d->width, d->height, d->stride); } return 0; } G_GNUC_INTERNAL void spicex_image_destroy(SpiceDisplay *display) { SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); if (d->ximage) { cairo_surface_finish(d->ximage); d->ximage = NULL; } if (d->convert && d->data) { g_free(d->data); d->data = NULL; } d->convert = FALSE; } #if !GTK_CHECK_VERSION (3, 0, 0) #define cairo_rectangle_int_t GdkRectangle #define cairo_region_t GdkRegion #define cairo_region_create_rectangle gdk_region_rectangle #define cairo_region_subtract_rectangle(_dest,_rect) { GdkRegion *_region = gdk_region_rectangle (_rect); gdk_region_subtract (_dest, _region); gdk_region_destroy (_region); } #define cairo_region_destroy gdk_region_destroy #endif G_GNUC_INTERNAL void spicex_draw_event(SpiceDisplay *display, cairo_t *cr) { SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); cairo_rectangle_int_t rect; cairo_region_t *region; double s; int x, y; int ww, wh; int w, h; spice_display_get_scaling(display, &s, &x, &y, &w, &h); gdk_drawable_get_size(gtk_widget_get_window(GTK_WIDGET(display)), &ww, &wh); /* We need to paint the bg color around the image */ rect.x = 0; rect.y = 0; rect.width = ww; rect.height = wh; region = cairo_region_create_rectangle(&rect); /* Optionally cut out the inner area where the pixmap will be drawn. This avoids 'flashing' since we're not double-buffering. */ if (d->ximage) { rect.x = x; rect.y = y; rect.width = w; rect.height = h; cairo_region_subtract_rectangle(region, &rect); } gdk_cairo_region (cr, region); cairo_region_destroy (region); /* Need to set a real solid color, because the default is usually transparent these days, and non-double buffered windows can't render transparently */ cairo_set_source_rgb (cr, 0, 0, 0); cairo_fill(cr); /* Draw the display */ if (d->ximage) { cairo_translate(cr, x, y); cairo_rectangle(cr, 0, 0, w, h); cairo_scale(cr, s, s); if (!d->convert) cairo_translate(cr, -d->area.x, -d->area.y); cairo_set_source_surface(cr, d->ximage, 0, 0); cairo_fill(cr); if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER && d->mouse_guest_x != -1 && d->mouse_guest_y != -1 && !d->show_cursor) { GdkPixbuf *image = d->mouse_pixbuf; if (image != NULL) { gdk_cairo_set_source_pixbuf(cr, image, d->mouse_guest_x - d->mouse_hotspot.x, d->mouse_guest_y - d->mouse_hotspot.y); cairo_paint(cr); } } } } #if ! GTK_CHECK_VERSION (2, 91, 0) G_GNUC_INTERNAL void spicex_expose_event(SpiceDisplay *display, GdkEventExpose *expose) { cairo_t *cr; cr = gdk_cairo_create(gtk_widget_get_window(GTK_WIDGET(display))); cairo_rectangle(cr, expose->area.x, expose->area.y, expose->area.width, expose->area.height); cairo_clip(cr); spicex_draw_event(display, cr); cairo_destroy(cr); } #endif G_GNUC_INTERNAL gboolean spicex_is_scaled(SpiceDisplay *display) { SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); return d->allow_scaling; }
// // Copyright (c) 2013, Ford Motor Company // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following // disclaimer in the documentation and/or other materials provided with the // distribution. // // Neither the name of the Ford Motor Company nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef NSRPC2COMMUNICATION_SMARTDEVICELINKCORE_GETDEVICELISTMARSHALLER_INCLUDE #define NSRPC2COMMUNICATION_SMARTDEVICELINKCORE_GETDEVICELISTMARSHALLER_INCLUDE #include <string> #include <json/json.h> #include "../src/../include/JSONHandler/RPC2Objects/NsRPC2Communication/BasicCommunication/GetDeviceList.h" namespace NsRPC2Communication { namespace BasicCommunication { struct GetDeviceListMarshaller { static bool checkIntegrity(GetDeviceList& e); static bool checkIntegrityConst(const GetDeviceList& e); static bool fromString(const std::string& s,GetDeviceList& e); static const std::string toString(const GetDeviceList& e); static bool fromJSON(const Json::Value& s,GetDeviceList& e); static Json::Value toJSON(const GetDeviceList& e); }; } } #endif
/* * libusb synchronization on Microsoft Windows * * Copyright © 2010 Michael Plante <michael.plante@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LIBUSB_THREADS_WINDOWS_H #define LIBUSB_THREADS_WINDOWS_H #define usbi_mutex_static_t volatile LONG #define USBI_MUTEX_INITIALIZER 0 #define usbi_mutex_t HANDLE typedef struct usbi_cond { // Every time a thread touches the CV, it winds up in one of these lists. // It stays there until the CV is destroyed, even if the thread terminates. struct list_head waiters; struct list_head not_waiting; } usbi_cond_t; // We *were* getting timespec from pthread.h: #if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED)) #define HAVE_STRUCT_TIMESPEC 1 #define _TIMESPEC_DEFINED 1 struct timespec { long tv_sec; long tv_nsec; }; #endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */ // We *were* getting ETIMEDOUT from pthread.h: #ifndef ETIMEDOUT # define ETIMEDOUT 10060 /* This is the value in winsock.h. */ #endif #define usbi_tls_key_t DWORD int usbi_mutex_static_lock(usbi_mutex_static_t *mutex); int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex); int usbi_mutex_init(usbi_mutex_t *mutex); int usbi_mutex_lock(usbi_mutex_t *mutex); int usbi_mutex_unlock(usbi_mutex_t *mutex); int usbi_mutex_trylock(usbi_mutex_t *mutex); int usbi_mutex_destroy(usbi_mutex_t *mutex); int usbi_cond_init(usbi_cond_t *cond); int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex); int usbi_cond_timedwait(usbi_cond_t *cond, usbi_mutex_t *mutex, const struct timeval *tv); int usbi_cond_broadcast(usbi_cond_t *cond); int usbi_cond_destroy(usbi_cond_t *cond); int usbi_tls_key_create(usbi_tls_key_t *key); void *usbi_tls_key_get(usbi_tls_key_t key); int usbi_tls_key_set(usbi_tls_key_t key, void *value); int usbi_tls_key_delete(usbi_tls_key_t key); // all Windows mutexes are recursive #define usbi_mutex_init_recursive usbi_mutex_init int usbi_get_tid(void); #endif /* LIBUSB_THREADS_WINDOWS_H */
/* Copyright 2020 by Angelo Naselli <anaselli at linux dot it> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3.0 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /*-/ File: YGMenuBar.h Author: Angelo Naselli <anaselli@linux.it> /-*/ #ifndef YGMenuBar_h #define YGMenuBar_h #include <yui/YMenuBar.h> #include <gtk/gtk.h> #include <gtk/gtktypes.h> class YGMenuBar : public YMenuBar, public YGWidget { public: YGMenuBar ( YWidget *parent ); virtual ~YGMenuBar ( ); /** * Rebuild the displayed menu tree from the internally stored YMenuItems. * * Reimplemented from YMenuWidget. **/ virtual void rebuildMenuTree(); /** * Enable or disable an item. * * Reimplemented from YMenuWidget. **/ virtual void setItemEnabled( YMenuItem * item, bool enabled ); /** * Show or hide an item. * * Reimplemented from YMenuWidget. **/ virtual void setItemVisible( YMenuItem * item, bool visible ); /** * Activate the item selected in the tree. Can be used in tests to simulate * user input. **/ virtual void activateItem( YMenuItem * item ); /** * Delete all items. * * Reimplemented from YMenuWidget **/ virtual void deleteAllItems(); YGWIDGET_IMPL_COMMON (YMenuBar) private: struct Private; Private *d; void doCreateMenu (GtkWidget *menu, YItemIterator begin, YItemIterator end); }; #endif // YGMenuBar_h
// Created file "Lib\src\Shell32\X64\shguid" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(FOLDERID_Profile, 0x5e6c858f, 0x0e22, 0x4760, 0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73);
#ifndef __TEMPLATEKEYWORDS_H__5DD73091_CBAC_4be6_BE7D_3D9E5B4D27E7 #define __TEMPLATEKEYWORDS_H__5DD73091_CBAC_4be6_BE7D_3D9E5B4D27E7 #include "imc_lecturnity_converter_LPLibs.h" // Keywords for 'Standard Navigation' #define NUMBER_OF_NAVIGATION_STATES imc_lecturnity_converter_LPLibs_NUMBER_OF_NAVIGATION_STATES const CString CS_NAVIGATION_KEYWORDS[] = { "NavigationControlBar", "NavigationStandardButtons", "NavigationTimeLine", "NavigationTimeDisplay", "NavigationDocumentStructure", "NavigationPlayerSearchField", "NavigationPlayerConfigButtons", "NavigationPluginContextMenu" }; enum TE_TYPES { TE_TYPE_IMAGE = 1, TE_TYPE_INTEGER, TE_TYPE_COLOR, TE_TYPE_GENERAL, TE_TYPE_TEXT, TE_TYPE_SELECT }; struct TE_VAR { DWORD dwSize; DWORD dwType; WCHAR wszVarName[128]; }; class CTemplateKeyword { public: CTemplateKeyword(const _TCHAR *tszName, const _TCHAR *tszFriendlyName); virtual void Restore(LPVOID pData, DWORD dwSize); virtual bool Serialize(LPVOID pData, DWORD *pdwSize); virtual int GetType()=0; virtual CString GetReplaceString()=0; virtual CString GetStringRepresentation() = 0; virtual bool ParseFromString(CString& csRepresentation) = 0; public: TE_VAR *m_pConfig; CString m_csName; CString m_csFriendlyName; DWORD m_dwMinStructSize; }; enum TE_IMAGE_SIZE_HANDLING { TE_IMAGE_FITS_ALREADY = 1, TE_IMAGE_ADAPT_SIZE, TE_IMAGE_DO_NOT_ADAPT }; struct TE_VAR_IMAGE : TE_VAR { WCHAR wszFileName[MAX_PATH]; DWORD dwImageSizeHandling; }; class CTemplateImageKeyword : public CTemplateKeyword { public: CTemplateImageKeyword(const _TCHAR *tszName, const _TCHAR *tszFriendlyName, int nMinWidth, int nMinHeight, int nMaxWidth, int nMaxHeight); void SetFileName(const _TCHAR *tszFileName); UINT GetFileName(_TCHAR *tszFileName, DWORD *pdwSize); void SetImageSizeHandling(DWORD dwAdaptImageSize); DWORD GetImageSizeHandling(); CString GetImageName(); virtual int GetType() {return TE_TYPE_IMAGE;} virtual CString GetReplaceString(); virtual CString GetStringRepresentation(); virtual bool ParseFromString(CString& csRepresentation); private: void GetImageSizeFromFile(CString csFileName, int &nOrigWidth, int &nOrigHeight); bool CalculateAdaptedImageSize(int &nOrigWidth, int &nOrigHeight, int &nNewWidth, int &nNewHeight); public: int m_nMinWidth; int m_nMinHeight; int m_nMaxWidth; int m_nMaxHeight; }; struct TE_VAR_INTEGER : TE_VAR { int nValue; }; class CTemplateIntegerKeyword : public CTemplateKeyword { public: CTemplateIntegerKeyword(const _TCHAR *tszName, const _TCHAR *tszFriendlyName, int nMinValue, int nMaxValue); void SetValue(int nValue); int GetValue(); virtual int GetType() {return TE_TYPE_INTEGER;} virtual CString GetReplaceString(); virtual CString GetStringRepresentation(); virtual bool ParseFromString(CString& csRepresentation); public: int m_nMinValue; int m_nMaxValue; }; struct TE_VAR_COLOR : TE_VAR { COLORREF rgbColor; }; class CTemplateColorKeyword : public CTemplateKeyword { public: CTemplateColorKeyword(const _TCHAR *tszName, const _TCHAR *tszFriendlyName); void SetColor(COLORREF color); COLORREF GetColor(); virtual int GetType() {return TE_TYPE_COLOR;} virtual CString GetReplaceString(); virtual CString GetStringRepresentation(); virtual bool ParseFromString(CString& csRepresentation); }; struct TE_VAR_GENERAL : TE_VAR { DWORD dwOffset; WCHAR wszGeneral[1]; }; class CTemplateGeneralKeyword : public CTemplateKeyword { public: CTemplateGeneralKeyword(const _TCHAR *tszName, const _TCHAR *tszFriendlyName); void SetGeneral(const _TCHAR *tszGeneral); UINT GetGeneral(_TCHAR *tszGeneral, DWORD *pdwSize); virtual int GetType() {return TE_TYPE_GENERAL;} virtual CString GetReplaceString(); virtual CString GetStringRepresentation(); virtual bool ParseFromString(CString& csRepresentation); }; struct TE_VAR_TEXT : TE_VAR { DWORD dwOffset; WCHAR wszText[1]; }; class CTemplateTextKeyword : public CTemplateKeyword { public: CTemplateTextKeyword(const _TCHAR *tszName, const _TCHAR *tszFriendlyName, int nMaxLength); void SetText(const _TCHAR *tszText); UINT GetText(_TCHAR *tszText, DWORD *pdwText); virtual int GetType() {return TE_TYPE_TEXT;} virtual CString GetReplaceString(); virtual CString GetStringRepresentation(); virtual bool ParseFromString(CString& csRepresentation); public: int m_nMaxLength; }; struct TE_VAR_SELECT : TE_VAR_TEXT { }; class CTemplateSelectKeyword : public CTemplateTextKeyword { public: CTemplateSelectKeyword(const _TCHAR *tszName, const _TCHAR *tszFriendlyName, const _TCHAR *tszVisibleOptions, const _TCHAR *tszOptions); virtual int GetType() {return TE_TYPE_SELECT;} // Note: the selected value is the text of the CTemplateTextKeyword (super class) public: CArray<CString, CString> m_caVisibleOptions; CArray<CString, CString> m_caOptions; int m_nOptionCount; }; #endif // __TEMPLATEKEYWORDS_H__5DD73091_CBAC_4be6_BE7D_3D9E5B4D27E7
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEEXPRESSIONRESPONSE_P_H #define QTAWS_DELETEEXPRESSIONRESPONSE_P_H #include "cloudsearchresponse_p.h" namespace QtAws { namespace CloudSearch { class DeleteExpressionResponse; class DeleteExpressionResponsePrivate : public CloudSearchResponsePrivate { public: explicit DeleteExpressionResponsePrivate(DeleteExpressionResponse * const q); void parseDeleteExpressionResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(DeleteExpressionResponse) Q_DISABLE_COPY(DeleteExpressionResponsePrivate) }; } // namespace CloudSearch } // namespace QtAws #endif
/* libpharmmlcpp - Library to handle PharmML * Copyright (C) 2016 Rikard Nordgren and Gunnar Yngman * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * his library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef PHARMMLCPP_DATASET_H_ #define PHARMMLCPP_DATASET_H_ #include <xml/xml.h> #include <PharmML/PharmMLReader.h> #include <PharmML/PharmMLSection.h> #include <AST/AstNode.h> #include <visitors/AstNodeVisitor.h> #include <visitors/XMLAstVisitor.h> #include <AST/Scalar.h> namespace pharmmlcpp { // Class HeaderDefinition (single header specification of dataset) class HeaderDefinition { public: HeaderDefinition(PharmMLReader &reader, xml::Node node); void parse(PharmMLReader &reader, xml::Node node); xml::Node xml(); void addHeaderRow(xml::Node node); std::string getName(); int getRowNumber(); private: std::string name; int rowNumber; }; // Class ColumnDefinition (single column specification of dataset) class ColumnDefinition { public: ColumnDefinition(PharmMLReader &reader, xml::Node node); void parse(PharmMLReader &reader, xml::Node node); xml::Node xml(); std::string getId(); std::string getType(); std::string getLevel(); std::string getValueType(); int getNum(); private: std::string id; std::string type; std::string level; std::string valueType; int num; }; // Class DatasetDefinition (header/column specifications of dataset) class DatasetDefinition { public: DatasetDefinition(PharmMLReader &reader, xml::Node node); void parse(PharmMLReader &reader, xml::Node node); xml::Node xml(); ColumnDefinition *getColumnDefinition(int colNum); std::vector<ColumnDefinition *> getColumnDefinitions(); int getNumColumns(); private: std::vector<HeaderDefinition *> headers; std::vector<ColumnDefinition *> columns; std::shared_ptr<AstNode> ignoreCondition; std::string ignoreSymbols; // 1 to 5 non-whitespace characters }; // class ExternalFile (data is stored externally) class ExternalFile { public: ExternalFile(PharmMLReader &reader, xml::Node node); void parse(PharmMLReader &reader, xml::Node node); std::string getOid(); std::string getPath(); std::string getFormat(); std::string getDelimiter(); void accept(PharmMLVisitor *visitor); private: std::string oid; std::string path; std::string format; std::string delimiter; // TODO: Support MissingDataMapType }; // Class DataColumn (single column with its definition) class DataColumn { public: DataColumn(PharmMLReader &reader, xml::Node table_node, ColumnDefinition *definition); void parse(PharmMLReader &reader, xml::Node table_node); std::vector<std::shared_ptr<AstNode>> getData(); ColumnDefinition *getDefinition(); std::shared_ptr<AstNode> getElement(int row); int getNumRows(); void accept(PharmMLVisitor *visitor); private: ColumnDefinition *definition; std::vector<std::shared_ptr<AstNode>> column; int numRows; }; // Class Dataset (top-level of above) class Dataset : public PharmMLSection { public: Dataset(PharmMLReader &reader, xml::Node node); void parse(PharmMLReader &reader, xml::Node node); xml::Node xml(); std::string getOid(); DatasetDefinition *getDefinition(); bool isExternal(); ExternalFile *getExternal(); std::vector<DataColumn *> getColumns(); DataColumn *getColumnFromType(std::string columnType); DataColumn *getIdvColumn(); void setName(std::string name); std::string getName(); void accept(PharmMLVisitor *visitor); private: std::string oid; DatasetDefinition *definition = nullptr; ExternalFile *externalFile = nullptr; std::vector<DataColumn *> columns; std::string name; }; } #endif
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_UPDATEJOBSTATUSREQUEST_H #define QTAWS_UPDATEJOBSTATUSREQUEST_H #include "s3controlrequest.h" namespace QtAws { namespace S3Control { class UpdateJobStatusRequestPrivate; class QTAWSS3CONTROL_EXPORT UpdateJobStatusRequest : public S3ControlRequest { public: UpdateJobStatusRequest(const UpdateJobStatusRequest &other); UpdateJobStatusRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(UpdateJobStatusRequest) }; } // namespace S3Control } // namespace QtAws #endif
// Created file "Lib\src\PortableDeviceGuids\X64\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(WPD_CONTENT_TYPE_AUDIO_ALBUM, 0xaa18737e, 0x5009, 0x48fa, 0xae, 0x21, 0x85, 0xf2, 0x43, 0x83, 0xb4, 0xe6);
// Created file "Lib\src\sensorsapi\sensorsapi" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(GUID_PROCESSOR_CORE_PARKING_INCREASE_TIME, 0x2ddd5a84, 0x5a71, 0x437e, 0x91, 0x2a, 0xdb, 0x0b, 0x8c, 0x78, 0x87, 0x32);
#pragma once #ifndef SAMPLE2_H #define SAMPLE2_H #include "WireApplication.h" namespace Wire { class Sample2 : public WIREAPPLICATION { WIRE_DECLARE_INITIALIZE; typedef WIREAPPLICATION Parent; public: Sample2(); virtual Bool OnInitialize(); virtual void OnIdle(); private: Node* CreateHelicopter(); RenderObject* CreateCube(ColorRGBA top, ColorRGBA bottom); CameraPtr mspCamera; Culler mCuller; Float mAngle; Double mLastTime; NodePtr mspRoot; NodePtr mspTopRotor; NodePtr mspRearRotor; }; WIRE_REGISTER_INITIALIZE(Sample2); } #endif
/***************************************************************************** Copyright (c) 2010, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************** * Contents: Native high-level C interface to LAPACK function ssteqr * Author: Intel Corporation * Generated October, 2010 *****************************************************************************/ #include "lapacke.h" #include "lapacke_utils.h" lapack_int LAPACKE_ssteqr( int matrix_order, char compz, lapack_int n, float* d, float* e, float* z, lapack_int ldz ) { lapack_int info = 0; /* Additional scalars declarations for work arrays */ lapack_int lwork; float* work = NULL; if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_ssteqr", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_s_nancheck( n, d, 1 ) ) { return -4; } if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { return -5; } if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { if( LAPACKE_sge_nancheck( matrix_order, n, n, z, ldz ) ) { return -6; } } #endif /* Additional scalars initializations for work arrays */ if( LAPACKE_lsame( compz, 'n' ) ) { lwork = 1; } else { lwork = MAX(1,2*n-2); } /* Allocate memory for working array(s) */ work = (float*)LAPACKE_malloc( sizeof(float) * lwork ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; } /* Call middle-level interface */ info = LAPACKE_ssteqr_work( matrix_order, compz, n, d, e, z, ldz, work ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_ssteqr", info ); } return info; }
#ifndef SQLTABLEMODEL_H #define SQLTABLEMODEL_H #include <QSqlTableModel> //------------------------------------------------------------------------------ namespace Patient { // Table name: extern const QString TableName; // Field names: extern const QString Id; extern const QString LastName; extern const QString FirstName; extern const QString MiddleName; extern const QString BirthDate; extern const QString Sex; extern const QString Addresses; extern const QString Phones; extern const QString Job; extern const QString Post; extern const QString PassportSeries; extern const QString PassportNumber; extern const QString PassportIssueDate; extern const QString PassportIssuingAuthority; extern const QString PassportPersonalNumber; extern const QString AdditionalInformation; } //------------------------------------------------------------------------------ namespace ReadablePatient { // Readable field names: extern const char *LastName; extern const char *FirstName; extern const char *MiddleName; } //------------------------------------------------------------------------------ class SqlTableModel : public QSqlTableModel { Q_OBJECT public: //-explicit SqlTableModel(QObject *parent = 0); explicit SqlTableModel(const QString &tableName, QObject *parent = 0); //-! 2 explicit - это нормально? }; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ class PatientSqlTableModel : public SqlTableModel { Q_OBJECT public: explicit PatientSqlTableModel(QObject *parent = 0); /*-explicit PatientSqlTableModel(const QString &tableName, QObject *parent = 0);-*/ }; //------------------------------------------------------------------------------ #endif // SQLTABLEMODEL_H
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_LISTCHANNELMEMBERSHIPSFORAPPINSTANCEUSERREQUEST_P_H #define QTAWS_LISTCHANNELMEMBERSHIPSFORAPPINSTANCEUSERREQUEST_P_H #include "chimerequest_p.h" #include "listchannelmembershipsforappinstanceuserrequest.h" namespace QtAws { namespace Chime { class ListChannelMembershipsForAppInstanceUserRequest; class ListChannelMembershipsForAppInstanceUserRequestPrivate : public ChimeRequestPrivate { public: ListChannelMembershipsForAppInstanceUserRequestPrivate(const ChimeRequest::Action action, ListChannelMembershipsForAppInstanceUserRequest * const q); ListChannelMembershipsForAppInstanceUserRequestPrivate(const ListChannelMembershipsForAppInstanceUserRequestPrivate &other, ListChannelMembershipsForAppInstanceUserRequest * const q); private: Q_DECLARE_PUBLIC(ListChannelMembershipsForAppInstanceUserRequest) }; } // namespace Chime } // namespace QtAws #endif
// Created file "Lib\src\Uuid\functiondiscovery" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(PKEY_DeviceDisplay_PrimaryCategory, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57);
/***************************************************************************** Copyright (c) 2010, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************** * Contents: Native high-level C interface to LAPACK function ssbev * Author: Intel Corporation * Generated October, 2010 *****************************************************************************/ #include "lapacke.h" #include "lapacke_utils.h" lapack_int LAPACKE_ssbev( int matrix_order, char jobz, char uplo, lapack_int n, lapack_int kd, float* ab, lapack_int ldab, float* w, float* z, lapack_int ldz ) { lapack_int info = 0; float* work = NULL; if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_ssbev", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_ssb_nancheck( matrix_order, uplo, n, kd, ab, ldab ) ) { return -6; } #endif /* Allocate memory for working array(s) */ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n-2) ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; } /* Call middle-level interface */ info = LAPACKE_ssbev_work( matrix_order, jobz, uplo, n, kd, ab, ldab, w, z, ldz, work ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_ssbev", info ); } return info; }
/* cladiv.f -- translated by f2c (version 20061008). You must link the resulting object file with libf2c: on Microsoft Windows system, link with libf2c.lib; on Linux or Unix systems, link with .../path/to/libf2c.a -lm or, if you install libf2c.a in a standard place, with -lf2c -lm -- in that order, at the end of the command line, as in cc *.o -lf2c -lm Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., http://www.netlib.org/f2c/libf2c.zip */ #include "pnl/pnl_f2c.h" /* Complex */ VOID cladiv_(complex * ret_val, complex *x, complex *y) { /* System generated locals */ float r__1, r__2, r__3, r__4; complex q__1; /* Builtin functions */ double r_imag(complex *); /* Local variables */ float zi, zr; extern int sladiv_(float *, float *, float *, float *, float * , float *); /* -- LAPACK auxiliary routine (version 3.2) -- */ /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */ /* November 2006 */ /* .. Scalar Arguments .. */ /* .. */ /* Purpose */ /* ======= */ /* CLADIV := X / Y, where X and Y are complex. The computation of X / Y */ /* will not overflow on an intermediary step unless the results */ /* overflows. */ /* Arguments */ /* ========= */ /* X (input) COMPLEX */ /* Y (input) COMPLEX */ /* The complex scalars X and Y. */ /* ===================================================================== */ /* .. Local Scalars .. */ /* .. */ /* .. External Subroutines .. */ /* .. */ /* .. Intrinsic Functions .. */ /* .. */ /* .. Executable Statements .. */ r__1 = x->r; r__2 = r_imag(x); r__3 = y->r; r__4 = r_imag(y); sladiv_(&r__1, &r__2, &r__3, &r__4, &zr, &zi); q__1.r = zr, q__1.i = zi; ret_val->r = q__1.r, ret_val->i = q__1.i; return ; /* End of CLADIV */ } /* cladiv_ */
/* * ipsw.c * Definitions for communicating with Apple's TSS server. * * Copyright (c) 2010 Joshua Hill. All Rights Reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef IDEVICERESTORE_TSS_H #define IDEVICERESTORE_TSS_H #ifdef __cplusplus extern "C" { #endif #include <plist/plist.h> plist_t tss_send_request(plist_t request); plist_t tss_create_request(plist_t build_identity, uint64_t ecid, unsigned char* nonce, int nonce_size, int buildno); int tss_get_ticket(plist_t tss, unsigned char** ticket, uint32_t* tlen); int tss_get_entry_path(plist_t tss, const char* entry, char** path); int tss_get_blob_by_path(plist_t tss, const char* path, char** blob); int tss_get_blob_by_name(plist_t tss, const char* entry, char** blob); #ifdef __cplusplus } #endif #endif
/* * The libcdata header wrapper * * Copyright (C) 2011-2022, Joachim Metz <joachim.metz@gmail.com> * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ #if !defined( _LIBSCCA_LIBCDATA_H ) #define _LIBSCCA_LIBCDATA_H #include <common.h> /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) #include <libcdata_array.h> #include <libcdata_btree.h> #include <libcdata_definitions.h> #include <libcdata_list.h> #include <libcdata_list_element.h> #include <libcdata_range_list.h> #include <libcdata_tree_node.h> #include <libcdata_types.h> #else /* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT * before including libcdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDATA_DLL_IMPORT #endif #include <libcdata.h> #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBSCCA_LIBCDATA_H ) */
#ifndef __SUBSTRATE__PARALLELISM_STRUCT_H #define __SUBSTRATE__PARALLELISM_STRUCT_H #include <stdbool.h> #include <stdio.h> struct substrate_parallelism_profile { bool * parallelizable_loops; /*< The loops that can be parallelized (from outer to inner loop) */ unsigned int size; }; struct substrate_parallelism_profile substrate_parallelism_profile_clone( struct substrate_parallelism_profile * pp); void substrate_parallelism_profile_free( struct substrate_parallelism_profile * pp); void substrate_parallelism_profile_dump( FILE * output_stream, struct substrate_parallelism_profile * pp); void substrate_parallelism_profile_idump( FILE * output_stream, struct substrate_parallelism_profile * pp, unsigned int level); struct substrate_parallelism_profile substrate_parallelism_profile_fusion( struct substrate_parallelism_profile * pp1, struct substrate_parallelism_profile * pp2); #endif
/************************************************************************** * * Copyright 2011-2015 by Andrey Butok. FNET Community. * *************************************************************************** * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License Version 3 * or later (the "LGPL"). * * As a special exception, the copyright holders of the FNET project give you * permission to link the FNET sources with independent modules to produce an * executable, regardless of the license terms of these independent modules, * and to copy and distribute the resulting executable under terms of your * choice, provided that you also meet, for each linked independent module, * the terms and conditions of the license of that module. * An independent module is a module which is not derived from or based * on this library. * If you modify the FNET sources, you may extend this exception * to your version of the FNET sources, but you are not obligated * to do so. If you do not wish to do so, delete this * exception statement from your version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License * and the GNU Lesser General Public License along with this program. * If not, see <http://www.gnu.org/licenses/>. * **********************************************************************/ /*! * * @file fnet_os.h * * @author Andrey Butok * * @brief FNET OS API. * ***************************************************************************/ #ifndef _FNET_OS_H_ #define _FNET_OS_H_ #include "fnet_config.h" #if FNET_CFG_OS_MUTEX int fnet_os_mutex_init(void); void fnet_os_mutex_lock(void); void fnet_os_mutex_unlock(void); void fnet_os_mutex_release(void); #else #define fnet_os_mutex_init() FNET_OK #define fnet_os_mutex_lock() do{}while(0) #define fnet_os_mutex_unlock() do{}while(0) #define fnet_os_mutex_release() do{}while(0) #endif #if FNET_CFG_OS_ISR void fnet_os_isr(void); #else #define fnet_os_isr(void) do{}while(0) #endif #if FNET_CFG_OS_EVENT int fnet_os_event_init(void); void fnet_os_event_wait(void); void fnet_os_event_raise(void); #else #define fnet_os_event_init() FNET_OK #define fnet_os_event_wait() do{}while(0) #define fnet_os_event_raise() do{}while(0) #endif int fnet_os_timer_init(unsigned int period_ms); void fnet_os_timer_release(void); #endif /* _FNET_OS_H_ */
/* * libgphoto++ - modern c++ wrapper library for gphoto2 * Copyright (C) 2016 Marco Gulino <marco AT gulinux.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef LIBGPHOTO_CPP_UTILS_READ_JPEG_IMAGE_H #define LIBGPHOTO_CPP_UTILS_READ_JPEG_IMAGE_H #include "read_image.h" #include "utils/dptr.h" namespace GPhotoCPP { class ReadJPEGImage : public ReadImage { public: ReadJPEGImage(); ~ReadJPEGImage(); virtual Image read(const std::string& file_path); virtual Image read(const std::vector< uint8_t >& data, const std::string &filename); private: DPTR }; } #endif // GPHOTO_READJPEGIMAGE_H
// Created file "Lib\src\ADSIid\guid" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(DBROWCOL_PARENTNAME, 0x0c733ab6, 0x2a1c, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
// Created file "Lib\src\dxguid\d3d10guid" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(IID_ID3D10BlendState1, 0xedad8d99, 0x8a35, 0x4d6d, 0x85, 0x66, 0x2e, 0xa2, 0x76, 0xcd, 0xe1, 0x61);
// Created file "Lib\src\Uuid\X64\scripteddiag_i" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(IID_IScriptedDiagnosticInformation, 0x2db48474, 0xd18b, 0x4315, 0xb5, 0x52, 0xdc, 0x6c, 0xf5, 0xf6, 0x51, 0xd5);
// Created file "Lib\src\Uuid\i_mshtml" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(IID_IHTMLDOMTextNode2, 0x3050f809, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
/* Area: ffi_call, closure_call Purpose: Check structure passing with different structure size. Depending on the ABI. Check bigger struct which overlaps the gp and fp register count on Darwin/AIX/ppc64. Limitations: none. PR: none. Originator: <andreast@gcc.gnu.org> 20030828 */ /* { dg-do run } */ #include "ffitest.h" typedef struct cls_struct_64byte { double a; double b; double c; double d; double e; double f; double g; double h; } cls_struct_64byte; cls_struct_64byte cls_struct_64byte_fn(struct cls_struct_64byte b0, struct cls_struct_64byte b1, struct cls_struct_64byte b2, struct cls_struct_64byte b3) { struct cls_struct_64byte result; result.a = b0.a + b1.a + b2.a + b3.a; result.b = b0.b + b1.b + b2.b + b3.b; result.c = b0.c + b1.c + b2.c + b3.c; result.d = b0.d + b1.d + b2.d + b3.d; result.e = b0.e + b1.e + b2.e + b3.e; result.f = b0.f + b1.f + b2.f + b3.f; result.g = b0.g + b1.g + b2.g + b3.g; result.h = b0.h + b1.h + b2.h + b3.h; printf("%g %g %g %g %g %g %g %g\n", result.a, result.b, result.c, result.d, result.e, result.f, result.g, result.h); return result; } static void cls_struct_64byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__) { struct cls_struct_64byte b0, b1, b2, b3; b0 = *(struct cls_struct_64byte*)(args[0]); b1 = *(struct cls_struct_64byte*)(args[1]); b2 = *(struct cls_struct_64byte*)(args[2]); b3 = *(struct cls_struct_64byte*)(args[3]); *(cls_struct_64byte*)resp = cls_struct_64byte_fn(b0, b1, b2, b3); } int main (void) { ffi_cif cif; void *code; ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code); void* args_dbl[5]; ffi_type* cls_struct_fields[9]; ffi_type cls_struct_type; ffi_type* dbl_arg_types[5]; cls_struct_type.size = 0; cls_struct_type.alignment = 0; cls_struct_type.type = FFI_TYPE_STRUCT; cls_struct_type.elements = cls_struct_fields; struct cls_struct_64byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0 }; struct cls_struct_64byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0 }; struct cls_struct_64byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0 }; struct cls_struct_64byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0 }; struct cls_struct_64byte res_dbl; cls_struct_fields[0] = &ffi_type_double; cls_struct_fields[1] = &ffi_type_double; cls_struct_fields[2] = &ffi_type_double; cls_struct_fields[3] = &ffi_type_double; cls_struct_fields[4] = &ffi_type_double; cls_struct_fields[5] = &ffi_type_double; cls_struct_fields[6] = &ffi_type_double; cls_struct_fields[7] = &ffi_type_double; cls_struct_fields[8] = NULL; dbl_arg_types[0] = &cls_struct_type; dbl_arg_types[1] = &cls_struct_type; dbl_arg_types[2] = &cls_struct_type; dbl_arg_types[3] = &cls_struct_type; dbl_arg_types[4] = NULL; CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type, dbl_arg_types) == FFI_OK); args_dbl[0] = &e_dbl; args_dbl[1] = &f_dbl; args_dbl[2] = &g_dbl; args_dbl[3] = &h_dbl; args_dbl[4] = NULL; ffi_call(&cif, FFI_FN(cls_struct_64byte_fn), &res_dbl, args_dbl); /* { dg-output "22 15 17 25 6 13 19 18" } */ printf("res: %g %g %g %g %g %g %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h); /* { dg-output "\nres: 22 15 17 25 6 13 19 18" } */ CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_64byte_gn, NULL, code) == FFI_OK); res_dbl = ((cls_struct_64byte(*)(cls_struct_64byte, cls_struct_64byte, cls_struct_64byte, cls_struct_64byte)) (code))(e_dbl, f_dbl, g_dbl, h_dbl); /* { dg-output "\n22 15 17 25 6 13 19 18" } */ printf("res: %g %g %g %g %g %g %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h); /* { dg-output "\nres: 22 15 17 25 6 13 19 18" } */ exit(0); }
/* * MPEG Audio parser * Copyright (c) 2003 Fabrice Bellard * Copyright (c) 2003 Michael Niedermayer * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "parser.h" #include "mpegaudiodecheader.h" #include "libavutil/common.h" #include "libavformat/id3v1.h" // for ID3v1_TAG_SIZE typedef struct MpegAudioParseContext { ParseContext pc; int frame_size; uint32_t header; int header_count; int no_bitrate; } MpegAudioParseContext; #define MPA_HEADER_SIZE 4 /* header + layer + freq + lsf/mpeg25 */ #define SAME_HEADER_MASK \ (0xffe00000 | (3 << 17) | (3 << 10) | (3 << 19)) static int mpegaudio_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size) { MpegAudioParseContext *s = s1->priv_data; ParseContext *pc = &s->pc; uint32_t state= pc->state; int i; int next= END_NOT_FOUND; int flush = !buf_size; for(i=0; i<buf_size; ){ if(s->frame_size){ int inc= FFMIN(buf_size - i, s->frame_size); i += inc; s->frame_size -= inc; state = 0; if(!s->frame_size){ next= i; break; } }else{ while(i<buf_size){ int ret, sr, channels, bit_rate, frame_size; enum AVCodecID codec_id = avctx->codec_id; state= (state<<8) + buf[i++]; ret = ff_mpa_decode_header(state, &sr, &channels, &frame_size, &bit_rate, &codec_id); if (ret < 4) { if (i > 4) s->header_count = -2; } else { int header_threshold = avctx->codec_id != AV_CODEC_ID_NONE && avctx->codec_id != codec_id; if((state&SAME_HEADER_MASK) != (s->header&SAME_HEADER_MASK) && s->header) s->header_count= -3; s->header= state; s->header_count++; s->frame_size = ret-4; if (s->header_count > header_threshold) { avctx->sample_rate= sr; avctx->channels = channels; s1->duration = frame_size; avctx->codec_id = codec_id; if (s->no_bitrate || !avctx->bit_rate) { s->no_bitrate = 1; avctx->bit_rate += (bit_rate - avctx->bit_rate) / (s->header_count - header_threshold); } } if (s1->flags & PARSER_FLAG_COMPLETE_FRAMES) { s->frame_size = 0; next = buf_size; } else if (codec_id == AV_CODEC_ID_MP3ADU) { avpriv_report_missing_feature(avctx, "MP3ADU full parser"); *poutbuf = NULL; *poutbuf_size = 0; return buf_size; /* parsers must not return error codes */ } break; } } } } pc->state= state; if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { *poutbuf = NULL; *poutbuf_size = 0; return buf_size; } if (flush && buf_size >= ID3v1_TAG_SIZE && memcmp(buf, "TAG", 3) == 0) { *poutbuf = NULL; *poutbuf_size = 0; return next; } *poutbuf = buf; *poutbuf_size = buf_size; return next; } AVCodecParser ff_mpegaudio_parser = { .codec_ids = { AV_CODEC_ID_MP1, AV_CODEC_ID_MP2, AV_CODEC_ID_MP3, AV_CODEC_ID_MP3ADU }, .priv_data_size = sizeof(MpegAudioParseContext), .parser_parse = mpegaudio_parse, .parser_close = ff_parse_close, };
// // Copyright (c) 2016-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. // #import <SocketRocket/NSRunLoop+SRWebSocket.h> // Empty function that force links the object file for the category. extern void import_NSRunLoop_SRWebSocket();
/****************************************************************************** * * Project: ConverterPIX @ Core * File: /prefab/curve.h * * _____ _ _____ _______ __ * / ____| | | | __ \_ _\ \ / / * | | ___ _ ____ _____ _ __| |_ ___ _ __| |__) || | \ V / * | | / _ \| '_ \ \ / / _ \ '__| __/ _ \ '__| ___/ | | > < * | |___| (_) | | | \ V / __/ | | || __/ | | | _| |_ / . \ * \_____\___/|_| |_|\_/ \___|_| \__\___|_| |_| |_____/_/ \_\ * * * Copyright (C) 2017 Michal Wojtowicz. * All rights reserved. * * This software is ditributed WITHOUT ANY WARRANTY; without even * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the copyright file for more information. * *****************************************************************************/ #pragma once #include <math/vector.h> #include <math/quaternion.h> class Curve { private: String m_name; u32 m_flags; u32 m_leadsToNodes; Float3 m_startPosition; Quaternion m_startRotation; Float3 m_endPosition; Quaternion m_endRotation; float m_length; i32 m_nextLines[4]; i32 m_prevLines[4]; u32 m_nextLinesCount; u32 m_prevLinesCount; i32 m_semaphoreId; String m_trafficRule; friend Prefab; }; /* eof */
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_GETAGGREGATECONFORMANCEPACKCOMPLIANCESUMMARYRESPONSE_P_H #define QTAWS_GETAGGREGATECONFORMANCEPACKCOMPLIANCESUMMARYRESPONSE_P_H #include "configserviceresponse_p.h" namespace QtAws { namespace ConfigService { class GetAggregateConformancePackComplianceSummaryResponse; class GetAggregateConformancePackComplianceSummaryResponsePrivate : public ConfigServiceResponsePrivate { public: explicit GetAggregateConformancePackComplianceSummaryResponsePrivate(GetAggregateConformancePackComplianceSummaryResponse * const q); void parseGetAggregateConformancePackComplianceSummaryResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(GetAggregateConformancePackComplianceSummaryResponse) Q_DISABLE_COPY(GetAggregateConformancePackComplianceSummaryResponsePrivate) }; } // namespace ConfigService } // namespace QtAws #endif
#pragma once #include <QTreeWidget> #include <QKeyEvent> class QAdvancedTreeWidget: public QTreeWidget { Q_OBJECT public: signals: void keyPress(QAdvancedTreeWidget*, QKeyEvent*); protected: virtual void keyPressEvent(QKeyEvent*); };
/* * invoke_instructions.h * * Copyright (c) 2008-2010 CSIRO, Delft University of Technology. * * This file is part of Darjeeling. * * Darjeeling is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Darjeeling is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Darjeeling. If not, see <http://www.gnu.org/licenses/>. */ /** * Return from function */ static inline void RETURN() { // return returnFromMethod(); } /** * Return from short/byte/boolean/char function */ static inline void SRETURN() { // pop return value off the stack int16_t ret = popShort(); // return returnFromMethod(); // push return value on the runtime stack pushShort(ret); } /** * Return from int function */ static inline void IRETURN() { // pop return value off the stack int32_t ret = popInt(); // return returnFromMethod(); // push return value on the runtime stack pushInt(ret); } /** * Return from long function */ static inline void LRETURN() { // pop return value off the stack int64_t ret = popLong(); // return returnFromMethod(); // push return value on the runtime stack pushLong(ret); } static inline void ARETURN() { // pop return value off the stack ref_t ret = popRef(); // return returnFromMethod(); // push return value on the runtime stack pushRef(ret); } static inline void INVOKESTATIC() { dj_local_id localId = dj_fetchLocalId(); dj_global_id globalId = dj_global_id_resolve(dj_exec_getCurrentInfusion(), localId); callMethod(globalId, false); } static inline void INVOKESPECIAL() { dj_local_id localId = dj_fetchLocalId(); dj_global_id globalId = dj_global_id_resolve(dj_exec_getCurrentInfusion(), localId); callMethod(globalId, true); } static inline void INVOKEVIRTUAL() { // fetch the method definition's global id and resolve it dj_local_id dj_local_id = dj_fetchLocalId(); // fetch the number of arguments for the method. uint8_t nr_ref_args = fetch(); // peek the object on the stack dj_object *object = REF_TO_VOIDP(peekDeepRef(nr_ref_args)); // if null, throw exception if (object==NULL) { dj_exec_createAndThrow(BASE_CDEF_java_lang_NullPointerException); return; } // check if the object is still valid if (dj_object_getRuntimeId(object)==CHUNKID_INVALID) { dj_exec_createAndThrow(BASE_CDEF_javax_darjeeling_vm_ClassUnloadedException); return; } dj_global_id resolvedMethodDefId = dj_global_id_resolve(dj_exec_getCurrentInfusion(), dj_local_id); DEBUG_LOG(">>>>> invokevirtual METHOD DEF %x.%d\n", resolvedMethodDefId.infusion, resolvedMethodDefId.entity_id); // lookup the virtual method dj_global_id methodImplId = dj_global_id_lookupVirtualMethod(resolvedMethodDefId, object); DEBUG_LOG(">>>>> invokevirtual METHOD IMPL %x.%d\n", methodImplId.infusion, methodImplId.entity_id); // check if method not found, and throw an error if this is the case. else, invoke the method if (methodImplId.infusion==NULL) { DEBUG_LOG("methodImplId.infusion is NULL at INVOKEVIRTUAL %p.%d\n", resolvedMethodDefId.infusion, resolvedMethodDefId.entity_id); dj_exec_throwHere(dj_vm_createSysLibObject(dj_exec_getVM(), BASE_CDEF_java_lang_VirtualMachineError)); } else { callMethod(methodImplId, true); } } static inline void INVOKEINTERFACE() { INVOKEVIRTUAL(); }
/*----------------------------------------------------------------------*/ /* modul : basetype.h */ /* description: interface */ /* */ /* author : Siemens AG, Bensheim */ /* date : unknown */ /* changed by : Alireza Esmailpour */ /* date : 04.11.1994 */ /* */ /* changed by : Matthias Block */ /* date : 21.12.1999 */ /* change : Zusaetzliche Konstante "NO_MEMORY" fuer die */ /* Speicherverwaltung der Previews eingefuegt */ /*----------------------------------------------------------------------*/ #ifndef _BASETYPE_H_ #define _BASETYPE_H_ /*----------------------------------------------------------------------*/ /* common defines used by ordinary C-programmers */ /*----------------------------------------------------------------------*/ #ifndef SUCCESS #define SUCCESS (0) #endif #ifndef FAILURE #define FAILURE (-1) #endif #ifndef FOREVER #define FOREVER for(;;) #endif #ifndef NIL #define NIL (-1) #endif #ifndef NO_MEMORY #define NO_MEMORY (-2) #endif /*----------------------------------------------------------------------*/ /* defines */ /*----------------------------------------------------------------------*/ #define SHL(j,c) ((j)<<(c)) #define SHR(j,c) ((j)>>(c)) #define ADDR(var) (Pointer) &(var) #define OR || #define AND && #define XOR ^ #define MOD % #define DIV / #define NOT(arg) (! (arg)) #define NEG(arg) (~ (arg)) /*----------------------------------------------------------------------*/ /* datatypes */ /*----------------------------------------------------------------------*/ /* typedef char* String; */ typedef unsigned char uByte; /* typedef signed char sByte; */ typedef unsigned short uWord; typedef short sWord; typedef unsigned long uDoubleWord; typedef long sDoubleWord; typedef double ExtendedReal; typedef uByte* Pointer; typedef Pointer* Handle; /*----------------------------------------------------------------------*/ /* Constants */ /*----------------------------------------------------------------------*/ #define kMaxuByte 0xFF #define kMaxsByte 0x7F #define kMaxuWord 0xFFFF #define kMaxsWord 0x7FFF #define kMaxuDoubleWord 0xFFFFFFFFUL #define kMaxsDoubleWord 0x7FFFFFFFL #define kMaxReal 3.37E+38 #define kMinReal 8.43E-37 #define kEpsReal 1.19209290E-07F #define kMaxExtendedReal 1.797693E+308 #define kMinExtendedReal 2.225074E-308 #define kEpsExtendedReal 2.2204460492503131E-16 #endif /* _BASETYPE_H_ */
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_LISTRESTOREJOBSRESPONSE_H #define QTAWS_LISTRESTOREJOBSRESPONSE_H #include "backupresponse.h" #include "listrestorejobsrequest.h" namespace QtAws { namespace Backup { class ListRestoreJobsResponsePrivate; class QTAWSBACKUP_EXPORT ListRestoreJobsResponse : public BackupResponse { Q_OBJECT public: ListRestoreJobsResponse(const ListRestoreJobsRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const ListRestoreJobsRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(ListRestoreJobsResponse) Q_DISABLE_COPY(ListRestoreJobsResponse) }; } // namespace Backup } // namespace QtAws #endif
/* * This file is part of the Ideal Library * Copyright (C) 2009 Rafael Fernández López <ereslibre@ereslibre.es> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef OBJECT_H #define OBJECT_H #include <ideal_export.h> #include <core/ideal_signal.h> namespace IdealCore { class Application; /** * @class Object object.h core/object.h * * The base class for Ideal library usage. Inheriting this class will allow you to use signals * and connect them to methods in any class that inherits IdealCore::Object. It contains the basic * functionality offered by the Ideal Library. * * You can check how to work with signals with several examples: * - @ref workingWithSignals * * @author Rafael Fernández López <ereslibre@ereslibre.es> */ class IDEAL_EXPORT Object : public SignalResource { // This friend classes are allowed to use the default constructor friend class Application; friend class Extension; friend class Module; friend class Timer; public: Object(Object *parent); virtual ~Object(); /** * Sets whether children of this object should be deleted recursively when this object is. */ void setDeleteChildrenRecursively(bool deleteChildrenRecursively); /** * @return Whether this object children will be removed when this object is. * * @note true by default. */ bool isDeleteChildrenRecursively() const; /** * Sets whether signals are blocked for this object or not. If @p blockedSignals is true, this * object won't receive any call coming from a signal. */ void setBlockedSignals(bool blockedSignals); /** * @return Whether signals are blocked for this object or not. * * @note false by default. */ bool areSignalsBlocked() const; /** * Sets whether emit() is blocked for all signals of this object. * * @note destroyed signal will always be emitted, even if emit() is blocked for this object. */ void setEmitBlocked(bool emitBlocked); /** * @return Whether emit() is blocked for all signals of this object. * * @note false by default. */ bool isEmitBlocked() const; /** * @return The list of children of this object. */ List<Object*> children() const; /** * @return The parent of this object. */ Object *parent() const; /** * Reparents this object to @p parent. */ void reparent(Object *parent); /** * @return The application this object belongs to. */ Application *application() const; /** * All signals in @p sender will become disconnected from their receivers. * * @note This cannot be undone. If you want to temporarily fake this effect, use setEmitBlocked. * * See @ref workingWithSignals */ static void disconnectSender(Object *sender); /** * All signals connected to @p receiver will be disconnected from it. * * @note If signals were connected to other receivers, those are still connected. * * @note This cannot be undone. If you want to temporarily fake this effect, use setBlockedSignals. * * See @ref workingWithSignals */ static void disconnectReceiver(Object *receiver); /** * Equivalent to disconnectSender() and disconnectReceiver() on @p object. * * See @ref workingWithSignals */ static void fullyDisconnect(Object *object); /** * Deletes this object right now. */ void deleteNow(); /** * Deletes this object on the next event loop. */ void deleteLater(); protected: /** * @internal */ virtual void signalCreated(const SignalBase *signal); /** * @internal */ virtual void signalConnected(const SignalBase *signal); /** * @internal */ virtual void signalDisconnected(const SignalBase *signal); /** * @internal */ virtual List<const SignalBase*> signals() const; private: /** * @internal */ Object(); class Private; Private *const d; public: IDEAL_SIGNAL(destroyed); }; } #endif //OBJECT_H
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_CREATEELASTICSEARCHDOMAINRESPONSE_H #define QTAWS_CREATEELASTICSEARCHDOMAINRESPONSE_H #include "elasticsearchserviceresponse.h" #include "createelasticsearchdomainrequest.h" namespace QtAws { namespace ElasticsearchService { class CreateElasticsearchDomainResponsePrivate; class QTAWSELASTICSEARCHSERVICE_EXPORT CreateElasticsearchDomainResponse : public ElasticsearchServiceResponse { Q_OBJECT public: CreateElasticsearchDomainResponse(const CreateElasticsearchDomainRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const CreateElasticsearchDomainRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(CreateElasticsearchDomainResponse) Q_DISABLE_COPY(CreateElasticsearchDomainResponse) }; } // namespace ElasticsearchService } // namespace QtAws #endif
#ifndef GETIMAGE_GLOBAL_H #define GETIMAGE_GLOBAL_H #include <QtCore/qglobal.h> #if defined(QIMAGEGRABBER_LIBRARY) # define QIMAGEGRABBERSHARED_EXPORT Q_DECL_EXPORT #else # define QIMAGEGRABBERSHARED_EXPORT Q_DECL_IMPORT #endif #endif // GETIMAGE_GLOBAL_H
/* -*- mode:C++ -*- FailCodes.h Listing of failure codes Copyright (C) 2014 The Regents of the University of New Mexico. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file FailCodes.h Listing of failure codes \author David H. Ackley. \date (C) 2014 All rights reserved. \lgpl */ XX(INCOMPLETE_CODE) XX(ILLEGAL_ARGUMENT) XX(NULL_POINTER) XX(ILLEGAL_STATE) XX(UNINITIALIZED_VALUE) XX(ARRAY_INDEX_OUT_OF_BOUNDS) XX(DUPLICATE_ENTRY) XX(UNCAUGHT_FAILURE) XX(UNKNOWN_ELEMENT) XX(UNREACHABLE_CODE) XX(OUT_OF_ROOM) XX(NOT_FOUND) XX(BAD_FORMAT_ARG) XX(IO_ERROR) XX(OUT_OF_RESOURCES) XX(ILLEGAL_INPUT) XX(NON_ZERO) XX(UNSUPPORTED_OPERATION) XX(INCONSISTENT_ATOM) XX(DEPRECATED) XX(LOCK_FAILURE)
/** ****************************************************************************** * @file stm32f4xx_it.c * @brief Interrupt Service Routines. ****************************************************************************** * * COPYRIGHT(c) 2015 STMicroelectronics * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "stm32f4xx_hal.h" #include "stm32f4xx.h" #include "stm32f4xx_it.h" #include "cmsis_os.h" /* USER CODE BEGIN 0 */ #include "hal.h" /* USER CODE END 0 */ /* External variables --------------------------------------------------------*/ extern void xPortSysTickHandler(void); extern ETH_HandleTypeDef heth; /******************************************************************************/ /* Cortex-M4 Processor Interruption and Exception Handlers */ /******************************************************************************/ /** * @brief This function handles System tick timer. */ void SysTick_Handler(void) { /* USER CODE BEGIN SysTick_IRQn 0 */ /* USER CODE END SysTick_IRQn 0 */ HAL_IncTick(); osSystickHandler(); /* USER CODE BEGIN SysTick_IRQn 1 */ /* USER CODE END SysTick_IRQn 1 */ } /******************************************************************************/ /* STM32F4xx Peripheral Interrupt Handlers */ /* Add here the Interrupt Handlers for the used peripherals. */ /* For the available peripheral interrupt handler names, */ /* please refer to the startup file (startup_stm32f4xx.s). */ /******************************************************************************/ /** * @brief This function handles EXTI line4 interrupt. */ void EXTI4_IRQHandler(void) { /* USER CODE BEGIN EXTI4_IRQn 0 */ /* USER CODE END EXTI4_IRQn 0 */ HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); /* USER CODE BEGIN EXTI4_IRQn 1 */ hal_rf230_isr(); /* USER CODE END EXTI4_IRQn 1 */ } /** * @brief This function handles Ethernet global interrupt. */ void ETH_IRQHandler(void) { /* USER CODE BEGIN ETH_IRQn 0 */ /* USER CODE END ETH_IRQn 0 */ HAL_ETH_IRQHandler(&heth); /* USER CODE BEGIN ETH_IRQn 1 */ /* USER CODE END ETH_IRQn 1 */ } /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/* DO NOT EDIT THIS FILE - it is machine generated */ #include "jni.h" #include <math.h> #include "../global/functions.h" /* Header for class org_algo4j_math_Trigonometric */ #pragma clang diagnostic push #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection" #ifndef _Included_org_algo4j_math_Trigonometric #define _Included_org_algo4j_math_Trigonometric #ifdef __cplusplus extern "C" { #endif /// __cplusplus /** * Class: org_algo4j_math_Trigonometric * Method: sin * Signature: (D)D */ JNIEXPORT auto JNICALL Java_org_algo4j_math_Trigonometric_sin( JNIEnv *, jclass, jdouble ) -> jdouble; /** * Class: org_algo4j_math_Trigonometric * Method: cos * Signature: (D)D */ JNIEXPORT auto JNICALL Java_org_algo4j_math_Trigonometric_cos( JNIEnv *, jclass, jdouble ) -> jdouble; /** * Class: org_algo4j_math_Trigonometric * Method: tan * Signature: (D)D */ JNIEXPORT auto JNICALL Java_org_algo4j_math_Trigonometric_tan( JNIEnv *, jclass, jdouble ) -> jdouble; /** * Class: org_algo4j_math_Trigonometric * Method: cot * Signature: (D)D */ JNIEXPORT auto JNICALL Java_org_algo4j_math_Trigonometric_cot( JNIEnv *, jclass, jdouble ) -> jdouble; /** * Class: org_algo4j_math_Trigonometric * Method: csc * Signature: (D)D */ JNIEXPORT auto JNICALL Java_org_algo4j_math_Trigonometric_csc( JNIEnv *, jclass, jdouble ) -> jdouble; /** * Class: org_algo4j_math_Trigonometric * Method: sec * Signature: (D)D */ JNIEXPORT auto JNICALL Java_org_algo4j_math_Trigonometric_sec( JNIEnv *, jclass, jdouble ) -> jdouble; #ifdef __cplusplus } #endif /// __cplusplus #endif /// _Included_org_algo4j_math_Trigonometric #pragma clang diagnostic pop
/*-------------------------------------------------------------------- (C) Copyright 2006-2011 Barcelona Supercomputing Center Centro Nacional de Supercomputacion This file is part of Mercurium C/C++ source-to-source compiler. See AUTHORS file in the top level directory for information regarding developers and contributors. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Mercurium C/C++ source-to-source compiler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Mercurium C/C++ source-to-source compiler; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. --------------------------------------------------------------------*/ /* <testinfo> test_generator=config/mercurium-ss </testinfo> */ #pragma css task input(a) void f(int a);
/* * picotm - A system-level transaction manager * Copyright (c) 2018 Thomas Zimmermann <contact@tzimmermann.org> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "file_tx_ops.h" /** * \cond impl || libc_impl || libc_impl_fd * \ingroup libc_impl * \ingroup libc_impl_fd * \file * \endcond */ extern const struct file_tx_ops socket_tx_ops;
#ifndef _B_UNITTEST_H_ #define _B_UNITTEST_H_ #include <B/Core/Common.h> namespace B { class UnitTest { public: UnitTest(); virtual ~UnitTest(); virtual INT32 doTest() = 0; }; } /* namespace B */ #endif /* _B_UNITTEST_H_ */
#include <asf.h> const usart_serial_options_t usart_serial_options = { .baudrate = 9600, .charlength = USART_CHSIZE_8BIT_gc, .paritytype = USART_PMODE_DISABLED_gc, .stopbits = false }; int main (void) { /* Insert system clock initialization code here (sysclk_init()). */ sysclk_init(); board_init(); stdio_serial_init(&USARTC0, &usart_serial_options); /* Insert application code here, after the board has been initialized. */ printf("\n\rHello ATMEL World!\n\r"); while (1); }
//////////////////////////////////////////////////////////////////////// // Copyright (c) Nehmulos 2011-2014 // This file is part of N0 Strain Serialization Library. // // N0Strain-Serialization-Library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // N0Strain-Serialization-Library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with N0Strain-Serialization-Library. If not, see https://gnu.org/licenses/lgpl-3.0 //////////////////////////////////////////////////////////////////////// #ifndef BINARY_WRITER_H_ #define BINARY_WRITER_H_ #include "Describer.h" #include "BinaryFstream.h" #include <stack> namespace nw { class BinaryWriter : public Describer{ public: BinaryWriter(const String filepath); virtual ~BinaryWriter(); void virtual close(); void readFromFile(const String filename); bool isInWriteMode(); bool push(const String tagName); void describeArray(const String arrayName, const String elementsName, unsigned int size); void describeValueArray(const String arrayName, unsigned int size); bool enterTag(const String childrenTagName); bool enterNextElement(unsigned int iterator); void autoEnterTags(bool doIt); /* Serialize functions */ void describeName(const String name); void describeValue(bool&); void describeValue(char&); void describeValue(unsigned char&); void describeValue(signed char&); void describeValue(short&); void describeValue(unsigned short&); void describeValue(int&); void describeValue(unsigned int&); void describeValue(long&); void describeValue(unsigned long&); void describeValue(float&); void describeValue(Pointer); void describeValue(double&); void describeValue(long long&); void describeValue(long double&); void describeValue(String&); void describeBlob(const String childName,nw::Pointer binaryBlob, unsigned int blobSize); void comment(const String text); String getParentName(); void pop(); private: BinaryFstream file; std::stack<unsigned int> arraySize; //helpers inline void registerPointer(DescribedObject*); inline void writeValidationSequence(); }; } // namespace nw #endif /* BINARY_WRITER_H_ */
/************************************************************ ** ** file: btreeprimitivedefinitions.h ** author: Andreas Steffens ** license: LGPL v3 ** ** description: ** ** This file contains definitions for the b-tree framework ** test bench's common primitives. ** ************************************************************/ #ifndef BTREEPRIMITIVEDEFINITIONS_H #define BTREEPRIMITIVEDEFINITIONS_H typedef enum { BTREETEST_KEY_GENERATION_DESCEND, BTREETEST_KEY_GENERATION_ASCEND, BTREETEST_KEY_GENERATION_RANDOM, BTREETEST_KEY_GENERATION_CONST } btreetest_key_generation_e; #endif // BTREEPRIMITIVEDEFINITIONS_H
#include <string> #include <cmath> #include <math.h> #include <random> #include <ctime> using namespace std; /* class Pole { public: int razmer; Pole(int razmer); ~ */ int ** CreateFullMassive(int razmer) { int count = 1; int ** mas = new int*[razmer]; for(int i=0; i<razmer; i++) { mas[i] = new int[razmer]; } for(int i=0; i<razmer; i++) for(int j=0; j<razmer; j++) { mas[i][j] = count++; } mas[razmer-1][razmer-1] = 0; return mas; } int ** PeremeshatMassive(int ** massive, int razmer) { int i; int j; for(int g=0; g<2; g++) { //******************************************* //×åòûðå ðàçà íà÷àòü ñ êàæäîãî èç óãëîâ if(g==0) { i = razmer - 1; j = razmer - 1; } else if(g==1) { //Ãîíþ ïóñòîé êâàäðàò â ëåâûé âåðõíèé óãîë while(1) { if(i!=0) { massive[i][j] = massive[i-1][j]; massive[i-1][j]=0; i--; } if(j!=0) { massive[i][j] = massive[i][j-1]; massive[i][j-1]=0; j--; } if(i==0 & j==0) break; } } //************************************ for(int k=0; k<pow((double)5, (double)razmer); k++) { //********************************************* //Âû÷èñëåíèå ðàíäîìíîãî ÷èñëà r ñ ó÷åòîì ðåàëüíîãî âðåìåíè â ñåêóíäàõ äèàïàçîí 1-100 int r = rand() % 100 +1; time_t myTimer; myTimer = time(NULL); myTimer-=1494850400; r+=myTimer*10; while(r>100) r-=100; //********************************************* //Ïðîâåðêè íà íàõîæåíèå if(i == 0 && j == 0)//óãîë ëåâî âåðõ { if(r>50) { massive[i][j] = massive[i+1][j]; massive[i+1][j]=0; i++; } else { massive[i][j] = massive[i][j+1]; massive[i][j+1]=0; j++; } } else if(i == 0 && j == razmer-1)//óãîë âåðõ ïðàâî { if(r>50) { massive[i][j] = massive[i+1][j]; massive[i+1][j]=0; i++; } else { massive[i][j] = massive[i][j-1]; massive[i][j-1]=0; j--; } } else if(i == razmer-1 && j == 0)//óãîë ëåâî íèç { if(r>50) { massive[i][j] = massive[i-1][j]; massive[i-1][j]=0; i--; } else { massive[i][j] = massive[i][j+1]; massive[i][j+1]=0; j++; } } else if(i == razmer-1 && j == razmer-1)//óãîë ïðàâî íèç { if(r>50) { massive[i][j] = massive[i-1][j]; massive[i-1][j]=0; i--; } else { massive[i][j] = massive[i][j-1]; massive[i][j-1]=0; j--; } } //ñòîðîíû else if(i == 0)//ñòîðîíà ëåâî { if(r>33) { massive[i][j] = massive[i+1][j]; massive[i+1][j]=0; i++; } else if(r>66) { massive[i][j] = massive[i][j-1]; massive[i][j-1]=0; j--; } else { massive[i][j] = massive[i][j+1]; massive[i][j+1]=0; j++; } } else if(j == 0)//ñòîðîíà âåðõ { if(r>33) { massive[i][j] = massive[i+1][j]; massive[i+1][j]=0; i++; } else if(r>66) { massive[i][j] = massive[i-1][j]; massive[i-1][j]=0; i--; } else { massive[i][j] = massive[i][j+1]; massive[i][j+1]=0; j++; } } else if(i == razmer-1)//ñòîðîíà íèç { if(r>33) { massive[i][j] = massive[i][j-1]; massive[i][j-1]=0; j--; } else if(r>66) { massive[i][j] = massive[i-1][j]; massive[i-1][j]=0; i--; } else { massive[i][j] = massive[i][j+1]; massive[i][j+1]=0; j++; } } else if(j == razmer-1)//ñòîðîíà ïðàâî { if(r>33) { massive[i][j] = massive[i][j-1]; massive[i][j-1]=0; j--; } else if(r>66) { massive[i][j] = massive[i+1][j]; massive[i+1][j]=0; i++; } else { massive[i][j] = massive[i-1][j]; massive[i-1][j]=0; i--; } } else//öåíòð { if(r>25) { massive[i][j] = massive[i][j-1]; massive[i][j-1]=0; j--; } else if(r>50) { massive[i][j] = massive[i-1][j]; massive[i-1][j]=0; i--; } else if(r>75) { massive[i][j] = massive[i][j+1]; massive[i][j+1]=0; j++; } else { massive[i][j] = massive[i+1][j]; massive[i+1][j]=0; i++; } } } } return massive; } void DeleteMassive(int ** massive, int razmer) { for(int i=0; i<razmer; i++) delete []massive[i]; } bool SwapQuadro(int ** massive, int razmer, int x, int y) { //****Ïîèñê ïóñòîé ÿ÷åéêè****** int g, l; for(int i=0; i<razmer;i++) for(int j=0; j<razmer; j++) if(massive[i][j] == 0) { g=i; l=j; } //*********************** //****Ïðîâåðêà íà ñîñåäñòâî íóëÿ ñ íàéäåíîé(íàæàòîé) ÿ÷åéêîé if((g+1==x & l==y) || (g-1==x & l==y) || (l-1 == y & g==x) || (l+1==y & g==x)) return true; else return false; //*********************** } bool Win_niPuh(int ** massive, int razmer) { if(massive[razmer-1][razmer-1] == 0) { int val=1; for(int i=0; i<razmer; i++) for(int j=0; j<razmer;j++) { if(massive[i][j]==0) { return true; } else if(massive[i][j]!=val) return false; val++; } } else { return false; } }
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_LISTSTREAMPROCESSORSRESPONSE_H #define QTAWS_LISTSTREAMPROCESSORSRESPONSE_H #include "rekognitionresponse.h" #include "liststreamprocessorsrequest.h" namespace QtAws { namespace Rekognition { class ListStreamProcessorsResponsePrivate; class QTAWSREKOGNITION_EXPORT ListStreamProcessorsResponse : public RekognitionResponse { Q_OBJECT public: ListStreamProcessorsResponse(const ListStreamProcessorsRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const ListStreamProcessorsRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(ListStreamProcessorsResponse) Q_DISABLE_COPY(ListStreamProcessorsResponse) }; } // namespace Rekognition } // namespace QtAws #endif
#ifndef _L3D_H #define _L3D_H #include "application.h" #include "neopixel.h" #define PIXEL_COUNT 512 #define PIXEL_PIN D0 #define PIXEL_TYPE WS2812B #define INTERNET_BUTTON D2 #define MODE D3 #define STREAMING_PORT 2222 /** An RGB color. */ struct Color { unsigned char red, green, blue; Color(int r, int g, int b) : red(r), green(g), blue(b) {} Color() : red(0), green(0), blue(0) {} }; /** A point in 3D space. */ struct Point { float x; float y; float z; Point() : x(0), y(0), z(0) {} Point(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {} }; /** An L3D LED cube. Provides methods for drawing in 3D. Controls the LED hardware. */ class Cube { private: int maxBrightness; bool onlinePressed; bool lastOnline; Adafruit_NeoPixel strip; UDP udp; int lastUpdated; char localIP[24]; char macAddress[20]; int port; void emptyFlatCircle(int x, int y, int z, int r, Color col); public: int size; Cube(unsigned int s, unsigned int mb); Cube(void); void setVoxel(int x, int y, int z, Color col); void setVoxel(Point p, Color col); Color getVoxel(int x, int y, int z); Color getVoxel(Point p); void line(int x1, int y1, int z1, int x2, int y2, int z2, Color col); void line(Point p1, Point p2, Color col); void sphere(int x, int y, int z, int r, Color col); void sphere(Point p, int r, Color col); void shell(float x, float y, float z, float r, Color col); void shell(float x, float y, float z, float r, float thickness, Color col); void shell(Point p, float r, Color col); void shell(Point p, float r, float thickness, Color col); void background(Color col); Color colorMap(float val, float min, float max); Color lerpColor(Color a, Color b, int val, int min, int max); void begin(void); void show(void); void listen(void); void initButtons(void); void onlineOfflineSwitch(void); void joinWifi(void); void updateNetworkInfo(void); int setPort(String port); }; // common colors const Color black = Color(0x00, 0x00, 0x00); const Color grey = Color(0x92, 0x95, 0x91); const Color yellow = Color(0xff, 0xff, 0x14); const Color magenta = Color(0xc2, 0x00, 0x78); const Color orange = Color(0xf9, 0x73, 0x06); const Color teal = Color(0x02, 0x93, 0x86); const Color red = Color(0xe5, 0x00, 0x00); const Color brown = Color(0x65, 0x37, 0x00); const Color pink = Color(0xff, 0x81, 0xc0); const Color blue = Color(0x03, 0x43, 0xdf); const Color green = Color(0x15, 0xb0, 0x1a); const Color purple = Color(0x7e, 0x1e, 0x9c); const Color white = Color(0xff, 0xff, 0xff); #endif
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qbs. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or (at your option) the GNU General ** Public license version 3 or any later version approved by the KDE Free ** Qt Foundation. The licenses are as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-2.0.html and ** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QBS_ARTIFACTCLEANER_H #define QBS_ARTIFACTCLEANER_H #include <QtCore/qlist.h> #include <language/forward_decls.h> #include <logging/logger.h> namespace qbs { class CleanOptions; namespace Internal { class ProgressObserver; class ArtifactCleaner { public: ArtifactCleaner(const Logger &logger, ProgressObserver *observer); void cleanup(const TopLevelProjectPtr &project, const QList<ResolvedProductPtr> &products, const CleanOptions &options); private: void removeEmptyDirectories(const QString &rootDir, const CleanOptions &options, bool *isEmpty = 0); Logger m_logger; bool m_hasError; ProgressObserver *m_observer; }; } // namespace Internal } // namespace qbs #endif // QBS_ARTIFACTCLEANER_H
/* Copyright (C) 2010 Gaetan Guidet This file is part of ofxpp. ofxpp is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. ofxpp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /** \file exception.h * Exception classes. */ #ifndef __ofx_exception_h__ #define __ofx_exception_h__ #include <ofxCore.h> #include <exception> #include <stdexcept> #include <string> namespace ofx { //! Base exception class. class Exception : public std::runtime_error { public: explicit Exception(OfxStatus s, const std::string &msg="", const char *statusString=0); virtual ~Exception() throw(); //! Get associated OpenFX status. inline OfxStatus status() const { return mStat; } protected: OfxStatus mStat; }; //! Failed exception. class FailedError : public Exception { public: explicit FailedError(const std::string &msg=""); virtual ~FailedError() throw(); }; //! Fatal exception. class FatalError : public Exception { public: explicit FatalError(const std::string &msg=""); virtual ~FatalError() throw(); }; //! Unknown exception. class UnknownError : public Exception { public: explicit UnknownError(const std::string &msg=""); virtual ~UnknownError() throw(); }; //! Missing host feature exception. class MissingHostFeatureError : public Exception { public: explicit MissingHostFeatureError(const std::string &msg=""); virtual ~MissingHostFeatureError() throw(); }; //! Unsupported exception. class UnsupportedError : public Exception { public: explicit UnsupportedError(const std::string &msg=""); virtual ~UnsupportedError() throw(); }; //! Exists exception. class ExistsError : public Exception { public: explicit ExistsError(const std::string &msg=""); virtual ~ExistsError() throw(); }; //! Format exception. class FormatError : public Exception { public: explicit FormatError(const std::string &msg=""); virtual ~FormatError() throw(); }; //! Memory exception. class MemoryError : public Exception { public: explicit MemoryError(const std::string &msg=""); virtual ~MemoryError() throw(); }; //! Bad handle exception. class BadHandleError : public Exception { public: explicit BadHandleError(const std::string &msg=""); virtual ~BadHandleError() throw(); }; //! Bad index exception. class BadIndexError : public Exception { public: explicit BadIndexError(const std::string &msg=""); virtual ~BadIndexError() throw(); }; //! Value exception. class ValueError : public Exception { public: explicit ValueError(const std::string &msg=""); virtual ~ValueError() throw(); }; //! Image format exception class ImageFormatError : public Exception { public: explicit ImageFormatError(const std::string &msg=""); virtual ~ImageFormatError() throw(); }; #ifdef OFX_API_1_3 class GLOutOfMemory : public Exception { public: explicit GLOutOfMemory(const std::string &msg=""); virtual ~GLOutOfMemory() throw(); }; class GLRenderFailed : public Exception { public: explicit GLRenderFailed(const std::string &msg=""); virtual ~GLRenderFailed() throw(); }; #endif } #endif