blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
247
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
57
| license_type
stringclasses 2
values | repo_name
stringlengths 4
111
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
58
| visit_date
timestamp[ns]date 2015-07-25 18:16:41
2023-09-06 10:45:08
| revision_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| committer_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| github_id
int64 3.89k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 25
values | gha_event_created_at
timestamp[ns]date 2012-06-07 00:51:45
2023-09-14 21:58:52
⌀ | gha_created_at
timestamp[ns]date 2008-03-27 23:40:48
2023-08-24 19:49:39
⌀ | gha_language
stringclasses 159
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 7
10.5M
| extension
stringclasses 111
values | filename
stringlengths 1
195
| text
stringlengths 7
10.5M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c001f7815b3d424f7a042d30def1883204e2a914
|
e14dcfc986eacc33b08920bd12766f7aa39aabae
|
/Classes/FindAttackTargetBehavior.hpp
|
6e31cc4291efec8ffb82718cb4faf08bb68b550e
|
[] |
no_license
|
tempdban/ClashRoyale
|
c186083562da9fe99e8ca58c95b75072ac134054
|
79db9ba39bd7306c7501109fc4ee89846f72edf3
|
refs/heads/master
| 2021-01-18T10:52:08.194621
| 2016-04-23T07:07:08
| 2016-04-23T07:07:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,804
|
hpp
|
FindAttackTargetBehavior.hpp
|
//
// FindAttackTargetBehavior.hpp
// ClashRoyale
//
// Created by 贾佳菊 on 16/4/7.
//
//
#ifndef FindAttackTargetBehavior_hpp
#define FindAttackTargetBehavior_hpp
#include <stdio.h>
#include "ToolFunction.hpp"
class Character;
class BattleLayer;
class FindAttackTargetBehavior: public cocos2d::Node{
public:
FindAttackTargetBehavior(Character *character, BattleLayer *battleLayer):
_character(character), _battleLayer(battleLayer) {}
virtual ~FindAttackTargetBehavior() = 0;
virtual void findAttackTarget() = 0;
protected:
Character *_character;
BattleLayer *_battleLayer;
};
class FindAttackTargetBehaviorEmpty: public FindAttackTargetBehavior{
public:
static FindAttackTargetBehaviorEmpty *createFindAttackTargetBehaviorEmpty(Character *character, BattleLayer *battleLayer);
FindAttackTargetBehaviorEmpty(Character *character, BattleLayer *battleLayer):
FindAttackTargetBehavior(character, battleLayer) {}
virtual void findAttackTarget() {}
private:
};
class FindAttackTargetBehaviorOnlyFindTower: public FindAttackTargetBehavior{
public:
static FindAttackTargetBehaviorOnlyFindTower *createFindAttackTargetBehaviorOnlyFindTower(Character *character, BattleLayer *battleLayer);
FindAttackTargetBehaviorOnlyFindTower(Character *character, BattleLayer *battleLayer):
FindAttackTargetBehavior(character, battleLayer) {}
virtual bool init();
virtual void findAttackTarget();
private:
};
class FindAttackTargetBehaviorFlyCharacterPriority: public FindAttackTargetBehavior{
public:
private:
};
class FindAttackTargetBehaviorGroundCharacterPriority: public FindAttackTargetBehavior{
public:
private:
};
#endif /* FindAttackTargetBehavior_hpp */
|
e665d95387e4db99a68ac75efb489afbd23a1ab3
|
35c7e16c69e2f0372691807a8cc72287a574f69f
|
/include/f1tenth_sensor_fusion/trackers.h
|
6df25dc7e8a0256e102d881b467e0ae883062e32
|
[
"Apache-2.0"
] |
permissive
|
g-kovacs/f1tenth_sensor_fusion
|
4d15a21ca18c81dbb8f36c56b73ff2e34dcbeb7b
|
09a91f984a686fcdfd05d8c49954d115b3eeac73
|
refs/heads/main
| 2023-08-21T20:18:51.353713
| 2021-08-19T11:33:11
| 2021-08-19T11:33:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,200
|
h
|
trackers.h
|
/* Copyright 2021 Kovács Gergely Attila
*
* Licensed under the Apache License,
* Version 2.0(the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef F1TENTH_SENSOR_FUSION__TRACKERS_H
#define F1TENTH_SENSOR_FUSION__TRACKERS_H
#include <f1tenth_sensor_fusion/cluster_tracker.h>
#include <nodelet/nodelet.h>
namespace f1tenth_sensor_fusion
{
class LidarTracker : protected ClusterTracker, public nodelet::Nodelet
{
public:
LidarTracker();
private:
virtual void onInit();
};
class CameraTracker : protected ClusterTracker, public nodelet::Nodelet
{
public:
CameraTracker();
protected:
virtual void onInit();
};
}
#endif // F1TENTH_SENSOR_FUSION__TRACKERS_H
|
fcad7a56819179452eb661f18861deace5674418
|
e645ebf3b5177eb0ebedb7f239bd6e1b40bf1b07
|
/packages/bputils/include/bpdox/Parser.h
|
103d2548649f251fce2b150698d5e68b2879cc70
|
[] |
no_license
|
lsst-dm/bp
|
e095cdb7412124fef39bdd8428fce70bbf0f462a
|
31c0b65866d06a09575a53d0dd558320e6994a06
|
refs/heads/main
| 2023-07-22T11:32:48.479329
| 2023-07-10T00:30:32
| 2023-07-10T00:30:32
| 37,212,636
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,237
|
h
|
Parser.h
|
// -*- c++ -*-
#ifndef BPDOX_Parser_h_INCLUDED
#define BPDOX_Parser_h_INCLUDED
#include "bpdox/Processor.h"
namespace bpdox {
class Parser {
public:
static char const MARKER = '@';
Parser(char const * current, char const * end, Processor const & processor, bp::list data) :
_current(current), _end(end), _lineNumber(1), _indent(0), _braces(0),
_output(), _processor(processor), _data(data)
{}
void parse();
private:
struct ActiveBlock {
int braces;
int indent;
int lineNumber;
bp::dict options;
boost::shared_ptr<Macro> macro;
};
void parseMacro();
void parseComment();
bp::dict processArgs(Macro & macro);
void consumeSpace(bool throwAtEnd=false);
bool finishArg(char const close);
std::string readString();
std::string readWord();
std::string readCode();
bool readBool();
bp::tuple readRef();
bp::list readList();
char const * _current;
char const * const _end;
int _lineNumber;
int _indent;
int _braces;
std::string _output;
Processor const & _processor;
std::list<ActiveBlock> _active;
bp::list _data;
};
} // namespace bpdox
#endif // !BPDOX_Parser_h_INCLUDED
|
a4a2573635789c369cd9fd90fe61ea0b5fe376e0
|
db15406151a22275ceae46221ab1ffea934bb07a
|
/src/RcppExports.cpp
|
7a3cea06181e364ab97564c577441a5106056377
|
[] |
no_license
|
jimb3/readbinarydosage
|
3756508016500a801ff3acc3897b87f57c5aaa52
|
c0eafc2c828c55e85abb8f409b3fcfac81398467
|
refs/heads/master
| 2021-05-25T19:48:30.416341
| 2020-05-12T15:45:25
| 2020-05-12T15:45:25
| 253,896,092
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,136
|
cpp
|
RcppExports.cpp
|
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
// readsnpsc
Rcpp::List readsnpsc(Rcpp::StringVector& filename, arma::uvec& subjects, arma::uvec& snps, int nsub, arma::vec& snploc, arma::vec& snpbytes, arma::vec& blksnps, arma::vec& firstsnp, arma::vec& blkloc, arma::vec& blkbytes, Rcpp::LogicalVector& dosageonly);
RcppExport SEXP _readbinarydosage_readsnpsc(SEXP filenameSEXP, SEXP subjectsSEXP, SEXP snpsSEXP, SEXP nsubSEXP, SEXP snplocSEXP, SEXP snpbytesSEXP, SEXP blksnpsSEXP, SEXP firstsnpSEXP, SEXP blklocSEXP, SEXP blkbytesSEXP, SEXP dosageonlySEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::StringVector& >::type filename(filenameSEXP);
Rcpp::traits::input_parameter< arma::uvec& >::type subjects(subjectsSEXP);
Rcpp::traits::input_parameter< arma::uvec& >::type snps(snpsSEXP);
Rcpp::traits::input_parameter< int >::type nsub(nsubSEXP);
Rcpp::traits::input_parameter< arma::vec& >::type snploc(snplocSEXP);
Rcpp::traits::input_parameter< arma::vec& >::type snpbytes(snpbytesSEXP);
Rcpp::traits::input_parameter< arma::vec& >::type blksnps(blksnpsSEXP);
Rcpp::traits::input_parameter< arma::vec& >::type firstsnp(firstsnpSEXP);
Rcpp::traits::input_parameter< arma::vec& >::type blkloc(blklocSEXP);
Rcpp::traits::input_parameter< arma::vec& >::type blkbytes(blkbytesSEXP);
Rcpp::traits::input_parameter< Rcpp::LogicalVector& >::type dosageonly(dosageonlySEXP);
rcpp_result_gen = Rcpp::wrap(readsnpsc(filename, subjects, snps, nsub, snploc, snpbytes, blksnps, firstsnp, blkloc, blkbytes, dosageonly));
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_readbinarydosage_readsnpsc", (DL_FUNC) &_readbinarydosage_readsnpsc, 11},
{NULL, NULL, 0}
};
RcppExport void R_init_readbinarydosage(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
|
7e6b737a8164fb7afd659d4732b528f01e334546
|
747a4c8cc6cbccb0ae7a519edc1f27b7295ff59d
|
/DLLog/dllog.cpp
|
1853f3526a86ab384bb1458805c641fbb9eac03d
|
[] |
no_license
|
591342534/DLLog
|
f37f0b84a95e4f00ab94331faedd27e5488d79d8
|
b6ccd5346e07915459d7ebc145445e5a3c489e90
|
refs/heads/master
| 2021-10-19T13:01:59.259309
| 2019-02-21T04:23:39
| 2019-02-21T04:23:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 10,931
|
cpp
|
dllog.cpp
|
/////////////////////////////////////
// File name : dllog.c
// Describe : not set
////////////////////////////////////
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>
#include <stdarg.h>
#include <dirent.h>
#include <sys/stat.h>
#include <string.h>
#include "dllog.h"
//DLlog default config begin
#define IS_SHOW_LOG 1
#define IS_WRITE_LOG 1
#define DL_LOG_MODE log_mode_develop
#define LOG_FILE_PATH "./dllog/"
#define LOG_FILE_NAME "dllog"
#define LOG_PRINT_LEVEL log_level_debug
#define LOG_WRITE_LEVEL log_level_warning
#define IS_PRINT_LINE_BREAK 0
#define LOG_OPEN_ASSERT_LEVEL log_level_warning
#define IS_OPEN_ASSERT 0
//DLlog default config end
#define DL_LOG(str) printf("LEVEL:error FILE:%s FUNC:%s LINE:%d DESCRIPTION:%s", __FILE__,__FUNCTION__,__LINE__,str)
static int globalIsShowLog = IS_SHOW_LOG;
static int globalIsWriteLog = IS_WRITE_LOG;
static log_mode_type globalLogMode = DL_LOG_MODE;
static char* globalLogFilePath = LOG_FILE_PATH;
static char* globalLogFileName = LOG_FILE_NAME;
static log_level_type globalLogPrintLevel = LOG_PRINT_LEVEL;
static log_level_type globalLogWriteLevel = LOG_WRITE_LEVEL;
static log_level_type globalOpenAssertLevel = LOG_OPEN_ASSERT_LEVEL;
static int globalIsPrintLineBreak = IS_PRINT_LINE_BREAK;
static int globalIsOpenAssert = IS_OPEN_ASSERT;
static void _FreeMemory(void** ptr){
if (*ptr == NULL){
return;
}else{
free(*ptr);
*ptr = NULL;
}
}
void setIsShowLog(int isShowLog){
globalIsShowLog = isShowLog;
}
static int _getIsShowLog(){
return globalIsShowLog;
}
void setIsWriteLog(int isWriteLog){
globalIsWriteLog = isWriteLog;
}
static int _getIsWriteLog(){
return globalIsWriteLog;
}
void setLogPrintLevel(log_level_type logLevel){
globalLogPrintLevel = logLevel;
}
static log_level_type _getLogPrintLevel(){
return globalLogPrintLevel;
}
void setLogWriteLevel(log_level_type logLevel){
globalLogWriteLevel = logLevel;
}
static log_level_type _getLogWriteLevel(){
return globalLogWriteLevel;
}
void setOpenAssertLevel(log_level_type logLevel){
globalOpenAssertLevel = logLevel;
}
static log_level_type _getOpenAssertLevel(){
return globalOpenAssertLevel;
}
void setLogFilePath(const char* filePath){
globalLogFilePath = (char*)filePath;
}
static char* _getLogFilePath(){
return globalLogFilePath;
}
void setLogMode(log_mode_type logMode){
globalLogMode = logMode;
}
static log_mode_type _getLogMode(){
return globalLogMode;
}
void setLogFileName(const char* fileName){
globalLogFileName = (char*)fileName;
}
static char* _getLogFileName(){
return globalLogFileName;
}
void setIsPrintLineBreak(int isPrintLineBreak){
globalIsPrintLineBreak = isPrintLineBreak;
}
static int _getIsPrintLineBreak(){
return globalIsPrintLineBreak;
}
void setIsOpenAssert(int isOpenAssert){
globalIsOpenAssert = isOpenAssert;
}
static int _getIsOpenAssert(){
return globalIsOpenAssert;
}
static char* _getLogLevelStr(int log_level){
char* log_level_str;
switch (log_level){
case log_level_debug:
log_level_str = "debug";
break;
case log_level_info:
log_level_str = "info";
break;
case log_level_warning:
log_level_str = "warning";
break;
case log_level_null:
log_level_str = "null";
break;
case log_level_error:
log_level_str = "error";
break;
case log_level_syserror:
log_level_str = "syserror";
break;
case log_level_fatal:
log_level_str = "fatal";
break;
default:
log_level_str = "unknown";
DL_LOG("undifined log_level");
}
return log_level_str;
}
static char* _mallocBuffer(int size){
char* bufferPointer = (char*)malloc(size);
if (bufferPointer == NULL)
DL_LOG("malloc fail\n");
return bufferPointer;
}
static char* _mallocStrFormat(const char* str,...){
va_list argptr;
int needreadcount;
int strbuffersize = 1024;
char* strbuffer = _mallocBuffer(strbuffersize);
va_start(argptr, str);
needreadcount = vsnprintf(strbuffer,strbuffersize,str, argptr);
va_end(argptr);
if (needreadcount >= strbuffersize){
DL_LOG("re malloc");
_FreeMemory((void**)&strbuffer);
int size = needreadcount + 1;
char* strbufferNeed = _mallocBuffer(size);
va_start(argptr, str);
vsnprintf(strbufferNeed,size,str, argptr);
va_end(argptr);
return strbufferNeed;
}
return strbuffer;
}
static char* _getCurrentDay(){
time_t timeStamp;
time(&timeStamp);
int dayFormatSize = 11;
struct tm* timeInfo = localtime(&timeStamp);
int currentYear = timeInfo->tm_year + 1900;
int currentMon = timeInfo->tm_mon + 1;
char* dayFormat = _mallocStrFormat("%d-%d-%d",currentYear,currentMon,timeInfo->tm_mday);
return dayFormat;
}
static void _createFilePath(const char* filePath){
DIR* dirptr = NULL;
struct dirent* entry;
dirptr = opendir(filePath);
if (dirptr == NULL){
int status = dlcpMkdir(filePath);
if (status == -1){
DL_LOG("");
printf("dir:%s create dir fail errno:%d errordesc:%s \n", filePath,errno,strerror(errno));
}
}else{
closedir(dirptr);
}
}
static char* _getLogFileFullPath(){
char* dayFormat = _getCurrentDay();
char* filePath = _getLogFilePath();
char* fileName = _getLogFileName();
_createFilePath(filePath);
char* logFileFullPath = _mallocStrFormat("./%s%s%s.dllog",filePath,fileName,dayFormat);
_FreeMemory((void**)&dayFormat);
return logFileFullPath;
}
static void _writeToFile(const char* text){
FILE* filePointer;
char* logFileFullPath = _getLogFileFullPath();
char* openStyle = "a";
filePointer = fopen(logFileFullPath,openStyle);
fputs(text,filePointer);
fclose(filePointer);
_FreeMemory((void**)&logFileFullPath);
}
static void _writeLogToFile(int log_level, const char* str, int line, const char* func, const char* file, const char* log_level_str){
char* fileCache = _mallocStrFormat("LEVEL:%-10sLINE:%-10dFILE:%s FUNC:%s DESCRIPTION:%s\n",log_level_str, line, file, func, str);
_writeToFile(fileCache);
_FreeMemory((void**)&fileCache);
}
static void _dealLogModeRelease(int log_level, const char* str, int line, const char* func, const char* file, const char* log_level_str){
printf("%s\n",str);
}
static void _dealLogModeDevelop(int log_level, const char* str, int line, const char* func, const char* file, const char* log_level_str){
if (_getIsPrintLineBreak()){
printf("LEVEL:%s\nFILE:%s\nFUNC:%s\nLINE:%d\nDESCRIPTION:%s\n", log_level_str, file, func, line, str);
}else{
printf("LEVEL:%-10sFILE:%s FUNC:%s LINE:%d DESCRIPTION:%s\n", log_level_str, file, func, line, str);
}
//Flush STREAM,Force a refresh to the console
fflush(stdout);
}
static void _dealLogModeDebug(int log_level, const char* str, int line, const char* func, const char* file, const char* log_level_str){
if (log_level > log_level_warning){
_dealLogModeDevelop(log_level, str, line, func, file, log_level_str);
}else{
_dealLogModeRelease(log_level, str, line, func, file, log_level_str);
}
}
static void _checkLogMode(int log_level, const char* str, int line, const char* func, const char* file, const char* log_level_str){
int log_mode = _getLogMode();
switch (log_mode){
case log_mode_release:
_dealLogModeRelease(log_level, str, line, func, file, log_level_str);
break;
case log_mode_debug:
_dealLogModeDebug(log_level, str, line, func, file, log_level_str);
break;
case log_mode_develop:
_dealLogModeDevelop(log_level, str, line, func, file, log_level_str);
break;
default:
DL_LOG("unkown log mode");
}
}
static int _checkIsSystemError(log_level_type log_level, const char** str){
int isSysError = 0;
if (log_level == log_level_syserror){
char* syserrorStr = _mallocStrFormat("%s system errno:%d system error description:%s", *str, errno, strerror(errno));
*str = syserrorStr;
isSysError = 1;
}
return isSysError;
}
static void __FreeMemorySysErrorStr(const char* str, int isSysError){
if (isSysError)
_FreeMemory((void**)&str);
}
static void _checkLogLevelShowBell(int log_level){
if (log_level > log_level_warning)
printf("\007\007\007\007\007\007");
}
static void _checkIsAssertAbort(int log_level){
if (_getLogMode() == log_mode_develop)
if (log_level > _getOpenAssertLevel())
if (_getIsOpenAssert())
assert(0);
}
static void _DLlog(log_level_type log_level, int line, const char* func, const char* file,const char* str){
char* log_level_str = _getLogLevelStr(log_level);
if (_getIsShowLog()){
if (log_level >= _getLogPrintLevel()){
int isSysError = _checkIsSystemError(log_level, &str);
_checkLogLevelShowBell(log_level);
_checkLogMode(log_level, str, line, func, file, log_level_str);
__FreeMemorySysErrorStr(str, isSysError);
}
}
if (_getIsWriteLog()){
if (log_level >= _getLogWriteLevel()){
_writeLogToFile(log_level, str, line, func, file, log_level_str);
}
}
_checkIsAssertAbort(log_level);
}
void DLlogFormat(log_level_type log_level, int line, const char* func, const char* file,const char* str,...){
va_list argptr;
int needreadcount;
int strbuffersize = 1024;
char* strbuffer = _mallocBuffer(strbuffersize);
va_start(argptr, str);
needreadcount = vsnprintf(strbuffer, strbuffersize, str, argptr);
va_end(argptr);
if (needreadcount >= strbuffersize){
printf("re malloc Func:%s Line:%d\n", __FUNCTION__, __LINE__);
_FreeMemory((void**)&strbuffer);
int size = needreadcount + 1;
char* strbufferNeed = _mallocBuffer(size);
va_start(argptr, str);
vsnprintf(strbufferNeed, size, str, argptr);
va_end(argptr);
str = strbufferNeed;
}else{
str = strbuffer;
}
_DLlog(log_level, line, func, file, str);
_FreeMemory((void**)&str);
}
int dlcpMkdir(const char* filePath){
//windows
#ifdef __WIN32
int status = mkdir(filePath);
return status;
#endif
//linux
#ifdef __linux__
int status = mkdir(filePath,S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH);
return status;
#endif
//mac
#ifdef __APPLE__
int status = mkdir(filePath,S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH);
return status;
#endif
//#ifdef __llvm__
}
|
eae06645492359d76a900435826b0465f83daea3
|
5b1a10605778c692a4133a0733a309c05f0c4bad
|
/Bundle1/Fraction.h
|
7ce02ed124041917b1449ef0e81bfd83933cad87
|
[] |
no_license
|
nc-uw/Cplusplus
|
04dcdbb9c3e1baa69ca54b49347625195e02198f
|
dacb3e6ebb59bc7d324952bca0d0c67e6d05b936
|
refs/heads/master
| 2020-06-07T08:41:04.404579
| 2019-06-23T00:42:40
| 2019-06-23T00:42:40
| 192,974,801
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,051
|
h
|
Fraction.h
|
/* The following code example is taken from the book
* "Object-Oriented Programming in C++"
* by Nicolai M. Josuttis, Wiley, 2002
*
* (C) Copyright Nicolai M. Josuttis 2002.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyright notice appears in all copies.
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*/
#ifndef FRACTION_H
#define FRACTION_H
#include <iostream> // for friend operator <<
// Fraction class: Continued evolution
class Fraction // Not to be confused with the Jackson 5
{
public:
Fraction();
Fraction(int n);
Fraction(int n, int d);
void print();
Fraction operator + (const Fraction& rhs) const;
Fraction operator - (const Fraction& rhs) const;
Fraction operator * (const Fraction& rhs) const;
void operator += (const Fraction& rhs);
void operator -= (const Fraction& rhs);
void operator *= (const Fraction& rhs);
bool operator < (const Fraction& rhs) const;
bool operator <= (const Fraction& rhs) const;
bool operator > (const Fraction& rhs) const;
bool operator >= (const Fraction& rhs) const;
// New: increment operators:
Fraction& operator ++ ();
Fraction operator ++ (int notused);
// New: equality and non-equality operators:
bool operator == (const Fraction& rhs) const;
bool operator != (const Fraction& rhs) const;
int numer() const;
int denom() const;
void setNumer(int n);
void setDenom(int d);
// friend operator so that we can output a fraction with cout
// Take this as given and use it; the mechanics are beyond
// the scope of the current topic.
friend std::ostream& operator << (std::ostream& os, const Fraction& rhs);
private:
void simplify_();
int gcd_() const;
// new: private member function to check for a zero in the denominator
void checkForZero_(int d) const;
// new: private member to move negative sign from denominator to numerator
void checkNegativeDenominator_();
int numer_;
int denom_;
};
#endif // FRACTION_H
|
3edee6d27c1dfd066de6745dcae260990ababa5a
|
28fef6171d93fdf6d93dd358e60d13ab0363cf4e
|
/rts2015jamm/release/Game/Game_Events/Orders_Follow.h
|
94096259ed168e6ad1829a5e5d2ded6199eb6512
|
[] |
no_license
|
antoinechene/RTS-SDL
|
6ae15210332bae583f08f2dd304e04a5b30a0451
|
bd53ff795a031c62dbd1ddaa322ef8a73f04469e
|
refs/heads/master
| 2016-09-06T09:34:26.214903
| 2012-09-06T14:15:06
| 2012-09-06T14:15:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 354
|
h
|
Orders_Follow.h
|
#ifndef __ORDERS_FOLLOW_H__
#define __ORDERS_FOLLOW_H__
#include "GameEvent.hpp"
#include <vector>
class cmd_Orders_Follow;
class Orders_Follow : public GameEvent
{
public:
Orders_Follow(std::vector<cmd_Orders_Follow>*, uint32_t t);
virtual ~Orders_Follow();
virtual void Apply();
private:
std::vector<cmd_Orders_Follow>* __cmd;
};
#endif
|
93c7980dc157963784546157c6d1aab121101e97
|
64d5e3790f97b636da6242e607ac1fa2eff9be7a
|
/InsertionSort/main.cpp
|
d766346222384ad81b86ae4d440fcf2de83a4c00
|
[
"MIT"
] |
permissive
|
Kapil706/GeeksForGeeks.Cpp-
|
57328ed1f72a0be498af5f09381b543dc8e4a3b5
|
3251fe2caf29e485656626d758058bd968e50ae1
|
refs/heads/master
| 2020-06-13T14:22:39.707718
| 2019-11-19T09:49:02
| 2019-11-19T09:49:02
| 194,684,257
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 594
|
cpp
|
main.cpp
|
#include <iostream>
using namespace std;
int InsertionSort(int arr[], int n){
int key;
for(int i=1;i<n;i++){
int j=i-1;
key =arr[i];
while(j>=0 && arr[j]>key){
arr[j+1]=arr[j];
j--;
}
arr[j+1]=key;
}
for(int i=0;i<n;i++){
cout<<arr[i]<<" ";
}
}
int main() {
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
cout<<InsertionSort(a,n)<<endl;
}
return 0;
}
|
fc3ea1733d6f65b8d218c8155a050827267209ea
|
95739ca059f070daec134c7c477fd1ccccc5577a
|
/ConsoleApplication1/Aula 1110 calculadora simples/Aula 1110 calculadora simples.cpp
|
30e6878138d6b276b5cf39c7fdd6f89543ecf8e2
|
[] |
no_license
|
kenjifujita1919/Alg2
|
871f2430e2ecb3cf556ebbbb67d9dc580da61f1e
|
518246fb63f2959ac5aa9f151b14495454ee314e
|
refs/heads/master
| 2020-03-31T15:15:42.534192
| 2018-10-12T01:26:41
| 2018-10-12T01:26:41
| 152,331,171
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
C++
| false
| false
| 1,022
|
cpp
|
Aula 1110 calculadora simples.cpp
|
// Aula 1110 calculadora simples.cpp : Define o ponto de entrada para a aplicação de console.
//
#include "stdafx.h"
#include <iostream>
int soma2valores(int x,int y)
{
int c;
c = x + y;
return c;
}
int subtracao2valores(int x, int y)
{
int c;
c = x - y;
return c;
}
int multiplicacao2valores(int x, int y)
{
int c;
c = x*y;
return c;
}
float divisao2valores(float x, float y)
{
float c;
c = x / y;
return c;
}
int LerNumeroInteiros()
{
printf("\nfavor digitar um numero inteiro");
int numero;
scanf_s("%i", &numero);
return numero;
}
int main()
{
int op, num1, num2, resultado;
printf("\n**Calcular**\n\n1=Adicao\n\n2=Subtracao\n\n3=Multiplicacao\n\n4=Divisao");
scanf_s("%f, &op");
if (op == 1)
{
printf("A operacao escolhinha foi Adicao\n");
printf("Insira o primeiro numero:\n");
scanf("%f,&num1");
printf("Insira o segundo numero:\n");
scanf("%f,&num2");
resultado=soma2valores(num1, num2);
printf("O resultado da operacao eh: %d\n", resultado);
}
system("pause");
}
|
083cf45206f25d44b0dcca145c74285fa88a218c
|
ce6b921a812d1bad1d8ca3e0521fc4829fc7b73d
|
/algorithm/tree/BinSearchTree.hpp
|
ffdf1b913c9e7af63bbe78326aab0a885f72f9a8
|
[] |
no_license
|
waterylife/SFC
|
67165d639b913659effcf465f24b1d9c876c4079
|
8a9eb3afdf016d7b532c367c40f51d6721da9e14
|
refs/heads/master
| 2020-04-02T02:21:56.132983
| 2014-12-24T03:58:21
| 2014-12-24T03:58:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,640
|
hpp
|
BinSearchTree.hpp
|
/*
* 二叉排序树实现
*/
#ifndef __BIN_SEARCH_TREE_H__
#define __BIN_SEARCH_TREE_H__
#include <stack>
using namespace std;
template<class T>
class BinSearchTreeNode
{
public:
T key;
bool flag; //用于后序非递归遍历
BinSearchTreeNode<T>* parent;
BinSearchTreeNode<T>* lchild;
BinSearchTreeNode<T>* rchild;
};
template<class T, class Fun>
class BinSearchTree
{
public:
BinSearchTreeNode<T>* root;
public:
BinSearchTree() : root(NULL) {}
//非递归后序遍历销毁每个节点
~BinSearchTree()
{
stack<BinSearchTreeNode<T>*> s;
BinSearchTreeNode<T>* p = root;
while(NULL != p || false == s.empty()) {
while(NULL != p) { //遍历左子树
p->flag = true; //标记为第一次访问
s.push(p);
p = p->lchild;
}
if(false == s.empty()) { //遍历右子树
p = s.top();
if(true == p->flag) { //标记为第二次访问
p->flag = false;
p = p->rchild;
}
else { //第三次访问
delete p;
s.pop();
p = NULL;
}
}
} //while
}
BinSearchTreeNode<T>* find_node(T key) //非递归形式
{
BinSearchTreeNode<T>* p = this->root;
while(NULL != p) {
if(key == p->key) return p;
if(key < p->key) p = p->lchild;
else p = p->rchild;
}
return p;
}
//若树中存在相同的key,则新节点插在相同key节点的右子树上
BinSearchTreeNode<T>* insert_node(T key)
{
BinSearchTreeNode<T>* ins_node = new BinSearchTreeNode<T>;
ins_node->key = key;
ins_node->lchild = ins_node->rchild = NULL;
/*空树情形*/
if(NULL == root) {
root = ins_node;
root->parent = NULL;
return ins_node;
}
/*不为空树的情形*/
BinSearchTreeNode<T>* p = this->root;
BinSearchTreeNode<T>* q = p;
do {
p = q;
if(key < p->key) q = p->lchild;
else q = p->rchild;
} while(NULL != q); //直到q为空,停止循环
if(key < p->key) {
p->lchild = ins_node;
ins_node->parent = p;
}
else {
p->rchild = ins_node;
ins_node->parent = p;
}
return ins_node;
}
void delete_node(BinSearchTreeNode<T>* node)
{
if(NULL == node) return;
/*被删除节点最多只有一个子节点的情形*/
if(NULL == node->rchild || NULL == node->lchild) {
//找到被删除节点的子节点,可能为空
BinSearchTreeNode<T>* child = NULL;
if(NULL != node->rchild) child = node->rchild;
else if(NULL != node->lchild) child = node->lchild;
//将被删除节点的子节点成为被删除节点的父节点的子节点
if(node->key < node->parent->key) node->parent->lchild = child;
else node->parent->rchild = child;
if(NULL != child) child->parent = node->parent;
//释放空间
delete node;
node = NULL;
return; //递归结束
}
/*被删除节点有两个子节点的情形*/
BinSearchTreeNode<T>* successor = bin_successor(node); //找到被删除节点的后继节点
node->key = successor->key;
this->delete_node(successor); //转化为删除后继节点
}
//非递归先序遍历
void preorder_traverse(Fun fun)
{
stack<BinSearchTreeNode<T>*> s;
BinSearchTreeNode<T>* p = root;
while(NULL != p || false == s.empty()) {
while(NULL != p) {
fun(p);
s.push(p);
p = p->lchild;
}
if(false == s.empty()) {
p = s.top();
s.pop();
p = p->rchild;
}
}
return;
}
//非递归中序遍历
void inorder_traverse(Fun fun)
{
stack<BinSearchTreeNode<T>*> s;
BinSearchTreeNode<T>* p = root;
while(NULL != p || false == s.empty()) {
while(NULL != p) {
s.push(p);
p = p->lchild;
}
if(false == s.empty()) {
p = s.top();
fun(p);
s.pop();
p = p->rchild;
}
}
return;
}
//非递归后序遍历
void postorder_traverse(Fun fun)
{
stack<BinSearchTreeNode<T>*> s;
BinSearchTreeNode<T>* p = root;
while(NULL != p || false == s.empty()) {
while(NULL != p) { //遍历左子树
p->flag = true; //标记为第一次访问
s.push(p);
p = p->lchild;
}
if(false == s.empty()) { //遍历右子树
p = s.top();
if(true == p->flag) { //标记为第二次访问
p->flag = false;
p = p->rchild;
}
else { //第三次访问
fun(p);
s.pop();
p = NULL;
}
}
} //while
return;
}
//递归先序遍历
void preorder_traverse(BinSearchTreeNode<T>* root, Fun fun)
{
if(NULL != root) {
fun(root);
preorder_traverse(root->lchild, fun);
preorder_traverse(root->rchild, fun);
}
return;
}
//递归中序遍历
void inorder_traverse(BinSearchTreeNode<T>* root, Fun fun)
{
if(NULL != root) {
inorder_traverse(root->lchild, fun);
fun(root);
inorder_traverse(root->rchild, fun);
}
return;
}
//递归后序遍历
void postorder_traverse(BinSearchTreeNode<T>* root, Fun fun)
{
if(NULL != root) {
postorder_traverse(root->lchild, fun);
postorder_traverse(root->rchild, fun);
fun(root);
}
return;
}
protected:
BinSearchTreeNode<T>* min_node(BinSearchTreeNode<T>* root)
{
BinSearchTreeNode<T>* p = root;
while(NULL != p->lchild) {
p = p->lchild;
}
return p;
}
BinSearchTreeNode<T>* max_node(BinSearchTreeNode<T>* root)
{
BinSearchTreeNode<T>* p = root;
while(NULL != p->rchild) {
p = p->rchild;
}
return p;
}
/*
* 若根节点的右子树存在,直接后继为右子树的最小节点;
* 若根节点的右子树不存在,直接后继为位于左分支上的最近双亲节点
*/
BinSearchTreeNode<T>* bin_successor(BinSearchTreeNode<T>* node)
{
if(NULL != node->rchild) return min_node(node->rchild);
BinSearchTreeNode<T>* p = node;
BinSearchTreeNode<T>* q = node->parent;
while(NULL != q) { //上溯,寻找位于左分支上的最近双亲节点
if(p == q->lchild) return q;
q = q->parent;
p = q;
}
}
/*
* 若根节点的左子树存在,直接后继为左子树的最大节点;
* 若根节点的左子树不存在,直接后继为位于右分支上的最近双亲节点
*/
BinSearchTreeNode<T>* pre_successor(BinSearchTreeNode<T>* node)
{
if(NULL != node->lchild) return max_node(node->lchild);
BinSearchTreeNode<T>* p = node;
BinSearchTreeNode<T>* q = node->parent;
while(NULL != q) { //上溯,寻找位于左分支上的最近双亲节点
if(p == q->rchild) return q;
q = q->parent;
p = q;
}
}
}; //BinSearchTree
#endif
|
a9d6ad160e105bf186d7876f4cf4235bacb2c009
|
a01da6d6a1cd146f20698bf23ee53c3be178523e
|
/BNode.cpp
|
cfe79317a31d63336c5cf256f14d78c3ba5dcdcf
|
[] |
no_license
|
YoungProducer/b-tree
|
a0c3e0c19e3f9318608b366da57d575475f7c7a4
|
436e46a5132c7d92c8670cede0f17bdeb18bcca5
|
refs/heads/master
| 2023-07-26T23:31:31.377114
| 2021-09-09T21:05:56
| 2021-09-09T21:05:56
| 404,670,813
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,363
|
cpp
|
BNode.cpp
|
#include "BNode.h"
BNode::BNode(std::vector<float> data, size_t maxSize)
: _data(data), _maxSize(maxSize)
{
_childNodes.resize(maxSize + 1, NULL);
if (data.size() == maxSize)
{
_full = true;
}
}
BNode::BNode(size_t maxSize)
: _maxSize(maxSize)
{
_childNodes.resize(maxSize + 1, NULL);
}
BNode::BNode(std::vector<float> data, size_t maxSize, BNode* parent)
: _data(data), _maxSize(maxSize), _parent(parent)
{
_childNodes.resize(maxSize + 1, NULL);
if (data.size() == maxSize)
{
_full = true;
}
}
BNode::BNode(size_t maxSize, BNode* parent)
: _maxSize(maxSize), _parent(parent)
{
_childNodes.resize(maxSize + 1, NULL);
}
const void BNode::add(float value)
{
int32_t index = getInsertIndex(value);
if (index == -1) return;
if (!_full)
{
std::vector<float>::iterator it = _data.begin();
std::advance(it, index);
_data.insert(it, value);
if (_data.size() == _maxSize) _full = true;
return;
}
if (isCurrentLevelFull() && isLevelsAboveFull())
{
std::vector<BNode*>::iterator it = _childNodes.begin();
std::advance(it, index);
if (*it == nullptr)
{
*it = new BNode(std::vector<float>{value}, _maxSize, this);
(*it)->assignNeighbours(index);
}
else
{
(*it)->add(value);
}
}
}
int32_t BNode::getInsertIndex(float value)
{
return getInsertIndex(value, 0, _data.size() - 1);
}
int32_t BNode::getInsertIndex(float value, size_t start, size_t end)
{
if (end - start == 1 && _data[start] < value && value < _data[end]) return end;
if (value < _data[start]) return start;
if (value > _data[end]) return end + 1;
size_t mid = (start + end) / 2;
if (value > _data[mid]) return getInsertIndex(value, mid + 1, end);
else if (value < _data[mid]) return getInsertIndex(value, start, mid - 1);
else return -1;
}
void BNode::assignNeighbours(int32_t index)
{
if (_parent == nullptr) return;
std::vector<BNode*>::iterator left = _parent->_childNodes.begin();
std::vector<BNode*>::iterator right = _parent->_childNodes.begin();
if (index > 0)
{
std::advance(left, index - 1);
_left = *left;
}
if (index < _parent->_childNodes.size() - 1)
{
std::advance(right, index + 1);
_right = *right;
}
}
bool BNode::isCurrentLevelFull() const
{
if (!_full) return false;
BNode* left = _left;
BNode* right = _right;
while (left != nullptr)
{
if (!left->isFull()) return false;
left = left->_left;
}
while (right != nullptr)
{
if (!right->isFull()) return false;
right = right->_right;
}
return true;
}
bool BNode::isLevelsAboveFull() const
{
if (_parent == nullptr) return true;
if (_parent->isCurrentLevelFull()) return _parent->isLevelsAboveFull();
return false;
}
bool BNode::isChildsFull() const
{
bool full = true;
for (const BNode* child : _childNodes)
{
if (child == nullptr) continue;
if (!child->isFull() || !child->isChildsFull())
{
full = false;
break;
}
}
return full;
}
bool BNode::isNodeFull() const
{
return isFull() && isChildsFull();
}
std::string BNode::dataToString() const
{
std::stringstream ss{ "" };
for (const float value : _data)
{
ss << " " << value;
}
return ss.str();
}
std::string BNode::toString() const
{
std::stringstream ss{ "" };
ss << dataToString() << std::endl;
for (const BNode* child : _childNodes)
{
if (child == nullptr) continue;
ss << child->toString();
}
return ss.str();
}
|
49d32d3e6e96af062a02632c1c0090e0b1dc36ba
|
f794fe7b0074b842e77607d7746623fc8d18fc2c
|
/source/process/log-server/LogServerRequest.cpp
|
22305d1cdc534f92ef06c225bb0e7b627a96c6df
|
[
"BSD-3-Clause"
] |
permissive
|
pombredanne/sf1r-logserver
|
387e1f453132dde12f8adbebec56d04922575821
|
d46fb3484792dac5c2e722878232ed42ccea1050
|
refs/heads/master
| 2021-01-15T12:28:14.151722
| 2014-09-12T10:22:28
| 2014-09-12T10:22:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 527
|
cpp
|
LogServerRequest.cpp
|
#include "LogServerRequest.h"
namespace sf1r
{
const LogServerRequest::method_t LogServerRequest::method_names[] =
{
"test",
"insert",
"insert_with_values",
"get_current_topk",
"get_topk",
"get_current_dvc",
"get_dvc",
"get_values",
"get_value_and_count",
"get_all_collection",
"insert_prop_label",
"get_prop_label",
"del_prop_label"
};
}
|
c0c483b9391a6293548cd8f7d19c3d9f4dd49d86
|
6f224b734744e38062a100c42d737b433292fb47
|
/flang/runtime/extrema.cpp
|
70b2c4d3d735a176450127882162b5aa47062c91
|
[
"LLVM-exception",
"Apache-2.0",
"NCSA"
] |
permissive
|
smeenai/llvm-project
|
1af036024dcc175c29c9bd2901358ad9b0e6610e
|
764287f1ad69469cc264bb094e8fcdcfdd0fcdfb
|
refs/heads/main
| 2023-09-01T04:26:38.516584
| 2023-08-29T21:11:41
| 2023-08-31T22:16:12
| 216,062,316
| 0
| 0
|
Apache-2.0
| 2019-10-18T16:12:03
| 2019-10-18T16:12:03
| null |
UTF-8
|
C++
| false
| false
| 34,065
|
cpp
|
extrema.cpp
|
//===-- runtime/extrema.cpp -----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// Implements MAXLOC, MINLOC, MAXVAL, & MINVAL for all required operand types
// and shapes and (for MAXLOC & MINLOC) result integer kinds. Also implements
// NORM2 using common infrastructure.
#include "reduction-templates.h"
#include "flang/Common/float128.h"
#include "flang/Runtime/character.h"
#include "flang/Runtime/reduction.h"
#include <algorithm>
#include <cfloat>
#include <cinttypes>
#include <cmath>
#include <optional>
namespace Fortran::runtime {
// MAXLOC & MINLOC
template <typename T, bool IS_MAX, bool BACK> struct NumericCompare {
using Type = T;
explicit NumericCompare(std::size_t /*elemLen; ignored*/) {}
bool operator()(const T &value, const T &previous) const {
if (value == previous) {
return BACK;
} else if constexpr (IS_MAX) {
return value > previous;
} else {
return value < previous;
}
}
};
template <typename T, bool IS_MAX, bool BACK> class CharacterCompare {
public:
using Type = T;
explicit CharacterCompare(std::size_t elemLen)
: chars_{elemLen / sizeof(T)} {}
bool operator()(const T &value, const T &previous) const {
int cmp{CharacterScalarCompare<T>(&value, &previous, chars_, chars_)};
if (cmp == 0) {
return BACK;
} else if constexpr (IS_MAX) {
return cmp > 0;
} else {
return cmp < 0;
}
}
private:
std::size_t chars_;
};
template <typename COMPARE> class ExtremumLocAccumulator {
public:
using Type = typename COMPARE::Type;
ExtremumLocAccumulator(const Descriptor &array)
: array_{array}, argRank_{array.rank()}, compare_{array.ElementBytes()} {
Reinitialize();
}
void Reinitialize() {
// per standard: result indices are all zero if no data
for (int j{0}; j < argRank_; ++j) {
extremumLoc_[j] = 0;
}
previous_ = nullptr;
}
int argRank() const { return argRank_; }
template <typename A> void GetResult(A *p, int zeroBasedDim = -1) {
if (zeroBasedDim >= 0) {
*p = extremumLoc_[zeroBasedDim] -
array_.GetDimension(zeroBasedDim).LowerBound() + 1;
} else {
for (int j{0}; j < argRank_; ++j) {
p[j] = extremumLoc_[j] - array_.GetDimension(j).LowerBound() + 1;
}
}
}
template <typename IGNORED> bool AccumulateAt(const SubscriptValue at[]) {
const auto &value{*array_.Element<Type>(at)};
if (!previous_ || compare_(value, *previous_)) {
previous_ = &value;
for (int j{0}; j < argRank_; ++j) {
extremumLoc_[j] = at[j];
}
}
return true;
}
private:
const Descriptor &array_;
int argRank_;
SubscriptValue extremumLoc_[maxRank];
const Type *previous_{nullptr};
COMPARE compare_;
};
template <typename ACCUMULATOR, typename CPPTYPE>
static void LocationHelper(const char *intrinsic, Descriptor &result,
const Descriptor &x, int kind, const Descriptor *mask,
Terminator &terminator) {
ACCUMULATOR accumulator{x};
DoTotalReduction<CPPTYPE>(x, 0, mask, accumulator, intrinsic, terminator);
ApplyIntegerKind<LocationResultHelper<ACCUMULATOR>::template Functor, void>(
kind, terminator, accumulator, result);
}
template <TypeCategory CAT, int KIND, bool IS_MAX,
template <typename, bool, bool> class COMPARE>
inline void DoMaxOrMinLoc(const char *intrinsic, Descriptor &result,
const Descriptor &x, int kind, const char *source, int line,
const Descriptor *mask, bool back) {
using CppType = CppTypeFor<CAT, KIND>;
Terminator terminator{source, line};
if (back) {
LocationHelper<ExtremumLocAccumulator<COMPARE<CppType, IS_MAX, true>>,
CppType>(intrinsic, result, x, kind, mask, terminator);
} else {
LocationHelper<ExtremumLocAccumulator<COMPARE<CppType, IS_MAX, false>>,
CppType>(intrinsic, result, x, kind, mask, terminator);
}
}
template <bool IS_MAX> struct CharacterMaxOrMinLocHelper {
template <int KIND> struct Functor {
void operator()(const char *intrinsic, Descriptor &result,
const Descriptor &x, int kind, const char *source, int line,
const Descriptor *mask, bool back) const {
DoMaxOrMinLoc<TypeCategory::Character, KIND, IS_MAX, NumericCompare>(
intrinsic, result, x, kind, source, line, mask, back);
}
};
};
template <bool IS_MAX>
inline void CharacterMaxOrMinLoc(const char *intrinsic, Descriptor &result,
const Descriptor &x, int kind, const char *source, int line,
const Descriptor *mask, bool back) {
int rank{x.rank()};
SubscriptValue extent[1]{rank};
result.Establish(TypeCategory::Integer, kind, nullptr, 1, extent,
CFI_attribute_allocatable);
result.GetDimension(0).SetBounds(1, extent[0]);
Terminator terminator{source, line};
if (int stat{result.Allocate()}) {
terminator.Crash(
"%s: could not allocate memory for result; STAT=%d", intrinsic, stat);
}
CheckIntegerKind(terminator, kind, intrinsic);
auto catKind{x.type().GetCategoryAndKind()};
RUNTIME_CHECK(terminator, catKind.has_value());
switch (catKind->first) {
case TypeCategory::Character:
ApplyCharacterKind<CharacterMaxOrMinLocHelper<IS_MAX>::template Functor,
void>(catKind->second, terminator, intrinsic, result, x, kind, source,
line, mask, back);
break;
default:
terminator.Crash(
"%s: bad data type code (%d) for array", intrinsic, x.type().raw());
}
}
template <TypeCategory CAT, int KIND, bool IS_MAXVAL>
inline void TotalNumericMaxOrMinLoc(const char *intrinsic, Descriptor &result,
const Descriptor &x, int kind, const char *source, int line,
const Descriptor *mask, bool back) {
int rank{x.rank()};
SubscriptValue extent[1]{rank};
result.Establish(TypeCategory::Integer, kind, nullptr, 1, extent,
CFI_attribute_allocatable);
result.GetDimension(0).SetBounds(1, extent[0]);
Terminator terminator{source, line};
if (int stat{result.Allocate()}) {
terminator.Crash(
"%s: could not allocate memory for result; STAT=%d", intrinsic, stat);
}
CheckIntegerKind(terminator, kind, intrinsic);
RUNTIME_CHECK(terminator, TypeCode(CAT, KIND) == x.type());
DoMaxOrMinLoc<CAT, KIND, IS_MAXVAL, NumericCompare>(
intrinsic, result, x, kind, source, line, mask, back);
}
extern "C" {
void RTNAME(MaxlocCharacter)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
CharacterMaxOrMinLoc<true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MaxlocInteger1)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 1, true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MaxlocInteger2)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 2, true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MaxlocInteger4)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 4, true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MaxlocInteger8)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 8, true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
#ifdef __SIZEOF_INT128__
void RTNAME(MaxlocInteger16)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 16, true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
#endif
void RTNAME(MaxlocReal4)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Real, 4, true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MaxlocReal8)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Real, 8, true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
#if LDBL_MANT_DIG == 64
void RTNAME(MaxlocReal10)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Real, 10, true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
#endif
#if LDBL_MANT_DIG == 113 || HAS_FLOAT128
void RTNAME(MaxlocReal16)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Real, 16, true>(
"MAXLOC", result, x, kind, source, line, mask, back);
}
#endif
void RTNAME(MinlocCharacter)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
CharacterMaxOrMinLoc<false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MinlocInteger1)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 1, false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MinlocInteger2)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 2, false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MinlocInteger4)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 4, false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MinlocInteger8)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 8, false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
#ifdef __SIZEOF_INT128__
void RTNAME(MinlocInteger16)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Integer, 16, false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
#endif
void RTNAME(MinlocReal4)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Real, 4, false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
void RTNAME(MinlocReal8)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Real, 8, false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
#if LDBL_MANT_DIG == 64
void RTNAME(MinlocReal10)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Real, 10, false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
#endif
#if LDBL_MANT_DIG == 113 || HAS_FLOAT128
void RTNAME(MinlocReal16)(Descriptor &result, const Descriptor &x, int kind,
const char *source, int line, const Descriptor *mask, bool back) {
TotalNumericMaxOrMinLoc<TypeCategory::Real, 16, false>(
"MINLOC", result, x, kind, source, line, mask, back);
}
#endif
} // extern "C"
// MAXLOC/MINLOC with DIM=
template <TypeCategory CAT, int KIND, bool IS_MAX,
template <typename, bool, bool> class COMPARE, bool BACK>
static void DoPartialMaxOrMinLocDirection(const char *intrinsic,
Descriptor &result, const Descriptor &x, int kind, int dim,
const Descriptor *mask, Terminator &terminator) {
using CppType = CppTypeFor<CAT, KIND>;
using Accumulator = ExtremumLocAccumulator<COMPARE<CppType, IS_MAX, BACK>>;
Accumulator accumulator{x};
ApplyIntegerKind<PartialLocationHelper<Accumulator>::template Functor, void>(
kind, terminator, result, x, dim, mask, terminator, intrinsic,
accumulator);
}
template <TypeCategory CAT, int KIND, bool IS_MAX,
template <typename, bool, bool> class COMPARE>
inline void DoPartialMaxOrMinLoc(const char *intrinsic, Descriptor &result,
const Descriptor &x, int kind, int dim, const Descriptor *mask, bool back,
Terminator &terminator) {
if (back) {
DoPartialMaxOrMinLocDirection<CAT, KIND, IS_MAX, COMPARE, true>(
intrinsic, result, x, kind, dim, mask, terminator);
} else {
DoPartialMaxOrMinLocDirection<CAT, KIND, IS_MAX, COMPARE, false>(
intrinsic, result, x, kind, dim, mask, terminator);
}
}
template <TypeCategory CAT, bool IS_MAX,
template <typename, bool, bool> class COMPARE>
struct DoPartialMaxOrMinLocHelper {
template <int KIND> struct Functor {
void operator()(const char *intrinsic, Descriptor &result,
const Descriptor &x, int kind, int dim, const Descriptor *mask,
bool back, Terminator &terminator) const {
DoPartialMaxOrMinLoc<CAT, KIND, IS_MAX, COMPARE>(
intrinsic, result, x, kind, dim, mask, back, terminator);
}
};
};
template <bool IS_MAX>
inline void TypedPartialMaxOrMinLoc(const char *intrinsic, Descriptor &result,
const Descriptor &x, int kind, int dim, const char *source, int line,
const Descriptor *mask, bool back) {
Terminator terminator{source, line};
CheckIntegerKind(terminator, kind, intrinsic);
auto catKind{x.type().GetCategoryAndKind()};
RUNTIME_CHECK(terminator, catKind.has_value());
const Descriptor *maskToUse{mask};
SubscriptValue maskAt[maxRank]; // contents unused
if (mask && mask->rank() == 0) {
if (IsLogicalElementTrue(*mask, maskAt)) {
// A scalar MASK that's .TRUE. In this case, just get rid of the MASK.
maskToUse = nullptr;
} else {
// For scalar MASK arguments that are .FALSE., return all zeroes
// Element size of the destination descriptor is the size
// of {TypeCategory::Integer, kind}.
CreatePartialReductionResult(result, x,
Descriptor::BytesFor(TypeCategory::Integer, kind), dim, terminator,
intrinsic, TypeCode{TypeCategory::Integer, kind});
std::memset(
result.OffsetElement(), 0, result.Elements() * result.ElementBytes());
return;
}
}
switch (catKind->first) {
case TypeCategory::Integer:
ApplyIntegerKind<DoPartialMaxOrMinLocHelper<TypeCategory::Integer, IS_MAX,
NumericCompare>::template Functor,
void>(catKind->second, terminator, intrinsic, result, x, kind, dim,
maskToUse, back, terminator);
break;
case TypeCategory::Real:
ApplyFloatingPointKind<DoPartialMaxOrMinLocHelper<TypeCategory::Real,
IS_MAX, NumericCompare>::template Functor,
void>(catKind->second, terminator, intrinsic, result, x, kind, dim,
maskToUse, back, terminator);
break;
case TypeCategory::Character:
ApplyCharacterKind<DoPartialMaxOrMinLocHelper<TypeCategory::Character,
IS_MAX, CharacterCompare>::template Functor,
void>(catKind->second, terminator, intrinsic, result, x, kind, dim,
maskToUse, back, terminator);
break;
default:
terminator.Crash(
"%s: bad data type code (%d) for array", intrinsic, x.type().raw());
}
}
extern "C" {
void RTNAME(MaxlocDim)(Descriptor &result, const Descriptor &x, int kind,
int dim, const char *source, int line, const Descriptor *mask, bool back) {
TypedPartialMaxOrMinLoc<true>(
"MAXLOC", result, x, kind, dim, source, line, mask, back);
}
void RTNAME(MinlocDim)(Descriptor &result, const Descriptor &x, int kind,
int dim, const char *source, int line, const Descriptor *mask, bool back) {
TypedPartialMaxOrMinLoc<false>(
"MINLOC", result, x, kind, dim, source, line, mask, back);
}
} // extern "C"
// MAXVAL and MINVAL
template <TypeCategory CAT, int KIND, bool IS_MAXVAL, typename Enable = void>
struct MaxOrMinIdentity {
using Type = CppTypeFor<CAT, KIND>;
static constexpr Type Value() {
return IS_MAXVAL ? std::numeric_limits<Type>::lowest()
: std::numeric_limits<Type>::max();
}
};
// std::numeric_limits<> may not know int128_t
template <bool IS_MAXVAL>
struct MaxOrMinIdentity<TypeCategory::Integer, 16, IS_MAXVAL> {
using Type = CppTypeFor<TypeCategory::Integer, 16>;
static constexpr Type Value() {
return IS_MAXVAL ? Type{1} << 127 : ~Type{0} >> 1;
}
};
#if HAS_FLOAT128
// std::numeric_limits<> may not support __float128.
//
// Usage of GCC quadmath.h's FLT128_MAX is complicated by the fact that
// even GCC complains about 'Q' literal suffix under -Wpedantic.
// We just recreate FLT128_MAX ourselves.
//
// This specialization must engage only when
// CppTypeFor<TypeCategory::Real, 16> is __float128.
template <bool IS_MAXVAL>
struct MaxOrMinIdentity<TypeCategory::Real, 16, IS_MAXVAL,
typename std::enable_if_t<
std::is_same_v<CppTypeFor<TypeCategory::Real, 16>, __float128>>> {
using Type = __float128;
static Type Value() {
// Create a buffer to store binary representation of __float128 constant.
constexpr std::size_t alignment =
std::max(alignof(Type), alignof(std::uint64_t));
alignas(alignment) char data[sizeof(Type)];
// First, verify that our interpretation of __float128 format is correct,
// e.g. by checking at least one known constant.
*reinterpret_cast<Type *>(data) = Type(1.0);
if (*reinterpret_cast<std::uint64_t *>(data) != 0 ||
*(reinterpret_cast<std::uint64_t *>(data) + 1) != 0x3FFF000000000000) {
Terminator terminator{__FILE__, __LINE__};
terminator.Crash("not yet implemented: no full support for __float128");
}
// Recreate FLT128_MAX.
*reinterpret_cast<std::uint64_t *>(data) = 0xFFFFFFFFFFFFFFFF;
*(reinterpret_cast<std::uint64_t *>(data) + 1) = 0x7FFEFFFFFFFFFFFF;
Type max = *reinterpret_cast<Type *>(data);
return IS_MAXVAL ? -max : max;
}
};
#endif // HAS_FLOAT128
template <TypeCategory CAT, int KIND, bool IS_MAXVAL>
class NumericExtremumAccumulator {
public:
using Type = CppTypeFor<CAT, KIND>;
explicit NumericExtremumAccumulator(const Descriptor &array)
: array_{array} {}
void Reinitialize() {
extremum_ = MaxOrMinIdentity<CAT, KIND, IS_MAXVAL>::Value();
}
template <typename A> void GetResult(A *p, int /*zeroBasedDim*/ = -1) const {
*p = extremum_;
}
bool Accumulate(Type x) {
if constexpr (IS_MAXVAL) {
if (x > extremum_) {
extremum_ = x;
}
} else if (x < extremum_) {
extremum_ = x;
}
return true;
}
template <typename A> bool AccumulateAt(const SubscriptValue at[]) {
return Accumulate(*array_.Element<A>(at));
}
private:
const Descriptor &array_;
Type extremum_{MaxOrMinIdentity<CAT, KIND, IS_MAXVAL>::Value()};
};
template <TypeCategory CAT, int KIND, bool IS_MAXVAL>
inline CppTypeFor<CAT, KIND> TotalNumericMaxOrMin(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask,
const char *intrinsic) {
return GetTotalReduction<CAT, KIND>(x, source, line, dim, mask,
NumericExtremumAccumulator<CAT, KIND, IS_MAXVAL>{x}, intrinsic);
}
template <TypeCategory CAT, int KIND, typename ACCUMULATOR>
static void DoMaxMinNorm2(Descriptor &result, const Descriptor &x, int dim,
const Descriptor *mask, const char *intrinsic, Terminator &terminator) {
using Type = CppTypeFor<CAT, KIND>;
ACCUMULATOR accumulator{x};
if (dim == 0 || x.rank() == 1) {
// Total reduction
// Element size of the destination descriptor is the same
// as the element size of the source.
result.Establish(x.type(), x.ElementBytes(), nullptr, 0, nullptr,
CFI_attribute_allocatable);
if (int stat{result.Allocate()}) {
terminator.Crash(
"%s: could not allocate memory for result; STAT=%d", intrinsic, stat);
}
DoTotalReduction<Type>(x, dim, mask, accumulator, intrinsic, terminator);
accumulator.GetResult(result.OffsetElement<Type>());
} else {
// Partial reduction
// Element size of the destination descriptor is the same
// as the element size of the source.
PartialReduction<ACCUMULATOR, CAT, KIND>(result, x, x.ElementBytes(), dim,
mask, terminator, intrinsic, accumulator);
}
}
template <TypeCategory CAT, bool IS_MAXVAL> struct MaxOrMinHelper {
template <int KIND> struct Functor {
void operator()(Descriptor &result, const Descriptor &x, int dim,
const Descriptor *mask, const char *intrinsic,
Terminator &terminator) const {
DoMaxMinNorm2<CAT, KIND,
NumericExtremumAccumulator<CAT, KIND, IS_MAXVAL>>(
result, x, dim, mask, intrinsic, terminator);
}
};
};
template <bool IS_MAXVAL>
inline void NumericMaxOrMin(Descriptor &result, const Descriptor &x, int dim,
const char *source, int line, const Descriptor *mask,
const char *intrinsic) {
Terminator terminator{source, line};
auto type{x.type().GetCategoryAndKind()};
RUNTIME_CHECK(terminator, type);
switch (type->first) {
case TypeCategory::Integer:
ApplyIntegerKind<
MaxOrMinHelper<TypeCategory::Integer, IS_MAXVAL>::template Functor,
void>(
type->second, terminator, result, x, dim, mask, intrinsic, terminator);
break;
case TypeCategory::Real:
ApplyFloatingPointKind<
MaxOrMinHelper<TypeCategory::Real, IS_MAXVAL>::template Functor, void>(
type->second, terminator, result, x, dim, mask, intrinsic, terminator);
break;
default:
terminator.Crash("%s: bad type code %d", intrinsic, x.type().raw());
}
}
template <int KIND, bool IS_MAXVAL> class CharacterExtremumAccumulator {
public:
using Type = CppTypeFor<TypeCategory::Character, KIND>;
explicit CharacterExtremumAccumulator(const Descriptor &array)
: array_{array}, charLen_{array_.ElementBytes() / KIND} {}
void Reinitialize() { extremum_ = nullptr; }
template <typename A> void GetResult(A *p, int /*zeroBasedDim*/ = -1) const {
static_assert(std::is_same_v<A, Type>);
std::size_t byteSize{array_.ElementBytes()};
if (extremum_) {
std::memcpy(p, extremum_, byteSize);
} else {
// Empty array; fill with character 0 for MAXVAL.
// For MINVAL, fill with 127 if ASCII as required
// by the standard, otherwise set all of the bits.
std::memset(p, IS_MAXVAL ? 0 : KIND == 1 ? 127 : 255, byteSize);
}
}
bool Accumulate(const Type *x) {
if (!extremum_) {
extremum_ = x;
} else {
int cmp{CharacterScalarCompare(x, extremum_, charLen_, charLen_)};
if (IS_MAXVAL == (cmp > 0)) {
extremum_ = x;
}
}
return true;
}
template <typename A> bool AccumulateAt(const SubscriptValue at[]) {
return Accumulate(array_.Element<A>(at));
}
private:
const Descriptor &array_;
std::size_t charLen_;
const Type *extremum_{nullptr};
};
template <bool IS_MAXVAL> struct CharacterMaxOrMinHelper {
template <int KIND> struct Functor {
void operator()(Descriptor &result, const Descriptor &x, int dim,
const Descriptor *mask, const char *intrinsic,
Terminator &terminator) const {
DoMaxMinNorm2<TypeCategory::Character, KIND,
CharacterExtremumAccumulator<KIND, IS_MAXVAL>>(
result, x, dim, mask, intrinsic, terminator);
}
};
};
template <bool IS_MAXVAL>
inline void CharacterMaxOrMin(Descriptor &result, const Descriptor &x, int dim,
const char *source, int line, const Descriptor *mask,
const char *intrinsic) {
Terminator terminator{source, line};
auto type{x.type().GetCategoryAndKind()};
RUNTIME_CHECK(terminator, type && type->first == TypeCategory::Character);
ApplyCharacterKind<CharacterMaxOrMinHelper<IS_MAXVAL>::template Functor,
void>(
type->second, terminator, result, x, dim, mask, intrinsic, terminator);
}
extern "C" {
CppTypeFor<TypeCategory::Integer, 1> RTNAME(MaxvalInteger1)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 1, true>(
x, source, line, dim, mask, "MAXVAL");
}
CppTypeFor<TypeCategory::Integer, 2> RTNAME(MaxvalInteger2)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 2, true>(
x, source, line, dim, mask, "MAXVAL");
}
CppTypeFor<TypeCategory::Integer, 4> RTNAME(MaxvalInteger4)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 4, true>(
x, source, line, dim, mask, "MAXVAL");
}
CppTypeFor<TypeCategory::Integer, 8> RTNAME(MaxvalInteger8)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 8, true>(
x, source, line, dim, mask, "MAXVAL");
}
#ifdef __SIZEOF_INT128__
CppTypeFor<TypeCategory::Integer, 16> RTNAME(MaxvalInteger16)(
const Descriptor &x, const char *source, int line, int dim,
const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 16, true>(
x, source, line, dim, mask, "MAXVAL");
}
#endif
// TODO: REAL(2 & 3)
CppTypeFor<TypeCategory::Real, 4> RTNAME(MaxvalReal4)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Real, 4, true>(
x, source, line, dim, mask, "MAXVAL");
}
CppTypeFor<TypeCategory::Real, 8> RTNAME(MaxvalReal8)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Real, 8, true>(
x, source, line, dim, mask, "MAXVAL");
}
#if LDBL_MANT_DIG == 64
CppTypeFor<TypeCategory::Real, 10> RTNAME(MaxvalReal10)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Real, 10, true>(
x, source, line, dim, mask, "MAXVAL");
}
#endif
#if LDBL_MANT_DIG == 113 || HAS_FLOAT128
CppTypeFor<TypeCategory::Real, 16> RTNAME(MaxvalReal16)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Real, 16, true>(
x, source, line, dim, mask, "MAXVAL");
}
#endif
void RTNAME(MaxvalCharacter)(Descriptor &result, const Descriptor &x,
const char *source, int line, const Descriptor *mask) {
CharacterMaxOrMin<true>(result, x, 0, source, line, mask, "MAXVAL");
}
CppTypeFor<TypeCategory::Integer, 1> RTNAME(MinvalInteger1)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 1, false>(
x, source, line, dim, mask, "MINVAL");
}
CppTypeFor<TypeCategory::Integer, 2> RTNAME(MinvalInteger2)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 2, false>(
x, source, line, dim, mask, "MINVAL");
}
CppTypeFor<TypeCategory::Integer, 4> RTNAME(MinvalInteger4)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 4, false>(
x, source, line, dim, mask, "MINVAL");
}
CppTypeFor<TypeCategory::Integer, 8> RTNAME(MinvalInteger8)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 8, false>(
x, source, line, dim, mask, "MINVAL");
}
#ifdef __SIZEOF_INT128__
CppTypeFor<TypeCategory::Integer, 16> RTNAME(MinvalInteger16)(
const Descriptor &x, const char *source, int line, int dim,
const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Integer, 16, false>(
x, source, line, dim, mask, "MINVAL");
}
#endif
// TODO: REAL(2 & 3)
CppTypeFor<TypeCategory::Real, 4> RTNAME(MinvalReal4)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Real, 4, false>(
x, source, line, dim, mask, "MINVAL");
}
CppTypeFor<TypeCategory::Real, 8> RTNAME(MinvalReal8)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Real, 8, false>(
x, source, line, dim, mask, "MINVAL");
}
#if LDBL_MANT_DIG == 64
CppTypeFor<TypeCategory::Real, 10> RTNAME(MinvalReal10)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Real, 10, false>(
x, source, line, dim, mask, "MINVAL");
}
#endif
#if LDBL_MANT_DIG == 113 || HAS_FLOAT128
CppTypeFor<TypeCategory::Real, 16> RTNAME(MinvalReal16)(const Descriptor &x,
const char *source, int line, int dim, const Descriptor *mask) {
return TotalNumericMaxOrMin<TypeCategory::Real, 16, false>(
x, source, line, dim, mask, "MINVAL");
}
#endif
void RTNAME(MinvalCharacter)(Descriptor &result, const Descriptor &x,
const char *source, int line, const Descriptor *mask) {
CharacterMaxOrMin<false>(result, x, 0, source, line, mask, "MINVAL");
}
void RTNAME(MaxvalDim)(Descriptor &result, const Descriptor &x, int dim,
const char *source, int line, const Descriptor *mask) {
if (x.type().IsCharacter()) {
CharacterMaxOrMin<true>(result, x, dim, source, line, mask, "MAXVAL");
} else {
NumericMaxOrMin<true>(result, x, dim, source, line, mask, "MAXVAL");
}
}
void RTNAME(MinvalDim)(Descriptor &result, const Descriptor &x, int dim,
const char *source, int line, const Descriptor *mask) {
if (x.type().IsCharacter()) {
CharacterMaxOrMin<false>(result, x, dim, source, line, mask, "MINVAL");
} else {
NumericMaxOrMin<false>(result, x, dim, source, line, mask, "MINVAL");
}
}
} // extern "C"
// NORM2
template <int KIND> class Norm2Accumulator {
public:
using Type = CppTypeFor<TypeCategory::Real, KIND>;
// Use at least double precision for accumulators.
// Don't use __float128, it doesn't work with abs() or sqrt() yet.
static constexpr int largestLDKind {
#if LDBL_MANT_DIG == 113
16
#elif LDBL_MANT_DIG == 64
10
#else
8
#endif
};
using AccumType =
CppTypeFor<TypeCategory::Real, std::clamp(KIND, 8, largestLDKind)>;
explicit Norm2Accumulator(const Descriptor &array) : array_{array} {}
void Reinitialize() { max_ = sum_ = 0; }
template <typename A> void GetResult(A *p, int /*zeroBasedDim*/ = -1) const {
// m * sqrt(1 + sum((others(:)/m)**2))
*p = static_cast<Type>(max_ * std::sqrt(1 + sum_));
}
bool Accumulate(Type x) {
auto absX{std::abs(static_cast<AccumType>(x))};
if (!max_) {
max_ = absX;
} else if (absX > max_) {
auto t{max_ / absX}; // < 1.0
auto tsq{t * t};
sum_ *= tsq; // scale sum to reflect change to the max
sum_ += tsq; // include a term for the previous max
max_ = absX;
} else { // absX <= max_
auto t{absX / max_};
sum_ += t * t;
}
return true;
}
template <typename A> bool AccumulateAt(const SubscriptValue at[]) {
return Accumulate(*array_.Element<A>(at));
}
private:
const Descriptor &array_;
AccumType max_{0}; // value (m) with largest magnitude
AccumType sum_{0}; // sum((others(:)/m)**2)
};
template <int KIND> struct Norm2Helper {
void operator()(Descriptor &result, const Descriptor &x, int dim,
const Descriptor *mask, Terminator &terminator) const {
DoMaxMinNorm2<TypeCategory::Real, KIND, Norm2Accumulator<KIND>>(
result, x, dim, mask, "NORM2", terminator);
}
};
extern "C" {
// TODO: REAL(2 & 3)
CppTypeFor<TypeCategory::Real, 4> RTNAME(Norm2_4)(
const Descriptor &x, const char *source, int line, int dim) {
return GetTotalReduction<TypeCategory::Real, 4>(
x, source, line, dim, nullptr, Norm2Accumulator<4>{x}, "NORM2");
}
CppTypeFor<TypeCategory::Real, 8> RTNAME(Norm2_8)(
const Descriptor &x, const char *source, int line, int dim) {
return GetTotalReduction<TypeCategory::Real, 8>(
x, source, line, dim, nullptr, Norm2Accumulator<8>{x}, "NORM2");
}
#if LDBL_MANT_DIG == 64
CppTypeFor<TypeCategory::Real, 10> RTNAME(Norm2_10)(
const Descriptor &x, const char *source, int line, int dim) {
return GetTotalReduction<TypeCategory::Real, 10>(
x, source, line, dim, nullptr, Norm2Accumulator<10>{x}, "NORM2");
}
#endif
#if LDBL_MANT_DIG == 113
CppTypeFor<TypeCategory::Real, 16> RTNAME(Norm2_16)(
const Descriptor &x, const char *source, int line, int dim) {
return GetTotalReduction<TypeCategory::Real, 16>(
x, source, line, dim, nullptr, Norm2Accumulator<16>{x}, "NORM2");
}
#endif
void RTNAME(Norm2Dim)(Descriptor &result, const Descriptor &x, int dim,
const char *source, int line) {
Terminator terminator{source, line};
auto type{x.type().GetCategoryAndKind()};
RUNTIME_CHECK(terminator, type);
if (type->first == TypeCategory::Real) {
ApplyFloatingPointKind<Norm2Helper, void>(
type->second, terminator, result, x, dim, nullptr, terminator);
} else {
terminator.Crash("NORM2: bad type code %d", x.type().raw());
}
}
} // extern "C"
} // namespace Fortran::runtime
|
4c0d02f8216a04fb1a4a5c8db2677eb080b007f6
|
d41f6edf1dd5a794894c686bed6a97dcdf622eff
|
/src/editor/modes/visual.cpp
|
7c71110ddd44dfbf35439551b7bfd7efef239f27
|
[
"LicenseRef-scancode-other-permissive",
"MIT"
] |
permissive
|
GiovanyH/GioEngine
|
d4b5774368816c1865fbabc9b6bde4544ca54f14
|
cda5c26ab95646eef415e752994ce5efd4d9939e
|
refs/heads/main
| 2023-02-06T01:29:17.914334
| 2022-08-16T22:16:26
| 2022-08-16T22:16:26
| 511,667,429
| 2
| 0
|
NOASSERTION
| 2022-08-16T22:16:26
| 2022-07-07T20:36:16
|
Makefile
|
UTF-8
|
C++
| false
| false
| 612
|
cpp
|
visual.cpp
|
#include "include.h"
TextEditor::Modes TextEditor::handleVisual() {
current_mode = Visual;
if(ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_H))) MoveLeft(1, true);
else if(ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_L))) MoveRight(1, true);
else if(ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_J))) MoveDown(1, true);
else if(ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_K))) MoveUp(1, true);
else if(ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_X))) {
Backspace();
return Normal;
}
else if(ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_V))) return Normal;
return current_mode;
}
|
5dac504d90c4c451b3dbff29281937da24a6658c
|
e0b8edcb46e4b05483cb391c58854e4731c3f30a
|
/src/public/slpool.h
|
2677ee4fbdce5ed556205c7fceda8ff6d096b122
|
[] |
no_license
|
DuanDechao/shyloo
|
fcf147dd993f921ed3e6a6833af1ce9d0ac6e726
|
775231d3bbfbe3094fcd7393ad810d43c91784a4
|
refs/heads/master
| 2022-12-24T18:31:02.701260
| 2019-01-22T09:19:04
| 2019-01-22T09:19:04
| 47,161,086
| 9
| 3
| null | 2022-12-18T00:08:55
| 2015-12-01T02:47:06
|
Python
|
UTF-8
|
C++
| false
| false
| 4,214
|
h
|
slpool.h
|
#ifndef __SL_PUBLIC_POOL_H__
#define __SL_PUBLIC_POOL_H__
#include "slmulti_sys.h"
#include "sltools.h"
namespace sl{
template<typename T, int32 chunkCount = 1, int32 chunkSize = 64>
class SLPool{
enum{
IN_FREE = 0,
IN_USE,
};
struct ChunkList;
struct Chunk{
char _buffer[sizeof(T)];
ChunkList* _parent;
Chunk* _prev;
Chunk* _next;
int8 _state;
int32 _len;
#ifdef _DEBUG
const char _file[SL_PATH_MAX];
int32 _line;
#endif // _DEBUG
};
struct ChunkList{
ChunkList* _prev;
ChunkList* _next;
int32 _useCount;
Chunk _chunk[chunkSize];
};
public:
SLPool() :_head(nullptr), _listHead(nullptr), _chunkCount(0){
allocChunk(1);
}
~SLPool(){
while (_listHead){
ChunkList* next = _listHead->_next;
SLFREE(_listHead);
_listHead = next;
}
}
inline int32 count() { return _chunkCount * chunkSize; }
template<typename... Args>
T* create(const char* file, int32 line, Args... args){
Chunk* newChunk = alloc(file, line);
SLASSERT(newChunk, "create chunk failed");
return new(newChunk->_buffer)T(args...);
}
T* create(const char* file, int32 line){
Chunk* newChunk = alloc(file, line);
SLASSERT(newChunk, "create chunk failed");
return new(newChunk->_buffer)T();
}
void recover(T* obj){
obj->~T();
recover((Chunk*)obj);
}
private:
Chunk* alloc(const char* file, int32 line){
if (!_head)
allocChunk(1);
SLASSERT(_head, "create chunk failed");
Chunk* ret = _head;
remove(_head);
SLASSERT(ret->_state == IN_FREE && ret->_len == sizeof(Chunk), "buffer is not in free");
ret->_state = IN_USE;
++ret->_parent->_useCount;
#ifdef _DEBUG
sl::SafeMemcpy((void*)ret->_file, sizeof(ret->_file), file, strlen(file));
ret->_line = line;
#endif
return ret;
}
void recover(Chunk* chunk){
SLASSERT(chunk->_len == sizeof(Chunk) && chunk->_state == IN_USE, "invaild object memory or not in use");
SLASSERT(chunk->_parent->_useCount > 0, "chunk is not in list");
sl::SafeMemset(chunk->_buffer, sizeof(chunk->_buffer), 0, sizeof(chunk->_buffer));
chunk->_state = IN_FREE;
chunk->_parent->_useCount--;
if (chunk->_parent->_useCount == 0 && _chunkCount > chunkCount)
freeChunkList(chunk->_parent);
else
add(chunk);
}
void allocChunk(int32 count){
for (int32 i = 0; i < count; i++){
ChunkList* newChunk = (ChunkList*)SLMALLOC(sizeof(ChunkList));
SLASSERT(newChunk, "create chunk failed");
sl::SafeMemset(newChunk, sizeof(ChunkList), 0, sizeof(ChunkList));
arrangeChunkList(newChunk);
newChunk->_next = _listHead;
if (_listHead)
_listHead->_prev = newChunk;
_listHead = newChunk;
}
_chunkCount += count;
}
void arrangeChunkList(ChunkList* chunkList){
chunkList->_prev = nullptr;
chunkList->_next = nullptr;
chunkList->_useCount = 0;
for (int32 i = 0; i < chunkSize; i++){
chunkList->_chunk[i]._prev = nullptr;
chunkList->_chunk[i]._next = nullptr;
chunkList->_chunk[i]._state = IN_FREE;
chunkList->_chunk[i]._len = sizeof(Chunk);
chunkList->_chunk[i]._parent = chunkList;
add(&(chunkList->_chunk[i]));
}
}
void freeChunkList(ChunkList* chunkList){
for (int32 i = 0; i < chunkSize; i++){
SLASSERT(chunkList->_chunk[i]._state == IN_FREE, "not free chunk");
remove(&(chunkList->_chunk[i]));
}
if (chunkList->_prev)
chunkList->_prev->_next = chunkList->_next;
if (chunkList->_next)
chunkList->_next->_prev = chunkList->_prev;
if (chunkList == _listHead)
_listHead = chunkList;
chunkList->_prev = nullptr;
chunkList->_next = nullptr;
SLFREE(chunkList);
_chunkCount--;
}
void add(Chunk* chunk){
chunk->_next = _head;
if (_head)
_head->_prev = chunk;
_head = chunk;
}
void remove(Chunk* chunk){
if (chunk->_next)
chunk->_next->_prev = chunk->_prev;
if (chunk->_prev)
chunk->_prev->_next = chunk->_next;
if (chunk == _head)
_head = chunk->_next;
chunk->_prev = nullptr;
chunk->_next = nullptr;
}
private:
Chunk* _head;
ChunkList* _listHead;
int32 _chunkCount;
};
}
#ifdef SL_OS_WINDOWS
#define CREATE_FROM_POOL(pool, ...) pool.create(__FILE__, __LINE__, ##__VA_ARGS__)
#else
#define CREATE_FROM_POOL(pool, a...) pool.create(__FILE__, __LINE__, ##a)
#endif
#endif
|
9ebd606dd83ba974ecde884d0c37f73a7580ecb1
|
319b1e8d67a475ca3822464d044ae4af09cb0f12
|
/BEEP/Node.h
|
ae44b8ae664fca844f97c7e89e520a601eca865e
|
[] |
no_license
|
BEEP-algorithm/BEEP-algorithm
|
56b87229485529f9c6395d9846cf84ba53cf6108
|
3082f050af62d2442f77badb7b4e22f6c70c0dc3
|
refs/heads/main
| 2023-03-04T02:32:01.264574
| 2021-02-15T15:50:48
| 2021-02-15T15:50:48
| 335,218,776
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,365
|
h
|
Node.h
|
#ifndef NODE_H
#define NODE_H
#include "Common.h"
#include "Attribute.h"
#include "Pattern.h"
class Node {
public:
Node(int alphabet_size, int *alphabet_sizes, int timestep) : alphabet_size(alphabet_size),
alphabet_sizes(alphabet_sizes), timestep(timestep) {
tree_id = 0; //ROOT
init(-1);
}
Node(int alphabet_size, int *alphabet_sizes, int timestep, int id, int aid) : alphabet_size(alphabet_size),
alphabet_sizes(alphabet_sizes),
timestep(timestep), tree_id(id) {
init(aid);
}
~Node();
void init(int aid) {
next_timestep = nullptr;
infrequent = false;
pos_correction = 0;
for (int i = 0; i <= aid; ++i)
pos_correction += alphabet_sizes[i]; //symbols of lower or similar attributes can't become children
nr_children = alphabet_size -
pos_correction; //nr_children = alphabet_size - tree_id;
children = new Node *[nr_children];
for (int i = 0; i < nr_children; ++i)
children[i] = nullptr;
}
bool find_pattern(Pattern *p, int start_pos, event_set::iterator it,
event_set::iterator end) //True when event_set found and thus not frequent, False otherwise
{
if (infrequent)
return true;
if (it == end) //check if there is a next node to go to
{
if (timestep == p->get_length() - 1 - start_pos)
return false;
else {
if (next_timestep == nullptr)
return false;
else
return next_timestep->find_pattern(p, start_pos,
p->get_symbols(start_pos + timestep + 1)->begin(),
p->get_symbols(start_pos + timestep + 1)->end());
}
}
//evs is SORTED on tree_id, i.e. first ascending on attribute-level and then ascending alphabetically
int pos = (*it)->tree_id - pos_correction - 1;
if (children[pos] == nullptr)
return false;
else
return children[pos]->find_pattern(p, start_pos, ++it, end);
}
void add_infrequent_pattern(Pattern *p, event_set::iterator it,
event_set::iterator end) //evs is SORTED: first ascending on attribute-level and then ascending alphabetically
{
if (it == end) {
if (timestep == p->get_length() - 1)
infrequent = true;
else {
if (next_timestep == nullptr)
next_timestep = new Node(alphabet_size, alphabet_sizes, timestep + 1);//Root
next_timestep->add_infrequent_pattern(p, p->get_symbols(timestep + 1)->begin(),
p->get_symbols(timestep + 1)->end());
}
} else {
int tree_id = (*it)->tree_id;
int pos = tree_id - pos_correction - 1;
if (children[pos] == nullptr)
children[pos] = new Node(alphabet_size, alphabet_sizes, timestep, tree_id, (*it)->attribute);
children[pos]->add_infrequent_pattern(p, ++it, end);
}
}
void print(const string& tab) {
cout << tab << "NODE id: " << tree_id << " infreq=" << infrequent << " #Children: " << nr_children
<< " nextTimestep: " << next_timestep << endl;
for (int i = 0; i < nr_children; ++i)
if (children[i] != nullptr)
children[i]->print(tab + "\t");
}
private:
bool infrequent; //whether the pattern represented by this node is known to be infrequent
int alphabet_size;
int *alphabet_sizes;
int tree_id; //ROOT = 0, rest ranges from 1 to alphabet_size
int nr_children; //alphabet_size - tree_id
int pos_correction;
Node **children;
Node *next_timestep;
int timestep; //range 0 to ?
};
#endif
|
4a8befaad381e85b032cd420e0006d22a9405af4
|
c1ced4916270d7dec7ccbb8486290433fb189ca4
|
/nullsource.h
|
dd4cc4a4ed4e955f44c594a67524d3cc5d9fd92e
|
[] |
no_license
|
lltcggie/qaac
|
041b7c8d2d2579251181e96073de15684fe28659
|
1abcf4c3bc3306566fff367d8065d0b09f5de95b
|
refs/heads/master
| 2020-12-31T03:41:00.494826
| 2014-08-15T13:02:41
| 2014-08-15T13:02:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 767
|
h
|
nullsource.h
|
#ifndef _NULLSOURCE_H
#define _NULLSOURCE_H
#include "iointer.h"
class NullSource: public PartialSource<NullSource> {
SampleFormat m_format;
public:
NullSource(const SampleFormat &format):
m_format(format)
{}
uint64_t length() const { return getDuration(); }
const SampleFormat &getSampleFormat() const { return m_format; }
const std::vector<uint32_t> *getChannels() const { return 0; }
size_t readSamples(void *buffer, size_t nsamples)
{
nsamples = adjustSamplesToRead(nsamples);
if (nsamples) {
size_t nblocks = m_format.bytesPerFrame();
std::memset(buffer, 0, nsamples * nblocks);
addSamplesRead(nsamples);
}
return nsamples;
}
void skipSamples(int64_t count) {}
};
#endif
|
1e83d657a9a18f23124bd9d7b17e2ce0e04fd3b5
|
c47c254ca476c1f9969f8f3e89acb4d0618c14b6
|
/datasets/github_cpp_10/7/5.cpp
|
a4e60da138db2768eee5e19e9fb9d8a7e301eeab
|
[
"BSD-2-Clause"
] |
permissive
|
yijunyu/demo
|
5cf4e83f585254a28b31c4a050630b8f661a90c8
|
11c0c84081a3181494b9c469bda42a313c457ad2
|
refs/heads/master
| 2023-02-22T09:00:12.023083
| 2021-01-25T16:51:40
| 2021-01-25T16:51:40
| 175,939,000
| 3
| 6
|
BSD-2-Clause
| 2021-01-09T23:00:12
| 2019-03-16T07:13:00
|
C
|
UTF-8
|
C++
| false
| false
| 1,816
|
cpp
|
5.cpp
|
#include <iostream>
#include <vector>
#include <ctime>
#include <cstdlib>
using namespace std;
template <typename T>
void Merge_Sort(T &A, unsigned p, unsigned r)
{
cout << "merge sort " << p << " " << r << endl;
if (p < r) {
unsigned q = (p+r)/2;
cout << "begin left" << endl;
Merge_Sort(A, p, q);
cout << "begin right " << endl;
Merge_Sort(A, q+1, r);
Merge(A, p, q, r);
}
}
template <typename T>
void Merge(T &A, unsigned p, unsigned q, unsigned r)
{
cout << "merge " << p << " " << q << " " << r << endl;
typename T::iterator it_ini = A.begin();
T A_left(it_ini+p, it_ini+q+1), A_right(it_ini+q+1, it_ini+r+1);
T A_sort_ok;
typename T::iterator it1 = A_left.begin(), it2 = A_right.begin();
while (it1 != A_left.end() && it2 != A_right.end()) {
cout << "compare " << *it1 << " " << *it2 << endl;
if (*it1 < *it2) A_sort_ok.push_back(*it1++);
else A_sort_ok.push_back(*it2++);
}
while (it1 != A_left.end()) A_sort_ok.push_back(*it1++);
while (it2 != A_right.end()) A_sort_ok.push_back(*it2++);
it_ini = A.begin()+p;
it1 = A_sort_ok.begin();
while (it_ini != A.begin()+r+1) *it_ini++ = *it1++;
}
int main()
{
srand(time(NULL));
vector<int> need_sort;
unsigned sample_len = rand()%30;
for (unsigned ix = 0; ix != sample_len; ++ix) need_sort.push_back(rand()%100);
cout << "before Merge-Sort: " << endl;
for (unsigned ix = 0; ix != need_sort.size(); ++ix) cout << need_sort[ix] << ' ';
cout << endl;
Merge_Sort(need_sort, 0, need_sort.size()-1);
cout << "after Merge-Sort: " << endl;
for (unsigned ix = 0; ix != need_sort.size(); ++ix) cout << need_sort[ix] << ' ';
cout << endl;
return 0;
}
|
43020dd5e5fc8ffe90f852fb1f1b8d6fb8b41bd5
|
2878085060affd8375c9a2cdf7319b0a2280f8be
|
/src/ui/Screen.cpp
|
b72e9ba3b9df266bb2d9a57afa88b4356a57be99
|
[] |
no_license
|
silascodes/sgame
|
d2829b322b6971fa566d4884725e842dbbfaa98a
|
b563fc2d84208b4922cc7e7595bc470fdbed3eab
|
refs/heads/master
| 2021-01-23T19:25:53.218607
| 2017-09-08T05:36:44
| 2017-09-08T05:36:44
| 102,821,247
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,698
|
cpp
|
Screen.cpp
|
#include "ui/Screen.h"
#include "ui/widgets/Container.h"
#include "Log.h"
namespace ui {
void Screen::Init(lua_State *scriptState) {
Log_Info("");
this->root = new widgets::Container();
this->mouseFocus = NULL;
this->keyboardFocus = NULL;
this->scriptState = scriptState;
}
void Screen::Shutdown() {
Log_Info("");
delete this->root;
}
void Screen::Render(graphics::Renderer *renderer) {
// Start rendering at the root widget
this->root->Render(renderer);
}
Widget *Screen::GetRootWidget() {
return this->root;
}
bool Screen::OnMouseEvent(const client::MouseEvent &event) {
bool grabbed = false;
Widget *widget = this->GetRootWidget()->GetChildAtPosition(event.GetX(), event.GetY());
if(widget) {
switch(event.GetType()) {
case client::MouseEventType::Move:
if(widget != this->mouseFocus) {
// If there was a widget that previously had mouse focus, send it the mouse out event
if(this->mouseFocus) {
this->mouseFocus->OnMouseOut();
}
// Set as mouse focused widget, send mouse over event
this->mouseFocus = widget;
this->mouseFocus->OnMouseOver();
}
widget->OnMouseMove(event);
break;
case client::MouseEventType::ButtonDown:
widget->OnMouseButtonDown();
break;
case client::MouseEventType::ButtonUp:
grabbed = widget->IsGrabbed();
widget->OnMouseButtonUp();
// If the widget was grabbed, send a click event too
if(grabbed) {
widget->OnMouseClick(event);
this->CallFunc(widget->GetOnMouseClick());
}
break;
}
}
return true;
}
void Screen::CallFunc(const std::string &name) {
if(!this->scriptState || name.empty()) {
return;
}
lua_getglobal(this->scriptState, name.c_str());
if(lua_isfunction(this->scriptState, -1) != 1) {
Log_Error("states %s function not found", name.c_str());
return;
}
if(lua_pcall(this->scriptState, 0, 0, 0) != LUA_OK) {
Log_Error("failed to call states %s function (%s)", name.c_str(), lua_tostring(this->scriptState, -1));
return;
}
}
}
|
fd6e47818dbac67a3e3ca989f169c3f55a4e50ee
|
a4ad4b6eeb12fcb44125b51e07738b0355eddfff
|
/Number1/Material.cpp
|
a57c9f8807b1cfcf2ace2b401ce51faee306183e
|
[] |
no_license
|
HongYD/OpenGLCourse
|
ef1828f2af9d9b5ed0eed89a49f9380d251916da
|
9cdf1b4f8833e6d3f7d322bf11804d55d1d01737
|
refs/heads/master
| 2022-08-03T02:05:25.907899
| 2020-05-25T12:57:01
| 2020-05-25T12:57:01
| 259,295,157
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 556
|
cpp
|
Material.cpp
|
#include "Material.h"
Material::Material(Shader * _shader, glm::vec3 _ambient, glm::vec3 _diffuse, glm::vec3 _specular, float _shininess):
shader(_shader),ambient(_ambient),diffuse(_diffuse),specular(_specular),shininess(_shininess)
{
}
Material::Material(Shader * _shader, unsigned int _emission, glm::vec3 _ambient, unsigned int _diffuse, unsigned int _specular, float _shininess):
shader(_shader),emissionMapID(_emission), ambient(_ambient), diffuseMapID(_diffuse), specularMapID(_specular), shininess(_shininess)
{
}
Material::~Material()
{
}
|
1fc88def658f48bba232a3d173887aada9d3ab53
|
1998fb705b242b24d15f58929cc8692388d8f766
|
/Data Structure/LinkedList/InsertionSortLinkedListHavingTail.cpp
|
20a1d11673b77b1033eabbd1e3225c6339464bac
|
[] |
no_license
|
phongvanngo/Practice-Data-Structure
|
1c0120c584d457d938b45bc64452afc3e4e66776
|
58dbcd685ae0d971ec05e7c9606e25dd8a920ef5
|
refs/heads/master
| 2022-11-30T11:40:35.746835
| 2020-07-28T08:20:14
| 2020-07-28T08:20:14
| 270,015,395
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,264
|
cpp
|
InsertionSortLinkedListHavingTail.cpp
|
#include <iostream>
using namespace std;
class Node
{
private:
int info;
Node *next;
friend class SinglyLinkedList;
};
class SinglyLinkedList
{
private:
Node *head, *tail;
public:
SinglyLinkedList();
void Append(int info);
void PrintList();
void InsertionSort();
};
SinglyLinkedList::SinglyLinkedList()
{
head = NULL;
tail = NULL;
};
void SinglyLinkedList::Append(int info) //thêm phần tử vào cuối danh sách
{
Node *newNode = new Node;
newNode->info = info;
newNode->next = NULL;
if (head == NULL)
{
head = newNode;
tail = newNode;
return;
};
tail->next = newNode;
tail = newNode;
};
void SinglyLinkedList::PrintList()
{
Node *CurrentNode = head;
while (CurrentNode != NULL)
{
cout << CurrentNode->info << " ";
CurrentNode = CurrentNode->next;
};
};
void SinglyLinkedList::InsertionSort()
{
if (head == NULL)
return;
Node *CurrentNode = head->next,
*PrevCurrentNode = head;
//duyệt danh sách, tìm CurrentNode không đúng vị trí
while (CurrentNode != NULL)
{
if (CurrentNode->info < PrevCurrentNode->info) // nếu Node sau nhỏ hơn Node trước
{
// duyệt tìm vị trí để chèn
Node *SecondNode = head,
*PrevSecondNode = NULL;
while (SecondNode->info < CurrentNode->info)
{
PrevSecondNode = SecondNode;
SecondNode = SecondNode->next;
};
//chèn CurrentNode vào vị trí thích hợp
if (PrevSecondNode == NULL)
head = CurrentNode;
else
PrevSecondNode->next = CurrentNode;
PrevCurrentNode->next = CurrentNode->next;
CurrentNode->next = SecondNode;
if (tail == CurrentNode)
tail = PrevCurrentNode;
CurrentNode = PrevCurrentNode;
};
PrevCurrentNode = CurrentNode;
CurrentNode = CurrentNode->next;
};
};
int main()
{
SinglyLinkedList List1;
int n;
cin >> n;
while (n != 0)
{
List1.Append(n);
cin >> n;
};
List1.InsertionSort();
};
|
49de460e2751aea2006e74982f95256080024b31
|
3448a43cf0635866b25e5d513dd60fb003f47e29
|
/src/xrGame/Script_SchemeXRHit.cpp
|
60f42fe7405ea2143b6bac06c563748847eda383
|
[
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause"
] |
permissive
|
xrLil-Batya/cordisproject
|
49632acc5e68bea9847d001d82fb049703d223c2
|
24275a382fec62a4e58d11579bf497b894f220ba
|
refs/heads/master
| 2023-03-19T01:17:25.170059
| 2020-11-17T14:22:06
| 2020-11-17T14:22:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,700
|
cpp
|
Script_SchemeXRHit.cpp
|
#include "stdafx.h"
#include "Script_SchemeXRHit.h"
namespace Cordis
{
namespace Scripts
{
Script_SchemeXRHit::Script_SchemeXRHit(CScriptGameObject* const p_client_object, DataBase::Script_ComponentScheme_XRHit* storage)
: inherited_scheme(p_client_object, storage)
{
this->m_scheme_name = "hit";
}
Script_SchemeXRHit::~Script_SchemeXRHit(void) {}
void Script_SchemeXRHit::hit_callback(CScriptGameObject* const p_client_object, const float amount,
const Fvector& local_direction, CScriptGameObject* const p_client_who, const std::int16_t bone_index)
{
DataBase::Storage::getInstance().setStorageHitBoneIndex(this->m_id, bone_index);
if (fis_zero(amount) && !(p_client_object->invulnerable()))
{
return;
}
if (p_client_who)
{
MESSAGE("%s hit by %s",
p_client_object->Name(), p_client_who->Name());
DataBase::Storage::getInstance().setStorageHitWhoID(p_client_object->ID(), p_client_who->ID());
}
else
{
MESSAGE("%s hit by Unknown",
p_client_object->Name());
DataBase::Storage::getInstance().setStorageHitWhoID(p_client_object->ID(), Globals::kUnsignedInt16Undefined);
}
if (!DataBase::Storage::getInstance().getStorage().at(this->m_id).getActiveSchemeName().empty())
{
DataBase::Storage::getInstance().setStorageHitDeadlyHit(
this->m_id, (amount >= this->m_npc->GetHealth() * 100.0f));
if (XR_LOGIC::try_switch_to_another_section(
p_client_object, this->m_p_storage, DataBase::Storage::getInstance().getActor()))
{
DataBase::Storage::getInstance().setStorageHitDeadlyHit(this->m_id, false);
return;
}
DataBase::Storage::getInstance().setStorageHitDeadlyHit(this->m_id, false);
}
}
void Script_SchemeXRHit::set_hit_checker(CScriptGameObject* const p_client_object, CScriptIniFile* const p_ini,
const xr_string& scheme_name, const xr_string& section_name, const xr_string& gulag_name)
{
if (!p_client_object)
{
R_ASSERT2(false, "object is null!");
return;
}
DataBase::Script_ComponentScheme_XRHit* p_storage =
XR_LOGIC::assign_storage_and_bind<DataBase::Script_ComponentScheme_XRHit>(p_client_object, p_ini, scheme_name, section_name, gulag_name);
if (!p_storage)
{
R_ASSERT2(false, "object is null!");
return;
}
if (!p_ini->section_exist(section_name.c_str()))
{
R_ASSERT2(false, "There is no section for npc");
return;
}
p_storage->setLogic(XR_LOGIC::cfg_get_switch_conditions(p_ini, section_name, p_client_object));
}
} // namespace Scripts
} // namespace Cordis
|
a635c761b96501a1c62f20668ee43424c0611a34
|
eb6cb73d84ac40746053ea6822a776f7ef0d04cf
|
/minerva/minerva/classifiers/interface/LearnerEngine.h
|
a838064be682cf75d167905c35e4e27517d9d517
|
[] |
no_license
|
lukeandshuo/video-classifier
|
d60c0062d558208a790f28127de6f77b65dca763
|
8ae279b82231612193ee1794191181bfda4b5fab
|
refs/heads/master
| 2021-01-23T22:05:06.022764
| 2014-11-10T02:41:04
| 2014-11-10T02:41:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 769
|
h
|
LearnerEngine.h
|
/* \file LearnerEngine.h
\date Sunday August 11, 2013
\author Gregory Diamos <solusstultus@gmail.com>
\brief The header file for the LearnerEngine class.
*/
#pragma once
// Minerva Includes
#include <minerva/classifiers/interface/Engine.h>
// Forward Declarations
namespace minerva { namespace classifiers { class Learner; } }
namespace minerva
{
namespace classifiers
{
class LearnerEngine : public Engine
{
public:
LearnerEngine();
virtual ~LearnerEngine();
public:
LearnerEngine(const LearnerEngine&) = delete;
LearnerEngine& operator=(const LearnerEngine&) = delete;
private:
virtual void closeModel();
private:
virtual ResultVector runOnBatch(Matrix&& input, Matrix&& reference);
virtual bool requiresLabeledData() const;
};
}
}
|
9fd18d12c84b9d5d302dee8cb1b1ac13cb9c12dd
|
79e13c2a952ba68b7fcee5ef5b34d9a8c41030f1
|
/Uva-OJ/Perfection.cpp
|
89da6d69831964768d3ef1cf4efddf0d460f1ece
|
[] |
no_license
|
Shahin15-1573/mycode-arena
|
924a571a58eba07bc6455e9aeb02f7186e5b527d
|
05b615b80e90d76d05e761f6517ce3053458a44c
|
refs/heads/master
| 2020-02-26T13:18:13.304157
| 2015-11-27T20:08:19
| 2015-11-27T20:08:19
| 47,061,299
| 1
| 0
| null | 2015-11-29T11:43:12
| 2015-11-29T11:43:12
| null |
UTF-8
|
C++
| false
| false
| 1,554
|
cpp
|
Perfection.cpp
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <iostream>
#include <algorithm>
using namespace std;
#define l long int
#define ll long long int
#define MAX 60000 + 10
int main(){
ll i, j, n, cs=1, sum, tmp, cnt, arr[MAX];
printf ("PERFECTION OUTPUT\n");
while (scanf ("%lld", &n) == 1){
sum = cnt = 0;
memset (arr, 0, sizeof (arr));
if (n == 0) printf ("END OF OUTPUT\n");
else{
//sum = cnt = 0;
//memset (arr, 0, sizeof (arr));
for (i = 1; i < n; i++){
if (n % i == 0){
arr[cnt] = i;
cnt++;
}
}
for (j = 0; j < cnt; j++) sum += arr[j];
if (sum == n) printf ("%5d PERFECT\n", n);
else if (sum < n) printf ("%5d DEFICIENT\n", n);
else printf ("%5d ABUNDANT\n", n);
}
}
//printf ("END OF OUTPUT\n");
return 0;
}
/*int main(){
ll i, j, n, cs=1, sum, tmp, cnt, arr[MAX];
printf ("PERFECTION OUTPUT\n");
while (scanf ("%lld", &n) == 1 && n){
sum = cnt = 0;
//memset (arr, 0, sizeof (arr));
for (i = 1; i <= n/2; i++){
if (n % i == 0){
sum += i;
printf ("%d", sum);
}
}
if (sum == n) printf ("%5d PERFECT\n", n);
else if (sum < n) printf ("%5d DEFICIENT\n", n);
else printf ("%5d ABUNDANT\n", n);
}
printf ("END OF OUTPUT\n");
return 0;
}*/
|
4e98715ff47df2f3d0b053cee2e52177e56c6ec4
|
c09ffb7701d38365123beea17150a056d7e6090c
|
/UVA/UVA11613 Acme Corporation.cpp
|
913db1f45eebcd055865807830b7219324f55927
|
[] |
no_license
|
Reno-Jarrison/Code-Repository-for-Problem-Solving
|
f100aa1190c3a7d23955d4756a9afa8353c8edbe
|
b2715b696cdb4b0416e334a5bd231beea66cfca0
|
refs/heads/main
| 2023-04-12T08:08:16.151731
| 2021-05-11T01:29:07
| 2021-05-11T01:29:07
| 315,653,788
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,570
|
cpp
|
UVA11613 Acme Corporation.cpp
|
#include<cstdio>
#include<cstring>
#include<vector>
#include<queue>
#define ll long long
using namespace std;
const int maxn=205,inf=0x3f3f3f3f;
struct edge
{
int u,v,w,c;
edge(int u,int v,int w,int c):
u(u),v(v),w(w),c(c){}
};
vector<edge>e;
vector<int>g[maxn];
int ecnt,dis[maxn],pre[maxn],mnf[maxn];
bool inq[maxn];
void link(int u,int v,int w,int c)
{
e.push_back(edge(u,v,w,c));
e.push_back(edge(v,u,0,-c));
g[u].push_back(ecnt++);
g[v].push_back(ecnt++);
}
void init(int n)
{
ecnt=0,e.clear();
for(int i=0;i<=2*n+1;i++) g[i].clear();
}
bool spfa(int s,int t)
{
memset(dis,inf,sizeof(dis));
memset(mnf,inf,sizeof(mnf));
memset(inq,0,sizeof(inq));
queue<int>q;
q.push(s),inq[s]=true,dis[s]=0;
while(!q.empty())
{
int u=q.front();
q.pop(),inq[u]=false;
for(int i=0;i<(int)g[u].size();i++)
{
int id=g[u][i],v=e[id].v;
if(e[id].w&&dis[v]>dis[u]+e[id].c)
{
dis[v]=dis[u]+e[id].c;
pre[v]=id,mnf[v]=min(mnf[u],e[id].w);
!inq[v]?q.push(v),inq[v]=true:false;
}
}
}
return dis[t]<=0;
}
ll mcmf(int s,int t)
{
ll flow=0,cost=0;
while(spfa(s,t))
{
flow+=mnf[t],cost+=1LL*mnf[t]*dis[t];
for(int i=t;i!=s;i=e[pre[i]].u)
e[pre[i]].w-=mnf[t],e[pre[i]^1].w+=mnf[t];
}
return cost;
}
int main()
{
int T,k,c,m,n,p,s,r,ks=0;
scanf("%d",&T);
while(T--)
{
scanf("%d%d",&k,&c);
init(k);
for(int i=1;i<=k;i++)
{
scanf("%d%d%d%d%d",&m,&n,&p,&s,&r);
link(0,i,n,m);
link(k+i,2*k+1,s,-p);
for(int j=0;j<=min(r,k-i);j++)
link(i,k+i+j,inf,c*j);
}
printf("Case %d: %lld\n",++ks,-mcmf(0,2*k+1));
}
}
|
0113624e81839e1c61c61ec15a63131623c2bc0f
|
6b40e9dccf2edc767c44df3acd9b626fcd586b4d
|
/NT/multimedia/directx/dxvb/dx7vb/dxglob7obj.cpp
|
d30cec0c77385684b70b78684bcb804a84ca8a7d
|
[] |
no_license
|
jjzhang166/WinNT5_src_20201004
|
712894fcf94fb82c49e5cd09d719da00740e0436
|
b2db264153b80fbb91ef5fc9f57b387e223dbfc2
|
refs/heads/Win2K3
| 2023-08-12T01:31:59.670176
| 2021-10-14T15:14:37
| 2021-10-14T15:14:37
| 586,134,273
| 1
| 0
| null | 2023-01-07T03:47:45
| 2023-01-07T03:47:44
| null |
UTF-8
|
C++
| false
| false
| 37,075
|
cpp
|
dxglob7obj.cpp
|
//+-------------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1998 - 1999
//
// File: dxglob7obj.cpp
//
//--------------------------------------------------------------------------
#define DIRECTINPUT_VERSION 0x0500
#define DIRECTSOUND_VERSION 0x600
// dSoundResourceObj.cpp : Implementation of CDirectApp and DLL registration.
// DHF_DS entire file
#include "windows.h"
#include "mmsystem.h"
#include "stdafx.h"
#include "Direct.h"
#include "dms.h"
#include "math.h"
#include "dxGlob7Obj.h"
#include "d3drm.h"
#include "ddraw.h"
#include "dmusici.h"
#include "dmusicf.h"
#include "ddraw4Obj.h"
#include "ddraw7Obj.h"
#include "DDEnumObj.h"
#include "d3drm3Obj.h"
#include "dsoundObj.h"
#include "dsoundCaptureObj.h"
#include "DSEnumObj.h"
#include "dplay4obj.h"
#include "dplaylobby3obj.h"
#include "DPEnumObj.h"
#include "dinput1Obj.h"
#include "dmSegmentObj.h"
#include "dmSegmentStateObj.h"
#include "dmChordMapObj.h"
#include "dmBandObj.h"
#include "dmCollectionObj.h"
#include "dmStyleObj.h"
#include "dmPerformanceObj.h"
#include "dmLoaderObj.h"
#include "dmComposerObj.h"
//#include "webObj.h"
extern HINSTANCE g_hInstD3DRMDLL;
extern HINSTANCE g_hDSoundHandle;
extern HINSTANCE g_hDPlay;
extern HINSTANCE g_hDDrawHandle;
extern HINSTANCE g_hInstDINPUTDLL;
extern HINSTANCE g_hInst;
extern HRESULT BSTRtoPPGUID(LPGUID*,BSTR);
extern HRESULT BSTRtoGUID(LPGUID,BSTR);
extern void *g_dxj_DirectMusicLoader;
extern void *g_dxj_DirectMusicComposer;
extern void *g_dxj_DirectMusicPerformance;
extern BSTR GUIDtoBSTR(LPGUID);
extern HRESULT DPLBSTRtoGUID(LPGUID pGuid,BSTR str);
extern HINSTANCE LoadDDrawDLL();
extern HINSTANCE LoadD3DXOFDLL();
extern HINSTANCE LoadDPlayDLL();
extern HINSTANCE LoadDSoundDLL();
extern HINSTANCE LoadD3DRMDLL();
extern HINSTANCE LoadDINPUTDLL();
DWORD WINAPI ThreadFunc(LPVOID param);
C_dxj_DirectX7Object::C_dxj_DirectX7Object(){
m_pDirectDrawCreate=NULL;
m_pDirectDrawCreateEx=NULL;
m_pDirectDrawCreateClipper=NULL;
m_pDirectSoundCreate=NULL;
m_pDirectSoundEnumerate=NULL;
m_pDirectSoundCaptureEnumerate=NULL;
m_pDirectSoundCaptureCreate=NULL;
m_pDirectPlayCreate=NULL;
m_pDirectPlayEnumerate=NULL;
m_pDirectPlayLobbyCreate=NULL;
m_pDirect3DRMCreate=NULL;
m_pDirectDrawEnumerate=NULL;
m_pDirectDrawEnumerateEx=NULL;
m_pEventList=NULL;
}
void C_dxj_DirectX7Object::LoadDSOUND()
{
if (!g_hDSoundHandle ) LoadDSoundDLL();
if (!m_pDirectSoundCreate) m_pDirectSoundCreate = (DSOUNDCREATE)GetProcAddress( g_hDSoundHandle, "DirectSoundCreate" );
if (!m_pDirectSoundCaptureCreate) m_pDirectSoundCaptureCreate = (DSOUNDCAPTURECREATE)GetProcAddress( g_hDSoundHandle, "DirectSoundCaptureCreate" );
if (!m_pDirectSoundEnumerate) m_pDirectSoundEnumerate = (DSOUNDENUMERATE)GetProcAddress( g_hDSoundHandle, "DirectSoundEnumerateA" );
if (!m_pDirectSoundCaptureEnumerate) m_pDirectSoundCaptureEnumerate = (DSOUNDCAPTUREENUMERATE)GetProcAddress( g_hDSoundHandle, "DirectSoundCaptureEnumerateA" );
}
void C_dxj_DirectX7Object::LoadDDRAW()
{
if (!g_hDDrawHandle ) LoadDDrawDLL();
if (!m_pDirectDrawCreate) m_pDirectDrawCreate = (DDRAWCREATE)GetProcAddress( g_hDDrawHandle, "DirectDrawCreate" );
if (!m_pDirectDrawCreateEx) m_pDirectDrawCreateEx = (DDRAWCREATEEX)GetProcAddress( g_hDDrawHandle, "DirectDrawCreateEx" );
if (!m_pDirectDrawCreateClipper) m_pDirectDrawCreateClipper = (DDCREATECLIPPER)GetProcAddress( g_hDDrawHandle, "DirectDrawCreateClipper" );
if (!m_pDirectDrawEnumerate) m_pDirectDrawEnumerate = (DDENUMERATE)GetProcAddress( g_hDDrawHandle, "DirectDrawEnumerateA" );
if (!m_pDirectDrawEnumerateEx) m_pDirectDrawEnumerateEx = (DDENUMERATEEX)GetProcAddress( g_hDDrawHandle, "DirectDrawEnumerateExA" );
}
void C_dxj_DirectX7Object::LoadDPLAY()
{
if (!g_hDPlay ) LoadDPlayDLL();
//Note use of Wide char for DirectPlayLobby Create and
//Ansi for DirectPlay
if (!m_pDirectPlayCreate) m_pDirectPlayCreate = (DIRECTPLAYCREATE)GetProcAddress( g_hDPlay, "DirectPlayCreate" );
if (!m_pDirectPlayEnumerate) m_pDirectPlayEnumerate = (DIRECTPLAYENUMERATE)GetProcAddress( g_hDPlay, "DirectPlayEnumerateW" );
if (!m_pDirectPlayLobbyCreate) m_pDirectPlayLobbyCreate = (DIRECTPLAYLOBBYCREATE)GetProcAddress( g_hDPlay, "DirectPlayLobbyCreateW" );
}
void C_dxj_DirectX7Object::LoadD3DRM()
{
if (!g_hInstD3DRMDLL) {
LoadD3DXOFDLL();
LoadD3DRMDLL();
}
//Note: always ansi no unicode version
if (!m_pDirect3DRMCreate) m_pDirect3DRMCreate =(DIRECT3DRMCREATE)GetProcAddress( g_hInstD3DRMDLL, "Direct3DRMCreate" );
}
C_dxj_DirectX7Object::~C_dxj_DirectX7Object()
{
DWORD i=1;
while (m_pEventList) {
//bugbug SUNDOWN gotcha
//vb does not have 64 bit values
//and we use the same api to release the event
//but handles are 64 bit
//note handles never get near 32 bits in win32
//but whose knows on win64
destroyEvent((long)PtrToLong(m_pEventList->hEvent));
//m_pEventList=m_pEventList->pNext; done by destroyEvent
}
}
STDMETHODIMP C_dxj_DirectX7Object::direct3dRMCreate( I_dxj_Direct3dRM3 **ret){
HRESULT hr;
LPDIRECT3DRM realrm1=NULL;
LPDIRECT3DRM3 realrm3=NULL;
LoadD3DRM();
if (!m_pDirect3DRMCreate) return E_FAIL;
hr=(m_pDirect3DRMCreate)(&realrm1);
if FAILED(hr) return hr;
hr=realrm1->QueryInterface(IID_IDirect3DRM3,(void**) &realrm3);
if FAILED(hr){
realrm1->Release();
return hr;
}
INTERNAL_CREATE(_dxj_Direct3dRM3,realrm3,ret);
realrm1->Release();
if (*ret==NULL) {
realrm3->Release();
return E_FAIL;
}
return hr;
}
STDMETHODIMP C_dxj_DirectX7Object::directDraw4Create(BSTR strGuid, I_dxj_DirectDraw4 **ret){
HRESULT hr;
LPDIRECTDRAW realdraw1=NULL;
LPDIRECTDRAW4 realdraw4=NULL;
GUID guid;
LPGUID pguid=&guid;
DWORD i=0;
LoadDDRAW();
hr=BSTRtoPPGUID(&pguid,strGuid);
if FAILED(hr) return E_FAIL;
if (!m_pDirectDrawCreate) return E_FAIL;
hr=(m_pDirectDrawCreate)((GUID*)pguid,&realdraw1,NULL);
if FAILED(hr) return hr;
hr=realdraw1->QueryInterface(IID_IDirectDraw4,(void**) &realdraw4);
if FAILED(hr){
i=realdraw1->Release();
return hr;
}
i=realdraw1->Release();
INTERNAL_CREATE(_dxj_DirectDraw4,realdraw4,ret);
if (*ret==NULL) {
i=realdraw4->Release();
return E_FAIL;
}
return hr;
}
STDMETHODIMP C_dxj_DirectX7Object::directDrawCreate(BSTR strGuid, I_dxj_DirectDraw7 **ret){
HRESULT hr;
LPDIRECTDRAW7 realdraw7=NULL;
GUID guid;
LPGUID pguid=&guid;
DWORD i=0;
LoadDDRAW();
ZeroMemory(&guid,sizeof(GUID)); //andrewke bugfix post dx7
hr=BSTRtoPPGUID(&pguid,strGuid);
if FAILED(hr) return E_FAIL;
if (!m_pDirectDrawCreateEx) return E_FAIL;
hr=(m_pDirectDrawCreateEx)(pguid,(void**)&realdraw7,IID_IDirectDraw7,NULL);
if FAILED(hr) return hr;
INTERNAL_CREATE(_dxj_DirectDraw7,realdraw7,ret);
if (*ret==NULL) {
i=realdraw7->Release();
return E_FAIL;
}
return hr;
}
STDMETHODIMP C_dxj_DirectX7Object::directSoundCreate(BSTR strGuid, I_dxj_DirectSound **ret){
HRESULT hr;
LPDIRECTSOUND realsound1=NULL;
GUID guid;
LPGUID pguid=&guid;
LoadDSOUND();
hr=BSTRtoPPGUID(&pguid,strGuid);
if FAILED(hr) return hr;
if (!m_pDirectSoundCreate) return E_FAIL;
hr=(m_pDirectSoundCreate)((GUID*)pguid,&realsound1,NULL);
if FAILED(hr) return hr;
INTERNAL_CREATE(_dxj_DirectSound,realsound1,ret);
if (*ret==NULL) {
realsound1->Release();
return E_FAIL;
}
return hr;
}
STDMETHODIMP C_dxj_DirectX7Object::directSoundCaptureCreate(BSTR strGuid, I_dxj_DirectSoundCapture **ret){
HRESULT hr;
LPDIRECTSOUNDCAPTURE realsound1=NULL;
GUID guid;
LPGUID pguid=&guid;
hr=BSTRtoPPGUID(&pguid,strGuid);
if FAILED(hr) return hr;
LoadDSOUND();
if (!m_pDirectSoundCaptureCreate) return E_FAIL;
hr=(m_pDirectSoundCaptureCreate)(pguid,&realsound1,NULL);
if FAILED(hr) return hr;
INTERNAL_CREATE(_dxj_DirectSoundCapture,realsound1,ret);
if (*ret==NULL) {
realsound1->Release();
return E_FAIL;
}
return hr;
}
STDMETHODIMP C_dxj_DirectX7Object::getDSCaptureEnum( I_dxj_DSEnum **retVal)
{
HRESULT hr;
LoadDSOUND();
if (!m_pDirectSoundCaptureEnumerate) return E_FAIL;
hr=C_dxj_DSEnumObject::create(NULL,m_pDirectSoundCaptureEnumerate,retVal);
return hr;
}
STDMETHODIMP C_dxj_DirectX7Object::getDDEnum( I_dxj_DirectDrawEnum **retVal)
{
LoadDDRAW();
HRESULT hr;
if (!m_pDirectDrawEnumerateEx) return E_FAIL;
hr=C_dxj_DirectDrawEnumObject::create(m_pDirectDrawEnumerateEx,retVal);
return hr;
}
/////////////////////////////////////////////////////////////////////////////
STDMETHODIMP C_dxj_DirectX7Object::getDSEnum( I_dxj_DSEnum **retVal)
{
HRESULT hr;
LoadDSOUND();
if (!m_pDirectSoundEnumerate) return E_FAIL;
hr=C_dxj_DSEnumObject::create(m_pDirectSoundEnumerate,NULL,retVal);
return hr;
}
/////////////////////////////////////////////////////////////////////////////
STDMETHODIMP C_dxj_DirectX7Object::colorGetAlpha(long color, float *retval)
{
static float (WINAPI *ProcAdd)(long)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (float (WINAPI*)(long)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMColorGetAlpha");
if (ProcAdd==NULL) return E_FAIL;
}
*retval=(ProcAdd) ((D3DCOLOR) color);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::colorGetRed(long color, float *retval)
{
static float (WINAPI *ProcAdd)(long)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (float (WINAPI*)(long)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMColorGetRed");
if (ProcAdd==NULL) return E_FAIL;
}
*retval=(ProcAdd) ((D3DCOLOR) color);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::colorGetGreen(long color, float *retval)
{
static float (WINAPI *ProcAdd)(long)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (float (WINAPI*)(long)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMColorGetGreen");
if (ProcAdd==NULL) return E_FAIL;
}
*retval=(ProcAdd) ((D3DCOLOR) color);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::colorGetBlue(long color, float *retval)
{
static float (WINAPI *ProcAdd)(long)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (float (WINAPI*)(long)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMColorGetBlue");
if (ProcAdd==NULL) return E_FAIL;
}
*retval=(ProcAdd) ((D3DCOLOR) color);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::createColorRGB(float r, float g, float b, long *color)
{
static long (WINAPI *ProcAdd)(float,float,float)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (long (WINAPI*)(float,float,float)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMCreateColorRGB");
if (ProcAdd==NULL) return E_FAIL;
}
*color=(ProcAdd) (r,g,b);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::createColorRGBA(float r, float g, float b, float a, long *color)
{
static long (WINAPI *ProcAdd)(float,float,float,float)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (long (WINAPI*)(float,float,float,float)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMCreateColorRGBA");
if (ProcAdd==NULL) return E_FAIL;
}
*color=(ProcAdd) (r,g,b,a);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::matrixFromQuaternion(D3dMatrix *matrix, D3dRMQuaternion *quat)
{
if ((!matrix) || (!quat)) return E_INVALIDARG;
D3DMATRIX *mat=(D3DMATRIX*)matrix;
FLOAT w=quat->s;
FLOAT x=quat->v.x;
FLOAT y=quat->v.y;
FLOAT z=quat->v.z;
FLOAT xx = x*x, xy = x*y, xz = x*z, xw = x*w;
FLOAT yy = y*y, yz = y*z, yw = y*w;
FLOAT zz = z*z, zw = z*w;
FLOAT ww = w*w;
mat->_11 = xx-yy-zz+ww;
mat->_12 = 2.0f*(xy-zw);
mat->_13 = 2.0f*(xz+yw);
mat->_21 = 2.0f*(xy+zw);
mat->_22 = -xx+yy-zz+ww;
mat->_23 = 2.0f*(yz-xw);
mat->_31 = 2.0f*(xz-yw);
mat->_32 = 2.0f*(yz+xw);
mat->_33 = -xx-yy+zz+ww;
mat->_14 = mat->_41 = 0.0f;
mat->_24 = mat->_42 = 0.0f;
mat->_34 = mat->_43 = 0.0f;
mat->_44 = xx+yy+zz+ww;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::quaternionRotation(D3dRMQuaternion *quat, D3dVector *axis, float theta)
{
static D3dRMQuaternion* (WINAPI *ProcAdd)(D3dRMQuaternion*,D3dVector*,float)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (D3dRMQuaternion* (WINAPI*)(D3dRMQuaternion*,D3dVector*,float)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMQuaternionRotation");
if (ProcAdd==NULL) return E_FAIL;
}
if (NULL== (ProcAdd) (quat,axis,theta)) return E_FAIL;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::quaternionMultiply(D3dRMQuaternion *quatr, D3dRMQuaternion *quat1, D3dRMQuaternion *quat2)
{
static D3dRMQuaternion* (WINAPI *ProcAdd)(D3dRMQuaternion*,D3dRMQuaternion*,D3dRMQuaternion*)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (D3dRMQuaternion* (WINAPI*)(D3dRMQuaternion*,D3dRMQuaternion*,D3dRMQuaternion*)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMQuaternionMultiply");
if (ProcAdd==NULL) return E_FAIL;
}
if (NULL== (ProcAdd) (quatr,quat1,quat2)) return E_FAIL;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::quaternionSlerp(D3dRMQuaternion *quatr, D3dRMQuaternion *quat1, D3dRMQuaternion *quat2, float t)
{
static D3dRMQuaternion* (WINAPI *ProcAdd)(D3dRMQuaternion*,D3dRMQuaternion*,D3dRMQuaternion*,float)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (D3dRMQuaternion* (WINAPI*)(D3dRMQuaternion*,D3dRMQuaternion*,D3dRMQuaternion*,float)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMQuaternionSlerp");
if (ProcAdd==NULL) return E_FAIL;
}
if (NULL== (ProcAdd) (quatr,quat1,quat2,t)) return E_FAIL;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorAdd(D3dVector *v, D3dVector *a, D3dVector *b)
{
v->x = a->x + b->x;
v->y = a->y + b->y;
v->z = a->z + b->z;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorCopy(D3dVector *dest, D3dVector *src)
{
memcpy(dest,src,sizeof(D3DVECTOR));
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorCrossProduct(D3dVector *v, D3dVector *a, D3dVector *b)
{
v->x = ((a->y) * (b->z)) - ((a->z) * (b->y));
v->y = ((a->z) * (b->x)) - ((a->x) * (b->z));
v->z = ((a->x) * (b->y)) - ((a->y) * (b->x));
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorDotProduct(D3dVector *a, D3dVector *b, float *ret)
{
//TODO consider overflow?
*ret = (a->x * b->x) + (a->y *b->y) + (a->z * b->z);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorModulus(D3dVector *a, float *ret)
{
//NOTE: would do it myself but dont want to link in c runtime for Sqrt
static float (WINAPI *ProcAdd)(D3dVector*)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (float (WINAPI*)(D3dVector*)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMVectorModulus");
if (ProcAdd==NULL) return E_FAIL;
}
*ret=(ProcAdd) (a);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorNormalize(D3dVector *dest)
{
double l;
l = dest->x * dest->x + dest->y * dest->y + dest->z * dest->z;
l = sqrt(l);
dest->x = dest->x / (float)l;
dest->y = dest->y / (float)l;
dest->z = dest->z / (float)l;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorRandom(D3dVector *a)
{
static D3dVector* (WINAPI *ProcAdd)(D3dVector*)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (D3dVector* (WINAPI*)(D3dVector*)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMVectorRandom");
if (ProcAdd==NULL) return E_FAIL;
}
if ((ProcAdd)(a)==NULL) return E_FAIL;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorReflect(D3dVector *dest,D3dVector *ray,D3dVector *norm)
{
static D3dVector* (WINAPI *ProcAdd)(D3dVector*,D3dVector*,D3dVector*)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (D3dVector* (WINAPI*)(D3dVector*,D3dVector*,D3dVector*)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMVectorReflect");
if (ProcAdd==NULL) return E_FAIL;
}
if ((ProcAdd)(dest,ray,norm)==NULL) return E_FAIL;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorRotate(D3dVector *dest,D3dVector *vA,D3dVector *vAxis, float theta)
{
static D3dVector* (WINAPI *ProcAdd)(D3dVector*,D3dVector*,D3dVector*,float)=NULL;
LoadD3DRMDLL();
if (ProcAdd==NULL){
if (g_hInstD3DRMDLL==NULL) return E_NOINTERFACE;
ProcAdd = (D3dVector* (WINAPI*)(D3dVector*,D3dVector*,D3dVector*,float)) GetProcAddress(g_hInstD3DRMDLL, "D3DRMVectorRotate");
if (ProcAdd==NULL) return E_FAIL;
}
if ((ProcAdd)(dest,vA,vAxis,theta)==NULL) return E_FAIL;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorScale(D3dVector *v, D3dVector *a, float factor)
{
v->x=a->x *factor;
v->y=a->y *factor;
v->z=a->z *factor;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::vectorSubtract(D3dVector *v, D3dVector *a, D3dVector *b)
{
v->x = a->x - b->x;
v->y = a->y - b->y;
v->z = a->z - b->z;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::directPlayCreate(BSTR strGuid, I_dxj_DirectPlay4 **directPlay)
{
LPDIRECTPLAY4 dp;
HRESULT hr=E_FAIL;
LPDIRECTPLAY lpDP=NULL;
GUID guid;
LoadDPLAY();
ZeroMemory(&guid,sizeof(GUID));
hr=DPLBSTRtoGUID(&guid,strGuid);
if FAILED(hr) return E_INVALIDARG;
if (m_pDirectPlayCreate == NULL ) return E_FAIL;
// create a DirectPlay1 interface
hr = (m_pDirectPlayCreate)(&guid, &lpDP, NULL);
if FAILED(hr) return hr;
if (!lpDP) return E_FAIL;
// now get Dplay3 interface
hr = lpDP->QueryInterface(IID_IDirectPlay4,(LPVOID *)&dp);
lpDP->Release();
if FAILED(hr) return hr;
if (!dp) return E_FAIL;
*directPlay=NULL;
INTERNAL_CREATE(_dxj_DirectPlay4, dp, directPlay);
if (*directPlay==NULL) return E_FAIL;
return hr;
}
STDMETHODIMP C_dxj_DirectX7Object::directPlayLobbyCreate(I_dxj_DirectPlayLobby3 **ret)
{
LPDIRECTPLAYLOBBY3 dp=NULL;
HRESULT hr=E_FAIL;
LPDIRECTPLAYLOBBY lpDP=NULL;
LoadDPLAY();
if (m_pDirectPlayLobbyCreate == NULL ) return E_FAIL;
// create a DirectPlay1 interface
hr = m_pDirectPlayLobbyCreate(NULL, &lpDP, NULL,NULL,0);
if FAILED(hr) return hr;
if (!lpDP) return E_FAIL;
// no get Dplay3 interface
hr = lpDP->QueryInterface(IID_IDirectPlayLobby3,(LPVOID *)&dp);
lpDP->Release();
if FAILED(hr) return hr;
*ret=NULL;
if (!dp) return E_FAIL;
INTERNAL_CREATE(_dxj_DirectPlayLobby3, dp, ret);
if (*ret==NULL) return E_FAIL;
return hr;
}
/////////////////////////////////////////////////////////////////////////////
STDMETHODIMP C_dxj_DirectX7Object::getDPEnum( I_dxj_DPEnumServiceProviders **retVal)
{
HRESULT hr;
LoadDPLAY();
if (!m_pDirectPlayEnumerate) return E_FAIL;
hr=C_dxj_DPEnumObject::create(m_pDirectPlayEnumerate,retVal);
return hr;
}
////////////////////////////////////////////////////////////////
STDMETHODIMP C_dxj_DirectX7Object::directInputCreate(I_dxj_DirectInput **ret){
LoadDINPUTDLL();
HRESULT hr;
static HRESULT (WINAPI *ProcAdd)(HINSTANCE,DWORD,LPDIRECTINPUT*,LPUNKNOWN)=NULL;
if (ProcAdd==NULL){
if (g_hInstDINPUTDLL==NULL) return E_NOINTERFACE;
ProcAdd = (HRESULT (WINAPI*)(HINSTANCE,DWORD,LPDIRECTINPUT*,LPUNKNOWN)) GetProcAddress(g_hInstDINPUTDLL, "DirectInputCreateA");
if (ProcAdd==NULL) return E_FAIL;
}
LPDIRECTINPUT lpInput=NULL;
hr= (ProcAdd)(g_hInst,(DWORD)DIRECTINPUT_VERSION,&lpInput,NULL);
if FAILED(hr) return hr;
INTERNAL_CREATE(_dxj_DirectInput,lpInput,ret);
return hr;
}
/////////////////////////////////////////////////////////////////////////////
//
STDMETHODIMP C_dxj_DirectX7Object::tickCount( long *retval)
{
*retval = GetTickCount();
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::systemBpp(long *retval)
{
HDC hdc;
hdc = ::GetDC(NULL);
if (!hdc) return E_OUTOFMEMORY;
*retval = GetDeviceCaps(hdc, BITSPIXEL);
::ReleaseDC(NULL, hdc);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::rotateXMatrix(
/* [out][in] */ D3dMatrix __RPC_FAR *mDest,
/* [in] */ float radians){
//id matrix
float fcos;
float fsin;
ZeroMemory(mDest,sizeof(D3dMatrix));
mDest->rc11 = 1;
mDest->rc44 = 1;
fsin=(float)sin(radians);
fcos=(float)cos(radians);
mDest->rc22 = fcos;
mDest->rc33 = fcos;
mDest->rc23 = -fsin;
mDest->rc32 = fsin;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::rotateYMatrix(
/* [out][in] */ D3dMatrix __RPC_FAR *mDest,
/* [in] */ float radians){
//id matrix
float fcos;
float fsin;
ZeroMemory(mDest,sizeof(D3dMatrix));
mDest->rc22 = 1;
mDest->rc44 = 1;
fsin=(float)sin(radians);
fcos=(float)cos(radians);
mDest->rc11 = fcos;
mDest->rc33 = fcos;
mDest->rc13 = fsin;
mDest->rc31 = -fsin;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::rotateZMatrix(
/* [out][in] */ D3dMatrix __RPC_FAR *mDest,
/* [in] */ float radians){
//id matrix
float fcos;
float fsin;
ZeroMemory(mDest,sizeof(D3dMatrix));
mDest->rc33 = 1;
mDest->rc44 = 1;
fsin=(float)sin(radians);
fcos=(float)cos(radians);
mDest->rc11 = fcos;
mDest->rc22 = fcos;
mDest->rc12 = -fsin;
mDest->rc21 = fsin;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::viewMatrix(
/* [out][in] */ D3dMatrix __RPC_FAR *view,
/* [in] */ D3dVector __RPC_FAR *from,
/* [in] */ D3dVector __RPC_FAR *at,
/* [in] */ D3dVector __RPC_FAR *world_up,
/* [in] */ float roll)
{
D3dVector up;
D3dVector right;
D3dVector view_Dir;
ZeroMemory(view,sizeof(D3dMatrix));
view->rc11 = 1;
view->rc22 = 1;
view->rc33 = 1;
view->rc44 = 1;
view_Dir.x=at->x-from->x;
view_Dir.y=at->y-from->y;
view_Dir.z=at->z-from->z;
vectorNormalize(&view_Dir);
//think lefthanded coords
vectorCrossProduct(&right, world_up, &view_Dir);
vectorCrossProduct(&up, &view_Dir, &right);
vectorNormalize(&right);
vectorNormalize(&up);
view->rc11 = right.x;
view->rc21 = right.y;
view->rc31 = right.z;
view->rc12 = up.x ; //AK? should this be negative?
view->rc22 = up.y;
view->rc32 = up.z;
view->rc13 = view_Dir.x;
view->rc23 = view_Dir.y;
view->rc33 = view_Dir.z;
view->rc41 = -((right.x * from->x) + (right.y * from->y) + (right.z * from->z));
view->rc42 = -((up.x * from->x) + (up.y * from->y) + (up.z * from->z));
view->rc43 = -((view_Dir.x * from->x) + (view_Dir.y * from->y) + (view_Dir.z * from->z));
if (roll!=0){
D3dMatrix rotZMat;
rotateZMatrix(&rotZMat,-roll);
matrixMultiply(view,&rotZMat,view);
}
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::matrixMultiply(
/* [out][in] */ D3dMatrix __RPC_FAR *result,
/* [in] */ D3dMatrix __RPC_FAR *a,
/* [in] */ D3dMatrix __RPC_FAR *b)
{
D3dMatrix ret;
ZeroMemory(&ret,sizeof(D3dMatrix));
ret.rc11 = b->rc11 * a->rc11 + b->rc21 * a->rc12 + b->rc31 * a->rc13 + b->rc41 * a->rc14;
ret.rc12 = b->rc12 * a->rc11 + b->rc22 * a->rc12 + b->rc32 * a->rc13 + b->rc42 * a->rc14;
ret.rc13 = b->rc13 * a->rc11 + b->rc23 * a->rc12 + b->rc33 * a->rc13 + b->rc43 * a->rc14;
ret.rc14 = b->rc14 * a->rc11 + b->rc24 * a->rc12 + b->rc34 * a->rc13 + b->rc44 * a->rc14;
ret.rc21 = b->rc11 * a->rc21 + b->rc21 * a->rc22 + b->rc31 * a->rc23 + b->rc41 * a->rc24;
ret.rc22 = b->rc12 * a->rc21 + b->rc22 * a->rc22 + b->rc32 * a->rc23 + b->rc42 * a->rc24;
ret.rc23 = b->rc13 * a->rc21 + b->rc23 * a->rc22 + b->rc33 * a->rc23 + b->rc43 * a->rc24;
ret.rc24 = b->rc14 * a->rc21 + b->rc24 * a->rc22 + b->rc34 * a->rc23 + b->rc44 * a->rc24;
ret.rc31 = b->rc11 * a->rc31 + b->rc21 * a->rc32 + b->rc31 * a->rc33 + b->rc41 * a->rc34;
ret.rc32 = b->rc12 * a->rc31 + b->rc22 * a->rc32 + b->rc32 * a->rc33 + b->rc42 * a->rc34;
ret.rc33 = b->rc13 * a->rc31 + b->rc23 * a->rc32 + b->rc33 * a->rc33 + b->rc43 * a->rc34;
ret.rc34 = b->rc14 * a->rc31 + b->rc24 * a->rc32 + b->rc34 * a->rc33 + b->rc44 * a->rc34;
ret.rc41 = b->rc11 * a->rc41 + b->rc21 * a->rc42 + b->rc31 * a->rc43 + b->rc41 * a->rc44;
ret.rc42 = b->rc12 * a->rc41 + b->rc22 * a->rc42 + b->rc32 * a->rc43 + b->rc42 * a->rc44;
ret.rc43 = b->rc13 * a->rc41 + b->rc23 * a->rc42 + b->rc33 * a->rc43 + b->rc43 * a->rc44;
ret.rc44 = b->rc14 * a->rc41 + b->rc24 * a->rc42 + b->rc34 * a->rc43 + b->rc44 * a->rc44;
memcpy(result,&ret,sizeof(D3dMatrix));
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::projectionMatrix(
/* [out][in] */ D3dMatrix __RPC_FAR *mDest,
/* [in] */ float near_plane,
/* [in] */ float far_plane,
/* [in] */ float fov)
{
float c,s,Q;
c =(float) cos(fov * 0.5);
s = (float)sin(fov * 0.5);
if (far_plane==0) return E_INVALIDARG;
Q = s / (1 - near_plane / far_plane);
ZeroMemory(mDest,sizeof(D3dMatrix));
mDest->rc11 = c;
mDest->rc22 = c;
mDest->rc33 = Q;
mDest->rc43 = -Q * near_plane;
mDest->rc34 = s;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::copyMatrix(
/* [out][in] */ D3dMatrix __RPC_FAR *mDest,
/* [in] */ D3dMatrix __RPC_FAR *mSrc)
{
memcpy(mDest,mSrc,sizeof(D3dMatrix));
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::identityMatrix(
/* [out][in] */ D3dMatrix __RPC_FAR *mDest)
{
ZeroMemory (mDest,sizeof(D3dMatrix));
mDest->rc11=1;
mDest->rc22=1;
mDest->rc33=1;
mDest->rc44=1;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::zeroMatrix(
/* [out][in] */ D3dMatrix __RPC_FAR *mDest)
{
ZeroMemory (mDest,sizeof(D3dMatrix));
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::directMusicLoaderCreate (
/* [retval][out] */ I_dxj_DirectMusicLoader __RPC_FAR *__RPC_FAR *ret)
{
HRESULT hr;
IDirectMusicLoader *pLoader=NULL;
hr =CoCreateInstance(
CLSID_DirectMusicLoader,
NULL,
CLSCTX_INPROC,
IID_IDirectMusicLoader,
(void**)&pLoader);
if (FAILED(hr)) return E_NOINTERFACE;
if (!pLoader) return E_FAIL;
INTERNAL_CREATE_NOADDREF(_dxj_DirectMusicLoader,pLoader,ret);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::directMusicComposerCreate (
/* [retval][out] */ I_dxj_DirectMusicComposer __RPC_FAR *__RPC_FAR *ret)
{
IDirectMusicComposer *pComp=NULL;
if (FAILED(CoCreateInstance(
CLSID_DirectMusicComposer,
NULL,
CLSCTX_INPROC,
IID_IDirectMusicComposer,
(void**)&pComp ))) {
return E_NOINTERFACE;
}
if (!pComp) return E_FAIL;
INTERNAL_CREATE_NOADDREF(_dxj_DirectMusicComposer,pComp,ret);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::directMusicPerformanceCreate (
/* [retval][out] */ I_dxj_DirectMusicPerformance __RPC_FAR *__RPC_FAR *ret)
{
IDirectMusicPerformance *pPerf=NULL;
if (FAILED(CoCreateInstance(
CLSID_DirectMusicPerformance,
NULL,
CLSCTX_INPROC,
IID_IDirectMusicPerformance,
(void**)&pPerf ))) {
return E_NOINTERFACE;
}
if (!pPerf) return E_FAIL;
INTERNAL_CREATE_NOADDREF(_dxj_DirectMusicPerformance,pPerf,ret);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::getWindowRect(
/* [in] */ long hwnd,
/* [out][in] */ Rect __RPC_FAR *r)
{
BOOL b=GetWindowRect((HWND)hwnd,(LPRECT)r);
if (!b) return E_FAIL;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::createEvent(
/* [in] */ I_dxj_DirectXEvent __RPC_FAR *event,
/* [retval][out] */ long __RPC_FAR *h)
{
HRESULT hr;
LPSTREAM pStm=NULL;
IUnknown *pUnk=NULL;
HANDLE hEvent=NULL;
EVENTTHREADINFO *pNewEvent=NULL;
EVENTTHREADINFO *pTemp=NULL;
if (!event) return E_INVALIDARG;
if (!h) return E_INVALIDARG;
pNewEvent=(EVENTTHREADINFO*)malloc(sizeof(EVENTTHREADINFO));
if (!pNewEvent) return E_OUTOFMEMORY;
pNewEvent->pNext=NULL;
pNewEvent->fEnd=FALSE;
pNewEvent->pCallback=event;
pNewEvent->pStream=NULL;
pNewEvent->threadID=0;
event->AddRef();
pNewEvent->hEvent = CreateEvent(NULL,FALSE,FALSE,NULL);
if (!pNewEvent->hEvent){
free(pNewEvent);
event->Release();
return E_FAIL;
}
//pNewEvent->hEndEvent = CreateEvent(NULL,FALSE,FALSE,NULL);
hr=event->QueryInterface(IID_IUnknown,(void**)&pUnk);
if FAILED(hr) {
free(pNewEvent);
event->Release();
return E_FAIL;
}
hr=CoMarshalInterThreadInterfaceInStream(IID_IUnknown,pUnk,&pStm);
if (pUnk) pUnk->Release();
if FAILED(hr) {
free(pNewEvent);
event->Release();
return E_FAIL;
}
pNewEvent->pStream=pStm;
pNewEvent->hThread=CreateThread(NULL,0,ThreadFunc,(unsigned long*)pNewEvent,CREATE_SUSPENDED ,&pNewEvent->threadID);
if (!pNewEvent->threadID) {
CloseHandle(pNewEvent->hEvent);
free(pNewEvent);
event->Release();
return E_FAIL;
}
if (!m_pEventList){
m_pEventList=pNewEvent;
}
else{
pTemp=m_pEventList;
m_pEventList=pNewEvent;
pNewEvent->pNext=pTemp;
}
ResumeThread(pNewEvent->hThread);
*h=(long)PtrToLong(pNewEvent->hEvent); //bugbug SUNDOWN -
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::setEvent(
/* [in] */ long eventId)
{
SetEvent((HANDLE)eventId);
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::destroyEvent(
/* [in] */ long eventId)
{
//find the info on the stack
if (!m_pEventList) return E_INVALIDARG;
EVENTTHREADINFO *pTemp=NULL;
EVENTTHREADINFO *pLast=NULL;
//rely on lazy evaluation
for (pTemp=m_pEventList; ((pTemp)&&(pTemp->hEvent!=(HANDLE)eventId));pLast=pTemp,pTemp=pTemp->pNext);
if (!pTemp) return E_INVALIDARG;
//remove it from our Link List
if (!pLast) {
m_pEventList=pTemp->pNext;
}
else {
pLast->pNext=pTemp->pNext;
}
//indicate that we want to kill the thread
pTemp->fEnd=TRUE;
//Fire the event in case we are waiting
if (pTemp->hEvent) SetEvent(pTemp->hEvent);
//Wait for it to finish out
if (pTemp->hThread) WaitForSingleObject(pTemp->hThread,1000);
//wait for the end event to signal
//if (pTemp->hEndEvent) WaitForSingleObject(pTemp->hEndEvent,1000);
//desctroy the event
if (pTemp->hEvent) CloseHandle(pTemp->hEvent);
//if (pTemp->hEndEvent) CloseHandle (pTemp->hEndEvent);
if (pTemp->pCallback) pTemp->pCallback->Release();
//thread is gone..
//free the memory
free(pTemp);
return S_OK;
}
DWORD WINAPI ThreadFunc(LPVOID param){
HRESULT hr;
IUnknown *pUnk=NULL;
EVENTTHREADINFO *pCntrl=(EVENTTHREADINFO *)param;
I_dxj_DirectXEvent *pVBCallback=NULL;
OleInitialize(NULL);
LCID LOCAL_SYSTEM_DEFAULT=GetSystemDefaultLCID();
//note pstrm is released even on failure
hr=CoGetInterfaceAndReleaseStream(pCntrl->pStream,IID_IUnknown,(void**)&pUnk);
pCntrl->pCallback=NULL; //since released to 0
if FAILED(hr) return -1;
if (!pUnk) return -1;
hr=pUnk->QueryInterface(IID_I_dxj_DirectXEvent,(void**)&pVBCallback);
pUnk->Release();
if FAILED(hr) return -1;
while (pCntrl->fEnd==FALSE)
{
WaitForSingleObject(pCntrl->hEvent,INFINITE);
if ((pVBCallback )&&(pCntrl->fEnd==FALSE))
{
pVBCallback->AddRef();
pVBCallback->DXCallback((long)PtrToLong(pCntrl->hEvent)); //bugbug SUNDOWN
pVBCallback->Release();
}
}
if (pVBCallback) pVBCallback->Release();
OleUninitialize();
//we need to syncronize the ending of the thread..
//if (pCntrl->hEndEvent) SetEvent(pCntrl->hEndEvent);
return 0;
}
STDMETHODIMP C_dxj_DirectX7Object::createD3DVertex(float x, float y, float z, float nx, float ny, float nz, float tu, float tv, D3dVertex *v)
{
if (!v) return E_INVALIDARG;
((D3DVERTEX*)v)->x=x;
((D3DVERTEX*)v)->y=y;
((D3DVERTEX*)v)->z=z;
((D3DVERTEX*)v)->nx=nx;
((D3DVERTEX*)v)->ny=ny;
((D3DVERTEX*)v)->nz=nz;
((D3DVERTEX*)v)->tu=tu;
((D3DVERTEX*)v)->tv=tv;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::createD3DLVertex(float x, float y, float z, long color, long specular, float tu, float tv, D3dLVertex *v)
{
if (!v) return E_INVALIDARG;
((D3DLVERTEX*)v)->x=x;
((D3DLVERTEX*)v)->y=y;
((D3DLVERTEX*)v)->z=z;
((D3DLVERTEX*)v)->color=color;
((D3DLVERTEX*)v)->specular=specular;
((D3DLVERTEX*)v)->dwReserved=0;
((D3DLVERTEX*)v)->tu=tu;
((D3DLVERTEX*)v)->tv=tv;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::createD3DTLVertex(float sx, float sy, float sz, float rhw, long color, long specular, float tu, float tv, D3dTLVertex *v)
{
if (!v) return E_INVALIDARG;
((D3DTLVERTEX*)v)->sx=sx;
((D3DTLVERTEX*)v)->sy=sy;
((D3DTLVERTEX*)v)->sz=sz;
((D3DTLVERTEX*)v)->rhw=rhw;
((D3DTLVERTEX*)v)->color=color;
((D3DTLVERTEX*)v)->specular=specular;
((D3DTLVERTEX*)v)->tu=tu;
((D3DTLVERTEX*)v)->tv=tv;
return S_OK;
}
STDMETHODIMP C_dxj_DirectX7Object::createNewGuid(BSTR *ret)
{
HRESULT hr;
GUID g=GUID_NULL;
if (!ret) return E_INVALIDARG;
hr=::CoCreateGuid(&g);
if FAILED(hr) return hr;
*ret=GUIDtoBSTR(&g);
return S_OK;
}
|
e55aba78d7058503090f1b3c44736cb1fd0ffa9d
|
0eff74b05b60098333ad66cf801bdd93becc9ea4
|
/second/download/git/gumtree/git_repos_function_1799_git-2.13.2.cpp
|
ff24055e74826f297251f04cd0ba4a00925d9149
|
[] |
no_license
|
niuxu18/logTracker-old
|
97543445ea7e414ed40bdc681239365d33418975
|
f2b060f13a0295387fe02187543db124916eb446
|
refs/heads/master
| 2021-09-13T21:39:37.686481
| 2017-12-11T03:36:34
| 2017-12-11T03:36:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 114
|
cpp
|
git_repos_function_1799_git-2.13.2.cpp
|
void set_shared_repository(int value)
{
the_shared_repository = value;
need_shared_repository_from_config = 0;
}
|
c634e6382d453498253ca0beee73ced29c022e54
|
1a5903534ba7d1f4742a9508e715ad4013b698cd
|
/topic/DynamicProgramming/minimumTotal/main.cpp
|
c11182173a3993a9c217ed6505baa5be08079b84
|
[] |
no_license
|
jonniepolkinghorn482/LeetCode
|
39b313ebe6ae63eab99661c049f8ebd5d8f2c852
|
4d408a3c48169ddc219094dd3ab64c5e4f543864
|
refs/heads/master
| 2023-03-25T10:15:38.268875
| 2020-10-13T03:27:10
| 2020-10-13T03:27:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 950
|
cpp
|
main.cpp
|
/*
# Copyright (c) 2020 Xinyan Han. All rights reserved.
*/
#include <iostream>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
using namespace std;
class Solution{
public:
int minimumTotal(vector<vector<int>>& triangle) {
int n = triangle.size();
vector<vector<int>> dp(n, vector<int>(n));
dp[0][0] = triangle[0][0];
for (int i = 1; i < n; ++i) {
dp[i][0] = dp[i - 1][0] + triangle[i][0];
for (int j = 1; j < i; ++j) {
dp[i][j] = min(dp[i - 1][j - 1], dp[i - 1][j]) + triangle[i][j];
}
dp[i][i] = dp[i - 1][i - 1] + triangle[i][i];
}
return *min_element(dp[n - 1].begin(), dp[n - 1].end());
}
};
int main() {
vector<vector<int>> triangle{{2}, {3, 4}, {6, 5, 7}, {4, 1, 8, 3}};
Solution solution;
int result = solution.minimumTotal(triangle);
cout << result << endl;
return 0;
}
|
67531dde25480b8a78b9ae6e1c4f9e398a9a0f3f
|
88a6e97fac8fa69f238dc4ce5c42947b781ec21a
|
/dependencies/amplapi/include/ampl/ep/variant_ep.h
|
3322d2b5fe8f279a1e617d27a4cb2e7c2da9cb3e
|
[] |
no_license
|
gi-ux/EON_Project
|
a675ba07fbf1bb92deaf410e592cf86d874bd6d0
|
4e4dc1414c7c9c841a06618834e5950e30b9caf4
|
refs/heads/main
| 2023-05-09T01:56:41.089297
| 2021-05-25T18:59:03
| 2021-05-25T18:59:03
| 352,982,185
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 421
|
h
|
variant_ep.h
|
#ifndef AMPL_VARIANT_EP_H
#define AMPL_VARIANT_EP_H
#include "ampl/ep/error_information.h"
namespace ampl {
namespace internal {
struct Variant; // Forward dec
extern "C" {
AMPLAPI void AMPL_Variant_DeleteArray(const Variant* toDelete);
AMPLAPI Variant* AMPL_Variant_CreateArray(std::size_t size, ErrorInformation* errorInfo);
}
} // namespace internal
} // namespace ampl
#endif // AMPL_VARIANT_EP_H
|
2893d911fac46fd38ad58e72053758d546a24526
|
f6ef05957b8e84df6854e5da3fff1d62c37d3ce4
|
/Blue-Flame-Engine/Core/BF/Application/Layers/PhysicsLayer.cpp
|
d4cc1b32b88afda5bbc239a9d5af473bc2aab0d3
|
[
"MIT"
] |
permissive
|
mustafa-sibai/Blue-Flame-Engine
|
8a69d0b83b07382b7a0d993d7e679f35e6824fd4
|
b0e44ccffdd41539fa9075e5d6a2b3c1cc811d96
|
refs/heads/master
| 2022-11-07T06:21:06.464308
| 2019-08-09T07:43:03
| 2019-08-09T07:43:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 392
|
cpp
|
PhysicsLayer.cpp
|
#include "PhysicsLayer.h"
namespace BF
{
namespace Application
{
namespace Layers
{
PhysicsLayer::PhysicsLayer()
{
}
PhysicsLayer::~PhysicsLayer()
{
}
void PhysicsLayer::Add(/*const PhysicsObject& physicsObject*/)
{
//physicsObjects.emplace_back(physicsObject);
}
void PhysicsLayer::Remove(/*const PhysicsObject& physicsObject*/)
{
}
}
}
}
|
7e593d4befaa5ed7f90fba57ac2c49643d79e13f
|
895bde2fbc53ec4a770349aab0c633e8cbf42ff6
|
/Paul_Saber_2/component_testing/voltage_sensor_stuff/voltage_sensor_stuff.ino
|
b063617e3346751fc676bec4fc905f71d7f1b1db
|
[] |
no_license
|
paulsimonson/Lightsaber
|
96f7b51b597db1394876cf1a53c2bc4d7341e000
|
8eb2409365eb4cbe84821c65ad9cfa33341cb8b1
|
refs/heads/master
| 2021-06-09T20:36:44.158152
| 2021-03-27T04:00:02
| 2021-03-27T04:00:02
| 146,828,160
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,728
|
ino
|
voltage_sensor_stuff.ino
|
//Voltage sensor:
//+ goes through 100 k ohm resistor
//ground goes through 51 k ohm resistor
//The two combine and go through the VOLT_PIN
//Connect the Arduino to the common ground.
#define VOLT_PIN A6
// ---------------------------- SETTINGS -------------------------------
#define NUM_LEDS 60 // number of microcircuits WS2811 on LED strip (note: one WS2811 controls 3 LEDs!)
//#define R1 101250.0 // voltage divider real resistance
//#define R2 51100.0 // voltage divider real resistance
#define R1 100000.0 // voltage divider real resistance
#define R2 51000.0 // voltage divider real resistance
//float calibration_factor = 1.0820399113082;
float calibration_factor = 1.0;
#define BATTERY_SAFE 1 // battery monitoring (1 - allow, 0 - disallow)
#define DEBUG 1 // debug information in Serial (1 - allow, 0 - disallow)
// ---------------------------- SETTINGS -------------------------------
// -------------------------- LIBS ---------------------------
// -------------------------- LIBS ---------------------------
// ------------------------------ VARIABLES ---------------------------------
boolean ls_chg_state;
unsigned long battery_timer;
float voltage;
// ------------------------------ VARIABLES ---------------------------------
void setup() {
//Wire.begin();
Serial.begin(115200);
byte capacity = voltage_measure(); // get battery level
capacity = map(capacity, 100, 0, (NUM_LEDS / 2 - 1), 1); // convert into blade length
if(DEBUG){
Serial.print(F("Battery: "));
Serial.println(capacity);
}
}
// --- MAIN LOOP---
void loop() {
batteryTick();
}
// --- MAIN LOOP---
void batteryTick() {
if (millis() - battery_timer > 1000 && BATTERY_SAFE) {
battery_timer = millis();
voltage = (float)analogRead(VOLT_PIN) * (5.0 / 1023.0) * ((R1 + R2) / R2) * calibration_factor;
if(DEBUG){
Serial.print(F("Battery: "));
Serial.println(voltage);
}
}
}
byte voltage_measure() {
voltage = 0;
for (int i = 0; i < 10; i++) {
//voltage += (float)analogRead(VOLT_PIN) * 5 / 1023 * (R1 + R2) / R2;
voltage += (float)analogRead(VOLT_PIN) * (5.0 / 1023.0) * ((R1 + R2) / R2) * calibration_factor;
}
voltage = voltage / 10;
int volts = voltage / 3 * 100; // 3 cells!!!
if (volts > 387)
return map(volts, 420, 387, 100, 77);
else if ((volts <= 387) && (volts > 375) )
return map(volts, 387, 375, 77, 54);
else if ((volts <= 375) && (volts > 368) )
return map(volts, 375, 368, 54, 31);
else if ((volts <= 368) && (volts > 340) )
return map(volts, 368, 340, 31, 8);
else if (volts <= 340)
return map(volts, 340, 260, 8, 0);
}
|
b0523c220fc38ed09b22b851146d5877625533b6
|
2e939da6db6f24404c223f13ccf5c1d8e1be4956
|
/PAT-乙级/1014.cpp
|
c60d4d871b74b98421d58a142f7d20f13226351b
|
[] |
no_license
|
whitebluepants/OJ-Practice
|
ffc793950491b76b3b703c826fce95e9a07b1ddf
|
f32e7afe3e2c347eca5620ff4e241614805c4555
|
refs/heads/master
| 2021-07-18T13:42:27.971732
| 2019-01-11T02:45:38
| 2019-01-11T02:45:38
| 121,104,040
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,517
|
cpp
|
1014.cpp
|
#include <stdio.h>
#include <string.h>
using namespace std;
int read()
{
char ch = getchar();
int f = 1;
int x = 0;
while(ch < '0' || ch > '9'){if(ch == '-')f = 0;ch = getchar();}
while(ch >= '0' && ch <= '9'){x = x * 10 + ch - '0';ch = getchar();}
return f?x:x*-1;
}
int l[26];
int u[26];
int main()
{
char s[4][61] = {};
char w,t;
for(int i = 0;i < 4;i ++)
{
scanf("%s",s[i]);
}
int l1 = strlen(s[0]), l2 = strlen(s[1]);
int f1 = 0;
for(int i = 0;i < l1 && i < l2;i ++)
{
if(s[0][i] == s[1][i])
{
if(f1 == 0 && s[0][i] >= 'A' && s[0][i] <= 'G')
{
w = s[0][i];
f1 = 1;
}
else if(f1 == 1 && ((s[0][i] >= '0' && s[0][i] <= '9') || (s[0][i] >= 'A' && s[0][i] <= 'N')))
{
t = s[0][i];
break; // 卡了一个点 需要break
}
}
}
int l3 = strlen(s[2]), l4 = strlen(s[3]);
int min = 0;
for(int i = 0;i < l3 && i < l4;i ++)
{
if(s[2][i] == s[3][i] && ((s[2][i] >= 'a' && s[2][i] <= 'z') || (s[2][i] >= 'A' && s[2][i] <= 'Z')))
{
min = i;
break;
}
}
char ss[7][4] = {"MON","TUE","WED","THU","FRI","SAT","SUN"};
printf("%s ",ss[w - 'A']);
if(t >= '0' && t <= '9')
{
printf("%02d:",t - '0');
}
else
{
printf("%d:",10 + t - 'A');
}
printf("%02d",min);
return 0;
}
|
07807d0d7f606b2f8f1b5a031ccfd6d0fafedf5e
|
d0fb03545780a82bb57ca3bbe4daa810777ff367
|
/include/wayfire/util/stringify.hpp
|
e9c12c869a64e222b0fb6e39939c72e7db03d4fc
|
[
"MIT"
] |
permissive
|
WayfireWM/wf-config
|
830ffcd6c01c2e9f64af27423b634d9710ff7ba1
|
8d96a30a4def766ddb45c5620234ebf76788ccd4
|
refs/heads/master
| 2023-09-01T16:03:32.911509
| 2023-08-08T15:16:59
| 2023-08-08T15:16:59
| 135,981,057
| 15
| 22
|
MIT
| 2023-08-08T15:17:01
| 2018-06-04T06:34:43
|
C++
|
UTF-8
|
C++
| false
| false
| 978
|
hpp
|
stringify.hpp
|
#pragma once
#include <string>
#include <sstream>
namespace wf
{
namespace log
{
/**
* Convert the given parameter to a string which can be logged.
* This function can be specialized for custom types.
*/
template<class T>
std::string to_string(T arg)
{
std::ostringstream out;
out << arg;
return out.str();
}
/** Specialization for boolean arguments - print true or false. */
template<>
std::string to_string(bool arg);
/* Specialization for pointers - print the address */
template<class T>
std::string to_string(T *arg)
{
if (!arg)
{
return "(null)";
}
return to_string<T*>(arg);
}
namespace detail
{
/**
* Convert each argument to a string and then concatenate them.
*/
template<class First>
std::string format_concat(First arg)
{
return wf::log::to_string(arg);
}
template<class First, class... Args>
std::string format_concat(First first, Args... args)
{
return format_concat(first) + format_concat(args...);
}
}
}
}
|
5a9f06004cb7f1e1559b3af016a2c9b37701e38d
|
6af67cb05ed54def8b2713af5f0c127fa2ed2bc4
|
/src/entities/DynamicEntity.cc
|
302a5ecb44b343a9ab164f77e75c2f09805207ec
|
[] |
no_license
|
Guo-Haowei/TheAviator
|
2d608c8c99cc0dd68987b0a30a9d17b11995c78c
|
877a14dff86d6f859f0ecb41357c6abf43b2610c
|
refs/heads/master
| 2022-03-04T04:17:29.482358
| 2022-02-18T10:35:44
| 2022-02-19T06:51:53
| 115,889,612
| 7
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,424
|
cc
|
DynamicEntity.cc
|
// DynamicEntity.cc
#include "DynamicEntity.h"
#include <models/Geometry.h>
#include <maths/Maths.h>
#include <entities/gameObjects/ParticleHolder.h>
#include <common.h>
#include <iostream>
using std::cout;
using std::vector;
DynamicEntity::DynamicEntity(
EntityType type,
RawModel* model,
glm::vec3 position,
glm::vec3 color,
float scale,
float opacity,
bool receiveShadow,
bool castShadow):
type(type),
lifespan(1),
distance(0.0f),
originScale(scale),
Entity(model, position, color, glm::vec3(scale), opacity, receiveShadow, castShadow)
{}
DynamicEntity::~DynamicEntity() {
if (type) {
removeEntity(this);
// generate particle effects
float density = type == OBSTACLE ? 15 : 8;
ParticleHolder::theOne().spawnParticles(position, density, color, (float) density * scale.x / 15.0f);
}
}
float DynamicEntity::getDistance() const {
return distance;
}
void DynamicEntity::setDistance(float distance) {
this->distance = distance;
}
int DynamicEntity::getLifespan() const {
return lifespan;
}
void DynamicEntity::setLifespan(int lifespan) {
this->lifespan = lifespan;
}
void DynamicEntity::deplete() {
// change scale
scale = glm::vec3(originScale * (float)lifespan / (float)LIFESPAN);
// change velocity and position
velocity += glm::vec3(velocity.x > 0.0f ? -0.04f: 0.04f, -0.06f, 0.0f);
changePosition(velocity.x, velocity.y, velocity.z);
// rotate randomly
changeRotation(Maths::rand(0.0f, 12.0f), Maths::rand(0.0f, 12.0f), 0.0f);
if (lifespan)
lifespan--;
}
void DynamicEntity::setVelocity(glm::vec3 velocity) {
this->velocity = velocity;
}
EntityType DynamicEntity::getType() const {
return type;
}
DynamicEntities dynamicEntities;
void DynamicEntity::addEntity(DynamicEntity* entity) {
RawModel* key = entity->getModel();
if (dynamicEntities.find(key) == dynamicEntities.end())
dynamicEntities.insert(std::pair<RawModel*, vector<DynamicEntity*>>(key, vector<DynamicEntity*>()));
dynamicEntities.at(key).push_back(entity);
}
void DynamicEntity::removeEntity(DynamicEntity* entity) {
RawModel* key = entity->getModel();
if (dynamicEntities.find(key) != dynamicEntities.end()) {
vector<DynamicEntity*>& entities = dynamicEntities[key];
for (int i = 0; i < entities.size(); ++i) {
if (entities[i]->getId() == entity->getId()) {
entities.erase(entities.begin() + i);
break;
}
}
}
}
|
26405099bbb5f27fac9c39bc1c3e2cc0c02855f1
|
4dd1a1bfa3cc41fe5f916b95e3ede51c2cf72f80
|
/src/help_dialog.cc
|
38fe530ddc54e06a18a2c6bc5839618d972469c7
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
stetre/moonfltk
|
22a6beb19b6ebaf6c2c6f508ec3e51d43349e02e
|
8c63723dbbc85e41be97e3a4685ab66e4ea72e7b
|
refs/heads/master
| 2022-02-12T12:59:06.247020
| 2022-02-06T11:34:09
| 2022-02-06T11:34:09
| 54,705,769
| 47
| 11
|
NOASSERTION
| 2022-02-05T10:46:49
| 2016-03-25T08:30:49
|
C++
|
UTF-8
|
C++
| false
| false
| 4,091
|
cc
|
help_dialog.cc
|
/* The MIT License (MIT)
*
* Copyright (c) 2016 Stefano Trettel
*
* Software repository: MoonFLTK, https://github.com/stetre/moonfltk
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include "internal.h"
/*------------------------------------------------------------------------------*
| Help_Dialog (not a widget) |
*------------------------------------------------------------------------------*/
static int Help_DialogNew(lua_State *L)
{
Fl_Help_Dialog *p = new Fl_Help_Dialog();
DBG_CREATE(Help_Dialog,p);
newuserdata(L, p, MT_Help_Dialog);
return 1;
}
static int Help_DialogDelete(lua_State *L)
{
Fl_Help_Dialog *p = check_Help_Dialog(L, 1);
DBG_DELETE(Help_Dialog,p);
if(freeuserdata(L, p)) delete p;
return 0;
}
WINDOW_SHOW(Help_Dialog, Help_Dialogshow)
VOID_VOID(Help_Dialog, hide, Help_Dialoghide)
INT_VOID(Help_Dialog, h, Help_Dialogh)
INT_VOID(Help_Dialog, w, Help_Dialogw)
INT_VOID(Help_Dialog, x, Help_Dialogx)
INT_VOID(Help_Dialog, y, Help_Dialogy)
VOID_INT_INT(Help_Dialog, position, Help_Dialogposition)
VOID_INT4(Help_Dialog, resize, Help_Dialogresize)
GETSET_INTTYPE(Help_Dialog, Fontsize, textsize, Help_Dialogtextsize)
BOOLEAN_VOID(Help_Dialog, visible, Help_Dialogvisible)
GETSET_STRING(Help_Dialog, value, Help_Dialogvalue)
VOID_STRING(Help_Dialog, load, Help_Dialogload)
static int Help_Dialogtopline(lua_State *L)
{
Fl_Help_Dialog *p = check_Help_Dialog(L, 1);
if(lua_type(L, 2) == LUA_TSTRING)
p->topline(luaL_checkstring(L, 2));
else
p->topline(luaL_checkinteger(L, 2));
return 0;
}
static const struct luaL_Reg Help_DialogMethods[] =
{
{ "h", Help_Dialogh },
{ "hide", Help_Dialoghide },
{ "load", Help_Dialogload },
{ "position", Help_Dialogposition },
{ "resize", Help_Dialogresize },
{ "show", Help_Dialogshow },
{ "textsize", Help_Dialogtextsize },
{ "topline", Help_Dialogtopline },
{ "value", Help_Dialogvalue },
{ "visible", Help_Dialogvisible },
{ "w", Help_Dialogw },
{ "x", Help_Dialogx },
{ "y", Help_Dialogy },
{ NULL, NULL } /* sentinel */
};
static const struct luaL_Reg Help_DialogMetaMethods[] =
{
{ "__gc", Help_DialogDelete },
{ NULL, NULL } /* sentinel */
};
static const struct luaL_Reg Help_DialogFunctions[] =
{
{ "help_dialog", Help_DialogNew },
{ NULL, NULL } /* sentinel */
};
void moonfltk_open_Help_Dialog(lua_State *L)
{
udata_define(L, MT_Help_Dialog, Help_DialogMethods, Help_DialogMetaMethods);
luaL_setfuncs(L, Help_DialogFunctions, 0);
}
|
28bee8f2da5e575395b9ff48b7b95a73c82137d5
|
32a87cda74dacf8289b21aefd63fbcb31d20c535
|
/Kassiopeia/Bindings/Trajectories/Source/KSTrajControlTimeBuilder.cxx
|
0596046a00831bea3172254d988c5dbcb9446547
|
[] |
no_license
|
Blawker/Kassiopeia
|
16c9ed4e203073409cc58e009207950b0f7dde80
|
4f7145bde9972cfa088a1994f98a491646333a8b
|
refs/heads/master
| 2022-12-03T19:28:38.050926
| 2020-08-18T14:16:21
| 2020-08-18T14:16:21
| 279,245,030
| 1
| 0
| null | 2020-07-13T08:38:58
| 2020-07-13T08:38:57
| null |
UTF-8
|
C++
| false
| false
| 484
|
cxx
|
KSTrajControlTimeBuilder.cxx
|
#include "KSTrajControlTimeBuilder.h"
#include "KSRootBuilder.h"
using namespace Kassiopeia;
using namespace std;
namespace katrin
{
template<> KSTrajControlTimeBuilder::~KComplexElement() {}
STATICINT sKSTrajControlTimeStructure =
KSTrajControlTimeBuilder::Attribute<string>("name") + KSTrajControlTimeBuilder::Attribute<double>("time");
STATICINT sToolboxKSTrajControlTime = KSRootBuilder::ComplexElement<KSTrajControlTime>("kstraj_control_time");
} // namespace katrin
|
8b8525ac2f241aefbd719828985aa6607a438aaf
|
4c89e2c6cc91b5807a490bcd7e5b2ec574f70155
|
/source/Script/lua/CzLuaSys.cpp
|
3fb60fbc733d9a498dd26f7bffb9587cc530d238
|
[] |
no_license
|
sanyaade-iot/AppEasyCoreSDK
|
431b02890799e689c0a2855ae5a91efea831c25c
|
94a6cc73c1869ff8ad98855a0673fb00ed97fa46
|
refs/heads/master
| 2020-12-31T03:02:36.038708
| 2014-08-07T09:23:19
| 2014-08-07T09:23:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 15,007
|
cpp
|
CzLuaSys.cpp
|
//
//
// AppEasy SDK - Cross Platform Multi-purpose Game and App Engine
//
// Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk
//
// For updates, tutorials and more details check out www.appeasymobile.com
//
// This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin.
// If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support
//
//
#include "IzPlatformSys.h"
#include "CzScriptLua.h"
#include "IzPlatformOther.h"
#include "CzPlatform.h"
#include "lua/CzLuaSys.h"
#include "CzApp.h"
#include "CzPlatform.h"
#include "CzSettings.h"
#include "s3eFile.h"
//
// LUA_isType(type-name)
//
static int LUA_isType(lua_State *lua)
{
int count = lua_gettop(lua);
if (lua_gettop(lua) < 1)
{
CzScriptEngineLua::DisplayError(lua, "sys.isType() not enough parameters, expected type-name");
lua_pushboolean(lua, false);
return 1;
}
// Get the resource
IzXomlResource* resource = NULL;
if (lua_isuserdata(lua, 1))
resource = (CzScene*)lua_touserdata(lua, 1);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.isTypeOf() Invalid parameter, expected object for Param0");
lua_pushboolean(lua, false);
return 1;
}
// Get the type of actor to create
const char* type = NULL;
if (lua_isstring(lua, 2))
type = lua_tostring(lua, 2);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.isTypeOf() Invalid parameter, expected type-name for Param1");
lua_pushboolean(lua, false);
return 1;
}
unsigned int type_hash = CZ_HASH(type);
if (resource->getActualClassTypeHash() == type_hash)
lua_pushboolean(lua, true);
else
lua_pushboolean(lua, false);
return 1;
}
//
// LUA_isTypeOf(type-name)
//
static int LUA_isTypeOf(lua_State *lua)
{
int count = lua_gettop(lua);
if (lua_gettop(lua) < 1)
{
CzScriptEngineLua::DisplayError(lua, "sys.isTypeOf() not enough parameters, expected type-name");
lua_pushboolean(lua, false);
return 1;
}
// Get the resource
IzXomlResource* resource = NULL;
if (lua_isuserdata(lua, 1))
resource = (CzScene*)lua_touserdata(lua, 1);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.isTypeOf() Invalid parameter, expected object for Param0");
lua_pushboolean(lua, false);
return 1;
}
// Get the type of actor to create
const char* type = NULL;
if (lua_isstring(lua, 2))
type = lua_tostring(lua, 2);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.isTypeOf() Invalid parameter, expected type-name for Param1");
lua_pushboolean(lua, false);
return 1;
}
unsigned int type_hash = CZ_HASH(type);
if (resource->getClassTypeHash() == type_hash)
lua_pushboolean(lua, true);
else
lua_pushboolean(lua, false);
return 1;
}
//
// LUA_LaunchURL - Launches a URL
//
static int LUA_LaunchURL(lua_State *lua)
{
int count = lua_gettop(lua);
if (count < 1)
{
CzScriptEngineLua::DisplayError(lua, "sys.launchURL() not enough parameters, expected url (string) ");
lua_pushboolean(lua, false);
return 1;
}
// Get the url
const char* url = NULL;
if (lua_isstring(lua, 1))
url = lua_tostring(lua, 1);
if (url == NULL)
{
CzScriptEngineLua::DisplayError(lua, "sys.launchURL(), invalid url for Param0");
lua_pushboolean(lua, false);
return 1;
}
PLATFORM_SYS->ExecuteViaOS(url, false);
lua_pushboolean(lua, true);
return 1;
}
//
// LUA_Exit - Exit the program
//
static int LUA_Exit(lua_State *lua)
{
int count = lua_gettop(lua);
PLATFORM_SYS->RequestQuit();
lua_pushboolean(lua, true);
return 1;
}
//
// LUA_getTimeMs - Returns current time in millseconds
//
static int LUA_getTimeMs(lua_State *lua)
{
int count = lua_gettop(lua);
lua_pushnumber(lua, (double)PLATFORM_SYS->getTimeInMs());
return 1;
}
//
// LUA_getTimeUTC - Returns coordinated universal time in millseconds
//
static int LUA_getTimeUTC(lua_State *lua)
{
int count = lua_gettop(lua);
lua_pushnumber(lua, (double)PLATFORM_SYS->getTimeUTC());
return 1;
}
//
// LUA_getTotalFrames - Returns total frames that have been processed since the app started
//
static int LUA_getTotalFrames(lua_State *lua)
{
lua_pushnumber(lua, (double)CzGlobals::App->getTotalFrames());
return 1;
}
//
// LUA_getFrameRate - Returns the current estimated frame rate
//
static int LUA_getFrameRate(lua_State *lua)
{
lua_pushnumber(lua, (double)CzGlobals::App->getFrameRate());
return 1;
}
//
// LUA_PauseTime - Pauses time in the app
//
static int LUA_PauseTime(lua_State *lua)
{
int count = lua_gettop(lua);
if (count < 1)
{
CzScriptEngineLua::DisplayError(lua, "sys.pauseTime() not enough parameters, expected paused (boolean) ");
lua_pushboolean(lua, false);
return 1;
}
// Get the state
bool paused = false;
if (lua_isboolean(lua, 1))
paused = lua_toboolean(lua, 1) != 0;
else
{
CzScriptEngineLua::DisplayError(lua, "sys.pauseTime(), invalid paused state for Param0");
lua_pushboolean(lua, false);
return 1;
}
CzGlobals::App->setTimePaused(paused);
lua_pushboolean(lua, true);
return 1;
}
//
// LUA_isTimePaused - Returns the current time paused state of the App
//
static int LUA_isTimePaused(lua_State *lua)
{
lua_pushboolean(lua, CzGlobals::App->isTimePaused());
return 1;
}
//
// LUA_getDeviceType - Returns device type
//
static int LUA_getDeviceType(lua_State *lua)
{
int count = lua_gettop(lua);
eCzDeviceType type = PLATFORM_SYS->getDeviceType();
switch (type)
{
case CzDeviceType_iPhone:
lua_pushstring(lua, "iphone");
break;
case CzDeviceType_iPad:
lua_pushstring(lua, "ipad");
break;
case CzDeviceType_Android:
lua_pushstring(lua, "android");
break;
/* case CzDeviceType_Bada:
break;
case CzDeviceType_QNX:
break;
case CzDeviceType_Symbian:
break;
case CzDeviceType_WinMobile:
break;
case CzDeviceType_WebOS:
break;*/
case CzDeviceType_Windows:
lua_pushstring(lua, "windows");
break;
/* case CzDeviceType_OSX:
break;
case CzDeviceType_Vita:
break;
case CzDeviceType_WP8:
break;*/
default:
lua_pushstring(lua, "unsupported");
}
return 1;
}
//
// LUA_getOSVersion - Returns OS version (return the devices OS version)
//
static int LUA_getOSVersion(lua_State *lua)
{
int count = lua_gettop(lua);
const char* locale = PLATFORM_SYS->getDeviceOSVersion();
lua_pushstring(lua, locale);
return 1;
}
//
// LUA_getLocale - Returns devices language (ISO 639 and ISO 3166 formats, e.g. en_GB)
//
static int LUA_getLocale(lua_State *lua)
{
int count = lua_gettop(lua);
const char* locale = PLATFORM_SYS->getDeviceLocale();
lua_pushstring(lua, locale);
return 1;
}
//
// LUA_getFreeMem - Returns current free memory
//
static int LUA_getFreeMem(lua_State *lua)
{
int count = lua_gettop(lua);
lua_pushnumber(lua, (double)PLATFORM_SYS->getFreeMemory());
return 1;
}
//
// LUA_StartVibrate - Starts vibration - duration (number), priority (number, optional)
//
static int LUA_StartVibrate(lua_State *lua)
{
int count = lua_gettop(lua);
if (count < 1)
{
CzScriptEngineLua::DisplayError(lua, "sys.vibrate() not enough parameters, expected duration (number), priority (number 0 to 255, optional)");
lua_pushboolean(lua, false);
return 1;
}
// Get duration
float duration = 0.5;
if (lua_isnumber(lua, 1))
duration = (float)lua_tonumber(lua, 1);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.vibrate(), expected number for Param0");
lua_pushboolean(lua, false);
return 1;
}
// Get priority
float priority = 255.0f;
if (count > 1)
{
if (lua_isnumber(lua, 2))
priority = (float)lua_tonumber(lua, 2);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.vibrate(), expected number for Param1");
lua_pushboolean(lua, false);
return 1;
}
}
PLATFORM->getOther()->VibrateStart(priority, duration);
lua_pushboolean(lua, true);
return 1;
}
//
// LUA_StopVibrate - Returns current free memory
//
static int LUA_StopVibrate(lua_State *lua)
{
int count = lua_gettop(lua);
PLATFORM->getOther()->VibrateStop();
lua_pushboolean(lua, true);
return 1;
}
//
// LUA_ChangePowerSaving - command (string (start, stop))
//
static int LUA_ChangePowerSaving(lua_State *lua)
{
int count = lua_gettop(lua);
if (count < 1)
{
CzScriptEngineLua::DisplayError(lua, "sys.powerSaving() not enough parameters, expected enable (boolean)");
lua_pushboolean(lua, false);
return 1;
}
// Get command
bool enabled = false;
if (lua_isboolean(lua, 1))
enabled = lua_toboolean(lua, 1) != 0;
else
{
CzScriptEngineLua::DisplayError(lua, "sys.powerSaving() invalid enable (Param0), expected boolean");
lua_pushboolean(lua, false);
return 1;
}
CZ_SETTINGS->setPreventPowerSaving(!enabled);
lua_pushboolean(lua, true);
return 1;
}
//
// LUA_YieldToOS - Yields to OS (time in millseonds (number))
//
static int LUA_YieldToOS(lua_State *lua)
{
int count = lua_gettop(lua);
if (count < 1)
{
CzScriptEngineLua::DisplayError(lua, "sys.yield() not enough parameters, expected time (number)");
lua_pushboolean(lua, false);
return 1;
}
// Get command
float time = 0;
if (lua_isnumber(lua, 1))
time = lua_tonumber(lua, 1) != 0;
else
{
CzScriptEngineLua::DisplayError(lua, "sys.yield() invalid time (Param0), expected number");
lua_pushboolean(lua, false);
return 1;
}
PLATFORM_SYS->YieldToOS((int)time);
lua_pushboolean(lua, true);
return 1;
}
//
// LUA_LoadXoml - Loads XOML (filename (string), scene (object, optional))
//
static int LUA_LoadXoml(lua_State *lua)
{
int count = lua_gettop(lua);
if (count < 1)
{
CzScriptEngineLua::DisplayError(lua, "sys.loadXoml() not enough parameters, expected filename (string), scene (object, optional)");
lua_pushboolean(lua, false);
return 1;
}
// Get filename
const char* filename = NULL;
if (lua_isstring(lua, 1))
filename = lua_tostring(lua, 1);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.loadXoml() invalid filename (Param0), expected string");
lua_pushboolean(lua, false);
return 1;
}
IzXomlResource* container = NULL;
if (count > 1)
{
// Get scene
if (lua_isuserdata(lua, 2))
container = (IzXomlResource*)lua_touserdata(lua, 2);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.loadXoml() invalid scene (Param1), expected scene object");
lua_pushboolean(lua, false);
return 1;
}
}
if (container == NULL)
container = CzGlobals::App;
lua_pushboolean(lua, CZ_XOML->Process(container, filename));
return 1;
}
//
// LUA_setBackgroundColour - Sets background clear colour (red, green, blue)
//
static int LUA_setBackgroundColour(lua_State *lua)
{
int count = lua_gettop(lua);
if (count < 3)
{
CzScriptEngineLua::DisplayError(lua, "sys.setBackgroundColour() not enough parameters, expected red (number), green (number), blue (number)");
lua_pushboolean(lua, false);
return 1;
}
// Get colour cponents
int red = 0;
if (lua_isnumber(lua, 1))
red = (int)lua_tonumber(lua, 1);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.setBackgroundColour() invalid value (Param0), expected number");
lua_pushboolean(lua, false);
return 1;
}
int green = 0;
if (lua_isnumber(lua, 2))
green = (int)lua_tonumber(lua, 2);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.setBackgroundColour() invalid value (Param1), expected number");
lua_pushboolean(lua, false);
return 1;
}
int blue = 0;
if (lua_isnumber(lua, 3))
blue = (int)lua_tonumber(lua, 3);
else
{
CzScriptEngineLua::DisplayError(lua, "sys.setBackgroundColour() invalid value (Param2), expected number");
lua_pushboolean(lua, false);
return 1;
}
CzGlobals::App->SetBackgroundColour(red, green, blue, 255);
lua_pushboolean(lua, true);
return 1;
}
//
// LUA_listDirectory - lists directory contents. if passed path is nil then lists drives instead
//
static int LUA_listDirectory(lua_State *lua)
{
const char* dir = NULL;
int count = lua_gettop(lua);
if (count > 0)
{
// Get directory name
if (lua_isstring(lua, 1))
dir = lua_tostring(lua, 1);
}
//get file list
s3eFileList* list = s3eFileListDirectory(dir);
if (list==NULL)
{
switch (s3eFileGetError())
{
case S3E_FILE_ERR_NOT_FOUND:
CzScriptEngineLua::DisplayError(lua, "sys.listDirectory() directory doesn't exist or doesn't contain any files.");
case S3E_FILE_ERR_DEVICE:
CzScriptEngineLua::DisplayError(lua, "sys.listDirectory() file device failed.");
case S3E_FILE_ERR_TOO_MANY:
CzScriptEngineLua::DisplayError(lua, "sys.listDirectory() too many file handles are open.");
case S3E_FILE_ERR_MEM:
CzScriptEngineLua::DisplayError(lua, "sys.listDirectory() couldn't allocate enough memory for the list.");
}
lua_pushnil(lua);
return 1;
}
//count items
int file_count = 0;
char buf[512];
while (s3eFileListNext(list,&buf[0],512)==S3E_RESULT_SUCCESS)
file_count+=1;
s3eFileListClose(list);
//get list again
list = s3eFileListDirectory(dir);
if (list==NULL)
{
switch (s3eFileGetError())
{
case S3E_FILE_ERR_NOT_FOUND:
CzScriptEngineLua::DisplayError(lua, "sys.listDirectory() directory doesn't exist or doesn't contain any files.");
case S3E_FILE_ERR_DEVICE:
CzScriptEngineLua::DisplayError(lua, "sys.listDirectory() file device failed.");
case S3E_FILE_ERR_TOO_MANY:
CzScriptEngineLua::DisplayError(lua, "sys.listDirectory() too many file handles are open.");
case S3E_FILE_ERR_MEM:
CzScriptEngineLua::DisplayError(lua, "sys.listDirectory() couldn't allocate enough memory for the list.");
}
lua_pushnil(lua);
return 1;
}
lua_createtable(lua, file_count, 0);
int new_table = lua_gettop(lua);
int index = 1;
// push file names
for (int i=0;i<file_count;i++)
{
s3eFileListNext(list,&buf[0],512);
lua_pushstring(lua, &buf[0]);
lua_rawseti(lua, new_table, index++);
}
s3eFileListClose(list);
return 1;
}
//
// Lua AppEasy System library
//
static const luaL_Reg g_syslib[] = {
{"isType", LUA_isType},
{"isTypeOf", LUA_isTypeOf},
{"launchURL", LUA_LaunchURL},
{"exit", LUA_Exit},
{"getTimeMs", LUA_getTimeMs},
{"getTimeUTC", LUA_getTimeUTC},
{"getTotalFrames", LUA_getTotalFrames},
{"getFrameRate", LUA_getFrameRate},
{"getDeviceType", LUA_getDeviceType},
{"getOSVersion", LUA_getOSVersion},
{"getLocale", LUA_getLocale},
{"getFreeMem", LUA_getFreeMem},
{"vibrate", LUA_StartVibrate},
{"stopVibrate", LUA_StopVibrate},
{"changePowerSaving", LUA_ChangePowerSaving},
{"yield", LUA_YieldToOS},
{"loadXoml", LUA_LoadXoml},
{"pauseTime", LUA_PauseTime},
{"isTimePaused", LUA_isTimePaused},
{"setBackgroundColour", LUA_setBackgroundColour},
{"listDirectory", LUA_listDirectory},
{NULL, NULL}
};
LUALIB_API int luaopen_sys(lua_State *L)
{
luaL_register(L, "sys", g_syslib);
lua_pop(L, 1);
return 1;
}
|
37a13ca03bdef3d7eddf24a095bbb15439f873a7
|
a11b50cf2c3c0ab1600ddd144a57c53a0a6d61dd
|
/UpdateTSS/dbtfileRO.h
|
646de932f93627d66537b4e671a2d51d02c81232
|
[] |
no_license
|
dlubom/walls
|
78f549e5a2e678d101f9e953daa04b5505d4fca7
|
e34363945b4c422a327380e20a6414e4298cfa58
|
refs/heads/master
| 2021-06-01T11:02:38.562704
| 2020-03-22T14:34:29
| 2020-03-22T14:34:56
| 87,931,918
| 1
| 0
| null | 2017-04-11T12:34:06
| 2017-04-11T12:34:06
| null |
UTF-8
|
C++
| false
| false
| 1,575
|
h
|
dbtfileRO.h
|
#ifndef _DBTFILE_H
#define _DBTFILE_H
#define LEN_MEMO_HDR 50
class CDBTData
{
public:
CDBTData() : pData(NULL),lenData(0),nUsers(0) {}
~CDBTData() {
if(lenData) {
ASSERT(0);
free(pData);
lenData=0;
}
}
BOOL AllocMin(UINT len)
{
if(len>lenData) {
LPSTR pNewData=(LPSTR)realloc(pData,len);
if(!pNewData) return FALSE;
pData=pNewData;
lenData=len;
}
return TRUE;
}
static bool IsTextRTF(LPCSTR pText)
{
return *pText=='{' && pText[1]=='\\' && pText[2]=='r' && pText[3]=='t' && pText[4]=='f';
}
static bool IsTextIMG(LPCSTR pText)
{
if(IsTextRTF(pText)) return false;
LPCSTR p=strstr(pText,"[~]");
return p && (p-pText)<=(255-3);
}
LPSTR pData;
UINT lenData;
UINT nUsers;
};
struct DBT_FREEREC {
DBT_FREEREC() : recNo(0),recCnt(0) {}
DBT_FREEREC(UINT recno,UINT reccnt) : recNo(recno),recCnt(reccnt) {}
UINT recNo; //starting block
UINT recCnt; //# of contiguous blocks
};
int dbt_GetMemoHdr(LPSTR dst,LPCSTR src);
class CDBTFile : public CFile {
public:
enum {F_INITFREE=1,F_EXTENDED=2,F_TRUNCATED=4,F_WRITTEN=8};
CDBTFile() : m_uNextRec(0),m_uFlags(0) {}
bool IsOpen() {return m_hFile!=CFile::hFileNull;}
BOOL InitFree();
static int RecNo(LPCSTR p10);
static int StripRTF(LPSTR pText,BOOL bKeepPrefix=FALSE);
LPSTR GetText(UINT *pLen,UINT rec);
LPSTR GetTextSample(LPSTR buf,UINT bufSiz,UINT recNo);
virtual BOOL Open(LPSTR pathName,UINT flags,CFileException *pEx=NULL);
virtual void Close();
static CDBTData dbt_data;
DWORD m_uNextRec; //will be >1 after any appends
UINT m_uFlags;
};
#endif
|
47c41389a9da7af5173ef92a0b02262bda208d1e
|
14eba770e849888849041a37e0fc91c17a964018
|
/Editor/sources/Interface/StandardEditorItem.cpp
|
310d454df0586c8b2524fa52925a65ce233490c3
|
[] |
no_license
|
wangscript007/3dNovac
|
d31d54fb314581a5f53f97d226cbff0a98b61139
|
1a2d4c7d948b13536488c5ca36a4d4d9bf9c577d
|
refs/heads/master
| 2021-05-31T01:02:35.035837
| 2012-10-11T11:34:14
| 2012-10-11T11:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,563
|
cpp
|
StandardEditorItem.cpp
|
/*-----------------------------------------------------------------------------
3dNovac Editor
Copyright (C) 2010-2011, The 3dNovac Team
This file is part of 3dNovac.
3dNovac 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.
3dNovac 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 3dNovac. If not, see <http://www.gnu.org/licenses/>.
File Created At: 05/12/2010
File Author(s): Poncin Matthieu
-----------------------------------------------------------------------------*/
#include <Nc/GUI/SceneGraph.h>
#include <Nc/Graphics/Camera/Camera3d.h>
#include <Nc/Graphics/Camera/Camera2d.h>
#include <Nc/Graphics/Effect/Effect.h>
#include "StandardEditorItem.h"
#include "NodeProperties.h"
using namespace Nc::Editor::Interface;
StandardEditorItem *StandardEditorItem::_globalObjectDroped = NULL;
const StandardEditorItem *StandardEditorItem::_globalLastGetDataObject = NULL;
StandardEditorItem *StandardEditorItem::_globalOldParentDroped = NULL;
int StandardEditorItem::_globalOldPosDroped = -1;
StandardEditorItem::StandardEditorItem(Nc::System::Object *obj, Type type)
: QStandardItem(), _type(type), _properties(NULL), _object(obj)
{
CreateObjectProperties();
if (obj != NULL)
{
std::string s = obj->GetClassName();
if (!obj->Name().empty())
s += " " + obj->Name();
setText(s.c_str());
}
}
StandardEditorItem::StandardEditorItem(const StandardEditorItem &item)
: QStandardItem(item), _type(item._type), _properties(NULL), _object(item._object)
{
CreateObjectProperties();
}
StandardEditorItem &StandardEditorItem::operator == (const StandardEditorItem &item)
{
delete _properties;
_properties = NULL;
_type = item._type;
_object = item._object;
CreateObjectProperties();
return *this;
}
StandardEditorItem::~StandardEditorItem()
{
delete _properties;
if (_globalLastGetDataObject == this)
_globalLastGetDataObject = NULL;
if (_globalObjectDroped == this)
_globalObjectDroped = NULL;
}
void StandardEditorItem::CreateObjectProperties()
{
switch (_type)
{
case Node: _properties = new NodeProperties(this); break;
case Scene: _properties = new SceneProperties(this); break;
case Camera2d: _properties = new Camera2dProperties(this); break;
case Camera3d: _properties = new Camera3dProperties(this); break;
case StandardCamera3d: _properties = new StandardCamera3dProperties(this); break;
case Object: _properties = new ObjectProperties(this); break;
case Effect: _properties = new EffectProperties(this); break;
case GUIScene: _properties = new GUISceneProperties(this); break;
case Widget: _properties = new WidgetProperties(this); break;
default: _properties = new IObjectProperties(this); break;
}
}
QStandardItem *StandardEditorItem::clone() const
{
if (_globalLastGetDataObject != NULL)
{
StandardEditorItem *newObj = new StandardEditorItem(*_globalLastGetDataObject);
_globalOldParentDroped = static_cast<StandardEditorItem*>(_globalLastGetDataObject->parent());
LOG << _globalOldParentDroped << std::endl;
_globalObjectDroped = newObj;
return newObj;
}
else
return new StandardEditorItem(*this);
}
QVariant StandardEditorItem::data(int role) const
{
// for drag and drop management with the Qt clone system
if (role == 31)
{
_globalLastGetDataObject = this;
_globalOldPosDroped = _globalLastGetDataObject->row();
}
return QStandardItem::data(role);
}
void StandardEditorItem::setData(const QVariant &value, int role)
{
QStandardItem::setData(value, role);
}
StandardEditorItem::Type StandardEditorItem::GetObjectType(Nc::System::Object *obj)
{
if (obj->AsWithoutThrow<Nc::GUI::Widget>() != NULL)
return Widget;
else if (obj->AsWithoutThrow<Nc::Graphic::StandardCamera3d>() != NULL)
return StandardCamera3d;
else if (obj->AsWithoutThrow<Nc::Graphic::Camera3d>() != NULL)
return Camera3d;
else if (obj->AsWithoutThrow<Nc::Graphic::Camera2d>() != NULL)
return Camera2d;
else if (obj->AsWithoutThrow<Nc::Graphic::Object>() != NULL)
return Object;
else if (obj->AsWithoutThrow<Nc::Graphic::Effect>() != NULL)
return Effect;
else if (obj->AsWithoutThrow<Nc::Graphic::SceneGraph>() != NULL)
return Scene;
else if (obj->AsWithoutThrow<Nc::GUI::SceneGraph>() != NULL)
return GUIScene;
else if (obj->AsWithoutThrow<Nc::Graphic::ISceneNode>() != NULL)
return Node;
return SysObject;
}
|
8b955032476cb4271d0e8557df8f1b8c5ed74bda
|
42d2456063bd77a23274cd5d1f880ac6cd533c1f
|
/Project1/Project1/Address.h
|
a84f51e212a66a7cfc04ef3e77c10e69647d121b
|
[] |
no_license
|
amills16/COSC1437_Lab4_Test
|
5db40713132d2f8b443a51070c4cdd1518476673
|
6449eba998092cfef6a338029ed72a44ff9ad0db
|
refs/heads/master
| 2021-01-20T19:49:42.420788
| 2016-07-08T18:50:44
| 2016-07-08T18:50:44
| 62,909,051
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,703
|
h
|
Address.h
|
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//
// //
// //
// Andrew Mills //
// Lab 4 //
// Bill Slater //
// COSC 1437.3S7 //
// //
// //
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//
#ifndef ADDRESS_H
#define ADDRESS_H
#include <iostream>
#include <WCS_String.h>
using namespace std;
class Address
{
public:
Address ();
Address (const Address &);
Address (const WCS_String &, const WCS_String &, const WCS_String &, const WCS_String &);
Address (const char[], const char[], const char[], const char[]);
~Address();
int Compare (const Address &) const;
Address & Copy (const Address &);
ostream & Display (ostream & = cout) const;
istream & Read (istream & = cin);
const WCS_String & GetStreet () const;
const WCS_String & GetCity () const;
const WCS_String & GetState () const;
const WCS_String & GetZip () const;
bool SetStreet (const WCS_String &);
bool SetCity (const WCS_String &);
bool SetState (const WCS_String &);
bool SetZip (const WCS_String &);
Address & operator = (const Address &);
bool operator != (const Address &) const;
bool operator == (const Address &) const;
private:
WCS_String Street;
WCS_String City;
WCS_String State;
WCS_String Zip;
};
inline ostream & operator << (ostream & out, const Address & A)
{
return A.Display(out);
}
inline istream & operator >> (istream & in, Address & A)
{
return A.Read(in);
}
inline Address & Address::Copy(const Address & N)
{
return *this = N; //The class being accessed is assigned with the Addresss in N
}
inline const WCS_String & Address::GetStreet() const
{
return Street;
}
inline const WCS_String & Address::GetCity() const
{
return City;
}
inline const WCS_String & Address::GetState() const
{
return State;
}
inline const WCS_String & Address::GetZip() const
{
return Zip;
}
inline bool Address::operator != (const Address & A) const
{
return Compare(A) != 0;
}
inline bool Address::operator == (const Address & A) const
{
return Compare(A) == 0;
}
#endif
|
4d65e377116db3b3c66455214ac6a0aecb0475ad
|
63db2a4036ba87e5da35bca4925464002c3c19d6
|
/big_exercise/qt/myclass/main.cpp
|
8fc6e68f666afe299d807a1c281228173db99336
|
[] |
no_license
|
gicsfree/exercise_aka
|
6c6ae3ef737e1a3da23001871a3b8c4dea9e7713
|
d831bc14d719fcd90a06e29d1832c5ea20abb988
|
refs/heads/master
| 2022-05-09T11:29:33.265928
| 2011-09-23T11:48:10
| 2011-09-23T11:48:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 711
|
cpp
|
main.cpp
|
#include <QApplication>
#include <QPushButton>
#include <QWidget>
#include "myclass.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget myform;
myform.show();
QPushButton hello("Hello world!", &myform);
hello.resize(200, 100);
hello.show();
myclass a;
// a.do_print();
// QObject::connect(&hello, SIGNAL(clicked()), &a, SLOT(do_print()));
QObject::connect(&hello, SIGNAL(clicked()), &a, SIGNAL(mysignal()));
QObject::connect(&a, SIGNAL(mysignal()), &a, SLOT(do_mysignal()));
QObject::connect(&a, SIGNAL(int_mysignal(int)), &a, SLOT(int_myslot(int)));
a.set_value(1);
a.set_value(2);
a.set_value(2);
return app.exec();
}
|
8e60d87af34b7944843602d63377648550df015e
|
0f0a5387051c80813737c2c89d9756ac50eff6c6
|
/prediction_goals.cc
|
5c649ebfd224ecea7885a9a60171412e6a7c0adf
|
[] |
no_license
|
maxrosan/HelpMyTeam
|
45eae0b84db7b2c9514ff5b68c1094f8d56c2c71
|
77b48ce747c6765ae6a347259589fa9b19bc83d3
|
refs/heads/master
| 2021-01-17T07:12:54.618007
| 2017-07-20T23:45:10
| 2017-07-20T23:45:10
| 2,839,510
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,158
|
cc
|
prediction_goals.cc
|
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <memory.h>
#include <string>
#include <map>
#include <iostream>
#include <vector>
#include <sstream>
#include <algorithm>
#include <random>
#include <cassert>
#include <cmath>
int numberOfTeams, numberOfMatches;
std::vector<int> goalsForHome, goalsAgainstHome, goalsForAway, goalsAgainstAway;
std::vector<double> meanGoalsForHome, meanGoalsAgainstHome, meanGoalsForAway, meanGoalsAgainstAway;
double meanGoalsForHomeTotal, meanGoalsAgainstHomeTotal, meanGoalsForAwayTotal, meanGoalsAgainstAwayTotal;
std::vector<std::vector<std::pair<int, int> > > results;
std::map<std::string, int> mapTeamNameId;
std::vector<double> attackStrengthHome, defensStrengthHome, attackStrengthAway, defensStrengthAway;
double factorial[10];
void initializeTables() {
int i;
factorial[0] = 1.;
for (i = 1; i < 10; i++) {
factorial[i] = i * factorial[i-1];
}
}
double poisson(double lambda, int x) {
assert(x >= 0 && x <= 10);
return (pow(lambda, x) / (factorial[x] * exp(lambda)));
}
double calculateHomeGoalsExpectancy(int teamA, int teamB) {
return (attackStrengthHome[teamA] * defensStrengthAway[teamB] * meanGoalsForHomeTotal);
}
double calculateAwayGoalsExpectancy(int teamA, int teamB) {
return (attackStrengthAway[teamB] * defensStrengthHome[teamA] * meanGoalsForAwayTotal);
}
void calculateExpectedResult(int teamA, int teamB, int& resultA, int& resultB, double& probability) {
double homeExp, awayExp;
int i, j, iMax = 0, jMax = 0;
double possibleResults[10][10];
//std::cout << attackStrengthHome[teamA] << " " << defensStrengthAway[teamB] << " " << meanGoalsForHomeTotal << std::endl;
homeExp = calculateHomeGoalsExpectancy(teamA, teamB);
awayExp = calculateAwayGoalsExpectancy(teamA, teamB);
//std::cout << homeExp << " " << awayExp << std::endl;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
possibleResults[i][j] = poisson(homeExp, i) * poisson(awayExp, j) * 100.;
//std::cout << possibleResults[i][j] << " ";
if (possibleResults[i][j] > possibleResults[iMax][jMax]) {
iMax = i;
jMax = j;
}
}
//std::cout << std::endl;
}
resultA = iMax;
resultB = jMax;
probability = possibleResults[iMax][jMax];
}
void calculateStrength() {
int i;
for (i = 0; i < numberOfTeams; i++) {
attackStrengthHome.push_back(meanGoalsForHome[i] / meanGoalsForHomeTotal);
defensStrengthHome.push_back(meanGoalsAgainstHome[i] / meanGoalsAgainstHomeTotal);
attackStrengthAway.push_back(meanGoalsForAway[i] / meanGoalsForAwayTotal);
defensStrengthAway.push_back(meanGoalsAgainstAway[i] / meanGoalsAgainstAwayTotal);
}
}
void calculateMeans() {
int i;
meanGoalsForHomeTotal = std::accumulate(goalsForHome.begin(), goalsForHome.end(), 0.0, [](double acc, int result) {
return (acc + result);
}) / (numberOfMatches * numberOfTeams / 2);
meanGoalsAgainstHomeTotal = std::accumulate(goalsAgainstHome.begin(), goalsAgainstHome.end(), 0.0, [](double acc, int result) {
return (acc + result);
}) / (numberOfTeams * numberOfTeams / 2);
meanGoalsForAwayTotal = std::accumulate(goalsForAway.begin(), goalsForAway.end(), 0.0, [](double acc, int result) {
return (acc + result);
}) / (numberOfTeams * numberOfTeams / 2);
meanGoalsAgainstAwayTotal = std::accumulate(goalsAgainstAway.begin(), goalsAgainstAway.end(), 0.0, [](double acc, int result) {
return (acc + result);
}) / (numberOfTeams * numberOfTeams / 2);
//std::cout << meanGoalsForHomeTotal << " " << meanGoalsAgainstHomeTotal << " " << meanGoalsForAwayTotal << " " << meanGoalsAgainstAwayTotal << std::endl;
for (i = 0; i < numberOfTeams; i++) {
meanGoalsForHome.push_back(((double) goalsForHome[i]) / ( numberOfMatches / 2 ));
meanGoalsAgainstHome.push_back(((double) goalsAgainstHome[i]) / ( numberOfMatches / 2));
meanGoalsForAway.push_back(((double) goalsForAway[i]) / ( numberOfMatches / 2 ));
meanGoalsAgainstAway.push_back(((double) goalsAgainstAway[i]) / (numberOfMatches / 2));
}
}
void calculateGoalsTable() {
int i, j, goalsForAwayValue, goalsAgainstAwayValue;
/*for (i = 0; i < numberOfTeams; i++) {
for (j = 0; j < numberOfTeams; j++) {
std::cout << results[i][j].first << "x" << results[i][j].second << " ";
}
std::cout << std::endl;
}*/
for (i = 0; i < numberOfTeams; i++) {
std::cout << "Team " << i << std::endl;
goalsForHome.push_back(std::accumulate(results[i].begin(), results[i].end(), 0, [](int acc, std::pair<int, int> result) {
return (acc + result.first);
}));
goalsAgainstHome.push_back(std::accumulate(results[i].begin(), results[i].end(), 0, [](int acc, std::pair<int, int> result) {
return (acc + result.second);
}));
goalsAgainstAwayValue = 0;
goalsForAwayValue = 0;
for (j = 0; j < numberOfTeams; j++) {
goalsForAwayValue += results[j][i].second;
goalsAgainstAwayValue += results[j][i].first;
}
goalsForAway.push_back(goalsForAwayValue);
goalsAgainstAway.push_back(goalsAgainstAwayValue);
//std::cout << goalsForHome[i] << " " << goalsAgainstHome[i] << " " << goalsForAwayValue << " " << goalsAgainstAwayValue << std::endl;
}
//std::cout << a << " " << b << " " << c << " " << d << std::endl;
}
void calculateGoalsForMatches() {
int numberOfMatches, idTeamA, idTeamB, scoresA, scoresB;
std::string teamA, teamB, separetor;
double probability;
std::cin >> numberOfMatches;
while (numberOfMatches--) {
std::cin >> teamA >> separetor >> teamB;
assert(mapTeamNameId.find(teamA) != mapTeamNameId.end());
assert(mapTeamNameId.find(teamB) != mapTeamNameId.end());
std::cout << "Expected result for " << teamA << " x " << teamB << std::endl;
calculateExpectedResult(mapTeamNameId[teamA], mapTeamNameId[teamB], scoresA, scoresB, probability);
std::cout << scoresA << " v " << scoresB << " (" << probability << "%)" << std::endl;
}
}
int main(int argc, char **argv) {
std::string teamName, result;
int position, wins, draws, loses, goalsFor, goalsAgainst, goalsDifference, points;
int i, j, goalsForHomeValue, goalsAgainstHomeValue, goalsForAwayValue, goalsAgainstAwayValue, x, y;
std::cin >> numberOfTeams;
for (i = 0; i < numberOfTeams; i++) {
std::cin >> position >> teamName >> numberOfMatches >> wins >> draws >> loses >> goalsFor >> goalsAgainst >> points >> goalsDifference;
std::cout << position << " " << teamName << " " << numberOfMatches << " " << wins << " " << draws << " " << loses << " " << goalsFor << " " << goalsAgainst << " " << points << " " << goalsDifference << std::endl;
mapTeamNameId[teamName] = i;
results.push_back(std::vector<std::pair<int, int> >(numberOfTeams));
for (j = 0; j < numberOfTeams; j++) {
std::cin >> result;
std::cout << result << std::endl;
if (result[0] >= '0' && result[0] <= '9') {
sscanf(result.c_str(), "%dx%d", &x, &y);
std::cout << x << " " << y << std::endl;
results[i][j] = (std::pair<int, int>(x, y));
} else {
results[i][j] = (std::pair<int, int>(0, 0));
}
}
}
initializeTables();
calculateGoalsTable();
calculateMeans();
calculateStrength();
calculateGoalsForMatches();
return EXIT_SUCCESS;
}
|
d30d36b87e798e46fb0035e4bfdd2c535c63ed19
|
3134840cf195132650124d37ef1e84fd8d0afc1c
|
/147.cc
|
32a8c6d6c26d095c30e6584c56ba3dd876bd0a43
|
[] |
no_license
|
DyungWang/leetcode
|
bc60f058c43fca9f55984f1ef4c0e0dbb204dde2
|
a0c68e2368b69432630e7996eff503775d10bdea
|
refs/heads/master
| 2021-04-14T00:27:58.540718
| 2020-07-08T12:51:06
| 2020-07-08T12:51:06
| 63,585,223
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,309
|
cc
|
147.cc
|
// @author wangyangyang<wangyanyang@gmail.com>
// @created 2020/04/27
// @link https://leetcode.com/problems/insertion-sort-list/
#include "leetcode.h"
using namespace std;
class Solution {
public:
ListNode* insertionSortList(ListNode* head) {
if (head == nullptr) return nullptr;
ListNode* rhead = nullptr;
ListNode* next = nullptr;
while (head != nullptr) {
next = head->next;
insertNode(&rhead, head);
head = next;
}
return rhead;
}
private:
void insertNode(ListNode** head, ListNode* node) {
node->next = nullptr;
ListNode* pre = nullptr;
ListNode* cur = *head;
while (cur != nullptr && cur->val < node->val) {
pre = cur;
cur = cur->next;
}
if (pre == nullptr) {
node->next = *head;
*head = node;
} else {
pre->next = node;
node->next = cur;
}
}
};
struct TestCase {
vector<int> ins;
vector<int> res;
bool test() {
vector<int> res;
ListNode* head = createList(ins);
ListNode* sort = Solution().insertionSortList(head);
res = listToVector(sort);
return equal(res, this->res);
}
};
TestCase testCase1 = {
{ 4, 2, 1, 3 },
{ 1, 2, 3, 4 }
};
#define TEST(testCase) assert(testCase.test())
int main(int, char**) {
TEST(testCase1);
return 0;
}
|
3f1eee04b2f204fd0e72c1ef1ff7d3cd4be4085e
|
90879dc9d39cfe49179657be448ba49d7e95de99
|
/Milestone6/Car.cpp
|
0aa975e88b1b49e99f39eec1b75fac815b424e25
|
[] |
no_license
|
ulianarozz/OOP244
|
6ab9af21f4760cff4c1b6ae25908b649ea53c94c
|
4cd9fe58c8081bfff75816bc53d3be996140cca0
|
refs/heads/master
| 2023-02-05T07:44:14.162513
| 2020-12-22T06:36:47
| 2020-12-22T06:36:47
| 323,530,360
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,926
|
cpp
|
Car.cpp
|
/* Citation and Sources...
Final Project Milestone 6
Module: Car
Filename: Car.cpp
Version 1.0
Author Uliana Rozzhyvaikina
-----------------------------------------------------------
Date Reason
2020/08/06 Implentation file of Car.h
-----------------------------------------------------------
I have done all the coding by myself and only copied the code
that my professor provided to complete my workshops and assignments.
-----------------------------------------------------------*/
#include<iostream>
#include<cstring>
#include"Car.h"
#include"Utils.h"
namespace sdds {
Car::Car() {
emptyState();
}
Car::Car(const char* plt, const char* mk_md,bool wash) :Vehicle( plt, mk_md) {
setEmpty();
if (plt == nullptr || plt[0] == '\0' || strlen(plt) > MAX_PLATE||mk_md==nullptr || mk_md[0]=='\0') {
emptyState();
carwash = false;
}
else {
setPlate(plt);
setMakeModel(mk_md);
setParkingSpot(0);
carwash = wash;
}
}
void Car::emptyState() {
Vehicle::setEmpty();
carwash = false;
}
std::istream& Car::read(std::istream& is) {
if (isCsv()) {
Vehicle::read(is);
int value;
is >> value;
if (value == 0) {
carwash = false;
}
else {
carwash = true;
}
is.ignore();
}
else {
cout << "\nCar information entry" << endl;
Vehicle::read(is);
cout << "Carwash while parked? (Y)es/(N)o: ";
if (validAnswer()) {
carwash = true;
}
else {
carwash = false;
}
}
return is;
}
std::ostream& Car::write(std::ostream& os) const {
if (isEmpty()) {
os << "Invalid Car Object" << endl;
}
else {
if (isCsv()){
os << "C,";
Vehicle::write(os);
os << int(carwash) << endl;
}
else {
os << "Vehicle type: Car" << endl;
Vehicle::write(os);
if (carwash == true) {
os<<"With Carwash" << endl;
}
else {
os << "Without Carwash" << endl;
}
}
}
return os;
}
Car::~Car(){
}
}
|
9d6ac14377abba8cff2f99a8c27ff115e44131f1
|
cf95dd4509488daefa10defabdb4d8665237ff67
|
/src/model/include/iDynTree/Model/SolidShapes.h
|
82e6963f6ee3edf8e1e2817ce33d17eb5a2c627d
|
[
"BSD-3-Clause"
] |
permissive
|
robotology/idyntree
|
c5c71172a0411ae56084074462edc401ce658610
|
eab099dd9d457ce33e476ab73a8fe7b26a0627c6
|
refs/heads/master
| 2023-08-27T21:00:36.746627
| 2023-08-18T08:41:19
| 2023-08-18T08:41:19
| 17,824,536
| 130
| 72
|
BSD-3-Clause
| 2023-09-12T13:58:57
| 2014-03-17T10:35:53
|
C++
|
UTF-8
|
C++
| false
| false
| 7,450
|
h
|
SolidShapes.h
|
// SPDX-FileCopyrightText: Fondazione Istituto Italiano di Tecnologia (IIT)
// SPDX-License-Identifier: BSD-3-Clause
#ifndef IDYNTREE_SOLID_SHAPES_H
#define IDYNTREE_SOLID_SHAPES_H
#include <cstdlib>
#include <string>
#include <vector>
#include <iDynTree/Core/Transform.h>
#include <iDynTree/Model/Indices.h>
namespace iDynTree
{
class Material {
public:
explicit Material();
explicit Material(const std::string& name);
std::string name() const;
bool hasColor() const;
Vector4 color() const;
void setColor(const Vector4& color);
bool hasTexture() const;
std::string texture() const;
void setTexture(const std::string& texture);
private:
Vector4 m_color;
bool m_isColorSet;
std::string m_texture;
std::string m_name;
};
class Sphere;
class Box;
class Cylinder;
class ExternalMesh;
class Model;
class SolidShape
{
public:
explicit SolidShape();
virtual ~SolidShape()=0;
virtual SolidShape* clone()=0;
/**
* Returns the name of the shape.
*/
const std::string& getName() const;
/**
* Sets the specified name.
*/
void setName(const std::string& name);
/**
* Returns if the name is valid.
*/
bool isNameValid() const;
/**
* Returns the homogeneus transformation of the geometry w.r.t. the attached link.
*/
const Transform& getLink_H_geometry() const;
/**
* Sets the homogeneus transformation of the geometry w.r.t. the attached link.
*/
void setLink_H_geometry(const Transform& newTransform);
/**
* Returns if the material is valid, i.e. you can call getMaterial().
*/
bool isMaterialSet() const;
/**
* Returns the current material.
*/
const Material& getMaterial() const;
/**
* Sets the material. isMaterialSet will return true after this call.
*/
void setMaterial(const Material& material);
bool isSphere() const;
bool isBox() const;
bool isCylinder() const;
bool isExternalMesh() const;
// Utility methods to traverse the SolidShape class hierachy.
Sphere* asSphere();
Box *asBox();
Cylinder* asCylinder();
ExternalMesh* asExternalMesh();
const Sphere* asSphere() const;
const Box* asBox() const;
const Cylinder* asCylinder() const;
const ExternalMesh* asExternalMesh() const;
private:
std::string name;
/**
* True if the name is valid, false otherwise.
*/
bool nameIsValid;
Transform link_H_geometry;
/**
* Material of the geometry, encoded as a rgba vector.
*/
Vector4 material;
bool m_isMaterialSet;
Material m_material;
};
class Sphere: public SolidShape
{
public:
virtual ~Sphere();
virtual SolidShape* clone();
/**
* Returns the current radius.
*/
double getRadius() const;
/**
* Sets the new radius.
*/
void setRadius(double radius);
private:
double radius;
};
/**
* @brief Box, i.e. 3D rectangular parallelepiped.
*
* The box is centered in the mesh frame, its sides
* are aligned with the axis of the mesh frame, and
* the side lenghts in the x, y and z direction are given
* by the attributes x, y and z.
*/
class Box: public SolidShape
{
public:
virtual ~Box();
virtual SolidShape* clone();
/**
* Returns the current x side length.
*/
double getX() const;
/**
* Sets the x side length.
*/
void setX(double x);
/**
* Returns the current y side length.
*/
double getY() const;
/**
* Sets the y side length.
*/
void setY(double y);
/**
* Returns the current z side length.
*/
double getZ() const;
/**
* Sets the z side length.
*/
void setZ(double z);
private:
double x;
double y;
double z;
};
class Cylinder: public SolidShape
{
public:
virtual ~Cylinder();
virtual SolidShape* clone();
/**
* Returns the current cylinder length.
*/
double getLength() const;
/**
* Sets the cylinder length.
*/
void setLength(double length);
/**
* Returns the current cylinder radius.
*/
double getRadius() const;
/**
* Sets the cylinder radius.
*/
void setRadius(double radius);
private:
double length;
double radius;
};
class ExternalMesh: public SolidShape
{
public:
virtual ~ExternalMesh();
virtual SolidShape* clone();
/**
* Returns the current filename.
*/
const std::string& getFilename() const;
/**
* Returns the current package directories.
*/
const std::vector<std::string>& getPackageDirs() const;
/**
* Returns the filename substituting the prefix "package://" with the corresponding absolute path.
* The absolute path is determined by searching for the file using the paths specified in the
* packageDirs vector or if empty in the "GAZEBO_MODEL_PATH", "ROS_PACKAGE_PATH" and
* "AMENT_PREFIX_PATH" environmental variables.
*/
std::string getFileLocationOnLocalFileSystem() const;
/**
* Sets the filename.
*/
void setFilename(const std::string& filename);
/**
* Sets the the package directories.
* @note if not set the absolute path is determined by searching for the file using the
* paths specified in the "GAZEBO_MODEL_PATH", "ROS_PACKAGE_PATH" and "AMENT_PREFIX_PATH"
* environmental variables.
*/
void setPackageDirs(const std::vector<std::string>& packageDirs);
/**
* Returns the current scale.
*/
const iDynTree::Vector3& getScale() const;
/**
* Sets the scale.
*/
void setScale(const iDynTree::Vector3& scale);
private:
std::string filename;
std::vector<std::string> packageDirs;
iDynTree::Vector3 scale;
};
class ModelSolidShapes
{
private:
ModelSolidShapes& copy(const ModelSolidShapes& other);
/**
* Storage ot ModelSolidShapes.
*/
std::vector< std::vector<SolidShape *> > linkSolidShapes;
public:
ModelSolidShapes();
~ModelSolidShapes();
ModelSolidShapes(const ModelSolidShapes& other);
ModelSolidShapes& operator=(const ModelSolidShapes& other);
void clear();
void resize(size_t nrOfLinks);
void resize(const Model& model);
bool isConsistent(const Model & model) const;
std::vector<std::vector<SolidShape *> >& getLinkSolidShapes();
const std::vector<std::vector<SolidShape *> >& getLinkSolidShapes() const;
};
}
#endif
|
e2ef1136faf5e24f9d3c7746579cb65fdd157fcd
|
55d4ae08e6a455b24ad6b87e0ce9e3d840aced17
|
/include/vision/FACE_DETECTOR/Face_Detector_Cascade.h
|
44ee6972da69ccfbc4bf5d557cf973daa22bdced
|
[
"MIT"
] |
permissive
|
lanfis/Walker
|
1008fbd5e09e0c561511b8fc3c0b5e82b7cbd712
|
db174fcc0e672da7c3113571a8ce772ad2e1fac5
|
refs/heads/master
| 2020-04-12T04:54:58.842588
| 2018-12-21T11:32:28
| 2018-12-21T11:32:28
| 162,282,166
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,519
|
h
|
Face_Detector_Cascade.h
|
#pragma once
#ifndef _FACE_DETECTOR_CASCADE_H_
#define _FACE_DETECTOR_CASCADE_H_
#include <iostream>
#include <string>
#include <cstring>
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <boost/foreach.hpp>
#include <boost/filesystem.hpp>
using namespace boost::filesystem;
using namespace std;
using namespace cv;
//const string static_path = "/../ROS/ros_object/FACE/data";
//const string static_path = "/data";
class Face_Detector_Cascade
{
private:
string data_directory = "/data/haarcascades";
string fullbody_cascade_name = "/haarcascade_fullbody.xml";
string upperbody_cascade_name = "/haarcascade_upperbody.xml";
string face_cascade_name = "/haarcascade_frontalface_alt.xml";
string eyesplit_cascade_name = "/haarcascade_lefteye_2splits.xml";
string smile_cascade_name = "/haarcascade_smile.xml";
string eyeglass_cascade_name = "/haarcascade_eye_tree_eyeglasses.xml";
CascadeClassifier fullbody_cascade;
CascadeClassifier upperbody_cascade;
CascadeClassifier face_cascade;
CascadeClassifier eyesplit_cascade;
CascadeClassifier smile_cascade;
CascadeClassifier eyeglass_cascade;
public:
vector<Rect> fullbody;
vector<Rect> upperbody;
vector<Rect> face;
vector<Rect> eyesplit;
vector<Rect> smile;
vector<Rect> eyeglass;
public:
Face_Detector_Cascade();
~Face_Detector_Cascade();
void fullbody_detect(Mat& image, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize);
void upperbody_detect(Mat& image, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize);
void face_detect(Mat& image, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize);
void eyesplit_detect(Mat& image, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize);
void smile_detect(Mat& image, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize);
void eyeglass_detect(Mat& image, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize);
};
Face_Detector_Cascade::Face_Detector_Cascade()
{
boost::filesystem::path path_curt = current_path();
//data_directory = path_curt.string() + static_path + data_directory;
data_directory = path_curt.string() + data_directory;
boost::filesystem::path dir(data_directory.c_str());
if(!is_directory(dir))
boost::filesystem::create_directories(dir);
fullbody_cascade_name = data_directory + fullbody_cascade_name;
upperbody_cascade_name = data_directory + upperbody_cascade_name;
face_cascade_name = data_directory + face_cascade_name;
eyesplit_cascade_name = data_directory + eyesplit_cascade_name;
smile_cascade_name = data_directory + smile_cascade_name;
eyeglass_cascade_name = data_directory + eyeglass_cascade_name;
if( !fullbody_cascade.load( fullbody_cascade_name ) ){ cout << "Error loading "<< fullbody_cascade_name << "\n";};
if( !upperbody_cascade.load( upperbody_cascade_name ) ){ cout << "Error loading "<< upperbody_cascade_name << "\n";};
if( !face_cascade.load( face_cascade_name ) ){ cout << "Error loading "<< face_cascade_name << "\n";};
if( !eyesplit_cascade.load( eyesplit_cascade_name ) ){ cout << "Error loading "<< eyesplit_cascade_name << "\n";};
if( !smile_cascade.load( smile_cascade_name ) ){ cout << "Error loading "<< smile_cascade_name << "\n";};
if( !eyeglass_cascade.load( eyeglass_cascade_name ) ){ cout << "Error loading "<< eyeglass_cascade_name << "\n";};
//return true;
}
Face_Detector_Cascade::~Face_Detector_Cascade()
{}
void Face_Detector_Cascade::fullbody_detect(Mat& image, double scaleFactor=1.1, int minNeighbors=2, int flags=0, Size minSize=Size(10, 10), Size maxSize=Size())
{
fullbody_cascade.detectMultiScale( image, fullbody, scaleFactor, minNeighbors, flags|CV_HAAR_SCALE_IMAGE, minSize, maxSize);
}
void Face_Detector_Cascade::upperbody_detect(Mat& image, double scaleFactor=1.1, int minNeighbors=2, int flags=0, Size minSize=Size(10, 10), Size maxSize=Size())
{
upperbody_cascade.detectMultiScale( image, upperbody, scaleFactor, minNeighbors, flags|CV_HAAR_SCALE_IMAGE, minSize, maxSize);
}
void Face_Detector_Cascade::face_detect(Mat& image, double scaleFactor=1.2, int minNeighbors=2, int flags=0, Size minSize=Size(30, 30), Size maxSize=Size())
{
face_cascade.detectMultiScale( image, face, scaleFactor, minNeighbors, flags|CV_HAAR_SCALE_IMAGE, minSize, maxSize);
}
void Face_Detector_Cascade::eyesplit_detect(Mat& image, double scaleFactor=1.1, int minNeighbors=2, int flags=0, Size minSize=Size(30, 30), Size maxSize=Size())
{
eyesplit_cascade.detectMultiScale( image, eyesplit, scaleFactor, minNeighbors, flags|CV_HAAR_SCALE_IMAGE, minSize, maxSize);
}
void Face_Detector_Cascade::smile_detect(Mat& image, double scaleFactor=1.1, int minNeighbors=2, int flags=0, Size minSize=Size(30, 30), Size maxSize=Size())
{
smile_cascade.detectMultiScale( image, smile, scaleFactor, minNeighbors, flags|CV_HAAR_SCALE_IMAGE, minSize, maxSize);
}
void Face_Detector_Cascade::eyeglass_detect(Mat& image, double scaleFactor=1.1, int minNeighbors=2, int flags=0, Size minSize=Size(30, 30), Size maxSize=Size())
{
eyeglass_cascade.detectMultiScale( image, eyeglass, scaleFactor, minNeighbors, flags|CV_HAAR_SCALE_IMAGE, minSize, maxSize);
}
#endif
|
91163ab426ec55b76f36a6c22894cda0a0498153
|
2b1bd4c1a43463c6e1be7968b8d9f63d070aa2c7
|
/patterns/builder.cpp
|
0ac44ef0465272ae6f5d5e77f226b48e994994fe
|
[] |
no_license
|
jeremimucha/small_projects
|
02db0a0e7709a518b4c7e9dc0291329b0aee856c
|
1cf4304469b21a8eb85aaaf94e8ca9f3d942ef95
|
refs/heads/master
| 2021-01-23T17:42:59.682127
| 2018-06-18T20:17:48
| 2018-06-18T20:17:48
| 102,774,178
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 677
|
cpp
|
builder.cpp
|
#include <iostream>
#include <stdio.h>
#include <string>
// enum class PersistenceType {File, Queue, Pathway};
// struct PersistenceAttribute
// {
// PersistenceType type;
// std::string value;
// };
// class DistrWorkPackage
// {
// public:
// DistrWorkPackage( const char* type )
// : m_descr("Distributed work package for ")
// {
// m_descr += type;
// m_descr.reserve(200);
// }
// void set_file( const char* f, const char* v )
// {
// m_descr += "\nFile(" + f + "): " + v;
// }
// private:
// std::string m_descr;
// };
int main()
{
}
|
4295e6e85fa60062e0fb8180fa98012efe712cac
|
a7fd9d15c10cc9ef69033364f6e7db5a1b64dab2
|
/UseDonation.cpp
|
7bfc0de9cf74fd6d779ac26d5304f3c9f28f5552
|
[] |
no_license
|
centosia/FreedMan
|
463b0119c1d22051071cc3311ed33cc71c68e542
|
26434d0faf918a2cfc76110b3b405224ce348f49
|
refs/heads/master
| 2020-04-03T00:54:26.630146
| 2018-10-27T01:57:54
| 2018-10-27T01:57:54
| 154,912,765
| 0
| 0
| null | 2018-10-27T01:57:55
| 2018-10-27T01:44:01
|
Java
|
UTF-8
|
C++
| false
| false
| 147
|
cpp
|
UseDonation.cpp
|
#include<iostream>
using namespace std;
int main() {
int don;
cin>>don;
if(don > 0) {
cout<<"thnak";
} else {
cout<<"bad";
}
}
|
f2bd89db68b9fd56e11c450114d6d7c45ac0560a
|
e76fd71cd1d8ba85ec65d1f5aca615144de4908c
|
/src/arrowcube.h
|
63611543cd0064f423b52875c98b5d4ddebfd24c
|
[
"MIT"
] |
permissive
|
hdc-arizona/pothos
|
9b448bc651e18f1f65b08d3724427b21d6f074b9
|
5b75dd71ee2babd2860245bb4ffb1d489d5531be
|
refs/heads/master
| 2021-06-23T18:24:02.867727
| 2021-03-09T19:42:24
| 2021-03-09T19:42:24
| 206,234,184
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,732
|
h
|
arrowcube.h
|
#pragma once
namespace nc2 {
// This is a "naivecube" backed by an arrow table.
// There should be n total columns: n-1 of those columns have type UInt64 and correspond to addresses,
// and the nth column corresponds to the summary to be aggregated
//
// row-by-row insertion will be exceedingly slow;
// consider using "insert_table" instead of
struct ArrowCube
{
std::shared_ptr<arrow::Table> table_;
std::vector<std::string> address_columns_;
std::string summary_column_;
public:
explicit ArrowCube(std::shared_ptr<arrow::Table> table_,
const std::vector<std::string> address_columns_):
table_(table_),
address_columns_(address_columns_) {}
void insert_table(std::shared_ptr<arrow::Table>);
template <typename Summary, typename SummaryPolicy>
void range_query(
SummaryPolicy &policy,
const std::vector<std::pair<uint64_t, uint64_t> > &bounds) const;
template <typename Summary, typename SummaryPolicy>
void range_query(
SummaryPolicy &policy,
const std::vector<std::pair<uint64_t, uint64_t> > &bounds,
const std::vector<std::string> &other_column_names) const;
};
void ArrowCube::insert_table(std::shared_ptr<arrow::Table> new_table)
{
// FIXME we should ensure that the schemata are compatible before
// doing this right away
table_ = arrow::ConcatenateTables({ table_, new_table }).ValueOrDie();
}
template <typename Summary, typename SummaryPolicy>
void ArrowCube::range_query(
SummaryPolicy &policy,
const std::vector<std::pair<uint64_t, uint64_t> > &bounds) const
{
std::vector<std::string> other_column_names;
range_query<Summary, SummaryPolicy>(policy, bounds, other_column_names);
}
template <typename Summary, typename SummaryPolicy>
void ArrowCube::range_query(
SummaryPolicy &policy,
const std::vector<std::pair<uint64_t, uint64_t> > &bounds,
const std::vector<std::string> &other_column_names) const
{
std::vector<ChunkedArrayIterator> itors;
for (auto &col: address_columns_) {
itors.push_back(ChunkedArrayIterator(table_->GetColumnByName(col)));
}
for (auto &other: other_column_names) {
itors.push_back(ChunkedArrayIterator(table_->GetColumnByName(other)));
}
RowIterator rows(itors);
while (!rows.next(true)) {
bool in_bounds = true;
for (size_t i = 0; i < bounds.size(); ++i) {
const std::pair<uint64_t, uint64_t> &bound = bounds[i];
if (rows.cols_[i].is_null()) {
in_bounds = false;
break;
}
uint64_t v = rows.cols_[i].value<arrow::UInt32Type>();
if (v < bound.first || v >= bound.second) {
in_bounds = false;
break;
}
}
if (in_bounds) {
policy.add(rows);
}
}
}
};
|
17828f2fc6b506af1354e0936c048c821811fe43
|
aa17ac0218f91596ceb6ebfa3b04d83974961221
|
/interpreter/singleton_value_expr.cc
|
33d6fa5714744f21659aca4d9d3a080c1c037fe7
|
[
"Apache-2.0"
] |
permissive
|
Netflix-Skunkworks/atlas-native-client
|
15fdd7298b9e43eb5e092947260d8e1d2fea9a1e
|
498ea991fb631a0ce64b178c195369f81b323ae3
|
refs/heads/main
| 2023-09-04T21:05:30.736847
| 2022-03-31T22:03:29
| 2022-03-31T22:03:29
| 102,539,821
| 3
| 8
|
Apache-2.0
| 2022-03-31T22:18:46
| 2017-09-05T23:34:04
|
C++
|
UTF-8
|
C++
| false
| false
| 629
|
cc
|
singleton_value_expr.cc
|
#include "singleton_value_expr.h"
namespace atlas {
namespace interpreter {
SingletonValueExpr::SingletonValueExpr(std::shared_ptr<ValueExpression> expr)
: expr_(std::move(expr)) {}
TagsValuePairs SingletonValueExpr::Apply(const TagsValuePairs& measurements) {
auto expr_result = expr_->Apply(measurements);
auto v = expr_result->value();
if (std::isnan(v)) {
return {};
}
return {TagsValuePair::of(expr_result->all_tags(), v)};
}
std::ostream& SingletonValueExpr::Dump(std::ostream& os) const {
os << "SingletonVE{expr=" << *expr_ << "}";
return os;
}
} // namespace interpreter
} // namespace atlas
|
f9274a0be7b2d9388185d8b88aae9b8737232683
|
8ca9d1f00bcb2a7c41eb2c92971f9f709f22a802
|
/CS201 Homeworks/akillioglu_akıllıoğlu_kerem_hw3/akillioglu_akıllıoğlu_kerem_hw3.cpp
|
21e12e36810d6e28db0fdbf1369cbe930f6e5184
|
[] |
no_license
|
keremakillioglu/SabanciCS
|
7cb460aa5973a975bcdc28ba75e245ab31697566
|
b8b6706acb80fa6a5da41e46f401486684ff0e81
|
refs/heads/master
| 2021-04-12T10:59:31.015205
| 2020-10-30T10:43:52
| 2020-10-30T10:43:52
| 126,732,539
| 0
| 0
| null | null | null | null |
ISO-8859-13
|
C++
| false
| false
| 4,544
|
cpp
|
akillioglu_akıllıoğlu_kerem_hw3.cpp
|
#include "robots.h" //KEREM AKILLIOŠLU 24179
using namespace std; //Necessary libraries added
bool isfirstsmallest(int x, int y, int z) //finds the smallest number, at my main function; it will help me to calculate shortest distance
{
if (x<=y && (x<=z)) //if the first written variable is the smallest number bool returns true
{return true;
}
else
{return false; //if the first written variable is not the smallest number bool returns false
}
}
bool terminate (int a) // if user's input is smaller than 0, program will terminate itself
{
if (a >= 0)
{return true;}
else
{ ShowMessage("The coordinate is entered as wrong and your program should come to the end"); //error message is shown
return false;} //the structure for terminating the program has been set
}
void turneast(Robot & sinan) // this function affects my created robot and it ables to make robot face east all the time
{
while (! sinan.FacingEast() ) // loop created and if robot is not facing east
{
sinan.TurnRight(); // robot turns right until the robot faces east
}
}
void turn180(Robot & sinan) //this function ables robot to turn 180 degrees
{
sinan.TurnRight();
sinan.TurnRight();
}
void turn270(Robot & sinan) //this function ables robot to turn 270 degrees
{
sinan.TurnRight();
sinan.TurnRight();
sinan.TurnRight();
}
void turn90right(Robot & sinan) //this function ables robot to turn 90 degrees
{
sinan.TurnRight();
}
void yallah (int x, int y, Robot & sinan) // these x and y values will refer to "user input-target" in the following
{ //yallah function provides my robot to move in x and y direction
if (x>=0) //MOVEMENT IN X-DIRECTION. If the input's difference between target is positive these lines will be realized
{ turneast(sinan);
sinan.Move(abs(x));}
else //if the input's difference between target is negative these lines will be realized
{ turneast(sinan);
turn180(sinan);
sinan.Move (abs(x));}
if (y>=0) //MOVEMENT IN Y-DIRECTION. If the input's difference between target is positive these lines will be realized
{ turneast(sinan);
turn270(sinan);
sinan.Move(abs(y));}
else //MOVEMENT IN Y-DIRECTION. If the input's difference between target is negative these lines will be realized
{ turneast(sinan);
turn90right(sinan);
sinan.Move(abs(y));}
turneast(sinan); //after the final movement robot turns to east
}
int main ()
{
int inputx, inputy ; //user will input a x and y value. They will be integers and defined here
GetInput("Please enter an x value: ", inputx); //I ask user to enter a x value
if (terminate (inputx)) //if written value is lower than 0, program will terminate itself
{
GetInput("Please enter a y value: ", inputy); //I ask user to enter a y value
if(terminate(inputy)) //if written value is lower than 0, program will terminate itself
{
int distance1= abs(abs(inputx-8)+abs(inputy-6)); //absolute value of distance difference is calculated for each of targets.
int distance2= abs(abs(inputx-2)+abs(inputy-3));
int distance3= abs(abs(inputx-4)+abs(inputy-10));
Robot sinan (inputx, inputy); //user decides on a x and y value and plugs an input, robot is created in that location
sinan.SetColor(yellow);
if (isfirstsmallest(distance1, distance2, distance3)) //distance comparison is held by the bool function
{
yallah(8-inputx, 6-inputy,sinan); //if the input is close to target 1, locomotion will be initialized
sinan.SetColor(blue); // when robot moves to its first target it changes its color as blue
yallah(-4,4, sinan); //then robot will move to its next targets as defined in the homework instructions
yallah(-2,-7,sinan);
}
else if (isfirstsmallest(distance2, distance3, distance1))
{
yallah(2-inputx,3-inputy,sinan); //if the input is close to target 2, locomotion will be initialized
sinan.SetColor(blue); // when robot moves to its first target it changes its color as blue.
yallah(2,7, sinan); //then robot will move to its next targets as defined in the homework instructions
yallah(4,-4,sinan);
}
else if (isfirstsmallest(distance3, distance2, distance1))
{
yallah(4-inputx,10-inputy,sinan); //if the input is close to target 3, locomotion will be initialized
sinan.SetColor(blue); // when robot moves to its first target it changes its color as blue
yallah(4,-4, sinan); //then robot will move to its next targets as defined in the homework instructions
yallah(-6,-3,sinan);
}
return 0;
}
}
}
|
395eefa343ac6c441fd02b5e96d922a01ead32f8
|
07327b5e8b2831b12352bf7c6426bfda60129da7
|
/Include/10.0.14393.0/winrt/windows.devices.midi.h
|
6bd148688552175896e007acd34a89fd7d8c6103
|
[] |
no_license
|
tpn/winsdk-10
|
ca279df0fce03f92036e90fb04196d6282a264b7
|
9b69fd26ac0c7d0b83d378dba01080e93349c2ed
|
refs/heads/master
| 2021-01-10T01:56:18.586459
| 2018-02-19T21:26:31
| 2018-02-19T21:29:50
| 44,352,845
| 218
| 432
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 276,717
|
h
|
windows.devices.midi.h
|
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.01.0618 */
/* @@MIDL_FILE_HEADING( ) */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __windows2Edevices2Emidi_h__
#define __windows2Edevices2Emidi_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_FWD_DEFINED__
#define ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_FWD_DEFINED__
typedef interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort;
#endif /* ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_FWD_DEFINED__ */
#ifndef ____FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_FWD_DEFINED__
#define ____FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_FWD_DEFINED__
typedef interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort;
#endif /* ____FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_FWD_DEFINED__ */
#ifndef ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_FWD_DEFINED__
#define ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_FWD_DEFINED__
typedef interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort;
#endif /* ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_FWD_DEFINED__ */
#ifndef ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_FWD_DEFINED__
#define ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_FWD_DEFINED__
typedef interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort;
#endif /* ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_FWD_DEFINED__ */
#ifndef ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_FWD_DEFINED__
#define ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_FWD_DEFINED__
typedef interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer;
#endif /* ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_FWD_DEFINED__ */
#ifndef ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_FWD_DEFINED__
#define ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_FWD_DEFINED__
typedef interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer;
#endif /* ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_FWD_DEFINED__ */
#ifndef ____FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_FWD_DEFINED__
#define ____FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_FWD_DEFINED__
typedef interface __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs;
#endif /* ____FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiChannelPressureMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiChannelPressureMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiControlChangeMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiControlChangeMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiInPort;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiInPortStatics;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiMessageReceivedEventArgs;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiNoteOffMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiNoteOffMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiNoteOnMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiNoteOnMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiOutPort;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiOutPortStatics;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiPitchBendChangeMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiPitchBendChangeMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiPolyphonicKeyPressureMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiPolyphonicKeyPressureMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiProgramChangeMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiProgramChangeMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiSongPositionPointerMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiSongPositionPointerMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiSongSelectMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiSongSelectMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiSynthesizer;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiSynthesizerStatics;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiSystemExclusiveMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiTimeCodeMessage;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_FWD_DEFINED__ */
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory;
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiTimeCodeMessageFactory;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
#endif /* __cplusplus */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_FWD_DEFINED__ */
/* header files for imported files */
#include "inspectable.h"
#include "AsyncInfo.h"
#include "EventToken.h"
#include "Windows.Foundation.h"
#include "Windows.Devices.Enumeration.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0000 */
/* [local] */
#ifdef __cplusplus
} /*extern "C"*/
#endif
#include <windows.foundation.collections.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiOutPort;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0000 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0000_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3111 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3111 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3111_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3111_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0001 */
/* [local] */
#ifndef DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_USE
#define DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_USE
#if defined(__cplusplus) && !defined(RO_NO_TEMPLATE_NAME)
} /*extern "C"*/
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("eed37805-2a49-59b4-b4d4-1188c6819122"))
IAsyncOperationCompletedHandler<ABI::Windows::Devices::Midi::IMidiOutPort*> : IAsyncOperationCompletedHandler_impl<ABI::Windows::Devices::Midi::IMidiOutPort*> {
static const wchar_t* z_get_rc_name_impl() {
return L"Windows.Foundation.AsyncOperationCompletedHandler`1<Windows.Devices.Midi.IMidiOutPort>"; }
};
typedef IAsyncOperationCompletedHandler<ABI::Windows::Devices::Midi::IMidiOutPort*> __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_t;
#define ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_FWD_DEFINED__
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort ABI::Windows::Foundation::__FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_t
/* ABI */ } /* Windows */ } /* Foundation */ }
extern "C" {
#endif //__cplusplus
#endif /* DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_USE */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0001 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0001_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0001_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3112 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3112 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3112_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3112_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0002 */
/* [local] */
#ifndef DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_USE
#define DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_USE
#if defined(__cplusplus) && !defined(RO_NO_TEMPLATE_NAME)
} /*extern "C"*/
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("32699a4d-1cc0-5a1c-9da6-875197875086"))
IAsyncOperation<ABI::Windows::Devices::Midi::IMidiOutPort*> : IAsyncOperation_impl<ABI::Windows::Devices::Midi::IMidiOutPort*> {
static const wchar_t* z_get_rc_name_impl() {
return L"Windows.Foundation.IAsyncOperation`1<Windows.Devices.Midi.IMidiOutPort>"; }
};
typedef IAsyncOperation<ABI::Windows::Devices::Midi::IMidiOutPort*> __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_t;
#define ____FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_FWD_DEFINED__
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_t
/* ABI */ } /* Windows */ } /* Foundation */ }
extern "C" {
#endif //__cplusplus
#endif /* DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_USE */
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiInPort;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiInPort;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0002 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0002_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0002_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3113 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3113 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3113_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3113_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0003 */
/* [local] */
#ifndef DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_USE
#define DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_USE
#if defined(__cplusplus) && !defined(RO_NO_TEMPLATE_NAME)
} /*extern "C"*/
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("6c090fb2-8099-558f-8a92-9a8ea806e6fb"))
IAsyncOperationCompletedHandler<ABI::Windows::Devices::Midi::MidiInPort*> : IAsyncOperationCompletedHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Devices::Midi::MidiInPort*, ABI::Windows::Devices::Midi::IMidiInPort*>> {
static const wchar_t* z_get_rc_name_impl() {
return L"Windows.Foundation.AsyncOperationCompletedHandler`1<Windows.Devices.Midi.MidiInPort>"; }
};
typedef IAsyncOperationCompletedHandler<ABI::Windows::Devices::Midi::MidiInPort*> __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_t;
#define ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_FWD_DEFINED__
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort ABI::Windows::Foundation::__FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_t
/* ABI */ } /* Windows */ } /* Foundation */ }
extern "C" {
#endif //__cplusplus
#endif /* DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_USE */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0003 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0003_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0003_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3114 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3114 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3114_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3114_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0004 */
/* [local] */
#ifndef DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_USE
#define DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_USE
#if defined(__cplusplus) && !defined(RO_NO_TEMPLATE_NAME)
} /*extern "C"*/
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("cc664f0e-edb1-55c8-9ef7-ec9007e4561c"))
IAsyncOperation<ABI::Windows::Devices::Midi::MidiInPort*> : IAsyncOperation_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Devices::Midi::MidiInPort*, ABI::Windows::Devices::Midi::IMidiInPort*>> {
static const wchar_t* z_get_rc_name_impl() {
return L"Windows.Foundation.IAsyncOperation`1<Windows.Devices.Midi.MidiInPort>"; }
};
typedef IAsyncOperation<ABI::Windows::Devices::Midi::MidiInPort*> __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_t;
#define ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_FWD_DEFINED__
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_t
/* ABI */ } /* Windows */ } /* Foundation */ }
extern "C" {
#endif //__cplusplus
#endif /* DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_USE */
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiSynthesizer;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiSynthesizer;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0004 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0004_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0004_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3115 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3115 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3115_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3115_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0005 */
/* [local] */
#ifndef DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_USE
#define DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_USE
#if defined(__cplusplus) && !defined(RO_NO_TEMPLATE_NAME)
} /*extern "C"*/
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("5d716335-d087-516f-ad0a-63f61cbcf342"))
IAsyncOperationCompletedHandler<ABI::Windows::Devices::Midi::MidiSynthesizer*> : IAsyncOperationCompletedHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Devices::Midi::MidiSynthesizer*, ABI::Windows::Devices::Midi::IMidiSynthesizer*>> {
static const wchar_t* z_get_rc_name_impl() {
return L"Windows.Foundation.AsyncOperationCompletedHandler`1<Windows.Devices.Midi.MidiSynthesizer>"; }
};
typedef IAsyncOperationCompletedHandler<ABI::Windows::Devices::Midi::MidiSynthesizer*> __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_t;
#define ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_FWD_DEFINED__
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer ABI::Windows::Foundation::__FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_t
/* ABI */ } /* Windows */ } /* Foundation */ }
extern "C" {
#endif //__cplusplus
#endif /* DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_USE */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0005 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0005_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0005_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3116 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3116 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3116_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3116_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0006 */
/* [local] */
#ifndef DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_USE
#define DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_USE
#if defined(__cplusplus) && !defined(RO_NO_TEMPLATE_NAME)
} /*extern "C"*/
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("9388b978-13f1-5e37-8133-94430d90dd50"))
IAsyncOperation<ABI::Windows::Devices::Midi::MidiSynthesizer*> : IAsyncOperation_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Devices::Midi::MidiSynthesizer*, ABI::Windows::Devices::Midi::IMidiSynthesizer*>> {
static const wchar_t* z_get_rc_name_impl() {
return L"Windows.Foundation.IAsyncOperation`1<Windows.Devices.Midi.MidiSynthesizer>"; }
};
typedef IAsyncOperation<ABI::Windows::Devices::Midi::MidiSynthesizer*> __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_t;
#define ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_FWD_DEFINED__
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer ABI::Windows::Foundation::__FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_t
/* ABI */ } /* Windows */ } /* Foundation */ }
extern "C" {
#endif //__cplusplus
#endif /* DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_USE */
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiMessageReceivedEventArgs;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
interface IMidiMessageReceivedEventArgs;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0006 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0006_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0006_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3117 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3117 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3117_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3117_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0007 */
/* [local] */
#ifndef DEF___FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_USE
#define DEF___FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_USE
#if defined(__cplusplus) && !defined(RO_NO_TEMPLATE_NAME)
} /*extern "C"*/
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("50017240-cc39-5775-8a6b-f6f22386bfca"))
ITypedEventHandler<ABI::Windows::Devices::Midi::MidiInPort*,ABI::Windows::Devices::Midi::MidiMessageReceivedEventArgs*> : ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Devices::Midi::MidiInPort*, ABI::Windows::Devices::Midi::IMidiInPort*>,ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Devices::Midi::MidiMessageReceivedEventArgs*, ABI::Windows::Devices::Midi::IMidiMessageReceivedEventArgs*>> {
static const wchar_t* z_get_rc_name_impl() {
return L"Windows.Foundation.TypedEventHandler`2<Windows.Devices.Midi.MidiInPort, Windows.Devices.Midi.MidiMessageReceivedEventArgs>"; }
};
typedef ITypedEventHandler<ABI::Windows::Devices::Midi::MidiInPort*,ABI::Windows::Devices::Midi::MidiMessageReceivedEventArgs*> __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_t;
#define ____FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_FWD_DEFINED__
#define __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_t
/* ABI */ } /* Windows */ } /* Foundation */ }
extern "C" {
#endif //__cplusplus
#endif /* DEF___FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_USE */
#if defined(__cplusplus)
}
#endif // defined(__cplusplus)
#include <Windows.Foundation.h>
#if !defined(__windows2Edevices2Eenumeration_h__)
#include <Windows.Devices.Enumeration.h>
#endif // !defined(__windows2Edevices2Eenumeration_h__)
#if !defined(__windows2Estorage2Estreams_h__)
#include <Windows.Storage.Streams.h>
#endif // !defined(__windows2Estorage2Estreams_h__)
#if defined(__cplusplus)
extern "C" {
#endif // defined(__cplusplus)
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Enumeration {
class DeviceInformation;
} /*Enumeration*/
} /*Devices*/
} /*Windows*/
}
#endif
#if !defined(__cplusplus)
typedef struct __x_ABI_CWindows_CFoundation_CTimeSpan __x_ABI_CWindows_CFoundation_CTimeSpan;
#endif
#if !defined(__cplusplus)
#if !defined(__cplusplus)
typedef enum __x_ABI_CWindows_CDevices_CMidi_CMidiMessageType __x_ABI_CWindows_CDevices_CMidi_CMidiMessageType;
#endif /* end if !defined(__cplusplus) */
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiActiveSensingMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiChannelPressureMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiContinueMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiControlChangeMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiNoteOffMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiNoteOnMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiOutPort;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiPitchBendChangeMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiPolyphonicKeyPressureMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiProgramChangeMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiSongPositionPointerMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiSongSelectMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiStartMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiStopMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiSystemExclusiveMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiSystemResetMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiTimeCodeMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiTimingClockMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
#ifdef __cplusplus
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
class MidiTuneRequestMessage;
} /*Midi*/
} /*Devices*/
} /*Windows*/
}
#endif
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0007 */
/* [local] */
#ifdef __cplusplus
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Foundation {
typedef struct TimeSpan TimeSpan;
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#endif
#ifdef __cplusplus
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
typedef enum MidiMessageType MidiMessageType;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#endif
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0007_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0007_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3118 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3118 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3118_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3118_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0008 */
/* [local] */
#ifndef DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort
#define DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort
#if !defined(__cplusplus) || defined(RO_NO_TEMPLATE_NAME)
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0008 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0008_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0008_v0_0_s_ifspec;
#ifndef ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_INTERFACE_DEFINED__
#define ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_INTERFACE_DEFINED__
/* interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort */
/* [unique][uuid][object] */
/* interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort */
/* [unique][uuid][object] */
EXTERN_C const IID IID___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("eed37805-2a49-59b4-b4d4-1188c6819122")
__FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Invoke(
/* [in] */ __RPC__in_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort *asyncInfo,
/* [in] */ AsyncStatus status) = 0;
};
#else /* C style interface */
typedef struct __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPortVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort * This);
HRESULT ( STDMETHODCALLTYPE *Invoke )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort * This,
/* [in] */ __RPC__in_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort *asyncInfo,
/* [in] */ AsyncStatus status);
END_INTERFACE
} __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPortVtbl;
interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort
{
CONST_VTBL struct __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPortVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_Invoke(This,asyncInfo,status) \
( (This)->lpVtbl -> Invoke(This,asyncInfo,status) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0009 */
/* [local] */
#endif /* pinterface */
#endif /* DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0009 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0009_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0009_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3119 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3119 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3119_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3119_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0010 */
/* [local] */
#ifndef DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort
#define DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort
#if !defined(__cplusplus) || defined(RO_NO_TEMPLATE_NAME)
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0010 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0010_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0010_v0_0_s_ifspec;
#ifndef ____FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_INTERFACE_DEFINED__
#define ____FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_INTERFACE_DEFINED__
/* interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort */
/* [unique][uuid][object] */
/* interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort */
/* [unique][uuid][object] */
EXTERN_C const IID IID___FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("32699a4d-1cc0-5a1c-9da6-875197875086")
__FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort : public IInspectable
{
public:
virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Completed(
/* [in] */ __RPC__in_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort *handler) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Completed(
/* [retval][out] */ __RPC__deref_out_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort **handler) = 0;
virtual HRESULT STDMETHODCALLTYPE GetResults(
/* [retval][out] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiOutPort **results) = 0;
};
#else /* C style interface */
typedef struct __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPortVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Completed )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort * This,
/* [in] */ __RPC__in_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort *handler);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Completed )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort * This,
/* [retval][out] */ __RPC__deref_out_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CIMidiOutPort **handler);
HRESULT ( STDMETHODCALLTYPE *GetResults )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort * This,
/* [retval][out] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort **results);
END_INTERFACE
} __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPortVtbl;
interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort
{
CONST_VTBL struct __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPortVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_put_Completed(This,handler) \
( (This)->lpVtbl -> put_Completed(This,handler) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_get_Completed(This,handler) \
( (This)->lpVtbl -> get_Completed(This,handler) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_GetResults(This,results) \
( (This)->lpVtbl -> GetResults(This,results) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0011 */
/* [local] */
#endif /* pinterface */
#endif /* DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0011 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0011_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0011_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3120 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3120 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3120_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3120_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0012 */
/* [local] */
#ifndef DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort
#define DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort
#if !defined(__cplusplus) || defined(RO_NO_TEMPLATE_NAME)
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0012 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0012_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0012_v0_0_s_ifspec;
#ifndef ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_INTERFACE_DEFINED__
#define ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_INTERFACE_DEFINED__
/* interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort */
/* [unique][uuid][object] */
/* interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort */
/* [unique][uuid][object] */
EXTERN_C const IID IID___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("6c090fb2-8099-558f-8a92-9a8ea806e6fb")
__FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Invoke(
/* [in] */ __RPC__in_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort *asyncInfo,
/* [in] */ AsyncStatus status) = 0;
};
#else /* C style interface */
typedef struct __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPortVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort * This);
HRESULT ( STDMETHODCALLTYPE *Invoke )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort * This,
/* [in] */ __RPC__in_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort *asyncInfo,
/* [in] */ AsyncStatus status);
END_INTERFACE
} __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPortVtbl;
interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort
{
CONST_VTBL struct __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPortVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_Invoke(This,asyncInfo,status) \
( (This)->lpVtbl -> Invoke(This,asyncInfo,status) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0013 */
/* [local] */
#endif /* pinterface */
#endif /* DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0013 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0013_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0013_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3121 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3121 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3121_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3121_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0014 */
/* [local] */
#ifndef DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort
#define DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort
#if !defined(__cplusplus) || defined(RO_NO_TEMPLATE_NAME)
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0014 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0014_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0014_v0_0_s_ifspec;
#ifndef ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_INTERFACE_DEFINED__
#define ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_INTERFACE_DEFINED__
/* interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort */
/* [unique][uuid][object] */
/* interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort */
/* [unique][uuid][object] */
EXTERN_C const IID IID___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("cc664f0e-edb1-55c8-9ef7-ec9007e4561c")
__FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort : public IInspectable
{
public:
virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Completed(
/* [in] */ __RPC__in_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort *handler) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Completed(
/* [retval][out] */ __RPC__deref_out_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort **handler) = 0;
virtual HRESULT STDMETHODCALLTYPE GetResults(
/* [retval][out] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiInPort **results) = 0;
};
#else /* C style interface */
typedef struct __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPortVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Completed )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort * This,
/* [in] */ __RPC__in_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort *handler);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Completed )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort * This,
/* [retval][out] */ __RPC__deref_out_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiInPort **handler);
HRESULT ( STDMETHODCALLTYPE *GetResults )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort * This,
/* [retval][out] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort **results);
END_INTERFACE
} __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPortVtbl;
interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort
{
CONST_VTBL struct __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPortVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_put_Completed(This,handler) \
( (This)->lpVtbl -> put_Completed(This,handler) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_get_Completed(This,handler) \
( (This)->lpVtbl -> get_Completed(This,handler) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_GetResults(This,results) \
( (This)->lpVtbl -> GetResults(This,results) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0015 */
/* [local] */
#endif /* pinterface */
#endif /* DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0015 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0015_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0015_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3122 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3122 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3122_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3122_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0016 */
/* [local] */
#ifndef DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer
#define DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer
#if !defined(__cplusplus) || defined(RO_NO_TEMPLATE_NAME)
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0016 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0016_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0016_v0_0_s_ifspec;
#ifndef ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_INTERFACE_DEFINED__
#define ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_INTERFACE_DEFINED__
/* interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer */
/* [unique][uuid][object] */
/* interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer */
/* [unique][uuid][object] */
EXTERN_C const IID IID___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("5d716335-d087-516f-ad0a-63f61cbcf342")
__FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Invoke(
/* [in] */ __RPC__in_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer *asyncInfo,
/* [in] */ AsyncStatus status) = 0;
};
#else /* C style interface */
typedef struct __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizerVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer * This);
HRESULT ( STDMETHODCALLTYPE *Invoke )(
__RPC__in __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer * This,
/* [in] */ __RPC__in_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer *asyncInfo,
/* [in] */ AsyncStatus status);
END_INTERFACE
} __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizerVtbl;
interface __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer
{
CONST_VTBL struct __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizerVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_Invoke(This,asyncInfo,status) \
( (This)->lpVtbl -> Invoke(This,asyncInfo,status) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0017 */
/* [local] */
#endif /* pinterface */
#endif /* DEF___FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0017 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0017_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0017_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3123 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3123 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3123_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3123_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0018 */
/* [local] */
#ifndef DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer
#define DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer
#if !defined(__cplusplus) || defined(RO_NO_TEMPLATE_NAME)
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0018 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0018_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0018_v0_0_s_ifspec;
#ifndef ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_INTERFACE_DEFINED__
#define ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_INTERFACE_DEFINED__
/* interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer */
/* [unique][uuid][object] */
/* interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer */
/* [unique][uuid][object] */
EXTERN_C const IID IID___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("9388b978-13f1-5e37-8133-94430d90dd50")
__FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer : public IInspectable
{
public:
virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Completed(
/* [in] */ __RPC__in_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer *handler) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Completed(
/* [retval][out] */ __RPC__deref_out_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer **handler) = 0;
virtual HRESULT STDMETHODCALLTYPE GetResults(
/* [retval][out] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiSynthesizer **results) = 0;
};
#else /* C style interface */
typedef struct __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizerVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Completed )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer * This,
/* [in] */ __RPC__in_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer *handler);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Completed )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer * This,
/* [retval][out] */ __RPC__deref_out_opt __FIAsyncOperationCompletedHandler_1_Windows__CDevices__CMidi__CMidiSynthesizer **handler);
HRESULT ( STDMETHODCALLTYPE *GetResults )(
__RPC__in __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer * This,
/* [retval][out] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer **results);
END_INTERFACE
} __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizerVtbl;
interface __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer
{
CONST_VTBL struct __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizerVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_put_Completed(This,handler) \
( (This)->lpVtbl -> put_Completed(This,handler) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_get_Completed(This,handler) \
( (This)->lpVtbl -> get_Completed(This,handler) )
#define __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_GetResults(This,results) \
( (This)->lpVtbl -> GetResults(This,results) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0019 */
/* [local] */
#endif /* pinterface */
#endif /* DEF___FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0019 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0019_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0019_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3124 */
/* interface __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3124 */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3124_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi2Eidl_0000_3124_v0_0_s_ifspec;
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0020 */
/* [local] */
#ifndef DEF___FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs
#define DEF___FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs
#if !defined(__cplusplus) || defined(RO_NO_TEMPLATE_NAME)
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0020 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0020_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0020_v0_0_s_ifspec;
#ifndef ____FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_INTERFACE_DEFINED__
#define ____FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_INTERFACE_DEFINED__
/* interface __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs */
/* [unique][uuid][object] */
/* interface __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs */
/* [unique][uuid][object] */
EXTERN_C const IID IID___FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("50017240-cc39-5775-8a6b-f6f22386bfca")
__FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Invoke(
/* [in] */ __RPC__in_opt ABI::Windows::Devices::Midi::IMidiInPort *sender,
/* [in] */ __RPC__in_opt ABI::Windows::Devices::Midi::IMidiMessageReceivedEventArgs *e) = 0;
};
#else /* C style interface */
typedef struct __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs * This);
HRESULT ( STDMETHODCALLTYPE *Invoke )(
__RPC__in __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs * This,
/* [in] */ __RPC__in_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort *sender,
/* [in] */ __RPC__in_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs *e);
END_INTERFACE
} __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgsVtbl;
interface __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs
{
CONST_VTBL struct __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_Invoke(This,sender,e) \
( (This)->lpVtbl -> Invoke(This,sender,e) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0021 */
/* [local] */
#endif /* pinterface */
#endif /* DEF___FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs */
#if !defined(__cplusplus)
#if !defined(__cplusplus)
/* [v1_enum] */
enum __x_ABI_CWindows_CDevices_CMidi_CMidiMessageType
{
MidiMessageType_None = 0,
MidiMessageType_NoteOff = 128,
MidiMessageType_NoteOn = 144,
MidiMessageType_PolyphonicKeyPressure = 160,
MidiMessageType_ControlChange = 176,
MidiMessageType_ProgramChange = 192,
MidiMessageType_ChannelPressure = 208,
MidiMessageType_PitchBendChange = 224,
MidiMessageType_SystemExclusive = 240,
MidiMessageType_MidiTimeCode = 241,
MidiMessageType_SongPositionPointer = 242,
MidiMessageType_SongSelect = 243,
MidiMessageType_TuneRequest = 246,
MidiMessageType_EndSystemExclusive = 247,
MidiMessageType_TimingClock = 248,
MidiMessageType_Start = 250,
MidiMessageType_Continue = 251,
MidiMessageType_Stop = 252,
MidiMessageType_ActiveSensing = 254,
MidiMessageType_SystemReset = 255
} ;
#endif /* end if !defined(__cplusplus) */
#endif
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiChannelPressureMessage[] = L"Windows.Devices.Midi.IMidiChannelPressureMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0021 */
/* [local] */
#ifdef __cplusplus
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
/* [v1_enum] */
enum MidiMessageType
{
MidiMessageType_None = 0,
MidiMessageType_NoteOff = 128,
MidiMessageType_NoteOn = 144,
MidiMessageType_PolyphonicKeyPressure = 160,
MidiMessageType_ControlChange = 176,
MidiMessageType_ProgramChange = 192,
MidiMessageType_ChannelPressure = 208,
MidiMessageType_PitchBendChange = 224,
MidiMessageType_SystemExclusive = 240,
MidiMessageType_MidiTimeCode = 241,
MidiMessageType_SongPositionPointer = 242,
MidiMessageType_SongSelect = 243,
MidiMessageType_TuneRequest = 246,
MidiMessageType_EndSystemExclusive = 247,
MidiMessageType_TimingClock = 248,
MidiMessageType_Start = 250,
MidiMessageType_Continue = 251,
MidiMessageType_Stop = 252,
MidiMessageType_ActiveSensing = 254,
MidiMessageType_SystemReset = 255
} ;
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#endif
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0021_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0021_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiChannelPressureMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("BE1FA860-62B4-4D52-A37E-92E54D35B909")
IMidiChannelPressureMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Channel(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Pressure(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiChannelPressureMessage = __uuidof(IMidiChannelPressureMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Pressure )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_get_Channel(This,value) \
( (This)->lpVtbl -> get_Channel(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_get_Pressure(This,value) \
( (This)->lpVtbl -> get_Pressure(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0022 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiChannelPressureMessageFactory[] = L"Windows.Devices.Midi.IMidiChannelPressureMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0022 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0022_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0022_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiChannelPressureMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("6218ED2F-2284-412A-94CF-10FB04842C6C")
IMidiChannelPressureMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiChannelPressureMessage(
/* [in] */ BYTE channel,
/* [in] */ BYTE pressure,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiChannelPressureMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiChannelPressureMessageFactory = __uuidof(IMidiChannelPressureMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiChannelPressureMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory * This,
/* [in] */ BYTE channel,
/* [in] */ BYTE pressure,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_CreateMidiChannelPressureMessage(This,channel,pressure,value) \
( (This)->lpVtbl -> CreateMidiChannelPressureMessage(This,channel,pressure,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiChannelPressureMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0023 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiControlChangeMessage[] = L"Windows.Devices.Midi.IMidiControlChangeMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0023 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0023_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0023_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiControlChangeMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("B7E15F83-780D-405F-B781-3E1598C97F40")
IMidiControlChangeMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Channel(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Controller(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ControlValue(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiControlChangeMessage = __uuidof(IMidiControlChangeMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Controller )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ControlValue )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_get_Channel(This,value) \
( (This)->lpVtbl -> get_Channel(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_get_Controller(This,value) \
( (This)->lpVtbl -> get_Controller(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_get_ControlValue(This,value) \
( (This)->lpVtbl -> get_ControlValue(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0024 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiControlChangeMessageFactory[] = L"Windows.Devices.Midi.IMidiControlChangeMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0024 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0024_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0024_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiControlChangeMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("2AB14321-956C-46AD-9752-F87F55052FE3")
IMidiControlChangeMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiControlChangeMessage(
/* [in] */ BYTE channel,
/* [in] */ BYTE controller,
/* [in] */ BYTE controlValue,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiControlChangeMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiControlChangeMessageFactory = __uuidof(IMidiControlChangeMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiControlChangeMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory * This,
/* [in] */ BYTE channel,
/* [in] */ BYTE controller,
/* [in] */ BYTE controlValue,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_CreateMidiControlChangeMessage(This,channel,controller,controlValue,value) \
( (This)->lpVtbl -> CreateMidiControlChangeMessage(This,channel,controller,controlValue,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiControlChangeMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0025 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiInPort[] = L"Windows.Devices.Midi.IMidiInPort";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0025 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0025_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0025_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiInPort */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiInPort;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("D5C1D9DB-971A-4EAF-A23D-EA19FE607FF9")
IMidiInPort : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE add_MessageReceived(
/* [in] */ __RPC__in_opt __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs *handler,
/* [out][retval] */ __RPC__out EventRegistrationToken *token) = 0;
virtual HRESULT STDMETHODCALLTYPE remove_MessageReceived(
/* [in] */ EventRegistrationToken token) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DeviceId(
/* [out][retval] */ __RPC__deref_out_opt HSTRING *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiInPort = __uuidof(IMidiInPort);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *add_MessageReceived )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort * This,
/* [in] */ __RPC__in_opt __FITypedEventHandler_2_Windows__CDevices__CMidi__CMidiInPort_Windows__CDevices__CMidi__CMidiMessageReceivedEventArgs *handler,
/* [out][retval] */ __RPC__out EventRegistrationToken *token);
HRESULT ( STDMETHODCALLTYPE *remove_MessageReceived )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort * This,
/* [in] */ EventRegistrationToken token);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DeviceId )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort * This,
/* [out][retval] */ __RPC__deref_out_opt HSTRING *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_add_MessageReceived(This,handler,token) \
( (This)->lpVtbl -> add_MessageReceived(This,handler,token) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_remove_MessageReceived(This,token) \
( (This)->lpVtbl -> remove_MessageReceived(This,token) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_get_DeviceId(This,value) \
( (This)->lpVtbl -> get_DeviceId(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPort_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0026 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiInPortStatics[] = L"Windows.Devices.Midi.IMidiInPortStatics";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0026 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0026_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0026_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiInPortStatics */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("44C439DC-67FF-4A6E-8BAC-FDB6610CF296")
IMidiInPortStatics : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE FromIdAsync(
/* [in] */ __RPC__in HSTRING deviceId,
/* [out][retval] */ __RPC__deref_out_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort **value) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDeviceSelector(
/* [out][retval] */ __RPC__deref_out_opt HSTRING *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiInPortStatics = __uuidof(IMidiInPortStatics);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStaticsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *FromIdAsync )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics * This,
/* [in] */ __RPC__in HSTRING deviceId,
/* [out][retval] */ __RPC__deref_out_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiInPort **value);
HRESULT ( STDMETHODCALLTYPE *GetDeviceSelector )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics * This,
/* [out][retval] */ __RPC__deref_out_opt HSTRING *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStaticsVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStaticsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_FromIdAsync(This,deviceId,value) \
( (This)->lpVtbl -> FromIdAsync(This,deviceId,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_GetDeviceSelector(This,value) \
( (This)->lpVtbl -> GetDeviceSelector(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiInPortStatics_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0027 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiMessage[] = L"Windows.Devices.Midi.IMidiMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0027 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0027_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0027_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("79767945-1094-4283-9BE0-289FC0EE8334")
IMidiMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Timestamp(
/* [out][retval] */ __RPC__out ABI::Windows::Foundation::TimeSpan *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RawData(
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Storage::Streams::IBuffer **value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Type(
/* [out][retval] */ __RPC__out ABI::Windows::Devices::Midi::MidiMessageType *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiMessage = __uuidof(IMidiMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Timestamp )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage * This,
/* [out][retval] */ __RPC__out __x_ABI_CWindows_CFoundation_CTimeSpan *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RawData )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage * This,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CStorage_CStreams_CIBuffer **value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage * This,
/* [out][retval] */ __RPC__out __x_ABI_CWindows_CDevices_CMidi_CMidiMessageType *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_get_Timestamp(This,value) \
( (This)->lpVtbl -> get_Timestamp(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_get_RawData(This,value) \
( (This)->lpVtbl -> get_RawData(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_get_Type(This,value) \
( (This)->lpVtbl -> get_Type(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0028 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiMessageReceivedEventArgs[] = L"Windows.Devices.Midi.IMidiMessageReceivedEventArgs";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0028 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0028_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0028_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiMessageReceivedEventArgs */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("76566E56-F328-4B51-907D-B3A8CE96BF80")
IMidiMessageReceivedEventArgs : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Message(
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiMessageReceivedEventArgs = __uuidof(IMidiMessageReceivedEventArgs);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Message )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs * This,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgsVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_get_Message(This,value) \
( (This)->lpVtbl -> get_Message(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiMessageReceivedEventArgs_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0029 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiNoteOffMessage[] = L"Windows.Devices.Midi.IMidiNoteOffMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0029 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0029_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0029_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiNoteOffMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("16FD8AF4-198E-4D8F-A654-D305A293548F")
IMidiNoteOffMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Channel(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Note(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Velocity(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiNoteOffMessage = __uuidof(IMidiNoteOffMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Note )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Velocity )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_get_Channel(This,value) \
( (This)->lpVtbl -> get_Channel(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_get_Note(This,value) \
( (This)->lpVtbl -> get_Note(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_get_Velocity(This,value) \
( (This)->lpVtbl -> get_Velocity(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0030 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiNoteOffMessageFactory[] = L"Windows.Devices.Midi.IMidiNoteOffMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0030 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0030_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0030_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiNoteOffMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("A6B240E0-A749-425F-8AF4-A4D979CC15B5")
IMidiNoteOffMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiNoteOffMessage(
/* [in] */ BYTE channel,
/* [in] */ BYTE note,
/* [in] */ BYTE velocity,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiNoteOffMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiNoteOffMessageFactory = __uuidof(IMidiNoteOffMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiNoteOffMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory * This,
/* [in] */ BYTE channel,
/* [in] */ BYTE note,
/* [in] */ BYTE velocity,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_CreateMidiNoteOffMessage(This,channel,note,velocity,value) \
( (This)->lpVtbl -> CreateMidiNoteOffMessage(This,channel,note,velocity,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOffMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0031 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiNoteOnMessage[] = L"Windows.Devices.Midi.IMidiNoteOnMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0031 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0031_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0031_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiNoteOnMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("E0224AF5-6181-46DD-AFA2-410004C057AA")
IMidiNoteOnMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Channel(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Note(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Velocity(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiNoteOnMessage = __uuidof(IMidiNoteOnMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Note )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Velocity )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_get_Channel(This,value) \
( (This)->lpVtbl -> get_Channel(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_get_Note(This,value) \
( (This)->lpVtbl -> get_Note(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_get_Velocity(This,value) \
( (This)->lpVtbl -> get_Velocity(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0032 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiNoteOnMessageFactory[] = L"Windows.Devices.Midi.IMidiNoteOnMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0032 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0032_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0032_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiNoteOnMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("9B4280A0-59C1-420E-B517-15A10AA9606B")
IMidiNoteOnMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiNoteOnMessage(
/* [in] */ BYTE channel,
/* [in] */ BYTE note,
/* [in] */ BYTE velocity,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiNoteOnMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiNoteOnMessageFactory = __uuidof(IMidiNoteOnMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiNoteOnMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory * This,
/* [in] */ BYTE channel,
/* [in] */ BYTE note,
/* [in] */ BYTE velocity,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_CreateMidiNoteOnMessage(This,channel,note,velocity,value) \
( (This)->lpVtbl -> CreateMidiNoteOnMessage(This,channel,note,velocity,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiNoteOnMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0033 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiOutPort[] = L"Windows.Devices.Midi.IMidiOutPort";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0033 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0033_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0033_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiOutPort */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("931D6D9F-57A2-4A3A-ADB8-4640886F6693")
IMidiOutPort : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE SendMessage(
/* [in] */ __RPC__in_opt ABI::Windows::Devices::Midi::IMidiMessage *midiMessage) = 0;
virtual HRESULT STDMETHODCALLTYPE SendBuffer(
/* [in] */ __RPC__in_opt ABI::Windows::Storage::Streams::IBuffer *midiData) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DeviceId(
/* [out][retval] */ __RPC__deref_out_opt HSTRING *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiOutPort = __uuidof(IMidiOutPort);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *SendMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort * This,
/* [in] */ __RPC__in_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage *midiMessage);
HRESULT ( STDMETHODCALLTYPE *SendBuffer )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort * This,
/* [in] */ __RPC__in_opt __x_ABI_CWindows_CStorage_CStreams_CIBuffer *midiData);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DeviceId )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort * This,
/* [out][retval] */ __RPC__deref_out_opt HSTRING *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_SendMessage(This,midiMessage) \
( (This)->lpVtbl -> SendMessage(This,midiMessage) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_SendBuffer(This,midiData) \
( (This)->lpVtbl -> SendBuffer(This,midiData) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_get_DeviceId(This,value) \
( (This)->lpVtbl -> get_DeviceId(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPort_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0034 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiOutPortStatics[] = L"Windows.Devices.Midi.IMidiOutPortStatics";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0034 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0034_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0034_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiOutPortStatics */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("065CC3E9-0F88-448B-9B64-A95826C65B8F")
IMidiOutPortStatics : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE FromIdAsync(
/* [in] */ __RPC__in HSTRING deviceId,
/* [out][retval] */ __RPC__deref_out_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort **value) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDeviceSelector(
/* [out][retval] */ __RPC__deref_out_opt HSTRING *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiOutPortStatics = __uuidof(IMidiOutPortStatics);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStaticsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *FromIdAsync )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics * This,
/* [in] */ __RPC__in HSTRING deviceId,
/* [out][retval] */ __RPC__deref_out_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CIMidiOutPort **value);
HRESULT ( STDMETHODCALLTYPE *GetDeviceSelector )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics * This,
/* [out][retval] */ __RPC__deref_out_opt HSTRING *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStaticsVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStaticsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_FromIdAsync(This,deviceId,value) \
( (This)->lpVtbl -> FromIdAsync(This,deviceId,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_GetDeviceSelector(This,value) \
( (This)->lpVtbl -> GetDeviceSelector(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiOutPortStatics_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0035 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiPitchBendChangeMessage[] = L"Windows.Devices.Midi.IMidiPitchBendChangeMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0035 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0035_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0035_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiPitchBendChangeMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("29DF4CB1-2E9F-4FAF-8C2B-9CB82A9079CA")
IMidiPitchBendChangeMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Channel(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Bend(
/* [out][retval] */ __RPC__out UINT16 *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiPitchBendChangeMessage = __uuidof(IMidiPitchBendChangeMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Bend )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage * This,
/* [out][retval] */ __RPC__out UINT16 *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_get_Channel(This,value) \
( (This)->lpVtbl -> get_Channel(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_get_Bend(This,value) \
( (This)->lpVtbl -> get_Bend(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0036 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiPitchBendChangeMessageFactory[] = L"Windows.Devices.Midi.IMidiPitchBendChangeMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0036 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0036_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0036_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiPitchBendChangeMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("F5EEDF55-CFC8-4926-B30E-A3622393306C")
IMidiPitchBendChangeMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiPitchBendChangeMessage(
/* [in] */ BYTE channel,
/* [in] */ UINT16 bend,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiPitchBendChangeMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiPitchBendChangeMessageFactory = __uuidof(IMidiPitchBendChangeMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiPitchBendChangeMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory * This,
/* [in] */ BYTE channel,
/* [in] */ UINT16 bend,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_CreateMidiPitchBendChangeMessage(This,channel,bend,value) \
( (This)->lpVtbl -> CreateMidiPitchBendChangeMessage(This,channel,bend,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiPitchBendChangeMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0037 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiPolyphonicKeyPressureMessage[] = L"Windows.Devices.Midi.IMidiPolyphonicKeyPressureMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0037 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0037_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0037_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiPolyphonicKeyPressureMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("1F7337FE-ACE8-48A0-868E-7CDBF20F04D6")
IMidiPolyphonicKeyPressureMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Channel(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Note(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Pressure(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiPolyphonicKeyPressureMessage = __uuidof(IMidiPolyphonicKeyPressureMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Note )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Pressure )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_get_Channel(This,value) \
( (This)->lpVtbl -> get_Channel(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_get_Note(This,value) \
( (This)->lpVtbl -> get_Note(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_get_Pressure(This,value) \
( (This)->lpVtbl -> get_Pressure(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0038 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiPolyphonicKeyPressureMessageFactory[] = L"Windows.Devices.Midi.IMidiPolyphonicKeyPressureMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0038 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0038_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0038_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiPolyphonicKeyPressureMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("E98F483E-C4B3-4DD2-917C-E349815A1B3B")
IMidiPolyphonicKeyPressureMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiPolyphonicKeyPressureMessage(
/* [in] */ BYTE channel,
/* [in] */ BYTE note,
/* [in] */ BYTE pressure,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiPolyphonicKeyPressureMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiPolyphonicKeyPressureMessageFactory = __uuidof(IMidiPolyphonicKeyPressureMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiPolyphonicKeyPressureMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory * This,
/* [in] */ BYTE channel,
/* [in] */ BYTE note,
/* [in] */ BYTE pressure,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_CreateMidiPolyphonicKeyPressureMessage(This,channel,note,pressure,value) \
( (This)->lpVtbl -> CreateMidiPolyphonicKeyPressureMessage(This,channel,note,pressure,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiPolyphonicKeyPressureMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0039 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiProgramChangeMessage[] = L"Windows.Devices.Midi.IMidiProgramChangeMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0039 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0039_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0039_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiProgramChangeMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("9CBB3C78-7A3E-4327-AA98-20B8E4485AF8")
IMidiProgramChangeMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Channel(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Program(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiProgramChangeMessage = __uuidof(IMidiProgramChangeMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Program )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_get_Channel(This,value) \
( (This)->lpVtbl -> get_Channel(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_get_Program(This,value) \
( (This)->lpVtbl -> get_Program(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0040 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiProgramChangeMessageFactory[] = L"Windows.Devices.Midi.IMidiProgramChangeMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0040 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0040_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0040_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiProgramChangeMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("D6B04387-524B-4104-9C99-6572BFD2E261")
IMidiProgramChangeMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiProgramChangeMessage(
/* [in] */ BYTE channel,
/* [in] */ BYTE program,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiProgramChangeMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiProgramChangeMessageFactory = __uuidof(IMidiProgramChangeMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiProgramChangeMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory * This,
/* [in] */ BYTE channel,
/* [in] */ BYTE program,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_CreateMidiProgramChangeMessage(This,channel,program,value) \
( (This)->lpVtbl -> CreateMidiProgramChangeMessage(This,channel,program,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiProgramChangeMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0041 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiSongPositionPointerMessage[] = L"Windows.Devices.Midi.IMidiSongPositionPointerMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0041 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0041_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0041_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiSongPositionPointerMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("4CA50C56-EC5E-4AE4-A115-88DC57CC2B79")
IMidiSongPositionPointerMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Beats(
/* [out][retval] */ __RPC__out UINT16 *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiSongPositionPointerMessage = __uuidof(IMidiSongPositionPointerMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Beats )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage * This,
/* [out][retval] */ __RPC__out UINT16 *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_get_Beats(This,value) \
( (This)->lpVtbl -> get_Beats(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0042 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiSongPositionPointerMessageFactory[] = L"Windows.Devices.Midi.IMidiSongPositionPointerMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0042 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0042_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0042_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiSongPositionPointerMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("9C00E996-F10B-4FEA-B395-F5D6CF80F64E")
IMidiSongPositionPointerMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiSongPositionPointerMessage(
/* [in] */ UINT16 beats,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiSongPositionPointerMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiSongPositionPointerMessageFactory = __uuidof(IMidiSongPositionPointerMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiSongPositionPointerMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory * This,
/* [in] */ UINT16 beats,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_CreateMidiSongPositionPointerMessage(This,beats,value) \
( (This)->lpVtbl -> CreateMidiSongPositionPointerMessage(This,beats,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongPositionPointerMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0043 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiSongSelectMessage[] = L"Windows.Devices.Midi.IMidiSongSelectMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0043 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0043_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0043_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiSongSelectMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("49F0F27F-6D83-4741-A5BF-4629F6BE974F")
IMidiSongSelectMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Song(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiSongSelectMessage = __uuidof(IMidiSongSelectMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Song )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_get_Song(This,value) \
( (This)->lpVtbl -> get_Song(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0044 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiSongSelectMessageFactory[] = L"Windows.Devices.Midi.IMidiSongSelectMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0044 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0044_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0044_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiSongSelectMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("848878E4-8748-4129-A66C-A05493F75DAA")
IMidiSongSelectMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiSongSelectMessage(
/* [in] */ BYTE song,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiSongSelectMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiSongSelectMessageFactory = __uuidof(IMidiSongSelectMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiSongSelectMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory * This,
/* [in] */ BYTE song,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_CreateMidiSongSelectMessage(This,song,value) \
( (This)->lpVtbl -> CreateMidiSongSelectMessage(This,song,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSongSelectMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0045 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiSynthesizer[] = L"Windows.Devices.Midi.IMidiSynthesizer";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0045 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0045_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0045_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiSynthesizer */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("F0DA155E-DB90-405F-B8AE-21D2E17F2E45")
IMidiSynthesizer : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AudioDevice(
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Enumeration::IDeviceInformation **value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Volume(
/* [out][retval] */ __RPC__out DOUBLE *value) = 0;
virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Volume(
/* [in] */ DOUBLE value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiSynthesizer = __uuidof(IMidiSynthesizer);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioDevice )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer * This,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation **value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Volume )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer * This,
/* [out][retval] */ __RPC__out DOUBLE *value);
/* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Volume )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer * This,
/* [in] */ DOUBLE value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_get_AudioDevice(This,value) \
( (This)->lpVtbl -> get_AudioDevice(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_get_Volume(This,value) \
( (This)->lpVtbl -> get_Volume(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_put_Volume(This,value) \
( (This)->lpVtbl -> put_Volume(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizer_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0046 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiSynthesizerStatics[] = L"Windows.Devices.Midi.IMidiSynthesizerStatics";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0046 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0046_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0046_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiSynthesizerStatics */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("4224EAA8-6629-4D6B-AA8F-D4521A5A31CE")
IMidiSynthesizerStatics : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateAsync(
/* [out][retval] */ __RPC__deref_out_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer **value) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateFromAudioDeviceAsync(
/* [in] */ __RPC__in_opt ABI::Windows::Devices::Enumeration::IDeviceInformation *audioDevice,
/* [out][retval] */ __RPC__deref_out_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer **value) = 0;
virtual HRESULT STDMETHODCALLTYPE IsSynthesizer(
/* [in] */ __RPC__in_opt ABI::Windows::Devices::Enumeration::IDeviceInformation *midiDevice,
/* [out][retval] */ __RPC__out boolean *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiSynthesizerStatics = __uuidof(IMidiSynthesizerStatics);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStaticsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateAsync )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics * This,
/* [out][retval] */ __RPC__deref_out_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer **value);
HRESULT ( STDMETHODCALLTYPE *CreateFromAudioDeviceAsync )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics * This,
/* [in] */ __RPC__in_opt __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation *audioDevice,
/* [out][retval] */ __RPC__deref_out_opt __FIAsyncOperation_1_Windows__CDevices__CMidi__CMidiSynthesizer **value);
HRESULT ( STDMETHODCALLTYPE *IsSynthesizer )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics * This,
/* [in] */ __RPC__in_opt __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation *midiDevice,
/* [out][retval] */ __RPC__out boolean *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStaticsVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStaticsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_CreateAsync(This,value) \
( (This)->lpVtbl -> CreateAsync(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_CreateFromAudioDeviceAsync(This,audioDevice,value) \
( (This)->lpVtbl -> CreateFromAudioDeviceAsync(This,audioDevice,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_IsSynthesizer(This,midiDevice,value) \
( (This)->lpVtbl -> IsSynthesizer(This,midiDevice,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSynthesizerStatics_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0047 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiSystemExclusiveMessageFactory[] = L"Windows.Devices.Midi.IMidiSystemExclusiveMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0047 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0047_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0047_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiSystemExclusiveMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("083DE222-3B74-4320-9B42-0CA8545F8A24")
IMidiSystemExclusiveMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiSystemExclusiveMessage(
/* [in] */ __RPC__in_opt ABI::Windows::Storage::Streams::IBuffer *rawData,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiSystemExclusiveMessageFactory = __uuidof(IMidiSystemExclusiveMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiSystemExclusiveMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory * This,
/* [in] */ __RPC__in_opt __x_ABI_CWindows_CStorage_CStreams_CIBuffer *rawData,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_CreateMidiSystemExclusiveMessage(This,rawData,value) \
( (This)->lpVtbl -> CreateMidiSystemExclusiveMessage(This,rawData,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiSystemExclusiveMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0048 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiTimeCodeMessage[] = L"Windows.Devices.Midi.IMidiTimeCodeMessage";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0048 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0048_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0048_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiTimeCodeMessage */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("0BF7087D-FA63-4A1C-8DEB-C0E87796A6D7")
IMidiTimeCodeMessage : public IInspectable
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_FrameType(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Values(
/* [out][retval] */ __RPC__out BYTE *value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiTimeCodeMessage = __uuidof(IMidiTimeCodeMessage);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrameType )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Values )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage * This,
/* [out][retval] */ __RPC__out BYTE *value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_get_FrameType(This,value) \
( (This)->lpVtbl -> get_FrameType(This,value) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_get_Values(This,value) \
( (This)->lpVtbl -> get_Values(This,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0049 */
/* [local] */
#if !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_INTERFACE_DEFINED__)
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Devices_Midi_IMidiTimeCodeMessageFactory[] = L"Windows.Devices.Midi.IMidiTimeCodeMessageFactory";
#endif /* !defined(____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_INTERFACE_DEFINED__) */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0049 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0049_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0049_v0_0_s_ifspec;
#ifndef ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_INTERFACE_DEFINED__
#define ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_INTERFACE_DEFINED__
/* interface __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory */
/* [uuid][object] */
/* interface ABI::Windows::Devices::Midi::IMidiTimeCodeMessageFactory */
/* [uuid][object] */
EXTERN_C const IID IID___x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
} /* end extern "C" */
namespace ABI {
namespace Windows {
namespace Devices {
namespace Midi {
MIDL_INTERFACE("EB3099C5-771C-40DE-B961-175A7489A85E")
IMidiTimeCodeMessageFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMidiTimeCodeMessage(
/* [in] */ BYTE frameType,
/* [in] */ BYTE values,
/* [out][retval] */ __RPC__deref_out_opt ABI::Windows::Devices::Midi::IMidiTimeCodeMessage **value) = 0;
};
extern const __declspec(selectany) IID & IID_IMidiTimeCodeMessageFactory = __uuidof(IMidiTimeCodeMessageFactory);
} /* end namespace */
} /* end namespace */
} /* end namespace */
} /* end namespace */
extern "C" {
#else /* C style interface */
typedef struct __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory * This);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory * This,
/* [out] */ __RPC__out ULONG *iidCount,
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID **iids);
HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory * This,
/* [out] */ __RPC__out TrustLevel *trustLevel);
HRESULT ( STDMETHODCALLTYPE *CreateMidiTimeCodeMessage )(
__RPC__in __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory * This,
/* [in] */ BYTE frameType,
/* [in] */ BYTE values,
/* [out][retval] */ __RPC__deref_out_opt __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessage **value);
END_INTERFACE
} __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactoryVtbl;
interface __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory
{
CONST_VTBL struct __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl -> GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl -> GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_CreateMidiTimeCodeMessage(This,frameType,values,value) \
( (This)->lpVtbl -> CreateMidiTimeCodeMessage(This,frameType,values,value) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ____x_ABI_CWindows_CDevices_CMidi_CIMidiTimeCodeMessageFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0050 */
/* [local] */
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiActiveSensingMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiActiveSensingMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiActiveSensingMessage[] = L"Windows.Devices.Midi.MidiActiveSensingMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiChannelPressureMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiChannelPressureMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiChannelPressureMessage[] = L"Windows.Devices.Midi.MidiChannelPressureMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiContinueMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiContinueMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiContinueMessage[] = L"Windows.Devices.Midi.MidiContinueMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiControlChangeMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiControlChangeMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiControlChangeMessage[] = L"Windows.Devices.Midi.MidiControlChangeMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiInPort_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiInPort_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiInPort[] = L"Windows.Devices.Midi.MidiInPort";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiMessageReceivedEventArgs_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiMessageReceivedEventArgs_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiMessageReceivedEventArgs[] = L"Windows.Devices.Midi.MidiMessageReceivedEventArgs";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiNoteOffMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiNoteOffMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiNoteOffMessage[] = L"Windows.Devices.Midi.MidiNoteOffMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiNoteOnMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiNoteOnMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiNoteOnMessage[] = L"Windows.Devices.Midi.MidiNoteOnMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiOutPort_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiOutPort_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiOutPort[] = L"Windows.Devices.Midi.MidiOutPort";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiPitchBendChangeMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiPitchBendChangeMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiPitchBendChangeMessage[] = L"Windows.Devices.Midi.MidiPitchBendChangeMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiPolyphonicKeyPressureMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiPolyphonicKeyPressureMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiPolyphonicKeyPressureMessage[] = L"Windows.Devices.Midi.MidiPolyphonicKeyPressureMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiProgramChangeMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiProgramChangeMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiProgramChangeMessage[] = L"Windows.Devices.Midi.MidiProgramChangeMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiSongPositionPointerMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiSongPositionPointerMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiSongPositionPointerMessage[] = L"Windows.Devices.Midi.MidiSongPositionPointerMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiSongSelectMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiSongSelectMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiSongSelectMessage[] = L"Windows.Devices.Midi.MidiSongSelectMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiStartMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiStartMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiStartMessage[] = L"Windows.Devices.Midi.MidiStartMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiStopMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiStopMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiStopMessage[] = L"Windows.Devices.Midi.MidiStopMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiSynthesizer_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiSynthesizer_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiSynthesizer[] = L"Windows.Devices.Midi.MidiSynthesizer";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiSystemExclusiveMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiSystemExclusiveMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiSystemExclusiveMessage[] = L"Windows.Devices.Midi.MidiSystemExclusiveMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiSystemResetMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiSystemResetMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiSystemResetMessage[] = L"Windows.Devices.Midi.MidiSystemResetMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiTimeCodeMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiTimeCodeMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiTimeCodeMessage[] = L"Windows.Devices.Midi.MidiTimeCodeMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiTimingClockMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiTimingClockMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiTimingClockMessage[] = L"Windows.Devices.Midi.MidiTimingClockMessage";
#endif
#ifndef RUNTIMECLASS_Windows_Devices_Midi_MidiTuneRequestMessage_DEFINED
#define RUNTIMECLASS_Windows_Devices_Midi_MidiTuneRequestMessage_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Devices_Midi_MidiTuneRequestMessage[] = L"Windows.Devices.Midi.MidiTuneRequestMessage";
#endif
/* interface __MIDL_itf_windows2Edevices2Emidi_0000_0050 */
/* [local] */
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0050_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windows2Edevices2Emidi_0000_0050_v0_0_s_ifspec;
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER HSTRING_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in HSTRING * );
unsigned char * __RPC_USER HSTRING_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in HSTRING * );
unsigned char * __RPC_USER HSTRING_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out HSTRING * );
void __RPC_USER HSTRING_UserFree( __RPC__in unsigned long *, __RPC__in HSTRING * );
unsigned long __RPC_USER HSTRING_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in HSTRING * );
unsigned char * __RPC_USER HSTRING_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in HSTRING * );
unsigned char * __RPC_USER HSTRING_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out HSTRING * );
void __RPC_USER HSTRING_UserFree64( __RPC__in unsigned long *, __RPC__in HSTRING * );
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
|
e863c3c0d1887de5089cd9c2371e6a357c3bc2c0
|
7c86bbd724492bf81d09f9b01311ac27b34703b6
|
/TAS\TTAS\TICKET/tas/tas.hpp
|
67cc7efca6f583b715aae8bc8c0fd3b4525df581
|
[] |
no_license
|
kulbitsky99/Multithreads_programming_acronis_2020
|
df231a5bb226a409953de65627010f78abc124df
|
797d3cdca2310a8b03a34f8dff42aed07040a23e
|
refs/heads/master
| 2021-03-13T11:38:29.402158
| 2020-05-22T13:02:08
| 2020-05-22T13:02:08
| 246,676,994
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 286
|
hpp
|
tas.hpp
|
#include <iostream>
#include <atomic>
#include <cassert>
#include <thread>
class spin_lock_TAS
{
private:
std::atomic<unsigned int> m_spin;
public:
spin_lock_TAS(): m_spin(0) {}
~spin_lock_TAS() { assert(m_spin.load() == 0);}
void lock();
void yield_lock();
void unlock();
};
|
ebef81b14b3d7673bf4f36e1dfcd56152f0a81ed
|
e90671c6b1cb69eaf57bd0ab4bbd1bd92ba9aea9
|
/android/vendored/unversioned/react-native-reanimated/android/src/main/cpp/LayoutAnimations.h
|
ad02ce1409548073bc60ee674befaaccce1f3490
|
[
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
expo/expo
|
72fc802e3b6806789225bdd856031a8d150dd6f5
|
40f087fc0c0ab22270cfef2673bced44af170c34
|
refs/heads/main
| 2023-08-17T01:38:28.442098
| 2023-08-16T21:43:11
| 2023-08-16T21:43:11
| 65,750,241
| 23,742
| 5,421
|
MIT
| 2023-09-14T21:37:37
| 2016-08-15T17:14:25
|
TypeScript
|
UTF-8
|
C++
| false
| false
| 2,471
|
h
|
LayoutAnimations.h
|
#pragma once
#include <fbjni/fbjni.h>
#include <jsi/jsi.h>
#include <memory>
#include <string>
#include "JNIHelper.h"
namespace reanimated {
using namespace facebook::jni;
using namespace facebook;
class LayoutAnimations : public jni::HybridClass<LayoutAnimations> {
using AnimationStartingBlock =
std::function<void(int, int, alias_ref<JMap<jstring, jstring>>)>;
using HasAnimationBlock = std::function<bool(int, int)>;
using ClearAnimationConfigBlock = std::function<void(int)>;
using CancelAnimationBlock =
std::function<void(int, int, jboolean, jboolean)>;
using FindPrecedingViewTagForTransitionBlock = std::function<int(int)>;
public:
static auto constexpr kJavaDescriptor =
"Lcom/swmansion/reanimated/layoutReanimation/LayoutAnimations;";
static jni::local_ref<jhybriddata> initHybrid(
jni::alias_ref<jhybridobject> jThis);
static void registerNatives();
void startAnimationForTag(
int tag,
int type,
alias_ref<JMap<jstring, jstring>> values);
bool hasAnimationForTag(int tag, int type);
bool isLayoutAnimationEnabled();
void setAnimationStartingBlock(AnimationStartingBlock animationStartingBlock);
void setHasAnimationBlock(HasAnimationBlock hasAnimationBlock);
void setClearAnimationConfigBlock(
ClearAnimationConfigBlock clearAnimationConfigBlock);
void setCancelAnimationForTag(CancelAnimationBlock cancelAnimationBlock);
void setFindPrecedingViewTagForTransition(
FindPrecedingViewTagForTransitionBlock
findPrecedingViewTagForTransitionBlock);
void progressLayoutAnimation(
int tag,
const jni::local_ref<JNIHelper::PropsMap> &updates,
bool isSharedTransition);
void endLayoutAnimation(int tag, bool cancelled, bool removeView);
void clearAnimationConfigForTag(int tag);
void cancelAnimationForTag(
int tag,
int type,
jboolean cancelled,
jboolean removeView);
int findPrecedingViewTagForTransition(int tag);
private:
friend HybridBase;
jni::global_ref<LayoutAnimations::javaobject> javaPart_;
AnimationStartingBlock animationStartingBlock_;
HasAnimationBlock hasAnimationBlock_;
ClearAnimationConfigBlock clearAnimationConfigBlock_;
CancelAnimationBlock cancelAnimationBlock_;
FindPrecedingViewTagForTransitionBlock
findPrecedingViewTagForTransitionBlock_;
explicit LayoutAnimations(
jni::alias_ref<LayoutAnimations::jhybridobject> jThis);
};
}; // namespace reanimated
|
fc28c0b9a830b43e215bb89461d832fc8ffee94e
|
723c87bfb1cf7aba01307c04bb1ea81a28bac5bb
|
/2020/Apr/0429idealSpot.cpp
|
bc876049fe6df851a8bde22e2c54b2438ce2fdbf
|
[] |
no_license
|
qlqnf16/algorithms
|
3174b9503e2fa320bbb2aee09a93cea4c6f9818e
|
21f530d1e0f4a0ce3c2f51460e42ab0c03b9854e
|
refs/heads/master
| 2021-06-13T00:37:21.932439
| 2021-05-06T14:30:05
| 2021-05-06T14:30:05
| 188,745,750
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,305
|
cpp
|
0429idealSpot.cpp
|
#include <stdio.h>
#define MAX 1000
int N;
int land[MAX+10][MAX+10];
int startPos[MAX];
int endPos[MAX];
void checkLand(int c, int r) {
for (int i = c; i < c + 100; i++) {
if (r < startPos[i]) startPos[i] = r;
if (r + 100 > endPos[i]) endPos[i] = r;
for (int j = r; j < r + 100; j++) {
land[i][j] = 1;
}
}
}
void countHeight() {
for (int i = 1; i < MAX; i++) {
for (int j = 0; j < MAX; j++) {
if (!land[i][j]) continue;
land[i][j] += land[i-1][j];
}
}
}
int findMaxWidth() {
int curheight, maxArea = 100*100, area;
for (int i = 1; i < MAX; i++) {
for (int j = 0; j < MAX; j++) {
curheight = 1000;
for (int k = j; k < MAX; k++) {
if (land[i][k] < curheight) curheight = land[i][k];
if (!curheight) break;
area = curheight * (k-j+1);
if (area > maxArea) maxArea = area;
}
}
}
return maxArea;
}
void solve() {
int ans;
countHeight();
ans = findMaxWidth();
printf("%d", ans);
}
int main(){
scanf("%d", &N);
for (int i = 0; i < N; i++) {
int c, r;
scanf("%d %d", &c, &r);
checkLand(c, r);
}
solve();
return 0;
}
|
9df3d3f7c2e53e68ee85855205f7aacbf61aa546
|
715442d2668c0526c022926e20b5f79f3f50cc18
|
/try_1.ino
|
8e1f87d1caaf43f7507206baf0fa9e6453ad6a5e
|
[] |
no_license
|
kushpandey1811/project_arduino
|
69766e0d27c789f1e2c95028fb477e6d190b8239
|
b3e0e130d8f65205bdcc99ffd70b8ed1d91fe859
|
refs/heads/master
| 2021-01-10T08:01:03.614410
| 2016-01-09T12:48:34
| 2016-01-09T12:48:34
| 49,324,006
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,150
|
ino
|
try_1.ino
|
#include <TimerOne.h>
const int pin[]={14,14,2,3,4,5,6,7,8,9};
const int sensor = A5;
const int sensor1 =A4;
const int myLed = 6;
bool ledOn = false;
volatile byte digital_val;
// byte digital_value;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
int i=2;
while(i<=9)
{
pinMode (pin[i], OUTPUT);
digitalWrite(pin[i], LOW);
i++;
}
Timer1.initialize(1999000); // Calls every 50ms
Timer1.attachInterrupt(myHandler);
}
volatile byte se = 0;
void myHandler(){
delay(500);
int okokval = analogRead(A4);
delay(500);
okokval = analogRead(A4);
int whatisthis;
//= /*(okokval/1024) * 10; //*/map(okokval,0,1023,0,9);
whatisthis = ((okokval < 900) ? ((okokval < 800) ? ((okokval < 700) ? ((okokval < 600)? ((okokval< 500)? ((okokval < 400)? ((okokval < 300)? ((okokval < 200) ? ((okokval < 100) ?1 : 100) : 2) : 3) : 4) : 5): 6): 7): 8): 9);
if(se != whatisthis)
{
Serial.print("Sensor: ");
Serial.print(okokval);
Serial.print("-->");
Serial.println(whatisthis);
se = whatisthis;
seg7(whatisthis);
}
if(whatisthis < digital_val)
{
digitalWrite(myLed, HIGH);
}
else if(whatisthis > digital_val)
{
digitalWrite(myLed, LOW);
}
}
int dv = 0;
void loop() {
// put your main code here, to run repeatedly:
delay(500);
int sensor_value = analogRead(sensor);
digital_val = map(sensor_value,0, 1023,1,9);
if(dv != digital_val)
{
Serial.print("SETTING: ");
Serial.print(sensor_value);
Serial.print("->");
Serial.println(digital_val);
delay(500);
seg7(digital_val);
dv = digital_val;
Timer1.restart();
}
}
byte ar[][8]={{0,0,0,0,0,0,0,0},{2,2,7,3,4,5,8,9},{5,3,2,5,9,8,7,4},{5,3,2,5,7,8,4,9},{4,4,5,2,7,3,9,8},{5,3,4,5,7,8,2,9},{6,3,4,5,7,8,9,2},{3,2,3,7,4,5,8,9},{7,2,3,4,5,7,8,9},{6,2,3,4,5,7,8,9}};
void seg7(const int digital_val){
int i,j=0;
for(i=1,j=ar[digital_val][0];i<8;i++)
{
while(i<=j)
{
//Serial.println(ar[digital_val][i]);
digitalWrite(ar[digital_val][i++],HIGH);
//i++;
}
digitalWrite(ar[digital_val][i],LOW);
}
}
|
5cf87dd17c63a7a5db7a70381dccbbc404d75e78
|
9a9ec65b09bce75a9fdb3f9fb34b27ff77e56ef0
|
/Snake.h
|
8757838f065528d4cb41dc8b035188c642be008f
|
[
"MIT"
] |
permissive
|
kesada7/Snake-1vs1-C-
|
858ce5e0a5a3b7ae2b24c3362b653fa2a1f4faec
|
0f65355fe32b50e2575d74dce7d5e6b67a9debea
|
refs/heads/master
| 2021-05-11T02:41:38.489036
| 2018-01-23T21:03:35
| 2018-01-23T21:03:35
| 118,369,427
| 0
| 0
|
MIT
| 2018-01-21T20:24:36
| 2018-01-21T20:05:48
| null |
UTF-8
|
C++
| false
| false
| 606
|
h
|
Snake.h
|
#ifndef SNAKE_H_INCLUDED
#define SNAKE_H_INCLUDED
#include "Game.h"
class Snake : public Game
{
private:
int score = 2;
public:
struct SnakeBody
{
int x =4,
y=4;
}s[100];
enum class EDirection
{
eUp,
eRight,
eDown,
eLeft
};
EDirection direction = EDirection::eRight;
//constructor
public:
Snake(int xPos, int yPos);
~Snake(){}
int getX();
int getY();
void setY(int yPos);
public:
void moveSnake();
void growSnake(int fruitPoints);
int getScore();
};
#endif // SNAKE_H_INCLUDED
|
c0cbf1a66904429f49ec6ce62971abef0f6b9f86
|
36b7cd88038df94aa2a1465e450b70c5277a332f
|
/src/ofApp.cpp
|
431755e13da49742ba24b9c2346970d6282dc4b4
|
[] |
no_license
|
USCcorpuscallosum/airbending
|
eb97d2ba825a4942a86fb6d68a8ba92ad739968d
|
fb8efe86b4169b10746ef5062355b254e3888903
|
refs/heads/master
| 2021-01-12T12:27:27.992856
| 2017-01-18T04:13:52
| 2017-01-18T04:13:52
| 74,927,577
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,730
|
cpp
|
ofApp.cpp
|
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetVerticalSync(true);
ofEnableAlphaBlending();
ofBackground(backgroundColor);
ofSetFrameRate(30);
for (int i = 0; i < 7000; i++){
boids.push_back(boid(ofVec2f(ofRandom(0,ofGetWidth()),ofRandom(0,ofGetHeight()))));
}
for (int i = 0; i < 2000; i++){
particles.push_back(particle(ofVec2f(ofRandom(0,ofGetWidth()),ofRandom(0,ofGetHeight()))));
}
// Make it so the hand can move across the entire Window.
kHand.handLocationContainer.setWidth(ofGetWindowWidth());
kHand.handLocationContainer.setHeight(ofGetWindowHeight());
}
//--------------------------------------------------------------
void ofApp::update(){
ofVec2f prev = handLocation;
kHand.update();
handLocation = kHand.handLocation;
if (prev.distance(handLocation) > 20){
boidPath.push_back(handLocation);
}
if (boidPath.size() > 20){
boidPath.erase(boidPath.begin());
}
ofSetWindowTitle(std::to_string(ofGetFrameRate()));
//delete if out of screen
for (auto it = boids.begin(); it != boids.end(); it++){
t = ofGetFrameNum() * TIME_SPEED_ONE;
//check if out of screen
auto position = it->pos;
if( position.x > ofGetWidth() || position.y > ofGetHeight()){
boids.erase(it);
//spawn a new one
boids.push_back(boid(ofVec2f(ofRandom(0, ofGetWidth()),0)));
it--;
}
}
//Create boid static - create new class if time
for (auto it = particles.begin(); it != particles.end(); it++){
t = ofGetFrameNum() * TIME_SPEED_TWO;
//check if out of screen
auto position = it->pos;
if( position.x > ofGetWidth() || position.y > ofGetHeight()){
particles.erase(it);
//spawn a new one
particles.push_back(particle(ofVec2f(ofRandom(0, ofGetWidth()),0)));
it--;
}
}
// set boids on paths
for (auto && b : boids){
if (b.seesPath(boidPath)){
b.setPath(boidPath);
}
}
for (auto && b : boids){
b.followPath();
}
for (auto && b : boids){
b.followWind(getField(b.pos));
}
for (auto && b : boids){
b.move();
}
for (auto && p : particles){
p.pos+=getField(p.pos)*scalarfield;
}
}
//--------------------------------------------------------------
void ofApp::draw(){
kHand.refinedMap.update();
float offsetX = 512 * handLocation.x/ofGetWidth();
float offsetY = 496 * handLocation.y/ofGetHeight();
ofSetColor(ofColor::red);
kHand.refinedMap.draw(ofVec2f(handLocation.x-offsetX ,handLocation.y-offsetY));
// ofSetColor(currentPathColor);
// for (auto && p : boidPath){
// currentPath.addVertex(p);
// }
// currentPath.draw();
// currentPath.clear();
//
for (auto b : boids ){
ofSetColor(b.color);
ofDrawCircle(b.pos, rand() % 5 + 1);
}
for (auto p : particles){
//ofSetColor(b.color);
ofSetColor(p.color);
ofDrawCircle(p.pos, rand() % 4 +1);
}
if (kinectDebug){
ofSetColor(ofColor::red);
ofDrawBox(handLocation, 30);
}
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key){
if (key=='e'){
//end the current path, add it to paths
paths.push_back(currentPath);
vector<ofVec2f> path;
for (auto && p : currentPath){
path.push_back(ofVec2f(p.x,p.y));
}
boidPath = path;
currentPath.clear();
}
if (key=='c'){
//clears paths
currentPath.clear();
paths.clear();
boidPath.clear();
}
if (key=='d'){
kinectDebug = ! kinectDebug;
}
}
ofVec2f ofApp::getField(ofVec2f position){
/// magic algorithm courtesy of the noiseField2dExample
/// returns velocity vector at a 2D position
float normx = ofNormalize(position.x, 0, ofGetWidth());
float normy = ofNormalize(position.y, 0, ofGetHeight());
float u = ofNoise(t + PHASE, normx * COMPLEXITY + PHASE, normy * COMPLEXITY + PHASE);
float v = ofNoise(t - PHASE, normx * COMPLEXITY - PHASE, normy * COMPLEXITY + PHASE);
return ofVec2f(u,v).rotate(45).getNormalized();
}
//--------------------------------------------------------------
void ofApp::keyReleased(int key){
}
//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y ){
}
//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button){
//currentPath.addVertex(ofPoint(x,y));
}
//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mouseEntered(int x, int y){
}
//--------------------------------------------------------------
void ofApp::mouseExited(int x, int y){
}
//--------------------------------------------------------------
void ofApp::windowResized(int w, int h){
}
//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg){
}
//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo){
}
|
18576d8841ad6c949718b158de5d535f81e4878f
|
b0b63ae082dc084c5869ab2c6f65a067aa72aff1
|
/vImporter/Core/Database.cpp
|
81299976be6ff087eaa6d019f1e5a768a7a8783b
|
[] |
no_license
|
bachns/vImporter
|
b2e73ab3f1d8eb77dc19bcafb82873c56c4f5475
|
461769c26b744a55b6ea6698154c4491a6b77526
|
refs/heads/master
| 2023-03-22T11:43:10.087666
| 2021-03-18T06:50:26
| 2021-03-18T06:50:26
| 322,203,478
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,104
|
cpp
|
Database.cpp
|
#include <memory>
#include <spdlog/spdlog.h>
#include <odb/database.hxx>
#include <odb/transaction.hxx>
#include <odb/oracle/database.hxx>
#include "Database.h"
#include "Vietnamese.h"
#include "ConnectionParams.h"
std::shared_ptr<odb::database> Database::m_database = {};
Database::Database(QObject* parent)
: QObject(parent)
{
}
bool Database::connect()
{
bool successful = false;
try
{
ConnectionParams params;
params.load();
const std::string& user = params.m_user.toStdString();
const std::string& password = params.m_password.toStdString();
const std::string& datbase = params.m_database.toStdString();
const std::string& host = params.m_host.toStdString();
unsigned int port = params.m_port;
m_database = make_shared<odb::oracle::database>(user, password, datbase, host, port, 873, 873);
odb::transaction t(m_database->begin());
t.rollback();
successful = true;
spdlog::get("logger")->info("Connected to database successfully");
}
catch (const odb::exception& e)
{
spdlog::get("logger")->error(e.what());
successful = false;
}
return successful;
}
|
369a38d475a1578e62c9b713145476381829f9c4
|
5f9d6d256dd3181e81b1ddd4a4691eb55fcf9d76
|
/src/common.hpp
|
93496e805ab5d399c0b1a68ef7bf58eb0af27c78
|
[
"MIT"
] |
permissive
|
blackalkane/attackalantus
|
2dec6ecfe10063307da79c5112bc8b85e59060eb
|
b80280a42c120c61c3277d10c5e02656aea21de7
|
refs/heads/master
| 2020-12-06T10:32:46.381946
| 2020-01-07T23:57:46
| 2020-01-07T23:57:46
| 232,439,262
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,427
|
hpp
|
common.hpp
|
#pragma once
// stlib
#include <fstream> // stdout, stderr..
// glfw
#define NOMINMAX
#include <gl3w.h>
#include <GLFW/glfw3.h>
#include <list>
#include <vector>
#include <entities/abilityType.hpp>
#include <entities/enemyType.hpp>
// Simple utility macros to avoid mistyping directory name, name has to be a string literal
// audio_path("audio.ogg") -> data/audio/audio.ogg
// Get defintion of PROJECT_SOURCE_DIR from:
#include "project_path.hpp"
#define shader_path(name) PROJECT_SOURCE_DIR "./shaders/" name
#define data_path PROJECT_SOURCE_DIR "./data"
#define textures_path(name) data_path "/textures/" name
#define audio_path(name) data_path "/audio/" name
#define mesh_path(name) data_path "/meshes/" name
const int width = 1200;
const int height = 800;
const float MIN_DISTANCE_TO_PLAYER = 300.f;
// Not much math is needed and there are already way too many libraries linked (:
// If you want to do some overloads..
struct vec2 { float x, y; };
struct vec3 { float x, y, z; };
struct vec4 { float x1, y1, x2, y2; };
struct mat3 { vec3 c0, c1, c2; };
// Utility functions
float dot(vec2 l, vec2 r);
float dot(vec3 l, vec3 r);
mat3 mul(const mat3& l, const mat3& r);
vec2 normalize(vec2 v);
float computeMagnitude(const vec2 &v);
// OpenGL utilities
// cleans error buffer
void gl_flush_errors();
bool gl_has_errors();
// Single Vertex Buffer element for non-textured meshes (coloured.vs.glsl & salmon.vs.glsl)
struct Vertex
{
vec3 position;
vec3 color;
};
// Single Vertex Buffer element for textured sprites (textured.vs.glsl)
struct TexturedVertex
{
vec3 position;
vec2 texcoord;
};
// Texture wrapper
struct Texture
{
Texture();
~Texture();
GLuint id;
GLuint depth_render_buffer_id;
int width;
int height;
// Loads texture from file specified by path
bool load_from_file(const std::string &path);
bool is_valid()const; // True if texture is valid
bool create_from_screen(GLFWwindow const * const window); // Screen texture
};
struct SpawnLimits {
int MAX_BASIC_ENEMIES;
int MAX_SHOOTING_ENEMIES;
int MAX_SPEED_ENEMIES;
int MAX_FRAMES_UNTIL_SPAWN;
int MAX_FRAMES_TO_DECREMENT;
int DEFAULT_FRAMES_UNTIL_SPEEDUP;
int MIN_FRAMES_UNTIL_SPAWN;
int FRAMES_TO_SPEEDUP_BY;
float TIME_PER_ABILITY_SPAWN;
int MAX_FRAMES_UNTIL_SHOOT;
int MAX_BOSS_ENEMIES;
int MAX_BOSS2_ENEMIES;
std::vector<AbilityType> SPAWNABLE_ABILITIES;
std::vector<EnemyType> SPAWNABLE_ENEMIES;
};
// An entity boils down to a collection of components,
// organized by their in-game context (mesh, effect, motion, etc...)
// struct Entity {
// // projection contains the orthographic projection matrix. As every Entity::draw()
// // renders itself it needs it to correctly bind it to its shader.
// virtual void draw(const mat3& projection) = 0;
// protected:
// // A Mesh is a collection of a VertexBuffer and an IndexBuffer. A VAO
// // represents a Vertex Array Object and is the container for 1 or more Vertex Buffers and
// // an Index Buffer.
// struct Mesh {
// GLuint vao;
// GLuint vbo;
// GLuint ibo;
// } mesh;
// // Effect component of Entity for Vertex and Fragment shader, which are then put(linked) together in a
// // single program that is then bound to the pipeline.
// struct Effect {
// GLuint vertex;
// GLuint fragment;
// GLuint program;
// bool load_from_file(const char* vs_path, const char* fs_path); // load shaders from files and link into program
// void release(); // release shaders and program
// } effect;
// // All data relevant to the motion of the salmon.
// struct Motion {
// vec2 positionComp;
// float radians;
// float speed;
// } motion;
// // Scale is used in the bounding box calculations,
// // and so contextually belongs here (for now).
// struct Physics {
// vec2 scale;
// } physics;
// // Transform component handles transformations passed to the Vertex shader.
// // gl Immediate mode equivalent, see the Rendering and Transformations section in the
// // specification pdf.
// struct Transform {
// mat3 out;
// void begin();
// void scale(vec2 scale);
// void rotate(float radians);
// void translate(vec2 offset);
// void end();
// } transform;
// };
|
3af76130bc8ebfd8e569df0a6fb1332c2d21c4d9
|
88ae8695987ada722184307301e221e1ba3cc2fa
|
/v8/src/codegen/riscv/extension-riscv-d.h
|
e7a707a793cf6fde74d360f9a292159d8c7f623b
|
[
"BSD-3-Clause",
"SunPro",
"Apache-2.0"
] |
permissive
|
iridium-browser/iridium-browser
|
71d9c5ff76e014e6900b825f67389ab0ccd01329
|
5ee297f53dc7f8e70183031cff62f37b0f19d25f
|
refs/heads/master
| 2023-08-03T16:44:16.844552
| 2023-07-20T15:17:00
| 2023-07-23T16:09:30
| 220,016,632
| 341
| 40
|
BSD-3-Clause
| 2021-08-13T13:54:45
| 2019-11-06T14:32:31
| null |
UTF-8
|
C++
| false
| false
| 3,495
|
h
|
extension-riscv-d.h
|
// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/codegen/assembler.h"
#include "src/codegen/riscv/base-assembler-riscv.h"
#include "src/codegen/riscv/constant-riscv-d.h"
#include "src/codegen/riscv/register-riscv.h"
#ifndef V8_CODEGEN_RISCV_EXTENSION_RISCV_D_H_
#define V8_CODEGEN_RISCV_EXTENSION_RISCV_D_H_
namespace v8 {
namespace internal {
class AssemblerRISCVD : public AssemblerRiscvBase {
// RV32D Standard Extension
public:
void fld(FPURegister rd, Register rs1, int16_t imm12);
void fsd(FPURegister source, Register base, int16_t imm12);
void fmadd_d(FPURegister rd, FPURegister rs1, FPURegister rs2,
FPURegister rs3, FPURoundingMode frm = RNE);
void fmsub_d(FPURegister rd, FPURegister rs1, FPURegister rs2,
FPURegister rs3, FPURoundingMode frm = RNE);
void fnmsub_d(FPURegister rd, FPURegister rs1, FPURegister rs2,
FPURegister rs3, FPURoundingMode frm = RNE);
void fnmadd_d(FPURegister rd, FPURegister rs1, FPURegister rs2,
FPURegister rs3, FPURoundingMode frm = RNE);
void fadd_d(FPURegister rd, FPURegister rs1, FPURegister rs2,
FPURoundingMode frm = RNE);
void fsub_d(FPURegister rd, FPURegister rs1, FPURegister rs2,
FPURoundingMode frm = RNE);
void fmul_d(FPURegister rd, FPURegister rs1, FPURegister rs2,
FPURoundingMode frm = RNE);
void fdiv_d(FPURegister rd, FPURegister rs1, FPURegister rs2,
FPURoundingMode frm = RNE);
void fsqrt_d(FPURegister rd, FPURegister rs1, FPURoundingMode frm = RNE);
void fsgnj_d(FPURegister rd, FPURegister rs1, FPURegister rs2);
void fsgnjn_d(FPURegister rd, FPURegister rs1, FPURegister rs2);
void fsgnjx_d(FPURegister rd, FPURegister rs1, FPURegister rs2);
void fmin_d(FPURegister rd, FPURegister rs1, FPURegister rs2);
void fmax_d(FPURegister rd, FPURegister rs1, FPURegister rs2);
void fcvt_s_d(FPURegister rd, FPURegister rs1, FPURoundingMode frm = RNE);
void fcvt_d_s(FPURegister rd, FPURegister rs1, FPURoundingMode frm = RNE);
void feq_d(Register rd, FPURegister rs1, FPURegister rs2);
void flt_d(Register rd, FPURegister rs1, FPURegister rs2);
void fle_d(Register rd, FPURegister rs1, FPURegister rs2);
void fclass_d(Register rd, FPURegister rs1);
void fcvt_w_d(Register rd, FPURegister rs1, FPURoundingMode frm = RNE);
void fcvt_wu_d(Register rd, FPURegister rs1, FPURoundingMode frm = RNE);
void fcvt_d_w(FPURegister rd, Register rs1, FPURoundingMode frm = RNE);
void fcvt_d_wu(FPURegister rd, Register rs1, FPURoundingMode frm = RNE);
#ifdef V8_TARGET_ARCH_RISCV64
// RV64D Standard Extension (in addition to RV32D)
void fcvt_l_d(Register rd, FPURegister rs1, FPURoundingMode frm = RNE);
void fcvt_lu_d(Register rd, FPURegister rs1, FPURoundingMode frm = RNE);
void fmv_x_d(Register rd, FPURegister rs1);
void fcvt_d_l(FPURegister rd, Register rs1, FPURoundingMode frm = RNE);
void fcvt_d_lu(FPURegister rd, Register rs1, FPURoundingMode frm = RNE);
void fmv_d_x(FPURegister rd, Register rs1);
#endif
void fmv_d(FPURegister rd, FPURegister rs) { fsgnj_d(rd, rs, rs); }
void fabs_d(FPURegister rd, FPURegister rs) { fsgnjx_d(rd, rs, rs); }
void fneg_d(FPURegister rd, FPURegister rs) { fsgnjn_d(rd, rs, rs); }
};
} // namespace internal
} // namespace v8
#endif // V8_CODEGEN_RISCV_EXTENSION_RISCV_D_H_
|
ab0cc4803f2cb53ec9b8285cd61238ede1659285
|
6373c610f3ff1679d146f80186016843005825f5
|
/1078.cpp
|
f48128291edb41b9d820160f09ddb5bbd5510d23
|
[] |
no_license
|
yongwhan/timus
|
d941ad557d9e5568e592da52f728dd5b48201420
|
be41fcb267395dd431d97d11f53a92640e3fdb62
|
refs/heads/master
| 2020-11-28T02:10:39.487441
| 2019-12-23T04:36:43
| 2019-12-23T04:36:43
| 229,676,992
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,000
|
cpp
|
1078.cpp
|
#include<bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
int n; cin>>n;
vector<int> l(n), r(n);
for (int i=0; i<n; i++)
cin>>l[i]>>r[i];
vector<vector<int>> child(n);
vector<int> indeg(n,0), dist(n,INT_MIN), par(n,-1);
for (int i=0; i<n; i++)
for (int j=0; j<n; j++)
if(i!=j&&l[i]<l[j]&&r[j]<r[i])
child[i].push_back(j), indeg[j]++;
queue<int> q;
for (int i=0; i<n; i++)
if(!indeg[i])
q.push(i), dist[i]=1;
while(!q.empty()) {
int cur=q.front(); q.pop();
for (const auto &nxt : child[cur])
if(dist[nxt]<dist[cur]+1)
dist[nxt]=dist[cur]+1, q.push(nxt), par[nxt]=cur;
}
int mx=*max_element(dist.begin(), dist.end()), cur=-1;
for (int i=0; i<n; i++)
if(dist[i]==mx)
cur=i;
cout<<mx<<endl;
vector<int> seq;
while(1) {
seq.push_back(cur);
if(par[cur]==-1) break;
cur=par[cur];
}
int sz=seq.size();
for (int i=0; i<sz; i++) {
if(i) cout<<" ";
cout<<seq[i]+1;
}
cout<<endl;
return 0;
}
|
3e91dd2eb44784721e0aa51535b65273b3d4fd8c
|
dddf681d54655429d03e834e9a7ac058a3bf9c14
|
/lista 1/distanciaponto.cpp
|
5d3f69e8071dfab0d7d28ef7a35a0b8b9f94172a
|
[] |
no_license
|
Delvani/intro-de-algoritimos
|
2647c43739ed890b4f4213055c62b0252f18117d
|
7c6132c3e729297585f898db2da1b3f65a95b7ac
|
refs/heads/master
| 2022-11-08T09:47:56.124677
| 2020-06-18T15:05:22
| 2020-06-18T15:05:22
| 273,265,317
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 204
|
cpp
|
distanciaponto.cpp
|
#include <iostream>
#include <cmath>
using namespace std;
int main(){
float x1,y1,x2,y2,d;
cin >> x1 >> y1 >> x2 >> y2;
d = sqrt((pow(x2-x1,2))+pow(y2-y1,2));
cout << d << endl;
return 0;
}
|
613b390c4abdb3da75cc8d919d87db81c171754d
|
4c6574534cc8dd7f582ee98603116b46ab608160
|
/PhaseJump/PhaseJump/Classes/Layout/LinePathLayout.h
|
6e832271efe2c872c2758099978ca95bb02c85e5
|
[
"MIT"
] |
permissive
|
coinbump/PhaseJumpPro
|
01b1805aac4a8dd0a17feb3ae9a06d76fbf63926
|
52f806cc7db9ef134a5e1786347c350cb8e2e4c3
|
refs/heads/main
| 2023-06-27T13:30:37.192977
| 2023-06-18T03:25:38
| 2023-06-18T03:25:38
| 127,684,651
| 50
| 5
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 481
|
h
|
LinePathLayout.h
|
#ifndef PJLINEPATHLAYOUT_H
#define PJLINEPATHLAYOUT_H
#include "Vector3.h"
#include "SomePathLayout.h"
#include "LinePath.h"
namespace PJ
{
/// <summary>
/// Distribute objects along a circle path
/// </summary>
class LinePathLayout : public SomePathLayout
{
public:
Vector3 start;
Vector3 end;
SP<SomePath> BuildPath() override
{
return SCAST<SomePath>(MAKE<LinePath>(start, end));
}
};
}
#endif
|
1ae7debbc2e541e0ec6c74f6746f8f7052232a2b
|
04a4a7723b627e0c78b1e9c9dc59058f5f9a2842
|
/Exercicios/88.cpp
|
fb9d5cb2bb4b7795ee1cfed6bd24b96346f70afd
|
[
"MIT"
] |
permissive
|
thiago1591/Exercicios_LinguagemC_1periodo
|
56e861cf5e946099577d9cd9fa6b73279e72c370
|
a7affcbb121493ef8abb556a6bdb7c28926144df
|
refs/heads/master
| 2022-10-17T01:13:46.396203
| 2020-06-12T05:51:08
| 2020-06-12T05:51:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 376
|
cpp
|
88.cpp
|
#include <stdio.h>
#include <string.h>
int main()
{
float num;
char resp;
FILE *file;
file = fopen("result.txt", "r");
if(file==NULL)
{
printf("Arquivo nao pode ser aberto\n");
return 0;
}
do
{
printf("digite S para continuar ou N para encerrar");
printf("Digite um numero de telefone para para ser armazenado");
scanf("%2.f", num);
}while (strcmp(resp,"S") ==0)
}
|
c7b512df546eef842ba34f5e3c77eb9e1aac3504
|
85a3266fbcb131cb9032324ab19b727013be6fd8
|
/src/lib/abstract/file/file_plugins/attachment/attachment.hpp
|
7ce8d3a50db53e945d877109d00eb26d90cdd481
|
[] |
no_license
|
TobiasLino/Corretora
|
38683bb0193cd19951eb729e4e6dca713183a805
|
c05f44ed161643bebf4a08e5c7db91919e04282f
|
refs/heads/master
| 2020-09-01T20:48:26.273176
| 2020-02-12T02:15:00
| 2020-02-12T02:15:00
| 219,052,767
| 0
| 0
| null | 2020-02-12T02:08:45
| 2019-11-01T19:50:25
|
C++
|
UTF-8
|
C++
| false
| false
| 201
|
hpp
|
attachment.hpp
|
#ifndef SRC_LIB_FILE_FILE_PLUGINS_ATTACHMENT_ATTACHMENT_HPP
#define SRC_LIB_FILE_FILE_PLUGINS_ATTACHMENT_ATTACHMENT_HPP
class Anexo {};
#endif // SRC_LIB_FILE_FILE_PLUGINS_ATTACHMENT_ATTACHMENT_HPP
|
b60beb36d612a1e0ee9a268ebcf53a49be3812e1
|
4506e6ceb97714292c3250023b634c3a07b73d5b
|
/KutoEngine/kuto/kuto_bmp_loader.h
|
f815bb8cc246f0e752ed3c424a579005a4fb8085
|
[] |
no_license
|
take-cheeze/rpgtukuru-iphone
|
76f23ddfe015018c9ae44b5e887cf837eb061bdf
|
3447dbfab84ed1f17e46e9d6936c28b766dadd36
|
refs/heads/master
| 2016-09-05T10:47:30.461471
| 2011-11-01T09:45:19
| 2011-11-01T09:45:19
| 1,151,984
| 2
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,185
|
h
|
kuto_bmp_loader.h
|
/**
* @file
* @brief PNG Image Loader
* @author project.kuto
*/
#pragma once
#include "kuto_types.h"
#include "kuto_math.h"
namespace kuto {
class LoadTextureCore;
class BmpLoader
{
public:
bool createTexture(char* bytes, LoadTextureCore& core, bool useAlphaPalette, int hue);
protected:
virtual const char* signature() { return "BM"; }
private:
static const uint SIGNATURE_SIZE = 2;
static const uint LINE_ALIGN = 4;
#pragma pack(push, 1)
struct FileHeader
{
u8 signature[SIGNATURE_SIZE];
u32 fileSize;
u16 reserved1, reserved2;
u32 offset;
};
struct CoreHeader
{
u32 headerSize;
u16 width, height;
u16 planeNum;
u16 bitsPerPixel;
};
struct InfoHeader
{
u32 headerSize;
u32 width, height;
u16 planeNum;
u16 bitsPerPixel;
u32 compressType;
u32 imageDataSize;
u32 horizontalRes, verticalRes;
u32 usingColorNum;
u32 importantColorNum;
};
struct RgbTriple
{
u8 blue;
u8 green;
u8 red;
};
struct RgbQuad
{
u8 blue;
u8 green;
u8 red;
u8 reserved;
};
#pragma pack(pop)
enum CompressType
{
BI_RGB = 0,
BI_RLE8,
BI_RLE4,
BI_BITFIELDS,
BI_JPEG,
BI_PNG,
};
}; // class BmpLoader
} // namespace kuto
|
4bc9482069e54ffae610328e1d6b208ff529ff09
|
1203aa93ab059dd5fad1eabfe2143a22d1bcfdb3
|
/Dustin_SMS_Project/Dustin_SMS_Project.ino
|
a5c3b51f23ed837076f7a73a537dca2f3a828437
|
[] |
no_license
|
iamtheream/brothersSmsDevice
|
15f4e8c90031ff8a8db98b18e285ae7c64d8464f
|
32116daa210e29b4a39760b6bec67253c38a7645
|
refs/heads/master
| 2021-01-01T18:12:24.432488
| 2013-11-08T00:57:35
| 2013-11-08T00:57:35
| 14,220,392
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 16,952
|
ino
|
Dustin_SMS_Project.ino
|
#include <Bridge.h>
#include <Temboo.h>
#include "TembooAccount.h" // contains Temboo account information
// as described in the footer comment below
#define TEMBOO_ACCOUNT "accountNumber" // your Temboo account name
#define TEMBOO_APP_KEY_NAME "accontName" // your Temboo app key name
#define TEMBOO_APP_KEY "appKey" // your Temboo app key
int button1 = 11; // button1 put into pin 11
int button2 = 10; // button1 put into pin 10
int button3 = 9; // button1 put into pin 9
int button4 = 8; // button1 put into pin 8
int button5 = 7; // button1 put into pin 7
int button6 = 6; // button1 put into pin 6
int ledRed = 13; // led put into pin 12
int ledGreen = 12; // led pit into pin 13
int buttonState1 = 0;
int buttonState2 = 0;
int buttonState3 = 0;
int buttonState4 = 0;
int buttonState5 = 0;
int buttonState6 = 0;
/*** SUBSTITUTE YOUR VALUES BELOW: ***/
// Note that for additional security and reusability, you could
// use #define statements to specify these values in a .h file.
// the Account SID from your Twilio account
const String TWILIO_ACCOUNT_SID = "youAccountInfoHere";
// the Auth Token from your Twilio account
const String TWILIO_AUTH_TOKEN = "authoTokenHere";
// your Twilio phone number, e.g., "+1 555-222-1212"
const String TWILIO_NUMBER = "+1 ***-***-****";
// the number to which the SMS should be sent, e.g., "+1 555-222-1212"
const String RECIPIENT_NUMBER = "+1 youNumberHere";
// a flag to indicate whether we've attempted to send the SMS yet or not
boolean attempted = false;
boolean attempted1 = false;
boolean attempted2 = false;
boolean attempted3 = false;
boolean attempted4 = false;
boolean attempted5 = false;
void setup() {
Serial.begin(9600);
pinMode(button1, INPUT);
pinMode(button2, INPUT);
pinMode(button3, INPUT);
pinMode(button4, INPUT);
pinMode(button5, INPUT);
pinMode(button6, INPUT);
pinMode(ledRed, OUTPUT);
pinMode(ledGreen, OUTPUT);
Serial.print("setUpComplete");
// for debugging, wait until a serial console is connected
delay(4000);
while(!Serial);
Bridge.begin();
}
void loop()
{
buttonState1 = digitalRead(button1);
buttonState2 = digitalRead(button2);
buttonState3 = digitalRead(button3);
buttonState4 = digitalRead(button4);
buttonState5 = digitalRead(button5);
buttonState6 = digitalRead(button6);
digitalWrite(ledRed, HIGH);
if(buttonState1 == HIGH) {
Serial.println("Starting SMS 1");
digitalWrite(ledRed, LOW);
// only try to send the SMS if we haven't already sent it successfully
if (attempted = true) {
Serial.println("Running SendAnSMS...");
// we need a Process object to send a Choreo request to Temboo
TembooChoreo SendSMSChoreo;
digitalWrite(ledRed, HIGH);
// invoke the Temboo client
// NOTE that the client must be reinvoked and repopulated with
// appropriate arguments each time its run() method is called.
SendSMSChoreo.begin();
// set Temboo account credentials
SendSMSChoreo.setAccountName(TEMBOO_ACCOUNT);
SendSMSChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME);
SendSMSChoreo.setAppKey(TEMBOO_APP_KEY);
digitalWrite(ledRed, LOW);
// identify the Temboo Library choreo to run (Twilio > SMSMessages > SendSMS)
SendSMSChoreo.setChoreo("/Library/Twilio/SMSMessages/SendSMS");
// the first input is a your AccountSID
SendSMSChoreo.addInput("AccountSID", TWILIO_ACCOUNT_SID);
// next is your Auth Token
SendSMSChoreo.addInput("AuthToken", TWILIO_AUTH_TOKEN);
// next is your Twilio phone number
SendSMSChoreo.addInput("From", TWILIO_NUMBER);
// next, what number to send the SMS to
SendSMSChoreo.addInput("To", RECIPIENT_NUMBER);
// finally, the text of the message to send
SendSMSChoreo.addInput("Body", "Message 1");
digitalWrite(ledRed, HIGH);
// tell the Process to run and wait for the results. The
// return code (returnCode) will tell us whether the Temboo client
// was able to send our request to the Temboo servers
unsigned int returnCode = SendSMSChoreo.run();
// a return code of zero (0) means everything worked
if (returnCode == 0) {
Serial.println("Success! SMS sent!");
digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, HIGH);
delay(3500);
digitalWrite(ledGreen, LOW);
digitalWrite(ledRed, HIGH);
buttonState1 = LOW;
} else {
// a non-zero return code means there was an error
// read and print the error message
while (SendSMSChoreo.available()) {
char c = SendSMSChoreo.read();
Serial.print(c);
}
}
SendSMSChoreo.close();
// set the flag indicatine we've tried once.
attempted=true;
}
}
if(buttonState2 == HIGH) {
Serial.println("Starting SMS 2");
digitalWrite(ledRed, LOW);
// only try to send the SMS if we haven't already sent it successfully
if (attempted1 = true) {
Serial.println("Running SendAnSMS...");
// we need a Process object to send a Choreo request to Temboo
TembooChoreo SendSMSChoreo1;
digitalWrite(ledRed, HIGH);
// invoke the Temboo client
// NOTE that the client must be reinvoked and repopulated with
// appropriate arguments each time its run() method is called.
SendSMSChoreo1.begin();
// set Temboo account credentials
SendSMSChoreo1.setAccountName(TEMBOO_ACCOUNT);
SendSMSChoreo1.setAppKeyName(TEMBOO_APP_KEY_NAME);
SendSMSChoreo1.setAppKey(TEMBOO_APP_KEY);
digitalWrite(ledRed, LOW);
// identify the Temboo Library choreo to run (Twilio > SMSMessages > SendSMS)
SendSMSChoreo1.setChoreo("/Library/Twilio/SMSMessages/SendSMS");
// the first input is a your AccountSID
SendSMSChoreo1.addInput("AccountSID", TWILIO_ACCOUNT_SID);
// next is your Auth Token
SendSMSChoreo1.addInput("AuthToken", TWILIO_AUTH_TOKEN);
// next is your Twilio phone number
SendSMSChoreo1.addInput("From", TWILIO_NUMBER);
// next, what number to send the SMS to
SendSMSChoreo1.addInput("To", RECIPIENT_NUMBER);
// finally, the text of the message to send
SendSMSChoreo1.addInput("Body", "Message 2");
digitalWrite(ledRed, HIGH);
// tell the Process to run and wait for the results. The
// return code (returnCode) will tell us whether the Temboo client
// was able to send our request to the Temboo servers
unsigned int returnCode = SendSMSChoreo1.run();
// a return code of zero (0) means everything worked
if (returnCode == 0) {
Serial.println("Success! SMS sent!");
digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, HIGH);
delay(3500);
digitalWrite(ledGreen, LOW);
digitalWrite(ledRed, HIGH);
buttonState2 = LOW;
} else {
// a non-zero return code means there was an error
// read and print the error message
while (SendSMSChoreo1.available()) {
char c = SendSMSChoreo1.read();
Serial.print(c);
}
}
SendSMSChoreo1.close();
// set the flag indicatine we've tried once.
attempted1=true;
}
}
if(buttonState3 == HIGH) {
Serial.println("Starting SMS 3");
digitalWrite(ledRed, LOW);
// only try to send the SMS if we haven't already sent it successfully
if (attempted2 = true) {
Serial.println("Running SendAnSMS...");
// we need a Process object to send a Choreo request to Temboo
TembooChoreo SendSMSChoreo2;
digitalWrite(ledRed, HIGH);
// invoke the Temboo client
// NOTE that the client must be reinvoked and repopulated with
// appropriate arguments each time its run() method is called.
SendSMSChoreo2.begin();
// set Temboo account credentials
SendSMSChoreo2.setAccountName(TEMBOO_ACCOUNT);
SendSMSChoreo2.setAppKeyName(TEMBOO_APP_KEY_NAME);
SendSMSChoreo2.setAppKey(TEMBOO_APP_KEY);
digitalWrite(ledRed, LOW);
// identify the Temboo Library choreo to run (Twilio > SMSMessages > SendSMS)
SendSMSChoreo2.setChoreo("/Library/Twilio/SMSMessages/SendSMS");
// the first input is a your AccountSID
SendSMSChoreo2.addInput("AccountSID", TWILIO_ACCOUNT_SID);
// next is your Auth Token
SendSMSChoreo2.addInput("AuthToken", TWILIO_AUTH_TOKEN);
// next is your Twilio phone number
SendSMSChoreo2.addInput("From", TWILIO_NUMBER);
// next, what number to send the SMS to
SendSMSChoreo2.addInput("To", RECIPIENT_NUMBER);
// finally, the text of the message to send
SendSMSChoreo2.addInput("Body", "Message 3");
digitalWrite(ledRed, HIGH);
// tell the Process to run and wait for the results. The
// return code (returnCode) will tell us whether the Temboo client
// was able to send our request to the Temboo servers
unsigned int returnCode = SendSMSChoreo2.run();
// a return code of zero (0) means everything worked
if (returnCode == 0) {
Serial.println("Success! SMS sent!");
digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, HIGH);
delay(3500);
digitalWrite(ledGreen, LOW);
digitalWrite(ledRed, HIGH);
buttonState3 = LOW;
} else {
// a non-zero return code means there was an error
// read and print the error message
while (SendSMSChoreo2.available()) {
char c = SendSMSChoreo2.read();
Serial.print(c);
}
}
SendSMSChoreo2.close();
// set the flag indicatine we've tried once.
attempted2=true;
}
}
if(buttonState4 == HIGH) {
Serial.println("Starting SMS 4");
digitalWrite(ledRed, LOW);
// only try to send the SMS if we haven't already sent it successfully
if (attempted3 = true) {
Serial.println("Running SendAnSMS...");
// we need a Process object to send a Choreo request to Temboo
TembooChoreo SendSMSChoreo3;
digitalWrite(ledRed, HIGH);
// invoke the Temboo client
// NOTE that the client must be reinvoked and repopulated with
// appropriate arguments each time its run() method is called.
SendSMSChoreo3.begin();
// set Temboo account credentials
SendSMSChoreo3.setAccountName(TEMBOO_ACCOUNT);
SendSMSChoreo3.setAppKeyName(TEMBOO_APP_KEY_NAME);
SendSMSChoreo3.setAppKey(TEMBOO_APP_KEY);
digitalWrite(ledRed, LOW);
// identify the Temboo Library choreo to run (Twilio > SMSMessages > SendSMS)
SendSMSChoreo3.setChoreo("/Library/Twilio/SMSMessages/SendSMS");
// the first input is a your AccountSID
SendSMSChoreo3.addInput("AccountSID", TWILIO_ACCOUNT_SID);
// next is your Auth Token
SendSMSChoreo3.addInput("AuthToken", TWILIO_AUTH_TOKEN);
// next is your Twilio phone number
SendSMSChoreo3.addInput("From", TWILIO_NUMBER);
// next, what number to send the SMS to
SendSMSChoreo3.addInput("To", RECIPIENT_NUMBER);
// finally, the text of the message to send
SendSMSChoreo3.addInput("Body", "Message 4");
digitalWrite(ledRed, HIGH);
// tell the Process to run and wait for the results. The
// return code (returnCode) will tell us whether the Temboo client
// was able to send our request to the Temboo servers
unsigned int returnCode = SendSMSChoreo3.run();
// a return code of zero (0) means everything worked
if (returnCode == 0) {
Serial.println("Success! SMS sent!");
digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, HIGH);
delay(3500);
digitalWrite(ledGreen, LOW);
digitalWrite(ledRed, HIGH);
buttonState4 = LOW;
} else {
// a non-zero return code means there was an error
// read and print the error message
while (SendSMSChoreo3.available()) {
char c = SendSMSChoreo3.read();
Serial.print(c);
}
}
SendSMSChoreo3.close();
// set the flag indicatine we've tried once.
attempted3=true;
}
}
if(buttonState5 == HIGH) {
Serial.println("Starting SMS 5");
digitalWrite(ledRed, LOW);
// only try to send the SMS if we haven't already sent it successfully
if (attempted4 = true) {
Serial.println("Running SendAnSMS...");
// we need a Process object to send a Choreo request to Temboo
TembooChoreo SendSMSChoreo4;
digitalWrite(ledRed, HIGH);
// invoke the Temboo client
// NOTE that the client must be reinvoked and repopulated with
// appropriate arguments each time its run() method is called.
SendSMSChoreo4.begin();
// set Temboo account credentials
SendSMSChoreo4.setAccountName(TEMBOO_ACCOUNT);
SendSMSChoreo4.setAppKeyName(TEMBOO_APP_KEY_NAME);
SendSMSChoreo4.setAppKey(TEMBOO_APP_KEY);
digitalWrite(ledRed, LOW);
// identify the Temboo Library choreo to run (Twilio > SMSMessages > SendSMS)
SendSMSChoreo4.setChoreo("/Library/Twilio/SMSMessages/SendSMS");
// the first input is a your AccountSID
SendSMSChoreo4.addInput("AccountSID", TWILIO_ACCOUNT_SID);
// next is your Auth Token
SendSMSChoreo4.addInput("AuthToken", TWILIO_AUTH_TOKEN);
// next is your Twilio phone number
SendSMSChoreo4.addInput("From", TWILIO_NUMBER);
// next, what number to send the SMS to
SendSMSChoreo4.addInput("To", RECIPIENT_NUMBER);
// finally, the text of the message to send
SendSMSChoreo4.addInput("Body", "Message 5");
digitalWrite(ledRed, HIGH);
// tell the Process to run and wait for the results. The
// return code (returnCode) will tell us whether the Temboo client
// was able to send our request to the Temboo servers
unsigned int returnCode = SendSMSChoreo4.run();
// a return code of zero (0) means everything worked
if (returnCode == 0) {
Serial.println("Success! SMS sent!");
digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, HIGH);
delay(3500);
digitalWrite(ledGreen, LOW);
digitalWrite(ledRed, HIGH);
buttonState5 = LOW;
} else {
// a non-zero return code means there was an error
// read and print the error message
while (SendSMSChoreo4.available()) {
char c = SendSMSChoreo4.read();
Serial.print(c);
}
}
SendSMSChoreo4.close();
// set the flag indicatine we've tried once.
attempted4=true;
}
}
if(buttonState6 == HIGH) {
Serial.println("Starting SMS 6");
digitalWrite(ledRed, LOW);
// only try to send the SMS if we haven't already sent it successfully
if (attempted5 = true) {
Serial.println("Running SendAnSMS...");
// we need a Process object to send a Choreo request to Temboo
TembooChoreo SendSMSChoreo5;
digitalWrite(ledRed, HIGH);
// invoke the Temboo client
// NOTE that the client must be reinvoked and repopulated with
// appropriate arguments each time its run() method is called.
SendSMSChoreo5.begin();
// set Temboo account credentials
SendSMSChoreo5.setAccountName(TEMBOO_ACCOUNT);
SendSMSChoreo5.setAppKeyName(TEMBOO_APP_KEY_NAME);
SendSMSChoreo5.setAppKey(TEMBOO_APP_KEY);
digitalWrite(ledRed, LOW);
// identify the Temboo Library choreo to run (Twilio > SMSMessages > SendSMS)
SendSMSChoreo5.setChoreo("/Library/Twilio/SMSMessages/SendSMS");
// the first input is a your AccountSID
SendSMSChoreo5.addInput("AccountSID", TWILIO_ACCOUNT_SID);
// next is your Auth Token
SendSMSChoreo5.addInput("AuthToken", TWILIO_AUTH_TOKEN);
// next is your Twilio phone number
SendSMSChoreo5.addInput("From", TWILIO_NUMBER);
// next, what number to send the SMS to
SendSMSChoreo5.addInput("To", RECIPIENT_NUMBER);
// finally, the text of the message to send
SendSMSChoreo5.addInput("Body", "Message 6");
digitalWrite(ledRed, HIGH);
// tell the Process to run and wait for the results. The
// return code (returnCode) will tell us whether the Temboo client
// was able to send our request to the Temboo servers
unsigned int returnCode = SendSMSChoreo5.run();
// a return code of zero (0) means everything worked
if (returnCode == 0) {
Serial.println("Success! SMS sent!");
digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, HIGH);
delay(3500);
digitalWrite(ledGreen, LOW);
digitalWrite(ledRed, HIGH);
buttonState6 = LOW;
} else {
// a non-zero return code means there was an error
// read and print the error message
while (SendSMSChoreo5.available()) {
char c = SendSMSChoreo5.read();
Serial.print(c);
}
}
SendSMSChoreo5.close();
// set the flag indicatine we've tried once.
attempted5=true;
}
}
}
|
4a02a73f194d8655374c7aa27b3abf85907bd6a4
|
4aa3ff56e35d2d4cdeba40f45795f62f276859b3
|
/Engine/Contents/Login/UICharacterCreateNew.cpp
|
f959626dbd3060585dc7149a90e123b702deabd1
|
[
"Apache-2.0"
] |
permissive
|
SixShoot/lastchaos-source-client
|
fde6a750afc4d7c5df3e9e0c542b056573c1b42d
|
3d88594dba7347b1bb45378136605e31f73a8555
|
refs/heads/master
| 2023-06-28T17:20:35.951648
| 2021-07-31T21:51:49
| 2021-07-31T21:51:49
| null | 0
| 0
| null | null | null | null |
UHC
|
C++
| false
| false
| 38,344
|
cpp
|
UICharacterCreateNew.cpp
|
#include "StdH.h"
#include <Engine/Interface/UIInternalClasses.h>
#include <Engine/GlobalDefinition.h>
#include "UICharacterCreateNew.h"
#include <Engine/Entities/InternalClasses.h>
#include <Engine/GameState.h>
#include <Engine/Sound/SoundLibrary.h> // 서정원 로긴 관련 사운드 처리
#include <Engine/GameDataManager/GameDataManager.h>
#include <Engine/Contents/Login/CharacterCreateNew.h>
#include <Engine/Contents/Login/CharacterCreateNewCmd.h>
#include <Engine/Base/KeyNames.h>
#include <Engine/Contents/Login/BackImageManager.h>
#include <Engine/Entities/ArmorPreview.h>
#include <EntitiesMP/Common/CharacterDefinition.h>
#include <Engine/Help/Util_Help.h>
#include <Engine/Effect/CTag.h>
#include <Engine/Effect/CSkaEffect.h>
#include <Engine/JobInfo.h>
#include <Engine/GameStageManager/StageMgr.h>
extern INDEX g_iCountry;
#define MIN_NAME_LEN (4)
#define MAX_NAME_LEN (16)
enum eClassSex
{
CLASS_SEX_MAN = 0,
CLASS_SEX_WOMAN,
CLASS_SEX_MAX,
};
#define DEF_FACE 8
#define DEF_HAIR 9
#define DEF_DEFAULT_ANGLE (180.0f)
const int m_nSocialIdx[CLASS_SEX_MAX][DEF_SOCIAL_MAX] =
{ /*0남, 1여*/
{10, 11, 14, 15, 17, 20, 21, 22},
{10, 11, 14, 15, 18, 20, 21, 22}
};
CUICharacterCreateNew::CUICharacterCreateNew(void)
// Center UI ///////////////////////
: m_pImgArrSelJob_left(NULL)
, m_pImgArrSelJob_center(NULL)
, m_pImgArrSelJob_right(NULL)
, m_pstrSelJob(NULL)
, m_pbtnSelJob_left(NULL)
, m_pbtnSelJob_right(NULL)
, m_pbtnRot_left(NULL)
, m_pbtnRot_right(NULL)
, m_pbtnZoom_In(NULL)
, m_pbtnZoom_Out(NULL)
, m_pbtnChar_Create(NULL)
, m_pebCharName(NULL)
, m_pImgSelJob_Arrow_highlight_left(NULL)
, m_pImgSelJob_Arrow_highlight_right(NULL)
// Left UI /////////////////////////
, m_pstrJob(NULL)
, m_ptbJobDesc(NULL)
, m_pstrDualJob(NULL)
, m_ptbDualJobDesc(NULL)
// Right UI ////////////////////////
, m_pArrayFace(NULL)
, m_pbtnFace_left(NULL)
, m_pbtnFace_right(NULL)
, m_pArrayHair(NULL)
, m_pbtnHair_left(NULL)
, m_pbtnHair_right(NULL)
, m_pArrayWear(NULL)
, m_pbtnWear_left(NULL)
, m_pbtnWear_right(NULL)
, m_pArraySocial(NULL)
, m_pbtnSocial_left(NULL)
, m_pbtnSocial_right(NULL)
// main UI /////////////////////////
, m_pbtnClose(NULL)
, m_pMouseWheel(NULL)
, m_fZSpeed(0.02f)
, m_fYSpeed(0.01f)
, m_fAngle(3.0f)
, m_nPlayActionId(0)
, m_eAniState(UI_ANI_NONE)
, m_fMinDistance(0.0f)
, m_fMaxDistance(0.0f)
, m_fMinHeight(0.0f)
, m_fMaxHeight(0.0f)
/////////////// UI END /////////////
{
for (int i = 0; i < UI_BASE_MAX; i++)
{
m_pUIBase[i] = NULL;
}
setInherit(false);
}
CUICharacterCreateNew::~CUICharacterCreateNew(void)
{
Destroy();
}
void CUICharacterCreateNew::OpenUI()
{
if (IsVisible() == TRUE)
return;
SetVisible(TRUE);
Hide(FALSE);
CUIManager* pUimgr = CUIManager::getSingleton();
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
pCharCreate->Reset();
Lock(FALSE);
ResetName();
ResetSelect();
// 캐릭터 생성창 셋팅
SetSelectJobInfo();
pUimgr->RearrangeOrder(UI_CREATE_CHAR, TRUE);
}
void CUICharacterCreateNew::CloseUI()
{
SetVisible(FALSE);
Hide(TRUE);
Lock(FALSE);
m_eAniState = UI_ANI_NONE;
CUIManager* pUIMgr = CUIManager::getSingleton();
GameDataManager* pGame = GameDataManager::getSingleton();
CUITooltipMgr::getSingleton()->setData(NULL);
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
int nIdx = pCharCreate->GetSelJob();
// 캐릭터 선택창으로 이동
_pGameState->ClearModelEffect(nIdx, LOGIN_MODEL_TYPE_CREATEUI);
pUIMgr->RearrangeOrder(UI_CREATE_CHAR, FALSE);
CUIBase::CloseProc();
}
void CUICharacterCreateNew::initialize()
{
// main
m_pbtnClose = (CUIButton*)findUI("btn_close");
if (m_pbtnClose != NULL)
{
CmdCharCreateClose* pCmd = new CmdCharCreateClose;
pCmd->setData(this);
m_pbtnClose->SetCommandUp(pCmd);
}
m_pMouseWheel = (CUIImage*)findUI("img_wheel");
if (m_pMouseWheel != NULL)
{
CmdCharZoom* pCmd = new CmdCharZoom;
pCmd->setData(this, BTN_TYPE_PREV);
m_pMouseWheel->SetCommandWheelUp(pCmd);
CmdCharZoom* pCmd1 = new CmdCharZoom;
pCmd1->setData(this, BTN_TYPE_NEXT);
m_pMouseWheel->SetCommandWheelDown(pCmd1);
}
m_pUIBase[UI_BASE_TOP] = findUI("center_ui_top");
m_pUIBase[UI_BASE_BOTTOM] = findUI("center_ui_bottom");
m_pUIBase[UI_BASE_LEFT] = findUI("Left_ui");
m_pUIBase[UI_BASE_RIGHT] = findUI("Right_ui");
initializeCenterUI();
initializeLeftUI();
initializeRightUI();
}
void CUICharacterCreateNew::initializeCenterUI()
{
// Center Top UI
m_pImgArrSelJob_left = (CUIImageArray*)findUI("ia_seljob_left");
m_pImgArrSelJob_center = (CUIImageArray*)findUI("ia_seljob_center");
m_pImgArrSelJob_right = (CUIImageArray*)findUI("ia_seljob_right");
m_pstrSelJob = (CUIText*)findUI("str_seljob");
m_pbtnSelJob_left = (CUIButton*)findUI("btn_seljob_left");
if (m_pbtnSelJob_left != NULL)
{
CmdCharSelect* pCmd = new CmdCharSelect;
pCmd->setData(this, BTN_TYPE_PREV);
m_pbtnSelJob_left->SetCommandUp(pCmd);
}
m_pbtnSelJob_right = (CUIButton*)findUI("btn_seljob_right");
if (m_pbtnSelJob_right != NULL)
{
CmdCharSelect* pCmd = new CmdCharSelect;
pCmd->setData(this, BTN_TYPE_NEXT);
m_pbtnSelJob_right->SetCommandUp(pCmd);
}
m_pImgSelJob_Arrow_highlight_left = (CUIImage*)findUI("img_seljob_left_arrow");
m_pImgSelJob_Arrow_highlight_right = (CUIImage*)findUI("img_seljob_right_arrow");
// Center Bottom UI
m_pbtnRot_left = (CUIButton*)findUI("btn_rotation_left");
if (m_pbtnRot_left != NULL)
{
CmdCharRotation* pCmd = new CmdCharRotation;
pCmd->setData(this, BTN_TYPE_PREV);
m_pbtnRot_left->SetCommandUp(pCmd);
CmdCharRotation* pCmd1 = new CmdCharRotation;
pCmd1->setData(this, BTN_TYPE_PREV);
m_pbtnRot_left->SetCommandOn(pCmd1);
}
m_pbtnRot_right = (CUIButton*)findUI("btn_rotation_right");
if (m_pbtnRot_right != NULL)
{
CmdCharRotation* pCmd = new CmdCharRotation;
pCmd->setData(this, BTN_TYPE_NEXT);
m_pbtnRot_right->SetCommandUp(pCmd);
CmdCharRotation* pCmd1 = new CmdCharRotation;
pCmd1->setData(this, BTN_TYPE_NEXT);
m_pbtnRot_right->SetCommandOn(pCmd1);
}
m_pbtnZoom_In = (CUIButton*)findUI("btn_zoomin");
if (m_pbtnZoom_In != NULL)
{
CmdCharZoom* pCmd = new CmdCharZoom;
pCmd->setData(this, BTN_TYPE_PREV);
m_pbtnZoom_In->SetCommandUp(pCmd);
CmdCharZoom* pCmd1 = new CmdCharZoom;
pCmd1->setData(this, BTN_TYPE_PREV);
m_pbtnZoom_In->SetCommandOn(pCmd1);
}
m_pbtnZoom_Out = (CUIButton*)findUI("btn_zoomout");
if (m_pbtnZoom_Out != NULL)
{
CmdCharZoom* pCmd = new CmdCharZoom;
pCmd->setData(this, BTN_TYPE_NEXT);
m_pbtnZoom_Out->SetCommandUp(pCmd);
CmdCharZoom* pCmd1 = new CmdCharZoom;
pCmd1->setData(this, BTN_TYPE_NEXT);
m_pbtnZoom_Out->SetCommandOn(pCmd1);
}
m_pbtnChar_Create = (CUIButton*)findUI("btn_ok");
if (m_pbtnChar_Create != NULL)
{
CmdCharCreateOk* pCmd = new CmdCharCreateOk;
pCmd->setData(this);
m_pbtnChar_Create->SetCommandUp(pCmd);
}
m_pebCharName = (CUIEditBox*)findUI("eb_Newname");
}
void CUICharacterCreateNew::initializeLeftUI()
{
// Left UI
m_pstrJob = (CUIText*)findUI("str_job_title");
m_ptbJobDesc = (CUITextBox*)findUI("tb_job_dec");
m_pstrDualJob = (CUIText*)findUI("str_job2_title");
m_ptbDualJobDesc = (CUITextBox*)findUI("tb_job2_dec");
m_pscrollJobDesc = (CUIScrollBar*)findUI("scroll_job_dec");
m_pscrollDualJobDesc = (CUIScrollBar*)findUI("scroll_job2_dec");
}
void CUICharacterCreateNew::initializeRightUI()
{
// Right UI
// 얼굴 설정 셋팅
m_pArrayFace = (CUIArray*)findUI("array_face");
m_pbtnFace_left = (CUIButton*)findUI("btn_face_left");
m_pbtnFace_right = (CUIButton*)findUI("btn_face_right");
if (m_pArrayFace != NULL)
{
CmdSelectFace* pCmd = new CmdSelectFace;
pCmd->setData(this);
m_pArrayFace->SetCommand(pCmd);
}
SetArrayList(m_pArrayFace);
// 머리 설정 셋팅
m_pArrayHair = (CUIArray*)findUI("array_hair");
m_pbtnHair_left = (CUIButton*)findUI("btn_hair_left");
m_pbtnHair_right = (CUIButton*)findUI("btn_hair_right");
if (m_pArrayHair != NULL)
{
CmdSelectHair* pCmd = new CmdSelectHair;
pCmd->setData(this);
m_pArrayHair->SetCommand(pCmd);
}
SetArrayList(m_pArrayHair);
// 장비 설정 셋팅
m_pArrayWear = (CUIArray*)findUI("array_wear");
m_pbtnWear_left = (CUIButton*)findUI("btn_wear_left");
m_pbtnWear_right = (CUIButton*)findUI("btn_wear_right");
if (m_pArrayWear != NULL)
{
CmdSelectArmor* pCmd = new CmdSelectArmor;
pCmd->setData(this);
m_pArrayWear->SetCommand(pCmd);
}
SetArrayList(m_pArrayWear);
m_pArraySocial = (CUIArray*)findUI("array_social");
if (m_pArraySocial != NULL)
{
CmdSelectSocial* pCmd = new CmdSelectSocial;
pCmd->setData(this);
m_pArraySocial->SetCommand(pCmd);
}
m_pbtnSocial_left = (CUIButton*)findUI("btn_social_left");
if (m_pbtnSocial_left != NULL)
{
CmdSocailSelect* pCmd = new CmdSocailSelect;
pCmd->setData(this, BTN_TYPE_PREV);
m_pbtnSocial_left->SetCommandUp(pCmd);
}
m_pbtnSocial_right = (CUIButton*)findUI("btn_social_right");
if (m_pbtnSocial_right != NULL)
{
CmdSocailSelect* pCmd = new CmdSocailSelect;
pCmd->setData(this, BTN_TYPE_NEXT);
m_pbtnSocial_right->SetCommandUp(pCmd);
}
}
void CUICharacterCreateNew::SelJob(eCreateBtnType eType)
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
int nIdx = pCharCreate->GetSelJob();
_pGameState->ClearModelEffect(nIdx, LOGIN_MODEL_TYPE_CREATEUI);
switch (eType)
{
case BTN_TYPE_NEXT:
nIdx++;
break;
case BTN_TYPE_PREV:
nIdx--;
break;
}
pCharCreate->SetJob(nIdx);
SetSelectJobInfo();
}
void CUICharacterCreateNew::SelSocial(eCreateBtnType eType)
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
int nIdx = pCharCreate->GetSocialShowIdx();
if (m_pArraySocial != NULL)
m_pArraySocial->SetSelectIdx(-1);
switch (eType)
{
case BTN_TYPE_NEXT:
nIdx++;
if (nIdx >= DEF_SOCIAL_MAX)
nIdx = DEF_SOCIAL_MAX;
break;
case BTN_TYPE_PREV:
nIdx--;
if (nIdx <= DEF_BTN_SHOW_MAX)
nIdx = DEF_BTN_SHOW_MAX;
break;
}
pCharCreate->SetSocialShowIdx(nIdx);
SetSocialInfo();
}
void CUICharacterCreateNew::SetSelectJobInfo()
{
GameDataManager* pGame = GameDataManager::getSingleton();
UtilHelp* pUtil = UtilHelp::getSingleton();
if (pGame == NULL || pUtil == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
// 캐릭터 정보 리셋
pCharCreate->InfoReset();
// 셀렉트 정보 리셋
ResetSelect();
int nJob = pCharCreate->GetSelJob();
// 카메라 이동
_pGameState->SetCameraByJob(nJob);
// 모델 데이타 설정
_pGameState->SetCreateUIModelSlot(nJob, nJob);
// 모델 위치 설정
ResetModelPos(nJob, TRUE);
// 모델 디폴트 아머 설정
SetDefaultArmorWearing();
CJobInfo* pInfo = CJobInfo::getSingleton();
// Center Top UI set
if (m_pstrSelJob != NULL)
m_pstrSelJob->SetText(pInfo->GetName(nJob));
// 구슬 변경
if (m_pImgArrSelJob_left != NULL)
m_pImgArrSelJob_left->SetRenderIdx(pCharCreate->GetSelPrevJob());
if (m_pImgArrSelJob_center != NULL)
m_pImgArrSelJob_center->SetRenderIdx(pCharCreate->GetSelJob());
if (m_pImgArrSelJob_right != NULL)
m_pImgArrSelJob_right->SetRenderIdx(pCharCreate->GetSelNextJob());
// Left UI set
// 클래스 설명
if (m_pstrJob != NULL)
m_pstrJob->SetText(pInfo->GetName(nJob));
CTString strJobDesc = GetClassDesc((eJob)nJob);
if (m_ptbJobDesc != NULL)
m_ptbJobDesc->SetText(strJobDesc);
if (m_pscrollJobDesc != NULL)
m_pscrollJobDesc->SetScrollPos(0);
CTString strJob2Name1 = pUtil->GetClass2Name((eJob)nJob,(eJob2)1);
CTString strJob2Desc1 = GetClass2Desc((eJob)nJob,(eJob2)1);
CTString strJob2Name2 = pUtil->GetClass2Name((eJob)nJob,(eJob2)2);
CTString strJob2Desc2 = GetClass2Desc((eJob)nJob,(eJob2)2);
CTString strJob2 = strJob2Name1 + "\\n" + strJob2Desc1;
CTString strDualJob = _S(1224, "전직정보");
if (nJob == NIGHTSHADOW) // 나이트 쉐도우의 경우 전직 정보가 없기에 한번만 뿌려준다. (나이트쉐도우의 생성 가능 조건 출력)
{
strDualJob = _S(6105, "나이트 셰도우 생성 여부");
}
else
{
strJob2 += "\\n\\n" + strJob2Name2 + "\\n" + strJob2Desc2;
}
if (m_pstrDualJob != NULL)
m_pstrDualJob->SetText( strDualJob );
if (m_ptbDualJobDesc != NULL)
m_ptbDualJobDesc->SetText(strJob2);
if (m_pscrollDualJobDesc != NULL)
m_pscrollDualJobDesc->SetScrollPos(0);
// 소셜 셋팅
SetSocialInfo();
// 디폴트 에니 플레이시 모든 커멘드 락
m_eAniState = UI_ANI_START;
// 스타트 에니
_pGameState->ModelPlayAnimation(_pGameState->m_pCharCreateUIModels[nJob], nJob, ANIM_LOGIN_GAMESTART, AN_NORESTART|AN_CLEAR);
}
void CUICharacterCreateNew::Zoom(eCreateBtnType eType)
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
int nJob = pCharCreate->GetSelJob();
BOOL bRefresh = TRUE;
CEntity* pModel = _pGameState->m_pCharCreateUIModels[nJob];
if (eType == BTN_TYPE_PREV)
{
pModel->en_plPlacement.pl_PositionVector(3) += m_fZSpeed;
pModel->en_plPlacement.pl_PositionVector(2) -= m_fYSpeed;
if ( pModel->en_plPlacement.pl_PositionVector(3) >= m_fMaxDistance )
{
pModel->en_plPlacement.pl_PositionVector(3) = m_fMaxDistance;
bRefresh = FALSE;
}
if ( pModel->en_plPlacement.pl_PositionVector(2) <= m_fMinHeight )
{
pModel->en_plPlacement.pl_PositionVector(2) = m_fMinHeight;
bRefresh = TRUE;
}
}
else if (eType == BTN_TYPE_NEXT)
{
pModel->en_plPlacement.pl_PositionVector(3) -= m_fZSpeed;
pModel->en_plPlacement.pl_PositionVector(2) += m_fYSpeed;
if ( pModel->en_plPlacement.pl_PositionVector(3) <= m_fMinDistance )
{
pModel->en_plPlacement.pl_PositionVector(3) = m_fMinDistance;
bRefresh = FALSE;
}
if ( pModel->en_plPlacement.pl_PositionVector(2) >= m_fMaxHeight )
{
pModel->en_plPlacement.pl_PositionVector(2) = m_fMaxHeight;
bRefresh = TRUE;
}
}
if (bRefresh == TRUE)
_pNetwork->MyCharacterInfo.itemEffect.Refresh(&pModel->GetModelInstance()->m_tmSkaTagManager, 1);
}
void CUICharacterCreateNew::Rotation(eCreateBtnType eType)
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
int nJob = pCharCreate->GetSelJob();
CEntity* pModel = _pGameState->m_pCharCreateUIModels[nJob];
if (eType == BTN_TYPE_PREV)
{
pModel->en_plPlacement.pl_OrientationAngle(1) -= m_fAngle;
}
else if (eType == BTN_TYPE_NEXT)
{
pModel->en_plPlacement.pl_OrientationAngle(1) += m_fAngle;
}
}
void CUICharacterCreateNew::SetCharaterAngle(FLOAT f_inL, FLOAT f_inR)
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
int nJob = pCharCreate->GetSelJob();
if (STAGEMGR()->GetCurStage() == eSTAGE_CREATECHAR)
{
CEntity *Character = _pGameState->m_pCharCreateUIModels[nJob];
if (Character == NULL)
return;
Character->en_plPlacement.pl_OrientationAngle(1) -= f_inL;
Character->en_plPlacement.pl_OrientationAngle(1) += f_inR;
}
}
void CUICharacterCreateNew::SelectFace()
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
if (m_pArrayFace == NULL)
return;
int nSelectIdx = m_pArrayFace->GetSelectIdx();
int nJob = pCharCreate->GetSelJob();
ResetModelPos(nJob, FALSE, TRUE);
if (nSelectIdx < 0)
{
nSelectIdx = pCharCreate->GetFace();
m_pArrayFace->SetSelectIdx(nSelectIdx);
return;
}
ChangeFace(nSelectIdx);
}
void CUICharacterCreateNew::ChangeFace(int idx)
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
pCharCreate->SetFace(idx);
int nJob = pCharCreate->GetSelJob();
CEntity* pModel = _pGameState->m_pCharCreateUIModels[nJob];
_pGameState->ModelChangeFace(pModel, nJob, idx + 1);
if(m_pArrayFace != NULL)
m_pArrayFace->SetSelectIdx(idx);
}
void CUICharacterCreateNew::SelectHair()
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
if (m_pArrayHair == NULL)
return;
int nSelectIdx = m_pArrayHair->GetSelectIdx();
int nJob = pCharCreate->GetSelJob();
ResetModelPos(nJob, FALSE, TRUE);
if (nSelectIdx < 0)
{
nSelectIdx = pCharCreate->GetHair();
m_pArrayHair->SetSelectIdx(nSelectIdx);
return;
}
ChangeHair(nSelectIdx);
}
void CUICharacterCreateNew::ChangeHair(int idx)
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
pCharCreate->SetHair(idx);
int nJob = pCharCreate->GetSelJob();
CEntity* pModel = _pGameState->m_pCharCreateUIModels[nJob];
int nArmor = pCharCreate->GetArmor();
int nItemIdx = CArmorPreview::m_ArmorPreview[nJob]->index[nArmor][WEAR_HELMET];
if (nItemIdx > 0)
{
_pGameState->CreateUIModelWearing(WEAR_HELMET, nJob, 0);
}
else
{
_pGameState->ModelChangeHair(pModel, nJob, idx + 1);
}
if(m_pArrayHair != NULL)
m_pArrayHair->SetSelectIdx(idx);
}
void CUICharacterCreateNew::SetDefaultArmorWearing()
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
int nJob = pCharCreate->GetSelJob();
ResetWearing(nJob);
for ( int i = 0; i < DEF_DEFAULT_COL; i++)
{
int ItemIdx = CArmorPreview::m_DefaultWearInfo[nJob]->index[i];
if (i == DEF_FACE )
ChangeFace(ItemIdx);
else if (i == DEF_HAIR)
ChangeHair(ItemIdx);
else
{
RenderTargetModel_Wearing(nJob, ItemIdx, i);
}
}
}
void CUICharacterCreateNew::SelectArmor()
{
if (m_pArrayWear == NULL)
return;
int nSelectIdx = m_pArrayWear->GetSelectIdx();
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
if (nSelectIdx < 0)
{
nSelectIdx = pCharCreate->GetArmor();
m_pArrayWear->SetSelectIdx(nSelectIdx);
return;
}
pCharCreate->SetArmor(nSelectIdx);
int nJob = pCharCreate->GetSelJob();
ResetModelPos(nJob, FALSE, FALSE);
for (int i = 0; i < DEF_ARMOR_COL; i++)
{
int nItemIdx = CArmorPreview::m_ArmorPreview[nJob]->index[nSelectIdx][i];
RenderTargetModel_Wearing(nJob, nItemIdx, i);
}
}
void CUICharacterCreateNew::SelectSocial()
{
if (m_pArraySocial == NULL)
return;
int nSelectIdx = m_pArraySocial->GetSelectIdx();
if (nSelectIdx < 0)
return;
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
CUIArrayItem* pArrayItem = m_pArraySocial->GetArrayItem(nSelectIdx);
if (pArrayItem == NULL)
return;
CUIIcon* pIcon = (CUIIcon*)pArrayItem->findUI("icon_slot_social");
if (pIcon == NULL)
return;
int nActionIdx = pIcon->getIndex();
int nJob = pCharCreate->GetSelJob();
ResetModelPos(nJob, FALSE, FALSE);
int nAniIdex = GetActionAniidx(nActionIdx);
CEntity* pModel = _pGameState->m_pCharCreateUIModels[nJob];
HideWeapon(TRUE, nJob);
m_eAniState = UI_ANI_SOCIAL;
m_nPlayActionId = nAniIdex;
_pGameState->ModelPlayAnimation(pModel, nJob, m_nPlayActionId, AN_FREEZE_ON_BLEND|AN_CLEAR);
pCharCreate->SetSocial(nSelectIdx);
}
void CUICharacterCreateNew::PressOk()
{
CUIManager* pUIManager = CUIManager::getSingleton();
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
if (m_pebCharName == NULL)
return;
// Get input string
if( m_pebCharName->GetString() )
{
CTString strNewName = m_pebCharName->GetString();
pCharCreate->SetNewName(strNewName);
// 공백 체크.
const char *chr = pCharCreate->GetName();
for( ; *chr != 0; chr++)
{
if( (*chr) == ' ' || (*chr) == '\t' || (*chr) == '\n' || (*chr) == '\r' ||
(*chr) == '%' || (*chr) == '#' || (*chr) == '&' || (*chr) == '?' || (*chr) == '+' || (*chr) == '=')
{
pUIManager->CloseMessageBox(MSGCMD_CREATE_ERROR);
CUIMsgBox_Info MsgBoxInfo;
MsgBoxInfo.SetMsgBoxInfo( _S( 145, "캐릭터 생성 오류" ), UMBS_OK,
UI_CREATE_CHAR, MSGCMD_CREATE_ERROR );
CTString strMessage = _S( 146, "캐릭터명에 공백이 들어갈 수 없습니다." );
MsgBoxInfo.AddString( strMessage );
pUIManager->CreateMessageBox( MsgBoxInfo );
ResetName();
return;
}
if (g_iCountry == RUSSIA)
{
if( !((*chr) >= 48 && (*chr) <= 57 )
&& !((*chr) >= -64 && (*chr) <= -1)
&& !((*chr) == -88)
&& !((*chr) == -72) )
{
pUIManager->CloseMessageBox(MSGCMD_CREATE_ERROR);
CUIMsgBox_Info MsgBoxInfo;
MsgBoxInfo.SetMsgBoxInfo( _S( 145, "캐릭터 생성 오류" ), UMBS_OK,
UI_CREATE_CHAR, MSGCMD_CREATE_ERROR );
CTString strMessage = _S(2980, "아이디는 영문과 숫자만 허용됩니다." );
MsgBoxInfo.AddString( strMessage );
pUIManager->CreateMessageBox( MsgBoxInfo );
ResetName();
return;
}
}
else if (g_iCountry != KOREA && g_iCountry != THAILAND)
{
if( !((*chr) >= 48 && (*chr) <=57) //! 0 ~ 9
&& !((*chr) >= 65 && (*chr) <=90) // ! A ~ Z
&& !((*chr) >= 97 && (*chr) <=122) // ! a ~ z
)
{
pUIManager->CloseMessageBox(MSGCMD_CREATE_ERROR);
CUIMsgBox_Info MsgBoxInfo;
MsgBoxInfo.SetMsgBoxInfo( _S( 145, "캐릭터 생성 오류" ), UMBS_OK,
UI_CREATE_CHAR, MSGCMD_CREATE_ERROR );
CTString strMessage = _S(2980, "아이디는 영문과 숫자만 허용됩니다." );
MsgBoxInfo.AddString( strMessage );
pUIManager->CreateMessageBox( MsgBoxInfo );
ResetName();
return;
}
}
}
}
//#define RESTRICT_SOUND
_pSound->Mute();
CreateCharacter();
#ifdef RESTRICT_SOUND
extern BOOL _bNTKernel;
//if( _bNTKernel )
_pSound->UpdateSounds();
#endif
}
void CUICharacterCreateNew::CreateCharacter()
{
CUIManager* pUIManager = CUIManager::getSingleton();
GameDataManager* pGame = GameDataManager::getSingleton();
CTString strMessage;
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
if (IsBila(g_iCountry) == TRUE || g_iCountry == KOREA)
{
// 이기환 수정 시작 ( 11.29 ) : 캐랙터명 오류 메세지 처리
char szBuffer[MAX_STR_LENGTH];
CTString szbuf = pCharCreate->GetName();
strcpy ( szBuffer, szbuf );
if( strlen( pCharCreate->GetName() ) <= 0 )
{
pUIManager->CloseMessageBox(MSGCMD_CREATE_ERROR);
CUIMsgBox_Info MsgBoxInfo;
MsgBoxInfo.SetMsgBoxInfo( _S( 145, "캐릭터 생성 오류" ), UMBS_OK,
UI_CREATE_CHAR, MSGCMD_CREATE_ERROR );
MsgBoxInfo.AddString( _S( 432, "캐릭터 이름을 입력하여 주십시오.\n(한글 4~8자, 영문 2~16자)" ) );
pUIManager->CreateMessageBox( MsgBoxInfo );
ResetName();
return;
}
else if(strlen(pCharCreate->GetName()) < MIN_NAME_LEN )
{
pUIManager->CloseMessageBox(MSGCMD_CREATE_ERROR);
CUIMsgBox_Info MsgBoxInfo;
MsgBoxInfo.SetMsgBoxInfo( _S( 145, "캐릭터 생성 오류" ), UMBS_OK,
UI_CREATE_CHAR, MSGCMD_CREATE_ERROR );
MsgBoxInfo.AddString( _S( 433, "캐릭터 이름이 너무 짧습니다.\n(한글 4~8자, 영문 2~16자)" ) );
pUIManager->CreateMessageBox( MsgBoxInfo );
ResetName();
return;
}
else if ( strlen(pCharCreate->GetName()) > MAX_NAME_LEN )
{
pUIManager->CloseMessageBox(MSGCMD_CREATE_ERROR);
CUIMsgBox_Info MsgBoxInfo;
MsgBoxInfo.SetMsgBoxInfo( _S( 145, "캐릭터 생성 오류" ), UMBS_OK,
UI_CREATE_CHAR, MSGCMD_CREATE_ERROR );
MsgBoxInfo.AddString( _S( 434, "캐릭터 이름이 너무 깁니다.\n(한글 4~8자, 영문 2~16자)" ) );
pUIManager->CreateMessageBox( MsgBoxInfo );
ResetName();
return;
}
else if( _UIFilteringCharacter.Filtering ( szBuffer ) == TRUE ) // find ...
{
pUIManager->CloseMessageBox(MSGCMD_CREATE_ERROR);
CUIMsgBox_Info MsgBoxInfo;
MsgBoxInfo.SetMsgBoxInfo( _S( 145, "캐릭터 생성 오류" ), UMBS_OK,
UI_CREATE_CHAR, MSGCMD_CREATE_ERROR );
CTString strName = pCharCreate->GetName();
CTString strMessage = _S( 435, "잘못된 문자[" );
strMessage += strName;
strMessage += _S( 436, "]가 포함되어 있습니다." );
MsgBoxInfo.AddString( strMessage );
pUIManager->CreateMessageBox( MsgBoxInfo );
ResetName();
return;
}
// 이기환 수정 끝
}
else
{
strMessage = pCharCreate->GetName();
if (!pUIManager->checkName(strMessage, 0))
return;
}
if(_pNetwork->m_bSendMessage)
return;
pCharCreate->SendCreateChar();
Lock(TRUE);
}
void CUICharacterCreateNew::Lock( BOOL bLock )
{
if (m_pbtnSelJob_left != NULL)
m_pbtnSelJob_left->SetEnable(!bLock);
if (m_pbtnSelJob_right != NULL)
m_pbtnSelJob_right->SetEnable(!bLock);
if (m_pbtnChar_Create != NULL)
m_pbtnChar_Create->SetEnable(!bLock);
if (m_pbtnClose != NULL)
m_pbtnClose->SetEnable(!bLock);
}
WMSG_RESULT CUICharacterCreateNew::OnKeyMessage( MSG* pMsg )
{
if ( pMsg->wParam == VK_RETURN )
{
if ( m_pbtnChar_Create != NULL )
{
if (m_pbtnChar_Create->IsEnabled() == FALSE)
return WMSG_FAIL;
PressOk();
return WMSG_SUCCESS;
}
}
return WMSG_FAIL;
}
WMSG_RESULT CUICharacterCreateNew::OnCharMessage( MSG* pMsg )
{
// [2012/06/08 : Sora] ITS 9144 태국 요청으로 ctrl key 비활성화
#ifdef G_THAI
extern UBYTE _abKeysPressed[256];
if( _abKeysPressed[KID_LCONTROL] || _abKeysPressed[KID_RCONTROL] )
{
return WMSG_FAIL;
}
#endif
return WMSG_FAIL;
}
void CUICharacterCreateNew::SetArrayList(CUIArray* pArray)
{
CUIArrayItem* pArrayItem = NULL;
if (pArray == NULL)
return;
int count = pArray->GetArrayChildCount();
CUIText* pText;
for (int i = 0; i < count; i++)
{
pArrayItem = pArray->GetArrayItem(i);
if ( pArrayItem == NULL )
continue;
pText = (CUIText*)pArrayItem->findUI("str_number");
if (pText != NULL)
{
CTString strNum = "";
strNum.PrintF( "%d", i+1 );
pText->SetText(strNum);
}
}
}
void CUICharacterCreateNew::SetSocialInfo()
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
CUIArrayItem* pArrayItem = NULL;
if (m_pArraySocial == NULL)
return;
int count = m_pArraySocial->GetArrayChildCount();
int nJob = pCharCreate->GetSelJob();
int nSex = GetClassSex(nJob);
int nShowLastIdx = pCharCreate->GetSocialShowIdx() - DEF_BTN_SHOW_MAX;
CUIIcon* pIcon;
for (int i = 0; i < count; i++)
{
pArrayItem = m_pArraySocial->GetArrayItem(i);
if ( pArrayItem == NULL )
continue;
pIcon = (CUIIcon*)pArrayItem->findUI("icon_slot_social");
if (pIcon != NULL)
{
pIcon->clearIconData();
pIcon->setData(UBET_ACTION, m_nSocialIdx[nSex][i+nShowLastIdx]);
}
}
}
void CUICharacterCreateNew::RenderTargetModel_Wearing( INDEX iJob, int nItemIdx, int nWearPos )
{
_pGameState->CreateUIModelWearing(nWearPos, iJob, nItemIdx);
}
void CUICharacterCreateNew::ResetSelect()
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
if (m_pArrayFace != NULL)
m_pArrayFace->SetSelectIdx(pCharCreate->GetFace());
if (m_pArrayHair != NULL)
m_pArrayHair->SetSelectIdx(pCharCreate->GetHair());
if (m_pArrayWear != NULL)
m_pArrayWear->SetSelectIdx(pCharCreate->GetArmor());
if (m_pArraySocial != NULL)
m_pArraySocial->SetSelectIdx(-1);
}
void CUICharacterCreateNew::ResetName()
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
if (m_pebCharName != NULL)
m_pebCharName->ResetString();
pCharCreate->SetNewName(CTString(""));
}
void CUICharacterCreateNew::ResetWearing(int nJob)
{
_pGameState->CreateUIModelDefaultWearing(nJob);
}
int CUICharacterCreateNew::GetClassSex( int nJob )
{
switch (nJob)
{
case TITAN:
case KNIGHT:
case SORCERER:
case NIGHTSHADOW:
return CLASS_SEX_MAN;
case MAGE:
case ROGUE:
case HEALER:
#ifdef CHAR_EX_ROGUE
case EX_ROGUE:
#endif // CHAR_EX_ROGUE
#ifdef CHAR_EX_MAGE
case EX_MAGE:
#endif // CHAR_EX_MAGE
return CLASS_SEX_WOMAN;
}
return -1;
}
int CUICharacterCreateNew::GetActionAniidx( int ActionIdx )
{
int nAniIdx = 0;
if(ActionIdx == ACTION_NUM_GREET)
nAniIdx = ANIM_SOCIAL_0;
else if(ActionIdx == ACTION_NUM_SMILE)
nAniIdx = ANIM_SOCIAL_1;
else if(ActionIdx == ACTION_NUM_CRY)
nAniIdx = ANIM_SOCIAL_2;
else if(ActionIdx == ACTION_NUM_NUMBER_ONE)
nAniIdx = ANIM_SOCIAL_3;
else if(ActionIdx == ACTION_NUM_HANDCLAP)
nAniIdx = ANIM_SOCIAL_4;
else if(ActionIdx == ACTION_NUM_REFUSE)
nAniIdx = ANIM_SOCIAL_5;
else if( ActionIdx == ACTION_NUM_GOOD_LOOKS || ActionIdx == ACTION_NUM_GOOD_LOOKS2 )
nAniIdx = ANIM_SOCIAL_6;
else if(ActionIdx == ACTION_NUM_BANTER)
nAniIdx = ANIM_SOCIAL_7;
else if(ActionIdx == ACTION_NUM_CHEER)
nAniIdx = ANIM_SOCIAL_8;
else if(ActionIdx == ACTION_NUM_COMBAT)
nAniIdx = ANIM_SOCIAL_9;
else if(ActionIdx == ACTION_NUM_SUBMISSION)
nAniIdx = ANIM_SOCIAL_10;
else if(ActionIdx == ACTION_NUM_WATER_SPREAD)
nAniIdx = ANIM_SOCIAL_11;
return nAniIdx;
}
void CUICharacterCreateNew::ResetModelPos( int nJob, BOOL bDefault, BOOL bZoomIn )
{
CEntity* pModel = _pGameState->m_pCharCreateUIModels[nJob];
if (pModel == NULL)
return;
CBackImageManager* pBackMgr = CBackImageManager::getSingleton();
if ( pBackMgr == NULL )
return;
float fDist = pBackMgr->GetCharDistance(false);
m_fMinDistance = pBackMgr->GetZoomDisValue(false); // min
m_fMaxDistance = pBackMgr->GetZoomDisValue(true); // max
m_fMinHeight = pBackMgr->GetZoomHeightValue(false);
m_fMaxHeight = pBackMgr->GetZoomHeightValue(true);
float fDis = m_fMinDistance;
float fHeight = m_fMaxHeight;
if (bDefault == TRUE)
{
fDis = fDist;
fHeight = m_fMaxHeight;
}
else
{
if (bZoomIn == TRUE)
{
fDis = m_fMaxDistance;
fHeight = m_fMinHeight;
}
}
pModel->en_plPlacement.pl_PositionVector(3) = fDis;
pModel->en_plPlacement.pl_PositionVector(2) = fHeight;
pModel->en_plPlacement.pl_OrientationAngle(1) = DEF_DEFAULT_ANGLE;
_pNetwork->MyCharacterInfo.itemEffect.Refresh(&pModel->GetModelInstance()->m_tmSkaTagManager, 1);
}
void CUICharacterCreateNew::OnUpdatePosition()
{
if (m_pUIBase[UI_BASE_LEFT] == NULL || m_pUIBase[UI_BASE_RIGHT] == NULL)
return;
CBackImageManager* pBackManager = CBackImageManager::getSingleton();
int x = 0, y = 0;
int w, h;
CUIManager* pUIManager = CUIManager::getSingleton();
w = pUIManager->GetWidth();
h = pUIManager->GetHeight();
SetSize(w, h); // 최상위 윈도우 차일드로 UIBase가 있기 때문에
//Parent기준으로 정렬이 될려면 최상위 윈도우 사이즈를 클라이언트 사이즈로 변경해줘야 함.
pBackManager->GetArrangeOffset(x, y);
m_pUIBase[UI_BASE_LEFT]->SetPos(x, y);
m_pUIBase[UI_BASE_RIGHT]->SetPos(x, y);
}
void CUICharacterCreateNew::OnUpdate( float fDeltaTime, ULONG ElapsedTime )
{
GameDataManager* pGame = GameDataManager::getSingleton();
CJobInfo* pInfo = CJobInfo::getSingleton();
if (pInfo == NULL)
return;
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
int nJob = pCharCreate->GetSelJob();
if (_pGameState->m_pCharCreateUIModels[nJob] == NULL)
return;
if (m_eAniState == UI_ANI_START)
{
INDEX animID = ska_GetIDFromStringTable(pInfo->GetAnimationName( nJob, ANIM_LOGIN_GAMESTART));
FLOAT fAniStartTime = _pGameState->GetAnimStartTime(_pGameState->m_pCharCreateUIModels[nJob], animID);
FLOAT fAniTime = _pGameState->GetAnimPlayTime(_pGameState->m_pCharCreateUIModels[nJob], animID);
if (fAniStartTime >= fAniTime)
{
m_eAniState = UI_ANI_IDLE1;
_pGameState->ClearModelEffect(nJob, LOGIN_MODEL_TYPE_CREATEUI);
_pGameState->ModelPlayAnimation(_pGameState->m_pCharCreateUIModels[nJob], nJob, ANIM_LOGIN_IDLE01, AN_LOOPING);
}
}
else if (m_eAniState > UI_ANI_START)
{
UpdateAnim(nJob);
}
Update_BtnHighlight(fDeltaTime);
}
int CUICharacterCreateNew::CheckAnim(int nJob)
{
int nId = 0;
switch (m_eAniState)
{
case UI_ANI_IDLE1:
nId = ANIM_LOGIN_IDLE01;
break;
case UI_ANI_IDLE2:
nId = ANIM_LOGIN_IDLE02;
break;
case UI_ANI_SOCIAL:
nId = m_nPlayActionId;
break;
}
return nId;
}
void CUICharacterCreateNew::UpdateAnim( int nJob )
{
CJobInfo* pInfo = CJobInfo::getSingleton();
if (pInfo == NULL)
return;
if (_pGameState->m_pCharCreateUIModels[nJob] == NULL)
return;
INDEX animID = ska_GetIDFromStringTable( pInfo->GetAnimationName( nJob, CheckAnim(nJob) ) );
FLOAT fAniStartTime = _pGameState->GetAnimStartTime(_pGameState->m_pCharCreateUIModels[nJob], animID);
FLOAT fAniTime = _pGameState->GetAnimPlayTime(_pGameState->m_pCharCreateUIModels[nJob], animID);
if (fAniStartTime >= fAniTime)
{
if (m_eAniState == UI_ANI_IDLE1)
{
CModelInstance* pMI = _pGameState->m_pCharCreateUIModels[nJob]->GetModelInstance();
int nLoopCnt = pMI->GetAnimEffectByAnimIndex(animID)->GetLoopCount();
if (nLoopCnt <= 0)
return;
if (nLoopCnt % 3 == 0)
{
m_eAniState = UI_ANI_IDLE2;
_pGameState->ModelPlayAnimation(_pGameState->m_pCharCreateUIModels[nJob], nJob, ANIM_LOGIN_IDLE02, AN_FREEZE_ON_BLEND|AN_CLEAR);
return;
}
}
else if (m_eAniState == UI_ANI_IDLE2)
{
m_eAniState = UI_ANI_IDLE1;
_pGameState->ClearModelEffect(nJob, LOGIN_MODEL_TYPE_CREATEUI);
_pGameState->ModelPlayAnimation(_pGameState->m_pCharCreateUIModels[nJob], nJob, ANIM_LOGIN_IDLE01, AN_LOOPING);
}
else if (m_eAniState == UI_ANI_SOCIAL)
{
m_eAniState = UI_ANI_IDLE1;
_pGameState->ModelPlayAnimation(_pGameState->m_pCharCreateUIModels[nJob], nJob, ANIM_LOGIN_IDLE01, AN_LOOPING);
HideWeapon(FALSE, nJob);
}
}
}
void CUICharacterCreateNew::HideWeapon( BOOL bHide, int nJob )
{
int nWeaponIdx = 0;
int nShieldIdx = 0;
if (bHide == FALSE)
{
GameDataManager* pGame = GameDataManager::getSingleton();
if (pGame == NULL)
return;
CharacterCreateNew* pCharCreate = pGame->GetCharCreate();
if (pCharCreate == NULL)
return;
int nArmorIdx = pCharCreate->GetArmor();
nWeaponIdx = CArmorPreview::m_ArmorPreview[nJob]->index[nArmorIdx][WEAR_WEAPON];
nShieldIdx = CArmorPreview::m_ArmorPreview[nJob]->index[nArmorIdx][WEAR_SHIELD];
}
_pGameState->CreateUIModelWearing(WEAR_WEAPON, nJob, nWeaponIdx);
_pGameState->CreateUIModelWearing(WEAR_SHIELD, nJob, nShieldIdx);
}
CTString CUICharacterCreateNew::GetClassDesc( eJob eClass )
{
if (eClass < 0 && eClass >= TOTAL_JOB)
return "";
CTString retStr = "none";
CTString retStr1 = "";
CTString retStr2 = "";
int nDesc1[TOTAL_JOB] =
{
129, 131, 133, 449, 1025, 1027, 4698
#ifdef CHAR_EX_ROGUE
,1025
#endif // CHAR_EX_ROGUE
#ifdef CHAR_EX_MAGE
,449
#endif // CHAR_EX_MAGE
};
int nDesc2[TOTAL_JOB] =
{
130, 132, 134, 450, 1026, 1028, 4699
#ifdef CHAR_EX_ROGUE
,5733
#endif // CHAR_EX_ROGUE
#ifdef CHAR_EX_MAGE
,5821
#endif // CHAR_EX_MAGE
};
retStr1 = _S(nDesc1[eClass], "기본 클래스 설명 1");
retStr2 = _S(nDesc2[eClass], "기본 클래스 설명 2");
retStr = retStr1 + "\\n\\n" + retStr2;
return retStr;
}
CTString CUICharacterCreateNew::GetClass2Desc( eJob eClass, eJob2 eClass2 )
{
if (eClass < 0 && eClass >= TOTAL_JOB)
return "";
if (eClass2 < 1 && eClass2 > 2)
return "";
CTString retStr = "none";
int nDesc[TOTAL_JOB][2] =
{
{1225, 1269}
,{1234, 1277}
,{1243, 1285}
,{1251, 1293}
,{1378, 1301}
,{2342, 2350}
,{4794, 4700}
#ifdef CHAR_EX_ROGUE
,{5739, 5747}
#endif // CHAR_EX_ROGUE
#ifdef CHAR_EX_MAGE
,{5827, 5835}
#endif // CHAR_EX_MAGE
};
if (eClass == NIGHTSHADOW)
{
if (_pGameState->IsCreatableNightShadow() == TRUE)// 나이트 쉐도우의 경우 전직 정보가 없기에 나이트쉐도우의 생성 가능 조건 출력
retStr = _S(4794, "나이트쉐도우 생성가능");
else
retStr = _S(4700, "나이트쉐도우 생성불가");
}
else
{
retStr = _S(nDesc[eClass][eClass2 - 1], "전직 클래스 정보");
}
return retStr;
}
void CUICharacterCreateNew::ReturnUI()
{
STAGEMGR()->SetNextStage(eSTAGE_SELCHAR);
}
void CUICharacterCreateNew::Update_BtnHighlight( float fDeltaTime )
{
static float falphaLv = 0.0f;
static bool bUp = true;
if (falphaLv <= 0.3f)
bUp = true;
else if (falphaLv >= 1.0f)
bUp = false;
float fRatio = 0.7f;
float fMin = 0.3f;
float fMax = 1.0f;
if (bUp == true)
{
falphaLv += (fDeltaTime * fRatio);
if (falphaLv > fMax)
falphaLv = fMax;
}
else
{
falphaLv -= (fDeltaTime * fRatio);
if (falphaLv < fMin)
falphaLv = fMin;
}
UtilHelp* pUtil = UtilHelp::getSingleton();
if (pUtil == NULL)
return;
COLOR colAlpha = DEF_UI_COLOR_WHITE;
colAlpha = pUtil->GetColorAlpha(falphaLv, colAlpha);
if (m_pImgSelJob_Arrow_highlight_left != NULL)
m_pImgSelJob_Arrow_highlight_left->SetAlpha(colAlpha);
if (m_pImgSelJob_Arrow_highlight_right != NULL)
m_pImgSelJob_Arrow_highlight_right->SetAlpha(colAlpha);
}
|
5cd767102e2c7fe8d068c4f58fae8abe98d6b9e9
|
508efd553572f28ebeb93bac77d913b514094256
|
/uva/10260.cpp
|
50a821acf526603d520ab8b6d3a6300c7d622912
|
[] |
no_license
|
pimukthee/competitive-prog
|
4eaa917c27ddd02c8e4ff56502fa53eb7f884011
|
0a40e9fe8b229ce3534ad6e6e316e0b94c028847
|
refs/heads/master
| 2021-05-23T05:59:02.243040
| 2018-06-08T08:54:03
| 2018-06-08T08:54:03
| 94,750,445
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 904
|
cpp
|
10260.cpp
|
#include <iostream>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <utility>
#include <algorithm>
#define pb push_back
#define mp make_pair
#define sqr(x) x*x
#define LL long long
#define F first
#define S second
#define vi vector<int>
#define pi pair<int,int>
using namespace std;
int dig[300];
char s[300];
int main()
{
int prev = 0;
dig['B']=dig['F'] = dig['P'] = dig['V'] = 1;
dig['C']=dig['G']=dig['J']=dig['K']=dig['Q']=dig['S']=dig['X']=dig['Z'] = 2;
dig['D']=dig['T'] = 3;
dig['L'] = 4;
dig['M'] = dig['N'] = 5;
dig['R'] = 6;
while(scanf(" %s",s)>0)
{
for(int i=0; s[i]; i++)
{
int k = dig[s[i]];
if(k>0 && k != prev)
{
printf("%d",k);
prev = k;
}
else prev = 0;
}
printf("\n");
}
return 0;
}
|
a76893935817675653cce67aca31b623641242a0
|
ad615721e4b1fdbb1d28691b7bd3948421267b88
|
/GAME3015_GameEngine_Project/GAME3015_GameEngine/MenuState.cpp
|
4cf61ddf7fc638d33391444ae58e5bc9ca5c8f4c
|
[] |
no_license
|
Shankk/GAME3015_GameEngine
|
59871b1fbe275662889dab4167c64d4e5403aac2
|
5fcfb0ce5383ae06ce3bfa73eeea759280f56859
|
refs/heads/main
| 2023-04-04T12:41:40.773706
| 2021-03-30T03:51:09
| 2021-03-30T03:51:09
| 352,515,583
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,452
|
cpp
|
MenuState.cpp
|
#include "MenuState.hpp"
#include "Game.hpp"
MenuState::MenuState(StateStack& stack, Context context, Game* game)
: State(stack, context, game)
, mOptionIndex(0)
, m_SceneGraph(new SceneNode(game))
, m_MenuScreenBackground(nullptr)
, m_PlayButton(nullptr)
, m_SettingButton(nullptr)
, m_QuitButton(nullptr)
, m_SelectorSprite (nullptr)
{
BuildScene();
}
void MenuState::draw()
{
m_SceneGraph->draw();
}
bool MenuState::update(const GameTimer& gt)
{
m_SceneGraph->update(gt);
float x = mOptions[mOptionIndex]->getWorldPosition().x - 1.25f;
float y = mOptions[mOptionIndex]->getWorldPosition().y;
float z = mOptions[mOptionIndex]->getWorldPosition().z;
m_SelectorSprite->setPosition(x, y, z);
return true;
}
bool MenuState::handleEvent(WPARAM btnState)
{
if (btnState == VK_RETURN)
{
if (mOptionIndex == Play)
{
requestStackPop();
requestStackPush(States::Game);
}
else if (mOptionIndex == Setting)
{
requestStackPop();
requestStackPush(States::Setting);
}
else if (mOptionIndex == Exit)
{
requestStackPop();
}
}
else if (btnState == VK_LEFT)
{
if (mOptionIndex > 0)
mOptionIndex--;
else
mOptionIndex = mOptions.size() - 1;
updateOptionText();
}
else if (btnState == VK_RIGHT)
{
if (mOptionIndex < mOptions.size() - 1)
mOptionIndex++;
else
mOptionIndex = 0;
updateOptionText();
}
else
{
return false;
}
return true;
}
void MenuState::updateOptionText()
{
if (mOptions.empty())
return;
}
void MenuState::BuildScene()
{
mGame->mAllRitems.clear();
mGame->mOpaqueRitems.clear();
mGame->mFrameResources.clear();
mGame->BuildMaterials();
std::unique_ptr<SpriteNode> backgroundSprite(new SpriteNode(mGame, "TitleScreen"));
m_MenuScreenBackground = backgroundSprite.get();
m_MenuScreenBackground->setPosition(0, 0, 0.0);
m_MenuScreenBackground->setScale(12.0, 1.0, 8.5);
m_MenuScreenBackground->setVelocity(0, 0, 0);
m_SceneGraph->attachChild(std::move(backgroundSprite));
std::unique_ptr<SpriteNode> menuPlaySprite(new SpriteNode(mGame, "MenuPlay"));
m_PlayButton = menuPlaySprite.get();
m_PlayButton->setPosition(-2, 0.1, 0.0);
m_PlayButton->setScale(4.0, 1.0, 4.0);
m_PlayButton->setVelocity(0, 0, 0);
m_SceneGraph->attachChild(std::move(menuPlaySprite));
mOptions.push_back(m_PlayButton);
std::unique_ptr<SpriteNode> menuSettingSprite(new SpriteNode(mGame, "MenuSettingTex"));
m_SettingButton = menuSettingSprite.get();
m_SettingButton->setPosition(0, 0.1, 0.0);
m_SettingButton->setScale(4.0, 1.0, 4.0);
m_SettingButton->setVelocity(0, 0, 0);
m_SceneGraph->attachChild(std::move(menuSettingSprite));
mOptions.push_back(m_SettingButton);
std::unique_ptr<SpriteNode> menuQuitSprite(new SpriteNode(mGame, "MenuQuit"));
m_QuitButton = menuQuitSprite.get();
m_QuitButton->setPosition(2.5, 0.1, 0.0);
m_QuitButton->setScale(4.0, 1.0, 4.0);
m_QuitButton->setVelocity(0, 0, 0);
m_SceneGraph->attachChild(std::move(menuQuitSprite));
mOptions.push_back(m_QuitButton);
std::unique_ptr<SpriteNode> menuArrowSprite(new SpriteNode(mGame, "MenuArrow"));
m_SelectorSprite = menuArrowSprite.get();
m_SelectorSprite->setPosition(-0.5, 0.1, 0.0);
m_SelectorSprite->setScale(0.75f, 1.0f, 0.75f);
m_SelectorSprite->setVelocity(0, 0, 0);
m_SceneGraph->attachChild(std::move(menuArrowSprite));
m_SceneGraph->build();
for (auto& e : mGame->mAllRitems)
mGame->mOpaqueRitems.push_back(e.get());
mGame->BuildFrameResources();
}
|
9cd4e02942c232f2629d3e822aba25db58c1e18c
|
5517b91a4be684d822d35a6c2bd8d21f1098aebc
|
/dragon/operators/math/elementwise_ops.h
|
f4898d1311c100d174b79164f6e89db050051e45
|
[
"BSD-2-Clause"
] |
permissive
|
zhengruiguo/dragon
|
785f52a2eaba0899b2e598a4365adf1b43e07b38
|
3dfb6ea55d90d2fb2da9b1b471f5e1e7d7667810
|
refs/heads/master
| 2023-05-31T22:48:42.157381
| 2021-06-29T01:59:24
| 2021-06-29T01:59:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,374
|
h
|
elementwise_ops.h
|
/*!
* Copyright (c) 2017-present, SeetaTech, Co.,Ltd.
*
* Licensed under the BSD 2-Clause License.
* You should have received a copy of the BSD 2-Clause License
* along with the software. If not, See,
*
* <https://opensource.org/licenses/BSD-2-Clause>
*
* ------------------------------------------------------------
*/
#ifndef DRAGON_OPERATORS_MATH_ELEMENTWISE_OPS_H_
#define DRAGON_OPERATORS_MATH_ELEMENTWISE_OPS_H_
#include "dragon/core/operator.h"
#include "dragon/utils/math/utils.h"
namespace dragon {
#define DECLARE_ELEMENTWISE_OP(name) \
template <class Context> \
class name##Op final : public Operator<Context> { \
public: \
SIMPLE_CTOR_DTOR(name##Op); \
USE_OPERATOR_FUNCTIONS; \
\
void RunOnDevice() override; \
\
template <typename T> \
void DoRunWithType(); \
};
template <class Context>
class AxpbyOp final : public Operator<Context> {
public:
AxpbyOp(const OperatorDef& def, Workspace* ws)
: Operator<Context>(def, ws),
alpha_(OP_SINGLE_ARG(float, "alpha", 1.f)),
beta_(OP_SINGLE_ARG(float, "beta", 1.f)) {}
USE_OPERATOR_FUNCTIONS;
void RunOnDevice() override;
template <typename T>
void DoRunWithType();
protected:
float alpha_, beta_;
Tensor *X_, *Y_;
};
inline vec32_t CheckOutputAliases(
const Tensor& A,
const Tensor& B,
Tensor* Y,
const vec64_t& Y_dims) {
if ((void*)&A == (void*)Y) {
CHECK(A.dims() == Y_dims)
<< "\nNon-broadcastable output shape " << A.DimString()
<< " does not match the broadcast shape " << Tensor::DimString(Y_dims);
} else if ((void*)&B == (void*)Y) {
CHECK(B.dims() == Y_dims)
<< "\nNon-broadcastable output shape " << B.DimString()
<< " does not match the broadcast shape " << Tensor::DimString(Y_dims);
}
vec32_t available_aliases;
if (Y_dims == A.dims()) available_aliases.push_back(0);
if (Y_dims == B.dims()) available_aliases.push_back(1);
return available_aliases;
}
// Unary ElementwiseOp
DECLARE_ELEMENTWISE_OP(Abs);
DECLARE_ELEMENTWISE_OP(Ceil);
DECLARE_ELEMENTWISE_OP(Cos);
DECLARE_ELEMENTWISE_OP(Exp);
DECLARE_ELEMENTWISE_OP(Floor);
DECLARE_ELEMENTWISE_OP(IsInf);
DECLARE_ELEMENTWISE_OP(IsNaN);
DECLARE_ELEMENTWISE_OP(Log);
DECLARE_ELEMENTWISE_OP(Neg);
DECLARE_ELEMENTWISE_OP(Reciprocal);
DECLARE_ELEMENTWISE_OP(Round);
DECLARE_ELEMENTWISE_OP(Rsqrt);
DECLARE_ELEMENTWISE_OP(Sign);
DECLARE_ELEMENTWISE_OP(Sin);
DECLARE_ELEMENTWISE_OP(Sqrt);
DECLARE_ELEMENTWISE_OP(Square);
DECLARE_ELEMENTWISE_OP(BitwiseNot);
DECLARE_ELEMENTWISE_OP(Not);
DECLARE_ELEMENTWISE_OP(AbsGradient);
DECLARE_ELEMENTWISE_OP(CosGradient);
DECLARE_ELEMENTWISE_OP(ExpGradient);
DECLARE_ELEMENTWISE_OP(LogGradient);
DECLARE_ELEMENTWISE_OP(NegGradient);
DECLARE_ELEMENTWISE_OP(ReciprocalGradient);
DECLARE_ELEMENTWISE_OP(RsqrtGradient);
DECLARE_ELEMENTWISE_OP(SignGradient);
DECLARE_ELEMENTWISE_OP(SinGradient);
DECLARE_ELEMENTWISE_OP(SqrtGradient);
DECLARE_ELEMENTWISE_OP(SquareGradient);
// Binary ElementwiseOp
DECLARE_ELEMENTWISE_OP(Add);
DECLARE_ELEMENTWISE_OP(Sub);
DECLARE_ELEMENTWISE_OP(Mul);
DECLARE_ELEMENTWISE_OP(Div);
DECLARE_ELEMENTWISE_OP(Pow);
DECLARE_ELEMENTWISE_OP(Minimum);
DECLARE_ELEMENTWISE_OP(Maximum);
DECLARE_ELEMENTWISE_OP(BitwiseAnd);
DECLARE_ELEMENTWISE_OP(BitwiseOr);
DECLARE_ELEMENTWISE_OP(BitwiseXor);
DECLARE_ELEMENTWISE_OP(And);
DECLARE_ELEMENTWISE_OP(Or);
DECLARE_ELEMENTWISE_OP(Xor);
DECLARE_ELEMENTWISE_OP(Equal);
DECLARE_ELEMENTWISE_OP(NotEqual);
DECLARE_ELEMENTWISE_OP(Less);
DECLARE_ELEMENTWISE_OP(LessEqual);
DECLARE_ELEMENTWISE_OP(Greater);
DECLARE_ELEMENTWISE_OP(GreaterEqual);
DECLARE_ELEMENTWISE_OP(AddGradient);
DECLARE_ELEMENTWISE_OP(SubGradient);
DECLARE_ELEMENTWISE_OP(MulGradient);
DECLARE_ELEMENTWISE_OP(DivGradient);
DECLARE_ELEMENTWISE_OP(PowGradient);
DECLARE_ELEMENTWISE_OP(MinimumGradient);
DECLARE_ELEMENTWISE_OP(MaximumGradient);
// Trinary ElementwiseOp
DECLARE_ELEMENTWISE_OP(Where);
DECLARE_ELEMENTWISE_OP(WhereGradient);
#undef DECLARE_ELEMENTWISE_OP
} // namespace dragon
#endif // DRAGON_OPERATORS_MATH_ELEMENTWISE_OPS_H_
|
63560a935656e6a4ca997b1540a92f87aeda85e6
|
79b674bd3a5036a68af1d5c4962b5f1126c5ac69
|
/sift/sift_04/sift_04/sift_04/temp.cpp
|
8dcb742c6cef33c56be9422670f70d08dac879df
|
[] |
no_license
|
UI-Mario/cv
|
b03befa9f8a4137e0b2f52b5dd3f84319afd49be
|
8e5ba043869f6aaf63398f6e787e094ae3b39c62
|
refs/heads/master
| 2020-05-09T10:35:57.544666
| 2019-05-13T11:12:10
| 2019-05-13T11:12:10
| 181,049,324
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,500
|
cpp
|
temp.cpp
|
#include "stdio.h"
#include <opencv2/opencv.hpp>
#include"pre.h"
#include"ach.h"
#include"step.h"
using namespace cv;
sift *sift1 = new sift();
sift *sift2 = new sift();
Res r1, r2;
int main()
{
r1.img = imread(img_path1);
r2.img = imread(img_path2);
resize(r1.img, r1.img, Size(r1.img.rows / 2, r1.img.cols / 2));
resize(r2.img, r2.img, Size(r2.img.rows / 2, r2.img.cols / 2));
r1.sift = sift1;
r2.sift = sift2;
process(r1);
process(r2);
Mat img1 = r1.img.clone();
Mat img2 = r2.img.clone();
sift1 = r1.sift;
sift2 = r2.sift;
imshow("1", r1.img);
imshow("2", r2.img);
int row1 = img1.rows, col1 = img1.cols, row2 = img2.rows, col2 = img2.cols;
int row = max(row1, row2), col = col1 + col2;
Mat img = Mat(row, col, CV_8UC3);
for (int r = 0; r < row1; r++) {
for (int c = 0; c < col1; c++) {
img.ptr<uchar>(r)[c * 3 + 0] = img1.ptr<uchar>(r)[c * 3 + 0];
img.ptr<uchar>(r)[c * 3 + 1] = img1.ptr<uchar>(r)[c * 3 + 1];
img.ptr<uchar>(r)[c * 3 + 2] = img1.ptr<uchar>(r)[c * 3 + 2];
}
for (int c = col1 ; c < col1 + col2 ; c++) {
img.ptr<uchar>(r)[c * 3 + 0] = img2.ptr<uchar>(r)[(c - col1 ) * 3 + 0];
img.ptr<uchar>(r)[c * 3 + 1] = img2.ptr<uchar>(r)[(c - col1 ) * 3 + 1];
img.ptr<uchar>(r)[c * 3 + 2] = img2.ptr<uchar>(r)[(c - col1 ) * 3 + 2];
}
}
namedWindow("temp");
imshow("temp", img);
waitKey(0);
destroyAllWindows();
sift1->release();
sift2->release();
return 0;
}
|
79deff390597bd0f915f740662af7a2d22a70964
|
a2cff87a7053aa837241e5a968686c9d45c92b67
|
/FinalProject/QwintoScoreSheet.h
|
700505a734c1320e629a19e11f2c5720cc763dca
|
[] |
no_license
|
tyleraustin005/Project-DataBase
|
dda9aaaea23a4618c855fc892fdab89e48db5ad1
|
b09d338548bf66f6562ef766e93b330b90023de5
|
refs/heads/master
| 2021-02-11T00:01:36.073631
| 2020-06-24T20:54:11
| 2020-06-24T20:54:11
| 244,431,154
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,059
|
h
|
QwintoScoreSheet.h
|
#pragma once
#ifndef Qwinto_ScoreSheet
#define Qwinto_ScoreSheet
#include "ScoreSheet.h"
#include "Colour.h"
#include "QwintoRow.h"
class QwintoScoreSheet : public ScoreSheet {
const int totalCharLength = 37;
QwintoRow<Colour::RED> redRow;
QwintoRow<Colour::YELLOW> yellowRow;
QwintoRow<Colour::BLUE> blueRow;
// Print dividing lines betwen the QwintoRows for the scoresheet
std::string printLine(const int& start, const int& end) const;
// Get the extra values from the bonus columns if there is any
int getBonusColumnValue(int redIndex, int yellowIndex, int blueIndex, Colour col);
public:
QwintoScoreSheet(const std::string& name) : ScoreSheet(name) {};
protected:
// Set the total score in the base class and return that score
int calcTotal() override;
// Print the Qwinto ScoreSheet
std::ostream& printSheet(std::ostream& stream) const override;
bool validate(RollofDice rollofdice, Colour colour, int position) const override;
bool operator!() override;
};
#endif // !Qwinto_ScoreSheet
|
e3328e100e9c28f2a620459045bbce117fbdabbc
|
19e031954aa694a7475eeb4c200d62deff87118c
|
/tests/arr_real_test.cpp
|
9442e407a953b9dec61ddc86af48c59bcd2014a4
|
[
"MIT"
] |
permissive
|
vitalsong/dsplib
|
e866c7a53b60820277bd53554e3305d36ac2517e
|
140c70168dd1cecad779a4b2bd3e0cf43a07759b
|
refs/heads/master
| 2023-08-30T20:59:34.310497
| 2023-08-24T21:37:12
| 2023-08-24T21:37:12
| 228,922,291
| 15
| 2
|
MIT
| 2023-08-24T21:37:13
| 2019-12-18T21:11:19
|
C++
|
UTF-8
|
C++
| false
| false
| 4,316
|
cpp
|
arr_real_test.cpp
|
#include "tests_common.h"
using namespace dsplib;
//-------------------------------------------------------------------------------------------------
TEST(ArrRealTest, Init) {
arr_real a1;
arr_real a3(a1);
arr_real a4(10);
arr_real a5 = a4;
arr_real a6 = a5 + a4;
arr_real a7(a6 + a4);
ASSERT_EQ(a1.size(), 0);
ASSERT_EQ(a3.size(), 0);
ASSERT_EQ(a4.size(), 10);
ASSERT_EQ(a5.size(), 10);
ASSERT_EQ(a6.size(), 10);
ASSERT_EQ(a7.size(), 10);
ASSERT_TRUE(a1.empty());
ASSERT_TRUE(a3.empty());
std::vector<short> v1 = {-1, -2, 3, 4};
arr_real a8{v1.data(), v1.size()};
ASSERT_EQ_ARR_REAL(v1, a8);
std::vector<::real_t> v2 = {1, 2, 3, 4};
arr_real a9(v2);
ASSERT_EQ_ARR_REAL(v2, a9);
}
//-------------------------------------------------------------------------------------------------
TEST(ArrRealTest, Arithm) {
arr_real a1 = {-1, -2, 3, 4};
arr_real a2 = {1, 2, -3, -4};
arr_real sum_r = {0, 0, 0, 0};
arr_real mlt_r = {-1, -4, -9, -16};
arr_real div_r = {-1, -1, -1, -1};
auto sum = a1 + a2;
auto mlt = a1 * a2;
auto div = a1 / a2;
ASSERT_EQ_ARR_REAL(sum, sum_r);
ASSERT_EQ_ARR_REAL(mlt, mlt_r);
ASSERT_EQ_ARR_REAL(div, div_r);
}
//-------------------------------------------------------------------------------------------------
TEST(ArrRealTest, Concatenate) {
arr_real a1 = {100, 200};
arr_real a2 = {-100, -200};
arr_real j1 = {100, 200, -100, -200};
arr_real j2 = {-100, -200, 100, 200};
auto r1 = concatenate(a1, a2);
auto r2 = concatenate(a2, a1);
ASSERT_EQ_ARR_REAL(r1, j1);
ASSERT_EQ_ARR_REAL(r2, j2);
ASSERT_EQ_ARR_REAL(a1 | a2, j1);
ASSERT_EQ_ARR_REAL(a2 | a1, j2);
}
//-------------------------------------------------------------------------------------------------
TEST(ArrRealTest, Zeros) {
arr_real r = {0, 0, 0, 0};
auto v = zeros(4);
ASSERT_EQ_ARR_REAL(r, v);
}
//-------------------------------------------------------------------------------------------------
TEST(ArrRealTest, Pow) {
{
arr_real x1 = {1, -1, 2, -2};
arr_real r1 = {1, 1, 4, 4};
auto y1 = pow(x1, 2);
ASSERT_EQ_ARR_REAL(r1, y1);
}
{
arr_real x1 = {1, -2.0, 3, -4.0};
arr_real r1 = {1, 1, 1, 1};
auto y1 = pow(x1, 0);
ASSERT_EQ_ARR_REAL(r1, y1);
}
{
arr_real x1 = {1, 2, 3, 4};
arr_real x2 = {2, 2, 2, 2};
arr_real r = {1, 4, 9, 16};
ASSERT_EQ_ARR_REAL(pow(x1, x2), r);
}
{
real_t x1 = 2;
arr_real x2 = {1, 2, 3, 4};
arr_real r = {2, 4, 8, 16};
ASSERT_EQ_ARR_REAL(pow(x1, x2), r);
}
}
//-------------------------------------------------------------------------------------------------
TEST(ArrRealTest, CheckEqual) {
const arr_real x = {1.0, -1.0, 200, -1e-5, 0.0};
{
std::vector<bool> r = (x == (x[0] + 1e-17));
ASSERT_TRUE(bool(r == std::vector<bool>{true, false, false, false, false}));
}
{
std::vector<bool> r = (x == (x[1] + 1e-17));
ASSERT_TRUE(bool(r == std::vector<bool>{false, true, false, false, false}));
}
{
std::vector<bool> r = (x == (x[2] + 1e-17));
ASSERT_TRUE(bool(r == std::vector<bool>{false, false, true, false, false}));
}
{
std::vector<bool> r = (x == (x[3] + 1e-23));
ASSERT_TRUE(bool(r == std::vector<bool>{false, false, false, true, false}));
}
{
std::vector<bool> r = (x == (x[4] + 1e-30));
ASSERT_TRUE(bool(r == std::vector<bool>{false, false, false, false, false}));
}
{
std::vector<bool> r = (x == -0.0);
ASSERT_TRUE(bool(r == std::vector<bool>{false, false, false, false, true}));
}
}
//-------------------------------------------------------------------------------------------------
TEST(ArrRealTest, CheckGreater) {
arr_real x = {1.0, -1.0, 200, -1e-5, 10000.0};
std::vector<bool> r = (x > 1.0);
ASSERT_TRUE(bool(r == std::vector<bool>{false, false, true, false, true}));
auto y = x[r];
ASSERT_EQ_ARR_REAL(y, arr_real{200, 10000.0});
}
|
f102fe134363cb88c5b10eaa449d58e719b9a9dd
|
d5a585e518cd4ee7ea74004b60459da4b4ef346e
|
/Ex3_LongestSubstringWithoutRepeatingCharacters/main.cpp
|
3df697b82f8ec572e519458262a29a4dda1da056
|
[] |
no_license
|
QiweiXue/LeetCode
|
7e5599b66c3d4ce965e7508c9790eae9e858f1ea
|
9cd3e32c08d7e86b948aeeff3e5f1950f88df865
|
refs/heads/master
| 2021-01-21T20:43:02.409638
| 2018-07-25T06:30:34
| 2018-07-25T06:30:34
| 94,674,662
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 301
|
cpp
|
main.cpp
|
# include "Solution.h"
#include <vector>
#include <iostream>
int main (int argc, char** argv)
{
std::vector<std::string> strings{"cvv","dvdf","hhhh","abcabcb","pwwkew"};
for(auto& a: strings)
{
std::cout << a << ": " << Solution().lengthOfLongestSubstring(a) << std::endl;
}
system("pause");
}
|
6400b8f5d27050bc58434c0d2f352131ddf70e03
|
fbd6afa22568045d8806ecdda93144d1a6e44af2
|
/Src/Libs/Debugging/DebugDrawings.cpp
|
68dbb124b4f787f1ad333d6fd3da7c10fbf84d51
|
[
"BSD-2-Clause"
] |
permissive
|
bhuman/BHumanCodeRelease
|
5ccbcc60b968c12f29983992d603ab464a51051b
|
645031c46ff88efcf32129301d21e109857cde3d
|
refs/heads/master
| 2023-05-22T09:49:04.827692
| 2023-03-29T15:27:24
| 2023-03-29T15:27:24
| 15,512,849
| 212
| 151
| null | 2018-04-12T12:36:26
| 2013-12-29T18:24:40
|
C++
|
UTF-8
|
C++
| false
| false
| 2,645
|
cpp
|
DebugDrawings.cpp
|
/**
* @file DebugDrawings.cpp
*
* Functions for Debugging
*
* @author Michael Spranger
*/
#include "DebugDrawings.h"
#include "Platform/BHAssert.h"
void DrawingManager::addDrawingId(const char* name, const char* typeName)
{
if(drawings.find(name) == drawings.end())
{
char id = static_cast<char>(drawings.size());
Drawing& drawing = drawings[name];
drawing.id = id;
std::unordered_map< const char*, char>::const_iterator i = types.find(typeName);
if(i == types.end())
{
drawing.type = static_cast<char>(types.size());
types[typeName] = drawing.type;
typesById[id] = typeName;
}
else
drawing.type = i->second;
drawingsById[id] = name;
}
}
void DrawingManager::clear()
{
types.clear();
drawings.clear();
strings.clear();
drawingsById.clear();
typesById.clear();
}
const char* DrawingManager::getString(const std::string& string)
{
std::unordered_map<std::string, const char*>::iterator i = strings.find(string);
if(i == strings.end())
{
strings[string];
i = strings.find(string);
i->second = i->first.c_str();
}
return i->second;
}
In& operator>>(In& stream, DrawingManager& drawingManager)
{
// note that this operator appends the data read to the drawingManager
// clear() has to be called first to replace the existing data
int size;
stream >> size;;
for(int i = 0; i < size; ++i)
{
std::string str;
char id;
stream >> id >> str;
const char* name = drawingManager.getString(str);
drawingManager.types[name] = id;
drawingManager.typesById[id] = name;
}
stream >> size;
for(int i = 0; i < size; ++i)
{
std::string str;
char id, type;
stream >> id >> type >> str;
const char* name = drawingManager.getString(str);
DrawingManager::Drawing& entry = drawingManager.drawings[name];
entry.id = id;
entry.type = type;
drawingManager.drawingsById[id] = name;
}
return stream;
}
Out& operator<<(Out& stream, const DrawingManager& drawingManager)
{
stream << static_cast<int>(drawingManager.types.size());
for(std::unordered_map<const char*, char>::const_iterator iter = drawingManager.types.begin(); iter != drawingManager.types.end(); ++iter)
{
stream << iter->second;
stream << iter->first;
}
stream << static_cast<int>(drawingManager.drawings.size());
for(std::unordered_map< const char*, DrawingManager::Drawing>::const_iterator iter = drawingManager.drawings.begin(); iter != drawingManager.drawings.end(); ++iter)
{
stream << iter->second.id;
stream << iter->second.type;
stream << iter->first;
}
return stream;
}
|
1e0f536f8eee56d82eb47dc85906412fbc1993a6
|
24fcc7a9446871f5affbc82d3ae1ed20d6a7c8aa
|
/src/RcppExports.cpp
|
f5c226fd7fd99e628833d5392e229a2a770f354b
|
[
"MIT"
] |
permissive
|
mrc-ide/malariasimulation
|
3188657f6ff9da4ea35646189d0bd75d6e35aa52
|
397a7b7efe90958dd01f97110a1d16c71d041f33
|
refs/heads/master
| 2023-08-23T11:29:10.050424
| 2023-07-03T15:58:32
| 2023-07-03T15:58:32
| 233,609,741
| 10
| 10
|
NOASSERTION
| 2023-08-17T15:48:41
| 2020-01-13T14:06:17
|
R
|
UTF-8
|
C++
| false
| false
| 16,037
|
cpp
|
RcppExports.cpp
|
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include "malariasimulation_types.h"
#include <Rcpp.h>
using namespace Rcpp;
#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif
// create_adult_mosquito_model
Rcpp::XPtr<AdultMosquitoModel> create_adult_mosquito_model(Rcpp::XPtr<AquaticMosquitoModel> growth_model, double mu, double tau, double susceptible, double foim);
RcppExport SEXP _malariasimulation_create_adult_mosquito_model(SEXP growth_modelSEXP, SEXP muSEXP, SEXP tauSEXP, SEXP susceptibleSEXP, SEXP foimSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<AquaticMosquitoModel> >::type growth_model(growth_modelSEXP);
Rcpp::traits::input_parameter< double >::type mu(muSEXP);
Rcpp::traits::input_parameter< double >::type tau(tauSEXP);
Rcpp::traits::input_parameter< double >::type susceptible(susceptibleSEXP);
Rcpp::traits::input_parameter< double >::type foim(foimSEXP);
rcpp_result_gen = Rcpp::wrap(create_adult_mosquito_model(growth_model, mu, tau, susceptible, foim));
return rcpp_result_gen;
END_RCPP
}
// adult_mosquito_model_update
void adult_mosquito_model_update(Rcpp::XPtr<AdultMosquitoModel> model, double mu, double foim, double susceptible, double f);
RcppExport SEXP _malariasimulation_adult_mosquito_model_update(SEXP modelSEXP, SEXP muSEXP, SEXP foimSEXP, SEXP susceptibleSEXP, SEXP fSEXP) {
BEGIN_RCPP
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<AdultMosquitoModel> >::type model(modelSEXP);
Rcpp::traits::input_parameter< double >::type mu(muSEXP);
Rcpp::traits::input_parameter< double >::type foim(foimSEXP);
Rcpp::traits::input_parameter< double >::type susceptible(susceptibleSEXP);
Rcpp::traits::input_parameter< double >::type f(fSEXP);
adult_mosquito_model_update(model, mu, foim, susceptible, f);
return R_NilValue;
END_RCPP
}
// create_adult_solver
Rcpp::XPtr<Solver> create_adult_solver(Rcpp::XPtr<AdultMosquitoModel> model, std::vector<double> init, double r_tol, double a_tol, size_t max_steps);
RcppExport SEXP _malariasimulation_create_adult_solver(SEXP modelSEXP, SEXP initSEXP, SEXP r_tolSEXP, SEXP a_tolSEXP, SEXP max_stepsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<AdultMosquitoModel> >::type model(modelSEXP);
Rcpp::traits::input_parameter< std::vector<double> >::type init(initSEXP);
Rcpp::traits::input_parameter< double >::type r_tol(r_tolSEXP);
Rcpp::traits::input_parameter< double >::type a_tol(a_tolSEXP);
Rcpp::traits::input_parameter< size_t >::type max_steps(max_stepsSEXP);
rcpp_result_gen = Rcpp::wrap(create_adult_solver(model, init, r_tol, a_tol, max_steps));
return rcpp_result_gen;
END_RCPP
}
// create_aquatic_mosquito_model
Rcpp::XPtr<AquaticMosquitoModel> create_aquatic_mosquito_model(double beta, double de, double mue, Rcpp::XPtr<Timeseries> k_timeseries, double gamma, double dl, double mul, double dp, double mup, size_t total_M, bool model_seasonality, double g0, std::vector<double> g, std::vector<double> h, double R_bar, double mum, double f, double rainfall_floor);
RcppExport SEXP _malariasimulation_create_aquatic_mosquito_model(SEXP betaSEXP, SEXP deSEXP, SEXP mueSEXP, SEXP k_timeseriesSEXP, SEXP gammaSEXP, SEXP dlSEXP, SEXP mulSEXP, SEXP dpSEXP, SEXP mupSEXP, SEXP total_MSEXP, SEXP model_seasonalitySEXP, SEXP g0SEXP, SEXP gSEXP, SEXP hSEXP, SEXP R_barSEXP, SEXP mumSEXP, SEXP fSEXP, SEXP rainfall_floorSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< double >::type beta(betaSEXP);
Rcpp::traits::input_parameter< double >::type de(deSEXP);
Rcpp::traits::input_parameter< double >::type mue(mueSEXP);
Rcpp::traits::input_parameter< Rcpp::XPtr<Timeseries> >::type k_timeseries(k_timeseriesSEXP);
Rcpp::traits::input_parameter< double >::type gamma(gammaSEXP);
Rcpp::traits::input_parameter< double >::type dl(dlSEXP);
Rcpp::traits::input_parameter< double >::type mul(mulSEXP);
Rcpp::traits::input_parameter< double >::type dp(dpSEXP);
Rcpp::traits::input_parameter< double >::type mup(mupSEXP);
Rcpp::traits::input_parameter< size_t >::type total_M(total_MSEXP);
Rcpp::traits::input_parameter< bool >::type model_seasonality(model_seasonalitySEXP);
Rcpp::traits::input_parameter< double >::type g0(g0SEXP);
Rcpp::traits::input_parameter< std::vector<double> >::type g(gSEXP);
Rcpp::traits::input_parameter< std::vector<double> >::type h(hSEXP);
Rcpp::traits::input_parameter< double >::type R_bar(R_barSEXP);
Rcpp::traits::input_parameter< double >::type mum(mumSEXP);
Rcpp::traits::input_parameter< double >::type f(fSEXP);
Rcpp::traits::input_parameter< double >::type rainfall_floor(rainfall_floorSEXP);
rcpp_result_gen = Rcpp::wrap(create_aquatic_mosquito_model(beta, de, mue, k_timeseries, gamma, dl, mul, dp, mup, total_M, model_seasonality, g0, g, h, R_bar, mum, f, rainfall_floor));
return rcpp_result_gen;
END_RCPP
}
// aquatic_mosquito_model_update
void aquatic_mosquito_model_update(Rcpp::XPtr<AquaticMosquitoModel> model, size_t total_M, double f, double mum);
RcppExport SEXP _malariasimulation_aquatic_mosquito_model_update(SEXP modelSEXP, SEXP total_MSEXP, SEXP fSEXP, SEXP mumSEXP) {
BEGIN_RCPP
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<AquaticMosquitoModel> >::type model(modelSEXP);
Rcpp::traits::input_parameter< size_t >::type total_M(total_MSEXP);
Rcpp::traits::input_parameter< double >::type f(fSEXP);
Rcpp::traits::input_parameter< double >::type mum(mumSEXP);
aquatic_mosquito_model_update(model, total_M, f, mum);
return R_NilValue;
END_RCPP
}
// create_aquatic_solver
Rcpp::XPtr<Solver> create_aquatic_solver(Rcpp::XPtr<AquaticMosquitoModel> model, std::vector<double> init, double r_tol, double a_tol, size_t max_steps);
RcppExport SEXP _malariasimulation_create_aquatic_solver(SEXP modelSEXP, SEXP initSEXP, SEXP r_tolSEXP, SEXP a_tolSEXP, SEXP max_stepsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<AquaticMosquitoModel> >::type model(modelSEXP);
Rcpp::traits::input_parameter< std::vector<double> >::type init(initSEXP);
Rcpp::traits::input_parameter< double >::type r_tol(r_tolSEXP);
Rcpp::traits::input_parameter< double >::type a_tol(a_tolSEXP);
Rcpp::traits::input_parameter< size_t >::type max_steps(max_stepsSEXP);
rcpp_result_gen = Rcpp::wrap(create_aquatic_solver(model, init, r_tol, a_tol, max_steps));
return rcpp_result_gen;
END_RCPP
}
// carrying_capacity
double carrying_capacity(const size_t timestep, const bool model_seasonality, const double g0, const std::vector<double>& g, const std::vector<double>& h, const double K0, const double R_bar, const double rainfall_floor);
RcppExport SEXP _malariasimulation_carrying_capacity(SEXP timestepSEXP, SEXP model_seasonalitySEXP, SEXP g0SEXP, SEXP gSEXP, SEXP hSEXP, SEXP K0SEXP, SEXP R_barSEXP, SEXP rainfall_floorSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const size_t >::type timestep(timestepSEXP);
Rcpp::traits::input_parameter< const bool >::type model_seasonality(model_seasonalitySEXP);
Rcpp::traits::input_parameter< const double >::type g0(g0SEXP);
Rcpp::traits::input_parameter< const std::vector<double>& >::type g(gSEXP);
Rcpp::traits::input_parameter< const std::vector<double>& >::type h(hSEXP);
Rcpp::traits::input_parameter< const double >::type K0(K0SEXP);
Rcpp::traits::input_parameter< const double >::type R_bar(R_barSEXP);
Rcpp::traits::input_parameter< const double >::type rainfall_floor(rainfall_floorSEXP);
rcpp_result_gen = Rcpp::wrap(carrying_capacity(timestep, model_seasonality, g0, g, h, K0, R_bar, rainfall_floor));
return rcpp_result_gen;
END_RCPP
}
// eggs_laid
double eggs_laid(double beta, double mu, double f);
RcppExport SEXP _malariasimulation_eggs_laid(SEXP betaSEXP, SEXP muSEXP, SEXP fSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< double >::type beta(betaSEXP);
Rcpp::traits::input_parameter< double >::type mu(muSEXP);
Rcpp::traits::input_parameter< double >::type f(fSEXP);
rcpp_result_gen = Rcpp::wrap(eggs_laid(beta, mu, f));
return rcpp_result_gen;
END_RCPP
}
// rainfall
double rainfall(const size_t t, const double g0, const std::vector<double>& g, const std::vector<double>& h, const double floor);
RcppExport SEXP _malariasimulation_rainfall(SEXP tSEXP, SEXP g0SEXP, SEXP gSEXP, SEXP hSEXP, SEXP floorSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const size_t >::type t(tSEXP);
Rcpp::traits::input_parameter< const double >::type g0(g0SEXP);
Rcpp::traits::input_parameter< const std::vector<double>& >::type g(gSEXP);
Rcpp::traits::input_parameter< const std::vector<double>& >::type h(hSEXP);
Rcpp::traits::input_parameter< const double >::type floor(floorSEXP);
rcpp_result_gen = Rcpp::wrap(rainfall(t, g0, g, h, floor));
return rcpp_result_gen;
END_RCPP
}
// solver_get_states
std::vector<double> solver_get_states(Rcpp::XPtr<Solver> solver);
RcppExport SEXP _malariasimulation_solver_get_states(SEXP solverSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<Solver> >::type solver(solverSEXP);
rcpp_result_gen = Rcpp::wrap(solver_get_states(solver));
return rcpp_result_gen;
END_RCPP
}
// solver_step
void solver_step(Rcpp::XPtr<Solver> solver);
RcppExport SEXP _malariasimulation_solver_step(SEXP solverSEXP) {
BEGIN_RCPP
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<Solver> >::type solver(solverSEXP);
solver_step(solver);
return R_NilValue;
END_RCPP
}
// create_timeseries
Rcpp::XPtr<Timeseries> create_timeseries(size_t size, double default_value);
RcppExport SEXP _malariasimulation_create_timeseries(SEXP sizeSEXP, SEXP default_valueSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< size_t >::type size(sizeSEXP);
Rcpp::traits::input_parameter< double >::type default_value(default_valueSEXP);
rcpp_result_gen = Rcpp::wrap(create_timeseries(size, default_value));
return rcpp_result_gen;
END_RCPP
}
// timeseries_at
double timeseries_at(Rcpp::XPtr<Timeseries> timeseries, double timestep, bool linear);
RcppExport SEXP _malariasimulation_timeseries_at(SEXP timeseriesSEXP, SEXP timestepSEXP, SEXP linearSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<Timeseries> >::type timeseries(timeseriesSEXP);
Rcpp::traits::input_parameter< double >::type timestep(timestepSEXP);
Rcpp::traits::input_parameter< bool >::type linear(linearSEXP);
rcpp_result_gen = Rcpp::wrap(timeseries_at(timeseries, timestep, linear));
return rcpp_result_gen;
END_RCPP
}
// timeseries_push
void timeseries_push(Rcpp::XPtr<Timeseries> timeseries, double value, double timestep);
RcppExport SEXP _malariasimulation_timeseries_push(SEXP timeseriesSEXP, SEXP valueSEXP, SEXP timestepSEXP) {
BEGIN_RCPP
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<Timeseries> >::type timeseries(timeseriesSEXP);
Rcpp::traits::input_parameter< double >::type value(valueSEXP);
Rcpp::traits::input_parameter< double >::type timestep(timestepSEXP);
timeseries_push(timeseries, value, timestep);
return R_NilValue;
END_RCPP
}
// random_seed
void random_seed(size_t seed);
RcppExport SEXP _malariasimulation_random_seed(SEXP seedSEXP) {
BEGIN_RCPP
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< size_t >::type seed(seedSEXP);
random_seed(seed);
return R_NilValue;
END_RCPP
}
// bernoulli_multi_p_cpp
std::vector<size_t> bernoulli_multi_p_cpp(const std::vector<double> p);
RcppExport SEXP _malariasimulation_bernoulli_multi_p_cpp(SEXP pSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const std::vector<double> >::type p(pSEXP);
rcpp_result_gen = Rcpp::wrap(bernoulli_multi_p_cpp(p));
return rcpp_result_gen;
END_RCPP
}
// bitset_index_cpp
std::vector<size_t> bitset_index_cpp(Rcpp::XPtr<individual_index_t> a, Rcpp::XPtr<individual_index_t> b);
RcppExport SEXP _malariasimulation_bitset_index_cpp(SEXP aSEXP, SEXP bSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::XPtr<individual_index_t> >::type a(aSEXP);
Rcpp::traits::input_parameter< Rcpp::XPtr<individual_index_t> >::type b(bSEXP);
rcpp_result_gen = Rcpp::wrap(bitset_index_cpp(a, b));
return rcpp_result_gen;
END_RCPP
}
// fast_weighted_sample
Rcpp::IntegerVector fast_weighted_sample(size_t size, std::vector<double> probs);
RcppExport SEXP _malariasimulation_fast_weighted_sample(SEXP sizeSEXP, SEXP probsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::traits::input_parameter< size_t >::type size(sizeSEXP);
Rcpp::traits::input_parameter< std::vector<double> >::type probs(probsSEXP);
rcpp_result_gen = Rcpp::wrap(fast_weighted_sample(size, probs));
return rcpp_result_gen;
END_RCPP
}
RcppExport SEXP run_testthat_tests();
static const R_CallMethodDef CallEntries[] = {
{"_malariasimulation_create_adult_mosquito_model", (DL_FUNC) &_malariasimulation_create_adult_mosquito_model, 5},
{"_malariasimulation_adult_mosquito_model_update", (DL_FUNC) &_malariasimulation_adult_mosquito_model_update, 5},
{"_malariasimulation_create_adult_solver", (DL_FUNC) &_malariasimulation_create_adult_solver, 5},
{"_malariasimulation_create_aquatic_mosquito_model", (DL_FUNC) &_malariasimulation_create_aquatic_mosquito_model, 18},
{"_malariasimulation_aquatic_mosquito_model_update", (DL_FUNC) &_malariasimulation_aquatic_mosquito_model_update, 4},
{"_malariasimulation_create_aquatic_solver", (DL_FUNC) &_malariasimulation_create_aquatic_solver, 5},
{"_malariasimulation_carrying_capacity", (DL_FUNC) &_malariasimulation_carrying_capacity, 8},
{"_malariasimulation_eggs_laid", (DL_FUNC) &_malariasimulation_eggs_laid, 3},
{"_malariasimulation_rainfall", (DL_FUNC) &_malariasimulation_rainfall, 5},
{"_malariasimulation_solver_get_states", (DL_FUNC) &_malariasimulation_solver_get_states, 1},
{"_malariasimulation_solver_step", (DL_FUNC) &_malariasimulation_solver_step, 1},
{"_malariasimulation_create_timeseries", (DL_FUNC) &_malariasimulation_create_timeseries, 2},
{"_malariasimulation_timeseries_at", (DL_FUNC) &_malariasimulation_timeseries_at, 3},
{"_malariasimulation_timeseries_push", (DL_FUNC) &_malariasimulation_timeseries_push, 3},
{"_malariasimulation_random_seed", (DL_FUNC) &_malariasimulation_random_seed, 1},
{"_malariasimulation_bernoulli_multi_p_cpp", (DL_FUNC) &_malariasimulation_bernoulli_multi_p_cpp, 1},
{"_malariasimulation_bitset_index_cpp", (DL_FUNC) &_malariasimulation_bitset_index_cpp, 2},
{"_malariasimulation_fast_weighted_sample", (DL_FUNC) &_malariasimulation_fast_weighted_sample, 2},
{"run_testthat_tests", (DL_FUNC) &run_testthat_tests, 0},
{NULL, NULL, 0}
};
RcppExport void R_init_malariasimulation(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
|
d59c95c1d6a3cf910718012ab5c07c0c08f9bde8
|
20e7990890414b27083c10b46b8dbdd91de87094
|
/data_structures/FLE-MEN2.CPP
|
e8748f7fa4246b5678fe83f8f9f89d24f8126fab
|
[] |
no_license
|
agudeloandres/C_Struct_Files
|
eb3aa9a62c596939a79f1e13c2f5cc04543592ec
|
cafe017f5dad4cec5d1ea2fabf4d6c646c99a23b
|
refs/heads/master
| 2021-01-10T14:04:32.468058
| 2015-10-22T04:12:02
| 2015-10-22T04:12:02
| 44,718,124
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,943
|
cpp
|
FLE-MEN2.CPP
|
//menu para manejo de archivos
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
#include<stdlib.h>
#include<string.h>
#include<dos.h>
#include<fstream.h>
void inside_inde(float,int);
typedef struct alumno{
float codigo;
char nombre[35];
float telefono;
};
void main()
{
clrscr();
fstream estudiantes;
alumno estudiante;
char op,nom[35];
float cod,tel;
int n,i,k,z,lo;
int sw;
char c,salida[80];
char opc;
//creacion del menu
sw=0;
do{
gotoxy(25,2);
printf("M E N U P R I N C I P A L");
gotoxy(17,4);
printf("CREAR ARCHIVO.............................[1]\n");
gotoxy(17,5);
printf("ADICIONES.................................[2]\n");
gotoxy(17,6);
printf("CONSULTAR.................................[3]\n");
gotoxy(17,7);
printf("MODIFICACIONES............................[4]\n");
gotoxy(17,8);
printf("TERMINAR..................................[5]\n");
gotoxy(17,10);
printf("DIGITE OPCION DESEADA: ");
do{
opc=getchar();
}while(opc < '0' && opc >'5');
clrscr();
switch(opc){
case '1':if(sw==0){
sw=1;
estudiantes.open("estud.dat",ios::in); //abriendo de lectura unicamente
//proceso de validacion de la existencia de un archivo
if (estudiantes.good()){
cout<<"archivo estud.dat existe-continua: ";
do{
c=getchar();
}while (c!='S' && c!= 's' && c!='N' && c!='n');
if (c=='N' || c=='n'){
exit(1);
}
}
estudiantes.close();
estudiantes.open("estud.dat",ios::out);//abrir para empezar a escribir(borrar)
//creacion de archivo
cout<<"dar entrada: ";
cin.getline(salida,80);
estudiantes<<salida;
estudiantes.close();
//lectura del archivo de texto
estudiantes.open("estud.dat",ios::in);
if (estudiantes.fail()){
cout<<"no existe archivo";
exit(1);
}
while (!estudiantes.eof()) {
estudiantes>>salida;
cout<<salida<<" " ;
}
estudiantes.close();
cout<<"\n\n\n ";
//adicionar mas texto al archivo
estudiantes.open ("estud.dat",ios::app);
cin.getline(salida,80);
n=strlen(salida);
for(i=0;i<=n;i++){
estudiantes.put(salida[i]);//otra forma de escribir en un archivo
}
estudiantes.close();
//lectura del archivo de texto
estudiantes.open ("estud.dat",ios::in);
while (!estudiantes.eof()){
estudiantes>>salida;
cout<<salida<<" ";
}
getch();
}
break;
case '2':if(sw==1){
// abrir el archivo en forma output=salida=escribir.
estudiantes.open("estud.dat",ios::in|ios::binary);
//proceso de validacion de la existencia de un archivo
if(estudiantes.good()){
cout<<"archivo estud.dat existe-continua(S/N): ";
do{
op=getchar();
}while (op!='S' && op!= 's' && op!='N' && op!='n');
if (op=='N' || op=='n'){
exit(1);
}
}
estudiantes.close();
estudiantes.open("estud.dat",ios::out|ios::binary);
//captura de datos a grabar en el archivo.
clrscr();
gotoxy(31,2);
printf("MANEJO DE ARCHIVOS");
gotoxy(10,4);
printf("codigo : ");
gotoxy(10,6);
printf("nombre : ");
gotoxy(10,8);
printf("telefono : ");
do{
gotoxy(23,4);
printf(" ");
gotoxy(23,6);
printf(" ");
gotoxy(23,8);
printf(" ");
gotoxy(23,4);
scanf("%f",&cod);
gotoxy(23,6);
cin.getline (nom,35);
gotoxy(23,8);
scanf("%f",&tel);
estudiante.codigo=cod;
n=strlen(nom);
for(i=0;i<=n;i++){
estudiante.nombre[i]=nom[i];
}
estudiante.telefono=tel;
// escritura del registro captura en el archivo.
estudiantes.write((char*) &estudiante,sizeof(estudiante));
gotoxy(10,16);
printf("Mas datos (S/N): ",k);
do{
op=getchar();
}while(op!='S' && op!= 's' && op!='N' && op!='n');
gotoxy(10,16);
printf(" ");
}while(op=='S' || op=='s');
estudiantes.close();
}
else{
gotoxy(25,10);
printf("por favor crear archivo");
getch();
clrscr();
}
break;
case '3':if(sw==1){
//abrir archivo para leer.
estudiantes.open("estud.dat",ios::in|ios::binary);
//validacion para archivo si ya existe.
if(estudiantes.fail()){
cout<<"archivo estud.dat no existe dar 0 y continua";
do{
op=getchar();
}while(op!='0');
exit(1);
}
clrscr();
gotoxy(31,2);
printf("MANEJO DE ARCHIVOS");
gotoxy(10,4);
printf(" codigo nombre telefono ");
i=6;
while(!estudiantes.eof()){
// leer registro del archivo estud.dat.
estudiantes.read((char*) &estudiante,sizeof(estudiante));
if(estudiantes.eof()){
printf("\n\n FIN");
break;
}
gotoxy(9,i);
printf("%7.0f",estudiante.codigo);
gotoxy(21,i);
printf("%-35s",estudiante.nombre);
gotoxy(43,i);
printf("%7.0f",estudiante.telefono);
i++;
estudiante.codigo=0;
estudiante.telefono=0;
}
estudiantes.close();
getch();
}
else{
gotoxy(25,10);
printf("adicione registros por favor");
getch();
clrscr();
}
break;
case '4':if(sw==1){
// abrir el archivo en forma input para validar su existencia
estudiantes.open("estud.dat",ios::in|ios::binary);
//proceso de validacion de la existencia de un archivo
if (estudiantes.fail()){
cout<<"archivo estud.dat no existe dar enter";
getch();
exit(1);
}
estudiantes.close();
estudiantes.open("estud.dat",ios::in|ios::out|ios::binary);
//captura de datos a grabar en el archivo.
do{
clrscr();
gotoxy(23,4);
printf("digite el codigo a registro buscar: ");
scanf("%f",&cod);
estudiantes.read((char*) &estudiante,sizeof(estudiante));
while (!estudiantes.eof() && cod != estudiante.codigo);
lo=43;
z=-lo;
estudiantes.seekg(z,ios::cur);
printf("digite nuevo nombre: ");
cin.getline (nom,35);
n=strlen(nom);
for(i=0;i<=n;i++){
estudiante.nombre[i]=nom[i];
}
printf("digite nuevo telefono: ");
scanf("%f",&tel);
estudiante.telefono=tel;
// escritura del registro captura en el archivo.
estudiantes.write((char*) &estudiante,sizeof(estudiante));
gotoxy(10,16);
printf("Mas datos (S/N): ");
do{
op=getchar();
}while(op!='S' && op!= 's' && op!='N' && op!='n');
} while(op=='S' || op=='s');
estudiantes.close();
}
else{
gotoxy(25,10);
printf("adicione registros por favor");
getch();
clrscr();
}
break;
}
}while(opc!='5');
gotoxy(25,15);
printf("FINALIZACION DEL PROGRAMA");
getch();
}
|
a0e721184a3fe7c877b7fca5ff2e7b81d40628db
|
1f1a038080425ef8ec0bca08064dff2af646b875
|
/teste/robo_hardware/examples/LerDadosCalibracaoEEPROM/LerDadosCalibracaoEEPROM.ino
|
bd953ba13efbe60e26e10831968fdce1c425379d
|
[] |
no_license
|
IFRN-SC/The_Zeta_Project
|
7d231dee9ffba6ca530a2b4bd80898030b97c42d
|
570669ca5f713818d7a8ddcda89c3007b7822440
|
refs/heads/master2
| 2021-01-23T17:38:45.592950
| 2019-04-18T01:39:16
| 2019-04-18T01:39:16
| 102,772,593
| 2
| 0
| null | 2019-08-08T12:34:22
| 2017-09-07T18:35:46
|
C++
|
UTF-8
|
C++
| false
| false
| 955
|
ino
|
LerDadosCalibracaoEEPROM.ino
|
//exemplo para ler valores de calibracao que estao salvos na memoria persistente do arduino a eeprom
#include <robo_hardware2.h>
#include <Servo.h>
calibracao_dados val; //dados de calibracao para sensores de cor e sensores de refletancia
/***** Dados existentes na Struct calibracao_dados *******************
HSV branco;
HSV preto;
HSV verde;
HSV cinza;
int refletancia_dir;
int refletancia_mais_dir;
int refletancia_esq;
int refletancia_mais_esq;
************************/
void setup() {
//inicializando a porta serial
Serial.begin(9600);
while (!Serial) {
;
}
}
void loop() {
// Le os dados da EEPROM
robo.lerCalibracao(val);
Serial.print(val.branco.h);
Serial.print("; ");
Serial.print(val.branco.s);
Serial.print("; ");
Serial.print(val.branco.v);
Serial.print("; ");
Serial.print(val.refletancia_dir);
Serial.print("; ");
Serial.print(val.refletancia_esq);
Serial.println();
delay(500);
}
|
fa0032ffbd510369f24524af94e661489a4fb95c
|
2c37c298a494ed37bff11b0b240371eaba6575b7
|
/0354/main.cpp
|
4c8c02bcc7e9407352d7343939e7b6b6ca2e0771
|
[] |
no_license
|
chichuyun/LeetCode
|
04ec78bf5b05d4febfd8daff5e0e0145cfcfacf4
|
44752f2b58cd7a850b8e02cd3735f93bb82bcb85
|
refs/heads/master
| 2021-06-04T11:03:04.297131
| 2020-11-19T14:48:32
| 2020-11-19T14:48:32
| 148,440,792
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 971
|
cpp
|
main.cpp
|
class Solution {
private:
static bool _func(vector<int>& p, vector<int>& q) {
if(p[0] != q[0]) return p[0] < q[0];
return p[1] > q[1];
}
public:
int maxEnvelopes(vector<vector<int>>& envelopes) {
if(envelopes.empty() || envelopes[0].empty()) return 0;
sort(envelopes.begin(), envelopes.end(), _func);
int len = envelopes.size();
vector<int> nums(len);
int max_len = 0, count = 0;
for(int i=0; i<len; ++i) {
int num = envelopes[i][1];
int left = 0, right = max_len;
while(left < right) {
int mid = left + (right - left)/2;
if(nums[mid] >= num) {
right = mid;
} else {
left = mid + 1;
}
}
count = right;
nums[count++] = num;
max_len = max(max_len, count);
}
return max_len;
}
};
|
482e2fe2651eb640bcf3c83728c8657e5c65eff2
|
2ed30f25c4a80afd02279f56e2e6c526ce8a6ecd
|
/sudoku/sudoku/solve.h
|
c5c3479b20d1368baabef480f616c38dcec01e06
|
[] |
no_license
|
zack-guo/Sudoku
|
518eeb84d60b8645173ba84f7d16230464cdbab2
|
7f5fb1c4101a17d75af8257a085a0f1c84126a32
|
refs/heads/master
| 2020-11-28T16:12:03.162023
| 2020-01-23T02:20:54
| 2020-01-23T02:20:54
| 229,864,162
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 643
|
h
|
solve.h
|
//
// backtrack.h
// sudoku
//
// Created by 郭子奇 on 2020/1/10.
// Copyright © 2020 郭子奇. All rights reserved.
//
#ifndef solve_h
#define solve_h
using namespace std;
class solve
{
private:
int map[9][9]; //数独盘
bool check_list[9][10]; //每个宫数字的出现情况
int current_box;//当前的宫
int current_num;//当前搜索的数字
int target_num;//空缺数量
int flag;
FILE* fp;
FILE* fout;
string superc;
public:
int backtrack(int);
bool check(int, int);
solve();
void output();
void clean();
int read();
void set_file(const char*);
void superoutput();
};
#endif /* solve_h */
|
2bfe40307b2cefac9fd6ddf80471c749e3d1edb7
|
b38eb24e92deda234b0d4636435ba1f878a03667
|
/MiniProjeto/Mini Projeto.cpp
|
1f2439d5e136532884dcc54e0ec79643260711bc
|
[
"MIT"
] |
permissive
|
HemensonDavid/Estudando-C
|
e4ddf6002bd69ec519bba5402029a7fdbd9477e5
|
fb5a33b399b369dce789bf77c06834da71fe0a4d
|
refs/heads/master
| 2020-06-26T20:35:22.908293
| 2019-07-31T03:59:07
| 2019-07-31T03:59:07
| 199,750,226
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 8,235
|
cpp
|
Mini Projeto.cpp
|
#include <iostream>
using namespace std;
int main(){
int voto;
string nome;
double alg=0;
double mat=0;
double fis=0;
double nulo=0;
double branco=0;
//variaveis de desempate
int id_alg=44;
int id_mat=43;
int id_fis=39;
double h_alg=1.83;
double h_mat=1.80;
double h_fis=1.73;
//finais de variaveis de desempate
do{
//
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
cout<<"\n";
cout<<"\t\tVotacao das disciplina mais show de bola do IFRN\n";
cout<<"\t\tPara algoritmo 609\n";
cout<<"\t\tPara matematica 124\n";
cout<<"\t\tPara fisica 6666\n";
cout<<"\t\tBranco 1111\n";
cout<<"\t\tEncerrar votacao 0000\n";
cout<<"\n";
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
//
cout<<"\t\tDigite seu Voto:";
cin>>voto;
//
if(voto==609){
cout<<"Voce esta votando em algoritmo\n";
cout<<"Disciplina do professor karlos thadeu\n";
cout<<"Voce tem certeza que quer votar? sim/nao\n";
cin>>nome;
if(nome=="sim"){
alg+=2;
cout<<"Voto confirmado com sucesso!!\n";
}
}else if(voto==124){
cout<<"Voce esta votando em Matematica\n";
cout<<"Disciplina do professor George\n";
cout<<"Voce tem certeza que quer votar? sim/nao\n";
cin>>nome;
if(nome=="sim"){
mat++;
cout<<"Voto confirmado com sucesso!!\n";
}
}else if(voto==6666){
cout<<"Voce esta votando em Fisica\n";
cout<<"Disciplina do professor Messias\n";
cout<<"Voce tem certeza que quer votar? sim/nao\n";
cin>>nome;
if(nome=="sim"){
fis++;
cout<<"Voto confirmado com sucesso!!\n";
}
}else if(voto==1111){
cout<<"Voce esta votando Branco!!\n";
cout<<"Voce tem certeza que quer votar? sim/nao\n";
cin>>nome;
if(nome=="sim"){
branco++;
cout<<"Voto confirmado com sucesso!!\n";
}
}else if(voto!=0000){
cout<<"Seu voto sera computado nulo \n";
cout<<"Voce tem certeza que quer votar nulo? sim/nao ";
cin>>nome;
if(nome=="sim"){
nulo++;
cout<<"Voto anulado com sucesso!!\n";
}
}
}while(voto!=0000);
//porcentagem de votos by:lucas Emanuel
double soma_dos_votos;
soma_dos_votos=alg+mat+fis+branco;
//fim da porcentagem by:lucas Emanuel
//quantidade de votos e porcentagem de votos
cout<<"\n";
cout<<"A disciplina de algoritmo teve: "<<alg<<" Votos, Totalizando: "<<alg/soma_dos_votos *100 <<"%"<<" Dos Votos!\n";
cout<<"A disciplina de Matematica teve: "<<mat<<" Votos, Totalizando: "<<mat/soma_dos_votos *100 <<"%"<<" Dos Votos!\n";
cout<<"A disciplina de Fisica teve: "<<fis<<" Votos, Totalizando: "<<fis/soma_dos_votos *100 <<"%"<<" Dos Votos!\n";
cout<<"Votos Brancos: "<<branco<<" Votos, Totalizando: "<<branco/soma_dos_votos *100 <<"%"<<" Dos Votos!\n";;
cout<<"Votos Nulos: "<<nulo<<endl;
cout<<"\n";
//fim da quantidade de votos
//resultado final
if(alg>fis && alg>mat){
cout<<"\tResultado Final:\n";
cout<<"\t\tA Disciplina de Algoritmo foi eleita como a mais show de bola.\n";
}else if(fis>alg && fis>mat){
cout<<"\tResultado Final:\n";
cout<<"\t\tA Disciplina de Fisica foi eleita como a mais show de bola.\n";
}else if(mat>alg && mat>fis){
cout<<"\tResultado Final:\n";
cout<<"\t\tA Disciplina de Matematica foi eleita como a mais show de bola.\n";
}
//final do resultado final
//resevado para bug; resevado para bug; resevado para bug; resevado para bug; resevado para bug; resevado para bug;
if(alg==0 || mat==0 || fis==0){
if(alg==0){
alg=alg-1;
}
if(mat==0){
mat=mat-2;
}
if(fis==0){
fis=fis-3;
}
}
//resevado para bug; resevado para bug; resevado para bug; resevado para bug; resevado para bug; resevado para bug;
//empate
if(alg==mat || alg==fis || fis==mat){
cout<<"\t\tOcorreu um Empate!!\n";
if(alg==mat){
if(id_alg>id_mat){
cout<<"A Disciplina de Algoritmo foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a idade do Professor\n";
}else if(id_mat>id_alg){
cout<<"A Disciplina de Matematica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a idade do Professor\n";
}
//
if(id_alg==id_mat){
cout<<"\t\tOutro Empate !!\n";
if(h_alg>h_mat){
cout<<"A Disciplina de Algoritmo foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a Altura do Professor\n";
}else if(h_mat>h_alg){
cout<<"A Disciplina de Matematica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a Altura do Professor\n";
}
}
}else if(alg==fis){
if(id_alg>id_fis){
cout<<"A Disciplina de Algoritmo foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a idade do Professor\n";
}else if(id_fis>id_alg){
cout<<"A Disciplina de Fisica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a idade do Professor\n";
}
//
if(id_alg==id_fis){
cout<<"\t\tOutro Empate !!\n";
if(h_alg>h_fis){
cout<<"A Disciplina de Algoritmo foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a Altura do Professor\n";
}else if(h_fis>h_alg){
cout<<"A Disciplina de Fisica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a Altura do Professor\n";
}
}
}else if(fis==mat){
if(id_fis>id_mat){
cout<<"A Disciplina de Fisica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a idade do Professor\n";
}else if(id_mat>id_fis){
cout<<"A Disciplina de Matematica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a idade do Professor\n";
}
//
if(id_fis==id_mat){
cout<<"\t\tOutro Empate !!\n";
if(h_fis>h_mat){
cout<<"A Disciplina de Fisica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a Altura do Professor\n";
}else if(h_mat>h_fis){
cout<<"A Disciplina de Matematica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a Altura do Professor\n";
}
}
}else if(alg==fis && fis==mat && alg==mat){
if(id_alg>id_fis && id_alg>id_mat){
cout<<"A Disciplina de Algoritmo foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a idade do Professor\n";
}else if(id_mat>id_alg && id_mat>id_fis){
cout<<"A Disciplina de Matematica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a idade do Professor\n";
}else if(id_fis>id_alg && id_fis>id_mat){
cout<<"A Disciplina de Fisica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a idade do Professor\n";
}
//
if(alg==fis && fis==mat && alg==mat){
cout<<"\t\tOutro Empate !!\n";
if(h_alg>h_mat && h_alg>h_fis){
cout<<"A Disciplina de Algoritmo foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a Altura do Professor\n";
}else if(h_fis>h_alg && h_fis>h_mat){
cout<<"A Disciplina de Fisica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a Altura do Professor\n";
}else if(h_mat>h_alg && h_mat>h_fis){
cout<<"A Disciplina de Matematica foi eleita como a mais show de bola.\n";
cout<<"Como criterio de desempate foi usado a Altura do Professor\n";
}
}
}
}//fim do empate
system("pause");
}//fim do progama;
|
258d7a04a59f00c33d622d7e9cee6bb4bb1c8979
|
377d69a058a0b5a1c66352fe7d5f27c9ef99a987
|
/10_elementary_data_structures/easy/01_stack_using_two_queues.h
|
ab73e1ee5824f3bf03c8a39bae43d82ac2a87b5e
|
[
"Apache-2.0"
] |
permissive
|
frozenca/CLRS
|
45782d67343eb285f2d95d8c25184b9973079e65
|
408a86c4c0ec7d106bdaa6f5526b186df9f65c2e
|
refs/heads/main
| 2022-09-24T14:55:38.542993
| 2022-09-12T02:59:10
| 2022-09-12T02:59:10
| 337,278,655
| 55
| 15
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 534
|
h
|
01_stack_using_two_queues.h
|
#ifndef __CLRS4_STACK_TWO_QUEUES_H__
#define __CLRS4_STACK_TWO_QUEUES_H__
#include <common.h>
#include <queue>
namespace frozenca {
using namespace std;
template <typename T> class StackTwoQueues {
queue<T> A;
queue<T> B;
public:
void push(const T &x) { A.push(x); }
T pop() {
while (A.size() > 1) {
B.push(A.front());
A.pop();
}
auto x = A.front();
A.pop();
swap(A, B);
return x;
}
};
} // namespace frozenca
#endif //__CLRS4_STACK_TWO_QUEUES_H__
|
d2f5f36f653b9ca5ef389ce0cf07c1664395fa19
|
693c8cdee5b2b9bf4cef0d9272a1ae6c2dcb98a0
|
/利润问题switch语句实现.cpp
|
b310dbacdcdcc823c59fd0739348aee834266f1b
|
[] |
no_license
|
livelq/oo
|
7f720ca9b61e0c90c0d70aebbd0abfc224b31a99
|
6377def327081eb3a5a14acdf1a00520617cd7a5
|
refs/heads/master
| 2021-05-09T07:02:53.272297
| 2018-01-29T07:42:43
| 2018-01-29T07:42:43
| 119,348,897
| 0
| 0
| null | null | null | null |
WINDOWS-1252
|
C++
| false
| false
| 608
|
cpp
|
利润问题switch语句实现.cpp
|
#include<stdio.h>
int main()
{
float i,bonus,b1,b2,b3,b4,b5;
int branch;
b1=100000*0.1;
b2=b1+100000*0.075;
b3=b2+200000*0.005;
b4=b3+200000*0.003;
b5=b4+400000*0.015;
printf("ÇëÊäÈëÀûÈó£º");
scanf("%f",&i);
branch=i/100000;
if (branch>10)
branch=10;
switch(branch)
{
case 0:bonus=i*0.1;break;
case 1:bonus=b1+(i-100000)*0.075;break;
case 2:
case 3:
bonus=b2+(i-200000)*0.005;break;
case 4:
case 5:
bonus=b3+(i-200000)*0.003;break;
case 6:
case 7:
case 8:
case 9:
bonus=b4+(i-400000)*0.015;break;
case 10:
bonus=b5+(i-1000000)*0.001;break;
}
printf("%f",bonus);
}
|
165a3949b628e784a06c23c2abd4d6d6134cd708
|
922d614fdbc0dd63980ce436117a55fc79926e09
|
/include/tpolynomial.h
|
b1078612d3777c338b65e4bfc45f956f465808f5
|
[] |
no_license
|
DimaNubo/Laba7_8_9
|
1cee56f87b7ac9c4618b0ad72cbffe6e2db6089a
|
b75c666eebca7b4aaca2a61d395a4a8fc083cf3a
|
refs/heads/main
| 2023-02-02T05:40:01.321374
| 2020-12-17T20:36:34
| 2020-12-17T20:36:34
| 321,992,437
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,401
|
h
|
tpolynomial.h
|
#pragma once
#include <iostream>
#include "exception.h"
#include "tmonomial.h"
using namespace std;
class TPolynomial
{
protected:
TMonomial *start;
int n; //поле размерности монома
int k; //количество элементов
public:
TPolynomial();
TPolynomial(int _n);
TPolynomial(const TPolynomial &A);
~TPolynomial();
int GetN();
int GetSize();
TMonomial* GetStart();
TPolynomial operator-(TPolynomial &A);
TPolynomial operator+(TPolynomial &A);
TPolynomial& operator=(const TPolynomial &A);
bool operator==(const TPolynomial &A);
bool operator!=(const TPolynomial &A);
TPolynomial operator*(TPolynomial &A);
TPolynomial& operator+=(const TMonomial &m);
TPolynomial& operator-=(const TMonomial &m);
friend std::ostream& operator<<(std::ostream &ostr, TPolynomial& Tm);
};
TPolynomial::TPolynomial()
{
n = 0;
k = 0;
start = NULL;
}
TPolynomial::TPolynomial(int _n)
{
if ( _n <= 0 )
throw TException( "Error" );
n = _n;
k = 0;
start = NULL;
}
TPolynomial::TPolynomial(const TPolynomial &A)
{
n = A.n;
k = A.k;
if ( A.start == NULL )
start = NULL;
else
{
start = new TMonomial(*A.start);
for ( TMonomial* it = A.start->GetNext(); it != NULL; it=it->GetNext() )
{
start->SetNext(new TMonomial(*it));
}
}
}
TPolynomial::~TPolynomial()
{
if ( start == NULL )
return;
TMonomial* next_el;
for ( TMonomial* it = start; it != NULL; )
{
next_el = it->GetNext();
it->~TMonomial();
it = next_el;
}
}
int TPolynomial::GetN()
{
return n;
}
int TPolynomial::GetSize()
{
return k;
}
TMonomial* TPolynomial::GetStart()
{
return start;
}
TPolynomial& TPolynomial::operator=(const TPolynomial &A)
{
if ( *this != A )
{
if ( start != NULL )
{
TMonomial* next_el;
for ( TMonomial* it = start; it != NULL; )
{
next_el = it->GetNext();
it->~TMonomial();
it = next_el;
}
}
start = new TMonomial( *A.start );
TMonomial* src_el = start;
for ( TMonomial* it = A.start->GetNext(); it != NULL;it=it -> GetNext() )
{
src_el -> SetNext( new TMonomial(*it) );
src_el = src_el -> GetNext();
}
n = A.n;
k = A.k;
}
return *this;
}
TPolynomial &TPolynomial::operator+=( const TMonomial &m)
{
if ( n != m.GetN() )
throw TException( "Error" );
if ( m.GetCoeff() == 0 )
return *this;
if ( start == NULL )
{
start = new TMonomial(m);
k++;
}
else
{
TMonomial* last_el = NULL;
for ( TMonomial *ptr = start; ptr != NULL; ptr = ptr->GetNext() )
{
if ( ptr->ComparePowers(m) )
{
*ptr += m;
break;
}
else if ( ptr ->GetNext() == NULL )
{
last_el = ptr;
}
}
if ( last_el != NULL )
{
last_el -> SetNext( new TMonomial(m) );
k++;
}
}
return *this;
}
TPolynomial &TPolynomial::operator-=( const TMonomial &m)
{
if ( n != m.GetN() )
throw TException( "Error" );
if ( m.GetCoeff() == 0 )
return *this;
if ( start == NULL )
{
start = new TMonomial(m);
start -> SetCoeff( start -> GetCoeff() * (-1) );
k++;
}
else
{
TMonomial* last_el = NULL;
for ( TMonomial *ptr = start; ptr != NULL; ptr=ptr->GetNext() )
{
if ( ptr->ComparePowers(m) )
{
*ptr -= m;
break;
} else if ( ptr ->GetNext() == NULL )
{
last_el = ptr;
}
}
if ( last_el != NULL )
{
last_el -> SetNext( new TMonomial(m) );
last_el -> SetCoeff( last_el ->GetCoeff() * (-1) );
k++;
}
}
return *this;
}
bool TPolynomial::operator==(const TPolynomial &A)
{
if ( this->n != A.n )
throw TException( "Error" );
if ( this->k != A.k )
return false;
for ( TMonomial* src_ptr = start; src_ptr != NULL; src_ptr = src_ptr -> GetNext() )
for ( TMonomial* p_ptr = start; p_ptr != NULL; p_ptr = p_ptr -> GetNext() )
{
if ( *src_ptr == *p_ptr )
{
break;
}
else if ( p_ptr -> GetNext() == NULL )
{
return false;
}
}
return true;
}
bool TPolynomial::operator!=(const TPolynomial &A)
{
return !( *this == A );
}
TPolynomial TPolynomial::operator*(TPolynomial &A)
{
if ( n != A.n )
throw TException( "Error" );
TPolynomial tmp(n);
for ( TMonomial* src_ptr = start; src_ptr != NULL; src_ptr = src_ptr -> GetNext() )
for ( TMonomial* p_ptr = start; p_ptr != NULL; p_ptr = p_ptr -> GetNext() )
{
tmp += (*src_ptr) * (*p_ptr);
}
return tmp;
}
TPolynomial TPolynomial::operator+(TPolynomial &A)
{
if ( n != A.n )
throw TException( "Error" );
TPolynomial tmp(A);
for ( TMonomial* p_ptr = start; p_ptr != NULL; p_ptr = p_ptr -> GetNext() )
{
tmp += *p_ptr;
}
return tmp;
}
TPolynomial TPolynomial::operator-(TPolynomial &A)
{
if ( n != A.n )
throw TException( "Error" );
TPolynomial tmp(A);
for ( TMonomial* p_ptr = start; p_ptr != NULL; p_ptr = p_ptr -> GetNext() )
{
tmp -= *p_ptr;
}
return tmp;
}
ostream& operator<<(ostream &ostr, TPolynomial& Tm)
{
if ( Tm.start == NULL )
ostr << "Empty";
else
{
for ( TMonomial* ptr = Tm.start; ptr != NULL; ptr = ptr -> GetNext() )
{
ostr << *ptr;
if ( ptr -> GetNext() != NULL )
ostr << "+";
}
}
return ostr;
}
|
f50f7364ffb654c29c892d2c465ad81078ba5c6b
|
5243037b081eafc39deec9484191159e73c2406c
|
/common_stripped/Libraries/SharedCommon/Timer.h
|
3eb796dc407a5e4c136b7dbb47927fcb9d321cdd
|
[] |
no_license
|
disorn-inc/old_igvc
|
d7b7b67a4a6beab336bd9254d5c6bf95298a187a
|
7ea402ee5d931fd27d5a195d14bd76f4b07ec5de
|
refs/heads/master
| 2021-05-27T09:41:57.463714
| 2013-03-28T02:09:53
| 2013-03-28T02:09:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 478
|
h
|
Timer.h
|
#pragma once
namespace Pave_Libraries_Common
{
struct TimerHandlerData
{
bool withData;
void (*timerHandlerNoData)();
void (*timerHandlerWithData)(void *data);
void *data;
};
class Timer
{
public:
static bool addTimer(void (*timerHandler)(), unsigned long ms);
static bool addTimer( void (*timerHandler)(void *data), unsigned long ms, void *data);
private:
static void timerCallback(void *data, unsigned long a, unsigned long b);
};
}
|
7ad50e58f32f32bfffc451f7d64f51f159241850
|
bbe6faa8c616ccf5e7c9733ff3f9e20494b4c066
|
/cmake-3.12.20181002-g18d20/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.hpp
|
b801eb19775215cc9301b2eb9f3bbe1345688aba
|
[
"BSD-3-Clause"
] |
permissive
|
helinyu/source_view
|
7d685f11dbd192b654188edf8ca132d7d5ad519c
|
6799043f6df66e6f491756c7b28c05f3e31064b6
|
refs/heads/master
| 2020-04-24T23:19:16.431516
| 2019-02-25T14:11:36
| 2019-02-25T14:11:36
| 172,340,220
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 392
|
hpp
|
StyleB.hpp
|
#ifndef STYLEB_HPP
#define STYLEB_HPP
#include "UtilityMacros.hpp"
#include <QStylePlugin>
class StyleB : public QStylePlugin
{
Q_OBJECT
// Json file in source local subdirectory
Q_PLUGIN_METADATA(IID "org.styles.B" FILE "jsonIn/StyleB.json")
A_CUSTOM_MACRO(SomeArg, "jsonIn/StyleB_Custom.json", AnotherArg)
public:
QStyle* create(const QString& key);
};
#endif
|
61149b82d6507a3ed9bccff3eef51535d7fb67a2
|
06bed8ad5fd60e5bba6297e9870a264bfa91a71d
|
/JavaQt/javaqt.cpp
|
4d89d14e5ea9ac005f49d90bd793c03dec535118
|
[] |
no_license
|
allenck/DecoderPro_app
|
43aeb9561fe3fe9753684f7d6d76146097d78e88
|
226c7f245aeb6951528d970f773776d50ae2c1dc
|
refs/heads/master
| 2023-05-12T07:36:18.153909
| 2023-05-10T21:17:40
| 2023-05-10T21:17:40
| 61,044,197
| 4
| 3
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 43
|
cpp
|
javaqt.cpp
|
#include "javaqt.h"
JavaQt::JavaQt()
{
}
|
3006f0fa65b99140ee23c18ec05da89ade161a39
|
37cca16f12e7b1d4d01d6f234da6d568c318abee
|
/src/rice/environment/Environment.cpp
|
a5c6263505effce9f48967ee50ef45e21ac78a94
|
[] |
no_license
|
subhash1-0/thirstyCrow
|
e48155ce68fc886f2ee8e7802567c1149bc54206
|
78b7e4e3d2b9a9530ad7d66b44eacfe73ceea582
|
refs/heads/master
| 2016-09-06T21:25:54.075724
| 2015-09-21T17:21:15
| 2015-09-21T17:21:15
| 42,881,521
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 16,306
|
cpp
|
Environment.cpp
|
// Generated from /pastry-2.1/src/rice/environment/Environment.java
#include <rice/environment/Environment.hpp>
#include <java/io/IOException.hpp>
#include <java/io/Serializable.hpp>
#include <java/lang/ArrayStoreException.hpp>
#include <java/lang/CharSequence.hpp>
#include <java/lang/Class.hpp>
#include <java/lang/ClassCastException.hpp>
#include <java/lang/Comparable.hpp>
#include <java/lang/Exception.hpp>
#include <java/lang/IllegalArgumentException.hpp>
#include <java/lang/NullPointerException.hpp>
#include <java/lang/Object.hpp>
#include <java/lang/String.hpp>
#include <java/lang/StringBuilder.hpp>
#include <java/util/ArrayList.hpp>
#include <java/util/Collection.hpp>
#include <java/util/HashSet.hpp>
#include <java/util/Iterator.hpp>
#include <rice/Destructable.hpp>
#include <rice/environment/Environment_destroy_1.hpp>
#include <rice/environment/exception/ExceptionStrategy.hpp>
#include <rice/environment/exception/simple/SimpleExceptionStrategy.hpp>
#include <rice/environment/logging/CloneableLogManager.hpp>
#include <rice/environment/logging/LogManager.hpp>
#include <rice/environment/logging/Logger.hpp>
#include <rice/environment/logging/file/FileLogManager.hpp>
#include <rice/environment/logging/simple/SimpleLogManager.hpp>
#include <rice/environment/params/Parameters.hpp>
#include <rice/environment/params/simple/SimpleParameters.hpp>
#include <rice/environment/processing/Processor.hpp>
#include <rice/environment/processing/sim/SimProcessor.hpp>
#include <rice/environment/processing/simple/SimpleProcessor.hpp>
#include <rice/environment/random/RandomSource.hpp>
#include <rice/environment/random/simple/SimpleRandomSource.hpp>
#include <rice/environment/time/TimeSource.hpp>
#include <rice/environment/time/simple/SimpleTimeSource.hpp>
#include <rice/environment/time/simulated/DirectTimeSource.hpp>
#include <rice/selector/SelectorManager.hpp>
#include <SubArray.hpp>
#include <ObjectArray.hpp>
template<typename ComponentType, typename... Bases> struct SubArray;
namespace java
{
namespace io
{
typedef ::SubArray< ::java::io::Serializable, ::java::lang::ObjectArray > SerializableArray;
} // io
namespace lang
{
typedef ::SubArray< ::java::lang::CharSequence, ObjectArray > CharSequenceArray;
typedef ::SubArray< ::java::lang::Comparable, ObjectArray > ComparableArray;
typedef ::SubArray< ::java::lang::String, ObjectArray, ::java::io::SerializableArray, ComparableArray, CharSequenceArray > StringArray;
} // lang
} // java
template<typename T, typename U>
static T java_cast(U* u)
{
if(!u) return static_cast<T>(nullptr);
auto t = dynamic_cast<T>(u);
if(!t) throw new ::java::lang::ClassCastException();
return t;
}
template<typename T>
static T* npc(T* t)
{
if(!t) throw new ::java::lang::NullPointerException();
return t;
}
rice::environment::Environment::Environment(const ::default_init_tag&)
: super(*static_cast< ::default_init_tag* >(0))
{
clinit();
}
rice::environment::Environment::Environment(::rice::selector::SelectorManager* sm, ::rice::environment::processing::Processor* proc, ::rice::environment::random::RandomSource* rs, ::rice::environment::time::TimeSource* time, ::rice::environment::logging::LogManager* lm, ::rice::environment::params::Parameters* params, ::rice::environment::exception::ExceptionStrategy* strategy)
: Environment(*static_cast< ::default_init_tag* >(0))
{
ctor(sm,proc,rs,time,lm,params,strategy);
}
rice::environment::Environment::Environment(::java::lang::StringArray* orderedDefaultFiles, ::java::lang::String* paramFileName)
: Environment(*static_cast< ::default_init_tag* >(0))
{
ctor(orderedDefaultFiles,paramFileName);
}
rice::environment::Environment::Environment(::java::lang::String* paramFileName)
: Environment(*static_cast< ::default_init_tag* >(0))
{
ctor(paramFileName);
}
rice::environment::Environment::Environment()
: Environment(*static_cast< ::default_init_tag* >(0))
{
ctor();
}
void rice::environment::Environment::init()
{
destructables = new ::java::util::HashSet();
}
java::lang::StringArray*& rice::environment::Environment::defaultParamFileArray_()
{
clinit();
return defaultParamFileArray__;
}
java::lang::StringArray* rice::environment::Environment::defaultParamFileArray__;
void rice::environment::Environment::ctor(::rice::selector::SelectorManager* sm, ::rice::environment::processing::Processor* proc, ::rice::environment::random::RandomSource* rs, ::rice::environment::time::TimeSource* time, ::rice::environment::logging::LogManager* lm, ::rice::environment::params::Parameters* params, ::rice::environment::exception::ExceptionStrategy* strategy)
{
super::ctor();
init();
this->selectorManager = sm;
this->randomSource = rs;
this->time = time;
this->logManager = lm;
this->params = params;
this->processor = proc;
this->exceptionStrategy = strategy;
if(params == nullptr) {
throw new ::java::lang::IllegalArgumentException(u"params cannot be null"_j);
}
chooseDefaults();
logger = npc(this->logManager)->getLogger(getClass(), nullptr);
npc(this->selectorManager)->setEnvironment(this);
addDestructable(this->time);
}
void rice::environment::Environment::ctor(::java::lang::StringArray* orderedDefaultFiles, ::java::lang::String* paramFileName)
{
ctor(nullptr, nullptr, nullptr, nullptr, nullptr, new ::rice::environment::params::simple::SimpleParameters(orderedDefaultFiles, paramFileName), nullptr);
}
rice::environment::Environment* rice::environment::Environment::directEnvironment(int32_t randomSeed)
{
clinit();
auto srs = new ::rice::environment::random::simple::SimpleRandomSource(static_cast< int64_t >(randomSeed), static_cast< ::rice::environment::logging::LogManager* >(nullptr));
auto env = directEnvironment(static_cast< ::rice::environment::random::RandomSource* >(srs));
npc(srs)->setLogManager(npc(env)->getLogManager());
return env;
}
rice::environment::Environment* rice::environment::Environment::directEnvironment()
{
clinit();
return directEnvironment(static_cast< ::rice::environment::random::RandomSource* >(nullptr));
}
rice::environment::Environment* rice::environment::Environment::directEnvironment(::rice::environment::random::RandomSource* rs)
{
clinit();
::rice::environment::params::Parameters* params = new ::rice::environment::params::simple::SimpleParameters(Environment::defaultParamFileArray__, nullptr);
auto dts = new ::rice::environment::time::simulated::DirectTimeSource(params);
auto lm = generateDefaultLogManager(dts, params);
npc(dts)->setLogManager(lm);
auto selector = generateDefaultSelectorManager(dts, lm, rs);
npc(dts)->setSelectorManager(selector);
::rice::environment::processing::Processor* proc = new ::rice::environment::processing::sim::SimProcessor(selector);
auto ret = new Environment(selector, proc, rs, dts, lm, params, generateDefaultExceptionStrategy(lm));
return ret;
}
void rice::environment::Environment::ctor(::java::lang::String* paramFileName)
{
ctor(defaultParamFileArray__, paramFileName);
}
void rice::environment::Environment::ctor()
{
ctor(nullptr);
}
void rice::environment::Environment::chooseDefaults()
{
if(time == nullptr) {
time = generateDefaultTimeSource();
}
if(logManager == nullptr) {
logManager = generateDefaultLogManager(time, params);
}
if(randomSource == nullptr) {
randomSource = generateDefaultRandomSource(params, logManager);
}
if(selectorManager == nullptr) {
selectorManager = generateDefaultSelectorManager(time, logManager, randomSource);
}
if(processor == nullptr) {
if(npc(params)->contains(u"environment_use_sim_processor"_j) && npc(params)->getBoolean(u"environment_use_sim_processor"_j)) {
processor = new ::rice::environment::processing::sim::SimProcessor(selectorManager);
} else {
processor = generateDefaultProcessor();
}
}
if(exceptionStrategy == nullptr) {
exceptionStrategy = generateDefaultExceptionStrategy(logManager);
}
}
rice::environment::exception::ExceptionStrategy* rice::environment::Environment::generateDefaultExceptionStrategy(::rice::environment::logging::LogManager* manager)
{
clinit();
return new ::rice::environment::exception::simple::SimpleExceptionStrategy(manager);
}
rice::environment::random::RandomSource* rice::environment::Environment::generateDefaultRandomSource(::rice::environment::params::Parameters* params, ::rice::environment::logging::LogManager* logging)
{
clinit();
::rice::environment::random::RandomSource* randomSource;
if(npc(npc(params)->getString(u"random_seed"_j))->equalsIgnoreCase(u"clock"_j)) {
randomSource = new ::rice::environment::random::simple::SimpleRandomSource(logging);
} else {
randomSource = new ::rice::environment::random::simple::SimpleRandomSource(npc(params)->getLong(u"random_seed"_j), logging);
}
return randomSource;
}
rice::environment::time::TimeSource* rice::environment::Environment::generateDefaultTimeSource()
{
clinit();
return new ::rice::environment::time::simple::SimpleTimeSource();
}
rice::environment::logging::LogManager* rice::environment::Environment::generateDefaultLogManager(::rice::environment::time::TimeSource* time, ::rice::environment::params::Parameters* params)
{
clinit();
if(npc(params)->getBoolean(u"environment_logToFile"_j)) {
return new ::rice::environment::logging::file::FileLogManager(time, params);
}
return new ::rice::environment::logging::simple::SimpleLogManager(time, params);
}
rice::selector::SelectorManager* rice::environment::Environment::generateDefaultSelectorManager(::rice::environment::time::TimeSource* time, ::rice::environment::logging::LogManager* logging, ::rice::environment::random::RandomSource* randomSource)
{
clinit();
return new ::rice::selector::SelectorManager(u"Default"_j, time, logging, randomSource);
}
rice::environment::processing::Processor* rice::environment::Environment::generateDefaultProcessor()
{
clinit();
return new ::rice::environment::processing::simple::SimpleProcessor(u"Default"_j);
}
rice::selector::SelectorManager* rice::environment::Environment::getSelectorManager()
{
return selectorManager;
}
rice::environment::processing::Processor* rice::environment::Environment::getProcessor()
{
return processor;
}
rice::environment::random::RandomSource* rice::environment::Environment::getRandomSource()
{
return randomSource;
}
rice::environment::time::TimeSource* rice::environment::Environment::getTimeSource()
{
return time;
}
rice::environment::logging::LogManager* rice::environment::Environment::getLogManager()
{
return logManager;
}
rice::environment::params::Parameters* rice::environment::Environment::getParameters()
{
return params;
}
void rice::environment::Environment::destroy()
{
try {
npc(params)->store();
} catch (::java::io::IOException* ioe) {
if(npc(logger)->level <= ::rice::environment::logging::Logger::WARNING)
npc(logger)->logException(u"Error during shutdown"_j, ioe);
}
if(npc(getSelectorManager())->isSelectorThread()) {
callDestroyOnDestructables();
} else {
npc(getSelectorManager())->invoke(new Environment_destroy_1(this));
}
}
void rice::environment::Environment::callDestroyOnDestructables()
{
auto i = (new ::java::util::ArrayList(static_cast< ::java::util::Collection* >(destructables)))->iterator();
while (npc(i)->hasNext()) {
auto d = java_cast< ::rice::Destructable* >(java_cast< ::rice::Destructable* >(npc(i)->next()));
npc(d)->destroy();
}
npc(selectorManager)->destroy();
npc(processor)->destroy();
}
void rice::environment::Environment::addDestructable(::rice::Destructable* destructable)
{
if(destructable == nullptr) {
if(npc(logger)->level <= ::rice::environment::logging::Logger::WARNING)
npc(logger)->logException(u"addDestructable(null)"_j, new ::java::lang::Exception(u"Stack Trace"_j));
return;
}
npc(destructables)->add(static_cast< ::java::lang::Object* >(destructable));
}
void rice::environment::Environment::removeDestructable(::rice::Destructable* destructable)
{
if(destructable == nullptr) {
if(npc(logger)->level <= ::rice::environment::logging::Logger::WARNING)
npc(logger)->logException(u"addDestructable(null)"_j, new ::java::lang::Exception(u"Stack Trace"_j));
return;
}
npc(destructables)->remove(static_cast< ::java::lang::Object* >(destructable));
}
rice::environment::exception::ExceptionStrategy* rice::environment::Environment::getExceptionStrategy()
{
return exceptionStrategy;
}
rice::environment::exception::ExceptionStrategy* rice::environment::Environment::setExceptionStrategy(::rice::environment::exception::ExceptionStrategy* newStrategy)
{
auto ret = exceptionStrategy;
exceptionStrategy = newStrategy;
return ret;
}
rice::environment::Environment* rice::environment::Environment::cloneEnvironment(::java::lang::String* prefix)
{
return cloneEnvironment(prefix, false, false);
}
rice::environment::Environment* rice::environment::Environment::cloneEnvironment(::java::lang::String* prefix, bool cloneSelector, bool cloneProcessor)
{
auto lman = cloneLogManager(prefix);
auto ts = cloneTimeSource(lman);
auto rand = cloneRandomSource(lman);
auto sman = cloneSelectorManager(prefix, ts, rand, lman, cloneSelector);
auto proc = this->cloneProcessor(prefix, lman, cloneProcessor);
auto ret = new Environment(sman, proc, rand, getTimeSource(), lman, getParameters(), getExceptionStrategy());
addDestructable(ret);
return ret;
}
rice::environment::time::TimeSource* rice::environment::Environment::cloneTimeSource(::rice::environment::logging::LogManager* lman)
{
return getTimeSource();
}
rice::environment::logging::LogManager* rice::environment::Environment::cloneLogManager(::java::lang::String* prefix)
{
auto lman = getLogManager();
if(dynamic_cast< ::rice::environment::logging::CloneableLogManager* >(lman) != nullptr) {
lman = npc((java_cast< ::rice::environment::logging::CloneableLogManager* >(getLogManager())))->clone(prefix);
}
return lman;
}
rice::selector::SelectorManager* rice::environment::Environment::cloneSelectorManager(::java::lang::String* prefix, ::rice::environment::time::TimeSource* ts, ::rice::environment::random::RandomSource* rs, ::rice::environment::logging::LogManager* lman, bool cloneSelector)
{
auto sman = getSelectorManager();
if(cloneSelector) {
sman = new ::rice::selector::SelectorManager(::java::lang::StringBuilder().append(prefix)->append(u" Selector"_j)->toString(), ts, lman, rs);
}
return sman;
}
rice::environment::processing::Processor* rice::environment::Environment::cloneProcessor(::java::lang::String* prefix, ::rice::environment::logging::LogManager* lman, bool cloneProcessor)
{
auto proc = getProcessor();
if(cloneProcessor) {
proc = new ::rice::environment::processing::simple::SimpleProcessor(::java::lang::StringBuilder().append(prefix)->append(u" Processor"_j)->toString());
}
return proc;
}
rice::environment::random::RandomSource* rice::environment::Environment::cloneRandomSource(::rice::environment::logging::LogManager* lman)
{
auto randSeed = npc(getRandomSource())->nextLong();
return new ::rice::environment::random::simple::SimpleRandomSource(randSeed, lman);
}
extern java::lang::Class *class_(const char16_t *c, int n);
java::lang::Class* rice::environment::Environment::class_()
{
static ::java::lang::Class* c = ::class_(u"rice.environment.Environment", 28);
return c;
}
void rice::environment::Environment::clinit()
{
super::clinit();
static bool in_cl_init = false;
struct clinit_ {
clinit_() {
in_cl_init = true;
defaultParamFileArray__ = (new ::java::lang::StringArray({u"freepastry"_j}));
}
};
if(!in_cl_init) {
static clinit_ clinit_instance;
}
}
java::lang::Class* rice::environment::Environment::getClass0()
{
return class_();
}
|
8b3ec4dd199116f39e41f96c40f23f2e1450b32d
|
d65d9c305e227b5dbe9553f9fc0150e56ebcc9a2
|
/src/benchmarks/hashjoin/tbbmap.hpp
|
d285ac7973c803f622a17100050f6fb7e5094a81
|
[] |
no_license
|
dminikm/HashmapBenchmark
|
71a59969312b133b891119f41e4fbfa5bc2b513b
|
00eec4ab608195cacfbd2ebe7ce0a699e827c190
|
refs/heads/master
| 2023-04-07T02:44:25.956383
| 2021-03-14T20:42:10
| 2021-03-14T20:42:10
| 304,665,168
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,177
|
hpp
|
tbbmap.hpp
|
#pragma once
#include "hashjoin.hpp"
#include <tbb/concurrent_hash_map.h>
#include <tbb/concurrent_unordered_map.h>
namespace HashJoinBenchmark {
class TBBHashMap {
public:
auto insert(uint32_t key, const DatasetAValue& value) -> void {
this->map.insert({key, value});
}
auto get(uint32_t key) -> DatasetAValue {
MapType::accessor accessor;
this->map.find(accessor, key);
auto value_copy = accessor->second;
accessor.release();
return value_copy;
}
private:
using MapType = tbb::concurrent_hash_map<uint32_t, DatasetAValue>;
MapType map;
};
class TBBUnorderedMap {
public:
auto insert(uint32_t key, const DatasetAValue& value) -> void {
this->map.insert({key, value});
}
auto get(uint32_t key) -> DatasetAValue {
auto result = this->map.find(key);
return result->second;
}
private:
tbb::concurrent_unordered_map<uint32_t, DatasetAValue> map;
};
}
|
70812b24bc13d3921f925aeba897155d3b63326d
|
cafc8bf6cabf11969399e876792908fe9c319bea
|
/pongping_resource_check.cpp
|
4f7240587ee97278f18a6cf056b0dc66143d887d
|
[] |
no_license
|
wildrabbitt100/pongping
|
cbd8e1d4de8d08a8705755bbe9428265166e095b
|
64e5e5d84d40c0fc8992fb9d595753cb09bc5c5e
|
refs/heads/master
| 2020-04-13T22:35:14.963482
| 2019-04-12T19:57:34
| 2019-04-12T19:57:34
| 12,612,850
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,374
|
cpp
|
pongping_resource_check.cpp
|
/*
*
*
* __________ __________ ____ ___ ____________ __________ __ ___ ___ ____________
* / __ /\ / ______ /\ / \ / /\ / ________/\ / __ /\ / /\ / \ / /\ / ________/\
* / /_/ / / / /\____/ / / / \ / / / / /\_______\/ / /_/ / / / / / / \ / / / / /\_______\/
* / ______/ / / / / / / / / /\ \ / / / / /_/______ / ______/ / / / / / /\ \ / / / / /_/______
* / /\_____\/ / /_/___/ / / / / /\ \/ / / /________ /\ / /\_____\/ / / / / / /\ \/ / / /________ /\
* /___/ / /_________/ / /___/ / \______/ / \_______/___/ / /___/ / /_/ / /___/ / \____/ / \_______/___/ /
* \___\/ \_________\/ \___\/ \_____\/ \___\/ \___\/ \_\/ \___\/ \___\/ \___\/
*
*
* See readme.txt for copyright information.
*/
#include "pongping_headers/pongping_resource_check_headers.h"
int check_resources_exist(void)
{
BITMAP_LIST *bL;
bL = get_bitmaps("game_menu_list.txt", "game_data");
if(bL == NULL)
{
return PONGPING_RESOURCES_MISSING;
}
else
{
destroy_bitmap_list(bL);
}
return 0;
}
|
67ae9ca3f218f861c59bcd415ed03abfd65b64ed
|
0a85f0bedd7c03a5dcb7206962bed39d89b92ff6
|
/Libraries/Linkedlist.cpp
|
0da6964fe8805bf60090bb1aa44fcbd81326c2de
|
[] |
no_license
|
JeromeYChen/Data-Structure
|
4eb5bce0439d71f239c64d07307de402e6f51b85
|
39e493c98995ca303da7125712c1b81191061110
|
refs/heads/main
| 2023-02-23T21:07:50.764928
| 2021-01-20T06:55:24
| 2021-01-20T06:55:24
| 323,063,127
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,239
|
cpp
|
Linkedlist.cpp
|
#include <iostream>
#include <cstdio>
using namespace std;
//定义一个叫做LinkedList的结构布局
typedef struct Node
{
int data;
struct Node *next;
}LinkedList;
/*
接下来都是具有头结点的单链表操作
单链表:list,list既是单链表的名字,也是其头结点
注意这里是头结点,并非头指针形式
*/
//初始化单链表,即建立一个新的空表
//调用函数,无需参数,返回头结点
LinkedList *Initiate ()
{
//内存申请失败极小可能性发生,故在此不判断
LinkedList* list = (LinkedList*)malloc(sizeof(LinkedList)); //创建一个头节点
//初始化头结点,链表为空
list->data = 0;
list->next = NULL;
//返回头结点
return list;
}
//创建储存链表的结点,将元素添加至指向的链表末尾
//调用函数,参数为元素及相应链表的头结点即链表名,返回是否成功
bool AddItem(int element, LinkedList* List)
{
LinkedList *pnew; //新的结点
LinkedList *scan = List; //扫描指针
//申请空间
pnew = (LinkedList*) malloc(sizeof(LinkedList));
//建立结点
pnew->data = element;
pnew->next = NULL;
if(scan->next == NULL) //空链表,把结点放在链表开头
List->next = pnew;
else
{
while(scan->next != NULL) //寻找链表末尾
scan = scan->next;
scan->next = pnew; //向末尾接入结点
}
return true;
}
//按顺序显示整条链表操作
//调用函数,参数为链表名,返回为空
void DisplayAll(LinkedList* List)
{
//注意,头结点只是个头结点,真正的链表要从头结点指向的结点开始
LinkedList* scan = List->next;
while(scan->next != NULL)
{
cout << scan->data << " ";
scan = scan->next;
}
//最后一个结点也要输出才完整
cout << scan->data << endl;
}
//求表长
//调用函数,参数为链表名,返回值为整数
int Length(LinkedList* List )
{
LinkedList *scan; //当前指针
scan = List -> next; //从表头开始,不算头节点
int count = 0; //计数器
while( scan != NULL)
{
count++;
scan = scan -> next;
}
return count;
}
//获取第i个结点元素操作,
//调用函数,给出要第几个以及相应链表
int GetINode(int i, LinkedList* List)
{
LinkedList* scan = List->next;
int j = 1;
while( (scan != NULL) && (j < i) )
{
scan = scan->next;
j++;
}
return scan->data;
}
//定位操作:找到链表中e出现的位置
//调用函数,给出寻找的元素e以及链表名,返回位置,没找到就返回-1
int LocatedE(int e, LinkedList* List)
{
int index = 1;
LinkedList *scan = List->next;
while((scan != NULL) && (scan->data != e))
{
scan = scan -> next;
index++;
}
//没找到返回-1
if(scan == NULL) return -1;
return index;
}
//插入结点操作,比如插入1,那就是第一个结点放置新结点,原链表第一个结点变成第二个
//给出插入的元素,以及插入的位置,以及插入的链表名,返回插入是否成功
bool Insert(int element, int i, LinkedList* List)
{
LinkedList *pnew; //新的结点
LinkedList *scan = List; //扫描指针,注意细节,从头节点开始
int index = 1; //位置
//插入的位置在1~Length之间,否者插入失败
if(i > Length(List) || i < 1) return false;
//扫描为指定位置
while(index < i && scan != NULL)
{
scan = scan->next;
index++;
}
//申请空间
pnew = (LinkedList*) malloc(sizeof(LinkedList));
//建立结点
pnew->data = element;
pnew->next = scan->next;
scan->next = pnew;
return true;
}
//删除元素为e的所有结点
void DelElem(LinkedList* List, int ele)
{
LinkedList* scan = List;
LinkedList* del = NULL;
while(scan->next != NULL)
{
if(scan->next->data == ele)
{
del = scan->next;
scan->next = scan->next->next;
free(del);
}
else
scan = scan->next;
}
}
int main()
{
//声明一个叫mylist的链表
LinkedList* mylist = Initiate();
//将5 4 3 2 1存入相对应的链表中
for(int i = 5; i > 0; i--)
AddItem(i, mylist);
//将链表全部显示出来看看
DisplayAll(mylist);
//输出表长(不包括头结点,这里表长为5)
cout << Length(mylist) << endl;
//看看第二个元素是什么
cout << GetINode(2, mylist) << endl;
//找找2在序列中的位置
cout << LocatedE(2, mylist) << endl;
//将8插入位置1,然后显示链表
if(Insert(8, 1, mylist))
DisplayAll(mylist);
else
cout << "ERROR" << endl;
//删除5,然后显示链表
DelElem(mylist, 5);
DisplayAll(mylist);
system("pause");
return 0;
}
|
576f90391afd09e17d21c5d98ed941abe85c1eb0
|
e2cfe482573024b138528fd4a4f5f1c73b7bca75
|
/Classes/SunflowerManger.h
|
366664e0030fed5bc43ee73bdfa79f1c9fa1dbee
|
[
"MIT"
] |
permissive
|
RabbitLee/PlantsVsRabbits
|
99e3d440c4b371f76df3602e9ed02140f8930ba8
|
26f04a2bff25e29a5e10bf7c62196cfae63e86b0
|
refs/heads/master
| 2021-01-12T12:29:31.087388
| 2016-12-05T11:48:31
| 2016-12-05T11:48:31
| 72,515,855
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 901
|
h
|
SunflowerManger.h
|
#ifndef _SUNFLOWERMANGER_H_
#define _SUNFLOWERMANGER_H_
#include "Sunflower.h"
#include "PlantManger.h"
#include "GameSettings.h"
class SunflowerManger :public PlantManger{
public:
CREATE_FUNC(SunflowerManger);
virtual bool init();
void planting(int row, int column,int myMapOfPlant[WIDTH + 1][HEIGHT + 1], int &mySunshine, int *myRefrigerateTime);
void mutUpdate(float dt);
virtual void removePlant(int row, int column, int myMapOfPlant[WIDTH + 1][HEIGHT + 1], int &mySunshine);
int getNumberOfClickedSunshine();
virtual Vector<Sprite*>* getPeaInRow(int row) { return NULL; }
private:
int myNumberOfClickedSunshine;
private:
static SunflowerManger* mySunflowerManager;
public:
static SunflowerManger* getInstance() {
if (mySunflowerManager == nullptr) {
mySunflowerManager = SunflowerManger::create();
}
return mySunflowerManager;
}
};
#endif
|
81ba14bcbb9cb1238886601e047bea1c8aba4a4f
|
5b2eb60e5fbb5220453510687462a4cee6c78148
|
/src/net/session.hpp
|
673f8119ea6e62f8c304e30a74ddcbe9c760a226
|
[] |
no_license
|
jediserg/ws-server
|
f1ba46332c7ba421841516fe6afa0732b6a8dfe1
|
f7ab643dde9907a5474777d7abf6dd916e018ad0
|
refs/heads/master
| 2021-01-20T21:15:59.514153
| 2016-07-24T18:24:17
| 2016-07-24T18:24:17
| 64,076,759
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 985
|
hpp
|
session.hpp
|
#pragma once
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <memory>
#include "user.h"
namespace ws
{
class Session
{
public:
using Ptr = std::shared_ptr<Session>;
Session()
: is_authorized(false),
is_auth_request_sent(false)
{
_token = boost::uuids::to_string(boost::uuids::random_generator()());
}
~Session()
{ }
const std::string &getToken() const
{ return _token; }
User::Ptr getUser()
{ return _data; }
void setUser(User::Ptr data)
{ _data = data; }
bool isAuthorized() const
{
return is_authorized;
}
void authorize(bool is_authorized)
{
Session::is_authorized = is_authorized;
}
bool isAuthRequestSent() const
{
return is_auth_request_sent;
}
void setAuthRequestSent()
{
is_auth_request_sent = true;
}
private:
User::Ptr _data;
std::string _token;
bool is_authorized;
private:
bool is_auth_request_sent;
};
}
|
d1274334a35f03fc2ba7c29805fdea7552e16776
|
e2c0591e6cb6d43e6f123bc2bb60e933c92ce6ff
|
/B177026 유병훈 1차과제/YBH_MTOS/YBH_MTOS/Thread.cpp
|
a727e9c0c97dec054757e7f5e24a15072b5da5f4
|
[] |
no_license
|
gunsct/server
|
4f304357d12c5bd6a4675800a9390548bdef5cb1
|
83fc8fcadc269121d9032913a32e585ad4b91bef
|
refs/heads/master
| 2016-12-13T15:03:20.095530
| 2016-06-06T10:31:22
| 2016-06-06T10:31:22
| 46,278,828
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 408
|
cpp
|
Thread.cpp
|
#include "Thread.h"
Thread* Thread::GetInstance()
{
static Thread* Instance;
if( NULL == Instance )
Instance = new Thread;
return Instance;
}
int Thread::CreateThreads(LPTHREAD_START_ROUTINE _workerthread, HANDLE _hcp){
for(int i=0; i<(int)si.dwNumberOfProcessors*2; i++){
hThread = CreateThread(NULL, 0, _workerthread, _hcp, 0, NULL);
if(hThread == NULL) return 1;
CloseHandle(hThread);
}
}
|
a0fa2f835a7b92a9fe1984390125f106130c2734
|
c678385c4f34d2b76fd3e8156946d4bfeb5f34c9
|
/src/flow.h
|
d45b60c63d1c3e53917a60fe01ffee4c9d82f027
|
[] |
no_license
|
dlecocq/openglot3d
|
e4d9ca0cfa6254df4309f6fcae20ba95c1307384
|
e523af2a93b1d6143530a8856edaabe2c25a8572
|
refs/heads/master
| 2021-01-19T18:35:49.023722
| 2017-04-15T18:18:02
| 2017-04-15T18:18:02
| 88,366,033
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,009
|
h
|
flow.h
|
#ifndef FLOW_H
#define FLOW_H
#include <GL/glew.h>
#include <string>
#include "shader_primitive.h"
#include "color.h"
using namespace std;
namespace glot {
/** \brief flow: a vector-valued function as a flow field
*
* This class represents a vector-valued function of x,
* y and t as a flow field using streamlines. It uses
* fourth-order Runge-Kutta integration to determine the
* next points in the line, and along the line linearly
* increases the alpha value. This is contrary to the
* ink smearing analogy, and more the comet tail analogy
* (in ink smearing the tail points forward, and in the
* comet analogy the tail points backwards).
*/
class flow : public shader_primitive {
public:
/** Constructor
* \param func - the vector-valued function to render
*/
flow(const string& f) : shader_primitive(color(1.0, 0.0, 0.0)), func(f) {
gen_shader();
};
/** Display-list generator
* \param scr - the screen specs of the plot
*
* This function generates the geometry that the geometry
* shader expects (a set of seed points). They are
* uniformly spaced on a grid.
*/
void dl_gen(const screen& scr);
private:
/** Shader generator
*
* Generates the shader - aggregates source code,
* compiles, links, and stores the handle in p.
*/
void gen_shader();
/** Vertex shader source
*
* Aggregates the source for the vertex shader, which
* is just a pass-through shader. In GLSL it is an
* error to specify a geometry shader without a vertex
* shader, and so a pass-through shader is all that's
* required here.
*/
string get_vert_shader();
/** Geometry shader source
*
* Aggregates the source for the geometry shader, which
* is a mapping of the vector field onto a set of
* streamlines.
*/
string get_geom_shader();
// This is the function it's meant to plot.
string func;
};
}
#endif
|
cbe938a81b8490f5eb16eb22c9b396c6f1014173
|
1a2aa18ada548e1728387729869b3707eb3b37c6
|
/datastructures/AVLTreeNode.hpp
|
9e7301652d04ec8f52b6be38c68ebdafcebe7c3a
|
[
"Apache-2.0"
] |
permissive
|
arupa-loka/lrep
|
b775174821db2aa0de139b72ced67d5d17e05618
|
7ef6ce39e7527693f8fb7d62b80a69fa29adc295
|
refs/heads/master
| 2021-01-20T15:10:24.502501
| 2015-02-22T17:56:56
| 2015-02-22T17:56:56
| 12,906,974
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,787
|
hpp
|
AVLTreeNode.hpp
|
#ifndef _AVL_TREE_NODE_HPP
#define _AVL_TREE_NODE_HPP
#include <iostream>
template<class T>
class AVLTreeNode
{
public:
AVLTreeNode();
AVLTreeNode(T iObj);
AVLTreeNode(T iObj, char iBalancing);
inline T getObj() const;
inline void setObj(T iObj);
inline AVLTreeNode<T>* getLeft();
inline void setLeft(AVLTreeNode<T>* iNode);
inline AVLTreeNode<T>* getRight();
inline void setRight(AVLTreeNode<T>* iNode);
inline bool operator<(const AVLTreeNode<T>& iNode) const;
inline char getBalancing() const;
inline void setBalancing(char iBalancing);
inline AVLTreeNode<T>* getChild(char i);
inline void setChild(char i, AVLTreeNode<T>* iNode);
std::ostream& toStream(std::ostream& oOut);
private:
char _balancing;
AVLTreeNode<T>* _left;
AVLTreeNode<T>* _right;
T _obj;
};
template<class T>
class AVLTreeNode<T*>
{
public:
AVLTreeNode();
AVLTreeNode(T* iObj);
AVLTreeNode(T* iObj, char iBalancing);
inline T* getObj() const;
inline void setObj(T* iObj);
inline AVLTreeNode<T*>* getLeft();
inline void setLeft(AVLTreeNode<T*>* iNode);
inline AVLTreeNode<T*>* getRight();
inline void setRight(AVLTreeNode<T*>* iNode);
inline bool operator<(const AVLTreeNode<T*>& iNode) const;
inline char getBalancing() const;
inline void setBalancing(char iBalancing);
inline AVLTreeNode<T*>* getChild(char i);
inline void setChild(char i, AVLTreeNode<T*>* iNode);
std::ostream& toStream(std::ostream& oOut);
private:
char _balancing;
AVLTreeNode<T*>* _left;
AVLTreeNode<T*>* _right;
T* _obj;
};
template<class T>
AVLTreeNode<T>::AVLTreeNode(): _left(NULL), _right(NULL), _balancing(0) {}
template<class T>
AVLTreeNode<T>::AVLTreeNode(T iObj): _obj(iObj), _left(NULL), _right(NULL), _balancing(0) {}
template<class T>
AVLTreeNode<T>::AVLTreeNode(T iObj, char iBalancing): _obj(iObj), _left(NULL), _right(NULL), _balancing(iBalancing) {}
template<class T>
T AVLTreeNode<T>::getObj() const {return _obj;}
template<class T>
void AVLTreeNode<T>::setObj(T iObj) {_obj=iObj;}
template<class T>
AVLTreeNode<T>* AVLTreeNode<T>::getLeft() {return _left;}
template<class T>
void AVLTreeNode<T>::setLeft(AVLTreeNode<T>* iNode) {_left=iNode;}
template<class T>
AVLTreeNode<T>* AVLTreeNode<T>::getRight() {return _right;}
template<class T>
void AVLTreeNode<T>::setRight(AVLTreeNode<T>* iNode) { _right=iNode;}
template<class T>
bool AVLTreeNode<T>::operator<(const AVLTreeNode<T>& iNode) const { return this->getObj() < iNode.getObj(); }
template<class T>
char AVLTreeNode<T>::getBalancing() const { return _balancing; }
template<class T>
void AVLTreeNode<T>::setBalancing(char iBalancing) { _balancing=iBalancing; }
template<class T>
AVLTreeNode<T>* AVLTreeNode<T>::getChild(char i) { return i<0 ? getLeft() : getRight(); }
template<class T>
void AVLTreeNode<T>::setChild(char i, AVLTreeNode<T>* iNode) { i<0 ? setLeft(iNode) : setRight(iNode); }
template <class T>
std::ostream& AVLTreeNode<T>::toStream(std::ostream& oOut)
{
oOut << _obj;
return oOut;
}
///////////////////////////////////////////////////////////////////////////////
template<class T>
AVLTreeNode<T*>::AVLTreeNode(): _obj(NULL), _left(NULL), _right(NULL), _balancing(0) {}
template<class T>
AVLTreeNode<T*>::AVLTreeNode(T* iObj): _obj(iObj), _left(NULL), _right(NULL), _balancing(0) {}
template<class T>
AVLTreeNode<T*>::AVLTreeNode(T* iObj, char iBalancing): _obj(iObj), _left(NULL), _right(NULL), _balancing(iBalancing) {}
template<class T>
T* AVLTreeNode<T*>::getObj() const {return _obj;}
template<class T>
void AVLTreeNode<T*>::setObj(T* iObj) {_obj=iObj;}
template<class T>
AVLTreeNode<T*>* AVLTreeNode<T*>::getLeft() {return _left;}
template<class T>
void AVLTreeNode<T*>::setLeft(AVLTreeNode<T*>* iNode) {_left=iNode;}
template<class T>
AVLTreeNode<T*>* AVLTreeNode<T*>::getRight() {return _right;}
template<class T>
void AVLTreeNode<T*>::setRight(AVLTreeNode<T*>* iNode) { _right=iNode;}
template<class T>
bool AVLTreeNode<T*>::operator<(const AVLTreeNode<T*>& iNode) const { return *(this->getObj()) < *(iNode.getObj()); }
template<class T>
char AVLTreeNode<T*>::getBalancing() const { return _balancing;}
template<class T>
void AVLTreeNode<T*>::setBalancing(char iBalancing) { _balancing=iBalancing; }
template<class T>
AVLTreeNode<T*>* AVLTreeNode<T*>::getChild(char i) { return i<0 ? getLeft() : getRight(); }
template<class T>
void AVLTreeNode<T*>::setChild(char i, AVLTreeNode<T*>* iNode) { i<0 ? setLeft(iNode) : setRight(iNode); }
template <class T>
std::ostream& AVLTreeNode<T*>::toStream(std::ostream& oOut)
{
oOut << *_obj;
return oOut;
}
///////////////////////////////////////////////////////////////////////////////
template <class T>
std::ostream& operator<<(std::ostream& oOut, AVLTreeNode<T> & iObj) { return iObj.toStream(oOut); }
#endif
|
bc7b3322b039274ecc260558a770081bea0b1c53
|
a3d6556180e74af7b555f8d47d3fea55b94bcbda
|
/content/common/android/gin_java_bridge_value_unittest.cc
|
1be8d652e075df9dd9bf094c90abfa0a65916fa0
|
[
"BSD-3-Clause"
] |
permissive
|
chromium/chromium
|
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
|
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
|
refs/heads/main
| 2023-08-24T00:35:12.585945
| 2023-08-23T22:01:11
| 2023-08-23T22:01:11
| 120,360,765
| 17,408
| 7,102
|
BSD-3-Clause
| 2023-09-10T23:44:27
| 2018-02-05T20:55:32
| null |
UTF-8
|
C++
| false
| false
| 4,185
|
cc
|
gin_java_bridge_value_unittest.cc
|
// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/common/android/gin_java_bridge_value.h"
#include <stdint.h>
#include <cmath>
#include <memory>
#include "base/containers/span.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
class GinJavaBridgeValueTest : public testing::Test {
};
TEST_F(GinJavaBridgeValueTest, BasicValues) {
float native_float;
int32_t native_object_id;
std::unique_ptr<base::Value> undefined(
GinJavaBridgeValue::CreateUndefinedValue());
ASSERT_TRUE(undefined.get());
EXPECT_TRUE(GinJavaBridgeValue::ContainsGinJavaBridgeValue(undefined.get()));
std::unique_ptr<const GinJavaBridgeValue> undefined_value(
GinJavaBridgeValue::FromValue(undefined.get()));
ASSERT_TRUE(undefined_value.get());
EXPECT_TRUE(undefined_value->IsType(GinJavaBridgeValue::TYPE_UNDEFINED));
EXPECT_FALSE(undefined_value->GetAsNonFinite(&native_float));
EXPECT_FALSE(undefined_value->GetAsObjectID(&native_object_id));
std::unique_ptr<base::Value> float_infinity(
GinJavaBridgeValue::CreateNonFiniteValue(
std::numeric_limits<float>::infinity()));
ASSERT_TRUE(float_infinity.get());
EXPECT_TRUE(
GinJavaBridgeValue::ContainsGinJavaBridgeValue(float_infinity.get()));
std::unique_ptr<const GinJavaBridgeValue> float_infinity_value(
GinJavaBridgeValue::FromValue(float_infinity.get()));
ASSERT_TRUE(float_infinity_value.get());
EXPECT_TRUE(float_infinity_value->IsType(GinJavaBridgeValue::TYPE_NONFINITE));
EXPECT_TRUE(float_infinity_value->GetAsNonFinite(&native_float));
EXPECT_TRUE(std::isinf(native_float));
EXPECT_FALSE(undefined_value->GetAsObjectID(&native_object_id));
std::unique_ptr<base::Value> double_infinity(
GinJavaBridgeValue::CreateNonFiniteValue(
std::numeric_limits<double>::infinity()));
ASSERT_TRUE(double_infinity.get());
EXPECT_TRUE(
GinJavaBridgeValue::ContainsGinJavaBridgeValue(double_infinity.get()));
std::unique_ptr<const GinJavaBridgeValue> double_infinity_value(
GinJavaBridgeValue::FromValue(double_infinity.get()));
ASSERT_TRUE(double_infinity_value.get());
EXPECT_TRUE(
double_infinity_value->IsType(GinJavaBridgeValue::TYPE_NONFINITE));
EXPECT_TRUE(double_infinity_value->GetAsNonFinite(&native_float));
EXPECT_TRUE(std::isinf(native_float));
EXPECT_FALSE(undefined_value->GetAsObjectID(&native_object_id));
std::unique_ptr<base::Value> object_id(
GinJavaBridgeValue::CreateObjectIDValue(42));
ASSERT_TRUE(object_id.get());
EXPECT_TRUE(GinJavaBridgeValue::ContainsGinJavaBridgeValue(object_id.get()));
std::unique_ptr<const GinJavaBridgeValue> object_id_value(
GinJavaBridgeValue::FromValue(object_id.get()));
ASSERT_TRUE(object_id_value.get());
EXPECT_TRUE(object_id_value->IsType(GinJavaBridgeValue::TYPE_OBJECT_ID));
EXPECT_TRUE(object_id_value->GetAsObjectID(&native_object_id));
EXPECT_EQ(42, native_object_id);
EXPECT_FALSE(undefined_value->GetAsNonFinite(&native_float));
std::unique_ptr<base::Value> in_uint32(GinJavaBridgeValue::CreateUInt32Value(
std::numeric_limits<uint32_t>::max()));
ASSERT_TRUE(in_uint32.get());
EXPECT_TRUE(GinJavaBridgeValue::ContainsGinJavaBridgeValue(in_uint32.get()));
std::unique_ptr<const GinJavaBridgeValue> uint32_value(
GinJavaBridgeValue::FromValue(in_uint32.get()));
ASSERT_TRUE(uint32_value.get());
EXPECT_TRUE(uint32_value->IsType(GinJavaBridgeValue::TYPE_UINT32));
uint32_t out_uint32_value;
EXPECT_TRUE(uint32_value->GetAsUInt32(&out_uint32_value));
EXPECT_EQ(std::numeric_limits<uint32_t>::max(), out_uint32_value);
}
TEST_F(GinJavaBridgeValueTest, BrokenValues) {
std::unique_ptr<base::Value> non_binary(new base::Value(42));
EXPECT_FALSE(
GinJavaBridgeValue::ContainsGinJavaBridgeValue(non_binary.get()));
const char dummy_data[] = "\000\001\002\003\004\005\006\007\010\011\012\013";
base::Value broken_binary(base::as_bytes(base::make_span(dummy_data)));
EXPECT_FALSE(GinJavaBridgeValue::ContainsGinJavaBridgeValue(&broken_binary));
}
} // namespace
|
99c9b9976d86aece693a703bb9a475ded669f8e8
|
74de2479d5a8932c810a0cc37e48685fcd936fa5
|
/ftnoir_tracker_udp/ftnoir_tracker_udp.h
|
c4c85372f1500cdcfa86a95be8f815eba21da43d
|
[] |
no_license
|
hfeeki/opentrack
|
290593d9347b603cac91e005f490e9152c1e038f
|
6fea9e0befc3f1d63bbdccaabaec767863972c46
|
refs/heads/master
| 2023-08-21T23:48:31.659691
| 2013-08-24T20:33:52
| 2013-08-24T20:33:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,561
|
h
|
ftnoir_tracker_udp.h
|
#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
#include "ui_ftnoir_ftnclientcontrols.h"
#include <QThread>
#include <QUdpSocket>
#include <QMessageBox>
#include <QSettings>
#include <QMutex>
#include <QWaitCondition>
#include <math.h>
#include "facetracknoir/global-settings.h"
class FTNoIR_Tracker : public ITracker, public QThread
{
public:
FTNoIR_Tracker();
~FTNoIR_Tracker();
void StartTracker( QFrame *videoframe );
bool GiveHeadPoseData(double *data);
void loadSettings();
volatile bool should_quit;
void WaitForExit() {
should_quit = true;
wait();
}
protected:
void run(); // qthread override run method
private:
// UDP socket-variables
QUdpSocket *inSocket; // Receive from ...
QUdpSocket *outSocket; // Send to ...
QHostAddress destIP; // Destination IP-address
QHostAddress srcIP; // Source IP-address
double newHeadPose[6]; // Structure with new headpose
float portAddress; // Port-number
bool bEnableRoll;
bool bEnablePitch;
bool bEnableYaw;
bool bEnableX;
bool bEnableY;
bool bEnableZ;
QMutex mutex;
};
// Widget that has controls for FTNoIR protocol client-settings.
class TrackerControls: public QWidget, public ITrackerDialog
{
Q_OBJECT
public:
explicit TrackerControls();
~TrackerControls();
void showEvent ( QShowEvent * event );
void Initialize(QWidget *parent);
void registerTracker(ITracker *tracker) {};
void unRegisterTracker() {};
private:
Ui::UICFTNClientControls ui;
void loadSettings();
void save();
/** helper **/
bool settingsDirty;
private slots:
void doOK();
void doCancel();
void settingChanged() { settingsDirty = true; };
void settingChanged(int) { settingsDirty = true; };
};
//*******************************************************************************************************
// FaceTrackNoIR Tracker DLL. Functions used to get general info on the Tracker
//*******************************************************************************************************
class FTNoIR_TrackerDll : public Metadata
{
public:
FTNoIR_TrackerDll();
~FTNoIR_TrackerDll();
void getFullName(QString *strToBeFilled);
void getShortName(QString *strToBeFilled);
void getDescription(QString *strToBeFilled);
void getIcon(QIcon *icon);
private:
QString trackerFullName; // Trackers' name and description
QString trackerShortName;
QString trackerDescription;
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.