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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3d183633a51ba2e97ff5c45f97a3c26a33e666af
|
f90920085074e79a37048155750b80e5e884c5d2
|
/mmcesrv/mmcemediamanager/src/mceaudiosdpcodec.cpp
|
404b9ce382baa1c0672c4b3da1a6b51ad88b0d51
|
[] |
no_license
|
piashishi/mce
|
fec6847fc9b4e01c43defdedf62ef68f55deba8e
|
8c0f20e0ebd607fb35812fd02f63a83affd37d74
|
refs/heads/master
| 2021-01-25T06:06:18.042653
| 2016-08-13T15:38:09
| 2016-08-13T15:38:09
| 26,538,858
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 19,166
|
cpp
|
mceaudiosdpcodec.cpp
|
/*
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/
// INCLUDE FILES
#include <e32base.h>
#include <e32std.h>
#include <e32def.h>
#include <stringpool.h>
#include <sdpdocument.h>
#include <sdpcodecstringconstants.h>
#include <sdpcodecstringpool.h>
#include <sdpmediafield.h>
#include <sdpattributefield.h>
#include <sdprtpmapvalue.h>
#include <sdpfmtattributefield.h>
#include <sdporiginfield.h>
#include "mcemediadefs.h"
#include "mceaudiosdpcodec.h"
#include "mcecomaudiostream.h"
#include "mceaudiostream.h"
#include "mcecomaudiocodec.h"
#include "mcemediadefs.h"
#include "mcecomfactory.h"
#include "mcemmlogs.h"
#include "mcecomrtpsource.h"
#include "mcecomspeakersink.h"
#include "mcecommicsource.h"
#include "mcecomrtpsink.h"
#include "mcedefs.h"
// ================= MEMBER FUNCTIONS =======================
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::NewL
// -----------------------------------------------------------------------------
//
CMceAudioSdpCodec* CMceAudioSdpCodec::NewL()
{
RStringF audio = MCE_SDP_STRING_AUDIOL();
CMceAudioSdpCodec* self = new (ELeave) CMceAudioSdpCodec( audio );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
return self;
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::CMceAudioSdpCodec
// -----------------------------------------------------------------------------
//
CMceAudioSdpCodec::CMceAudioSdpCodec( RStringF aMedia )
: CMceMediaSdpCodec( aMedia )
{
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::~CMceAudioSdpCodec
// -----------------------------------------------------------------------------
//
CMceAudioSdpCodec::~CMceAudioSdpCodec()
{
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::Encodes
// -----------------------------------------------------------------------------
//
TBool CMceAudioSdpCodec::Encodes( const CMceComMediaStream& aStream ) const
{
return aStream.iStreamType != CMceComMediaStream::ELocalStream &&
aStream.iType == KMceAudio;
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::CodecsL
// -----------------------------------------------------------------------------
//
const RPointerArray<CMceComCodec>& CMceAudioSdpCodec::CodecsL( CMceComMediaStream& aStream ) const
{
__ASSERT_ALWAYS( aStream.iType == KMceAudio, User::Leave( KErrArgument ) );
MCE_DEFINE_AUDIO( stream, aStream );
return reinterpret_cast< const RPointerArray< CMceComCodec >& >( stream.Codecs() );
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::EncodeRtpmapAttributeLC
// -----------------------------------------------------------------------------
//
CSdpFmtAttributeField* CMceAudioSdpCodec::EncodeRtpmapAttributeLC( CMceComCodec& aCodec ) const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::EncodeRtpmapAttributeLC(), Entry" )
MCE_DEFINE_AUDIO_CODEC( codec, aCodec );
CSdpFmtAttributeField* rtpmapAttribute = NULL;
TUint payloadType = codec.iPayloadType;
TPtrC8 codecName = codec.iSdpName;
TUint samplingFreq = codec.iSamplingFreq;
// Create rtpmap field for current codec
rtpmapAttribute = EncodeRtpMapFieldsL( payloadType,
codecName,
samplingFreq,
KMceSdpOptionalEncodingParam );
CleanupStack::PushL( rtpmapAttribute );
MCEMM_DEBUG_SVALUE( "encoded rtpmap", rtpmapAttribute->Value() )
MCEMM_DEBUG( "CMceAudioSdpCodec::EncodeRtpmapAttributeLC(), Exit" )
return rtpmapAttribute;
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::EncodeMediaAttributesL
// -----------------------------------------------------------------------------
//
void CMceAudioSdpCodec::EncodeMediaAttributesL( CMceComCodec& aCodec,
CSdpMediaField& aMediaLine,
CSdpFmtAttributeField& aRtpmap ) const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::EncodeMediaAttributesL(), Entry" )
MCE_DEFINE_AUDIO_CODEC( codec, aCodec );
if ( aCodec.Stream()->ReceiveStream() )
{
if ( codec.iPTime &&
codec.iMaxPTime &&
!FindAttribute( SdpCodecStringConstants::EAttributePtime, aMediaLine ) )
{
RStringF attributePtime = SDP_STRING( SdpCodecStringConstants::EAttributePtime );
RStringF attributeMaxPtime = SDP_STRING( SdpCodecStringConstants::EAttributeMaxptime );
MCE_DEFINE_DECSTR( ptime, codec.iPTime )
MCE_DEFINE_DECSTR( maxptime, codec.iMaxPTime )
CSdpAttributeField* ptimeLine =
CSdpAttributeField::NewLC( attributePtime, ptime );
CSdpAttributeField* maxptimeLine =
CSdpAttributeField::NewLC( attributeMaxPtime, maxptime );
MCEMM_DEBUG_SVALUE( "encoded ptime", ptime )
MCEMM_DEBUG_SVALUE( "encoded maxptime", maxptime )
aMediaLine.AttributeFields().AppendL( ptimeLine );
// this creates dependency between ptime and payload type
ptimeLine->AssignTo( aRtpmap );
CleanupStack::Pop( maxptimeLine );
aMediaLine.AttributeFields().AppendL( maxptimeLine );
// this creates dependency between maxptime and payload type
maxptimeLine->AssignTo( aRtpmap );
CleanupStack::Pop( ptimeLine );
}
}
MCEMM_DEBUG( "CMceAudioSdpCodec::EncodeMediaAttributesL(), Exit" )
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::DecodeMediaAttributesL
// -----------------------------------------------------------------------------
//
void CMceAudioSdpCodec::DecodeMediaAttributesL(
CSdpMediaField& aMediaLine,
CMceComCodec& aCodec,
CSdpFmtAttributeField& /*aRtpmap*/ ) const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::DecodeMediaAttributesL(), Entry ")
MCE_DEFINE_AUDIO_CODEC( codec, aCodec );
if ( aCodec.Stream()->SendStream() )
{
RPointerArray<CSdpAttributeField>& attrfields =
aMediaLine.AttributeFields();
// Packet times are negotiated at session or media line level and thus
// several codecs share common packet time values.
for ( TInt index = 0; index < attrfields.Count(); index++ )
{
CSdpAttributeField* attrfield = attrfields[ index ];
RStringF attribute;
attribute = attrfield->Attribute();
if ( attribute ==
SDP_STRING( SdpCodecStringConstants::EAttributePtime ) )
{
TUint ptime = ConvertDesToUintL( attrfield->Value() );
codec.SetPTime( ptime );
MCEMM_DEBUG_DVALUE( "decoded ptime", ptime )
}
else if ( attribute ==
SDP_STRING( SdpCodecStringConstants::EAttributeMaxptime ) )
{
TUint maxptime = ConvertDesToUintL( attrfield->Value() );
codec.SetMaxPTime( maxptime );
MCEMM_DEBUG_DVALUE( "decoded maxptime", maxptime )
}
else
{
// do not mind other attributes
}
}
}
MCEMM_DEBUG_DVALUES( "exit ptime", codec.iPTime,
"maxptime", codec.iMaxPTime )
MCEMM_DEBUG("CMceAudioSdpCodec::DecodeMediaAttributesL(), Exit ")
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::CreateStreamLC
// -----------------------------------------------------------------------------
//
CMceComMediaStream* CMceAudioSdpCodec::CreateStreamLC( TInt aType ) const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateStreamLC(), Entry" )
CMceComAudioStream* audiostream = NULL;
if( aType == SdpCodecStringConstants::EAttributeSendonly )
{
// downlink
MCEMM_DEBUG( "create downlink" )
audiostream = CreateDownlinkStreamL();
}
else if( aType == SdpCodecStringConstants::EAttributeRecvonly )
{
// uplink
MCEMM_DEBUG( "create uplink" )
audiostream = CreateUplinkStreamL();
}
else
{
// sendrcv
// create two way stream
// create downlink
MCEMM_DEBUG( "create two-way stream" )
audiostream = CreateDownlinkStreamL();
CleanupStack::PushL( audiostream );
// create bounded uplink
CMceComAudioStream *boundUplink = CreateUplinkStreamL();
CleanupStack::PushL( boundUplink );
audiostream->BindL( boundUplink );
CleanupStack::Pop( boundUplink );
CleanupStack::Pop( audiostream );
}
CleanupStack::PushL( audiostream );
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateStreamLC(), Exit" )
return audiostream;
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::UpdateStreamL
// -----------------------------------------------------------------------------
//
void CMceAudioSdpCodec::UpdateStreamL( CMceComMediaStream& aStream, TInt aDirection ) const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::UpdateStreamL(), Entry ")
MCE_DEFINE_AUDIO( stream, aStream );
CMceComAudioStream* audiostream = NULL;
TInt streamType = stream.SdpStreamType();
if ( aDirection != SdpCodecStringConstants::EAttributeInactive )
{
switch( streamType )
{
case SdpCodecStringConstants::EAttributeRecvonly:
{
//if direction is changed
if ( aDirection != SdpCodecStringConstants::EAttributeSendonly )
{
MCEMM_DEBUG( "update from recvonly to send" )
MCEMM_DEBUG( "create uplink" )
audiostream = CreateUplinkStreamL();
}
break;
}
case SdpCodecStringConstants::EAttributeSendonly:
{
//if direction is changed
if ( aDirection != SdpCodecStringConstants::EAttributeRecvonly )
{
MCEMM_DEBUG( "update from sendonly to recv" )
MCEMM_DEBUG( "create downlink" )
audiostream = CreateDownlinkStreamL();
}
break;
}
case SdpCodecStringConstants::EAttributeSendrecv:
default:
{
break;
}
}
}
if ( audiostream )
{
CleanupStack::PushL( audiostream );
MCEMM_DEBUG( "cloning codecs" )
for( TInt index = 0; index < stream.CodecCount(); ++index )
{
CMceComAudioCodec* codec =
static_cast<CMceComAudioCodec*>( stream.CodecL( index )->CloneL() );
CleanupStack::PushL( codec );
MCEMM_DEBUG_SVALUE( "cloned codec", codec->iSdpName )
audiostream->AddCodecL( codec );
CleanupStack::Pop( codec );
}
stream.BindL( audiostream );
audiostream->InitializeL( *aStream.Session() );
MCEMM_DEBUG( "binded stream created" )
CleanupStack::Pop( audiostream );
}
MCEMM_DEBUG( "CMceAudioSdpCodec::UpdateStreamL(), Exit" )
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::CreateCodecLC
// -----------------------------------------------------------------------------
//
CMceComCodec* CMceAudioSdpCodec::CreateCodecLC( CSdpFmtAttributeField& aRtpmap ) const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateCodecLC(), Entry" )
CMceComAudioCodec* codec = NULL;
const TDesC8& payloadType = aRtpmap.Format();
const TDesC8& attributeValue = aRtpmap.Value();
TSdpRtpmapValue rtpmapValue = TSdpRtpmapValue::DecodeL( attributeValue );
TPtrC8 codecName = rtpmapValue.iEncName;
TPtrC8 clockRate = rtpmapValue.iClockrate;
TUint uintValPT = ConvertDesToUintL( payloadType );
TUint uintValCR = ConvertDesToUintL( clockRate );
if ( uintValPT > KMceMaxPTValue )
{
MCEMM_DEBUG_DVALUE("CMceAudioSdpCodec::CreateCodecLC(), invalid payloadtype value ", uintValPT )
User::Leave( KErrNotSupported );
}
if ( IsSupported( codecName ) && IsPayloadTypeSupported( codecName, uintValPT ) )
{
TMceComAudioCodecFactory factory;
codec = factory.CreateLC( codecName );
codec->iSamplingFreq = uintValCR;
codec->iPayloadType = uintValPT;
MCEMM_DEBUG_SVALUE( "created codec", codecName )
MCEMM_DEBUG_DVALUE( "sampling frequence", uintValCR )
MCEMM_DEBUG_DVALUE( "payload", uintValPT )
}
else
{
MCEMM_DEBUG_SVALUE( "not supported codec", codecName )
}
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateCodecLC(), Exit" )
return codec;
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::CreateCodecLC
// -----------------------------------------------------------------------------
//
CMceComCodec* CMceAudioSdpCodec::CreateCodecLC( TUint aPayload,
CSdpMediaField& /*aMediaLine*/ ) const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateCodecLC( payload ), Entry" )
TMceComAudioCodecFactory factory;
CMceComAudioCodec* codec = NULL;
codec = factory.CreateCodecLC( aPayload );
if ( codec && !IsSupported( codec->iSdpName ) )
{
CleanupStack::PopAndDestroy( codec );
codec = NULL;
}
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateCodecLC( payload ), Exit" )
return codec;
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::DecodeSessionMediaAttributesL
// -----------------------------------------------------------------------------
//
void CMceAudioSdpCodec::DecodeSessionMediaAttributesL( CMceComMediaStream& aStream,
CSdpDocument& aSdpDocument ) const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::DecodeSessionMediaAttributesL(), Entry" )
MCE_DEFINE_AUDIO( stream, aStream );
if ( stream.SendStream() )
{
RPointerArray<CSdpAttributeField>& attrfields =
aSdpDocument.AttributeFields();
// look for the ptime and maxptime attributes, go through all
// attribute fields and apply to all codecs in the stream if found
for ( TInt index = 0; index < attrfields.Count(); index++ )
{
CSdpAttributeField* attrfield = attrfields[ index ];
RStringF attribute = attrfield->Attribute();
TInt j = 0;
if ( attribute == SDP_STRING( SdpCodecStringConstants::EAttributePtime ) )
{
MCEMM_DEBUG_SVALUE( "decoded ptime", attrfield->Value() )
for ( j = 0; j < stream.CodecCount(); j++ )
{
stream.CodecL( j )->iPTime = ConvertDesToUintL( attrfield->Value() );
}
}
else if ( attribute == SDP_STRING( SdpCodecStringConstants::EAttributeMaxptime ) )
{
MCEMM_DEBUG_SVALUE( "decoded maxptime", attrfield->Value() )
for ( j = 0; j < stream.CodecCount(); j++ )
{
stream.CodecL( j )->iMaxPTime = ConvertDesToUintL( attrfield->Value() );
}
}
}
}
MCEMM_DEBUG( "CMceAudioSdpCodec::DecodeSessionMediaAttributesL(), Exit" )
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::CreateUplinkStreamL
// -----------------------------------------------------------------------------
//
CMceComAudioStream* CMceAudioSdpCodec::CreateUplinkStreamL() const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateUplinkStreamL(), Entry" )
CMceComAudioStream *audiostream = CMceComAudioStream::NewL();
CleanupStack::PushL( audiostream );
// uplink
CMceComMicSource* micSource = CMceComMicSource::NewL();
CleanupStack::PushL( micSource );
micSource->InitializeL( static_cast<CMceComAudioStream&> ( *audiostream ) );
audiostream->SetSourceL( micSource );
CleanupStack::Pop( micSource );
CMceComRtpSink* rtpSink = CMceComRtpSink::NewL();
CleanupStack::PushL( rtpSink );
rtpSink->InitializeL( static_cast<CMceComAudioStream&> ( *audiostream ) );
audiostream->AddSinkL( rtpSink );
CleanupStack::Pop( rtpSink );
CleanupStack::Pop( audiostream );
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateUplinkStreamL(), Exit" )
return audiostream;
}
// -----------------------------------------------------------------------------
// CMceAudioSdpCodec::CreateDownlinkStreamL
// -----------------------------------------------------------------------------
//
CMceComAudioStream* CMceAudioSdpCodec::CreateDownlinkStreamL() const
{
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateDownlinkStreamL(), Entry" )
CMceComAudioStream *audiostream = CMceComAudioStream::NewL();
CleanupStack::PushL( audiostream );
// downlink
CMceComRtpSource* rtpSource = CMceComRtpSource::NewL();
CleanupStack::PushL( rtpSource );
rtpSource->InitializeL( static_cast<CMceComAudioStream&> ( *audiostream ) );
audiostream->SetSourceL( rtpSource );
CleanupStack::Pop( rtpSource );
CMceComSpeakerSink* speaker = CMceComSpeakerSink::NewL();
CleanupStack::PushL( speaker );
speaker->InitializeL( static_cast<CMceComAudioStream&> ( *audiostream ) );
audiostream->AddSinkL( speaker );
CleanupStack::Pop( speaker );
CleanupStack::Pop( audiostream );
MCEMM_DEBUG( "CMceAudioSdpCodec::CreateDownlinkStreamL(), Exit" )
return audiostream;
}
|
db38a2663011df311a1d7ec436e8fd5c652c3ae9
|
549270020f6c8724e2ef1b12e38d11b025579f8d
|
/recipes/rttr/all/test_package/test_package.cpp
|
99d52f686af40e2d4244e85cc1e2d13791f7c086
|
[
"MIT"
] |
permissive
|
conan-io/conan-center-index
|
1bcec065ccd65aa38b1fed93fbd94d9d5fe6bc43
|
3b17e69bb4e5601a850b6e006e44775e690bac33
|
refs/heads/master
| 2023-08-31T11:34:45.403978
| 2023-08-31T11:13:23
| 2023-08-31T11:13:23
| 204,671,232
| 844
| 1,820
|
MIT
| 2023-09-14T21:22:42
| 2019-08-27T09:43:58
|
Python
|
UTF-8
|
C++
| false
| false
| 265
|
cpp
|
test_package.cpp
|
#include <cstdlib>
#include <iostream>
#include <vector>
#include <rttr/type>
using dblvec = std::vector<double>;
int main()
{
auto type = rttr::type::get<dblvec>();
std::cout << "type name: " << type.get_name() << std::endl;;
return EXIT_SUCCESS;
}
|
5fb2991a7aa951889372eba1cc81fef97c7971b6
|
3535e4405ccc5f167f823dd8655b2176a79fb259
|
/source/core/libraries/support/objlib.h
|
fa8e73ad6fa7ab0c739f9618027124feb8603f6f
|
[] |
no_license
|
longhuarst/cosmos
|
21ce99cfc6d527fddef236a7a97926ab7280717c
|
3058862797d3289eb5716c389af6cd9b095aef95
|
refs/heads/master
| 2023-03-17T10:48:34.462942
| 2020-02-10T13:36:38
| 2020-02-10T13:36:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,871
|
h
|
objlib.h
|
#ifndef OBJLIB_H
#define OBJLIB_H
#include "support/configCosmos.h"
#include "math/mathlib.h"
#include "math/vector.h"
using Cosmos::Math::Vector;
namespace Cosmos
{
class wavefront
{
public:
wavefront();
struct vertex
{
size_t v;
size_t vt;
size_t vn;
};
struct point
{
vector <size_t> groups;
size_t vertex;
};
struct line
{
vector <size_t> groups;
vector <vertex> vertices;
Math::Vector centroid;
double length;
};
struct face
{
vector <size_t> groups;
vector <vertex> vertices;
Math::Vector com;
double area;
};
struct group
{
string name;
vector <size_t> pointidx;
vector <size_t> lineidx;
vector <size_t> faceidx;
Math::Vector com;
double volume;
};
void add_geometric_vertex(Math::Vector v);
void add_texture_vertex(Math::Vector v);
void add_normal_vertex(Math::Vector v);
void add_parameter_vertex(Math::Vector v);
void add_point(point point);
void add_line(line line);
void add_face(face face);
void add_groups(vector <string> groups);
int32_t load_file(string path);
vector<string> split(string str, char c = ' ');
vector <Math::Vector> Vg;
vector <Math::Vector> Vt;
vector <Math::Vector> Vn;
vector <Math::Vector> Vp;
vector <point> Points;
vector <line> Lines;
vector <face> Faces;
vector <group> Groups;
string name;
private:
vector <size_t> cGroups;
void parse(string input);
};
}
#endif // OBJLIB_H
|
b2a7d494ebb83c9dbb5ef9e1ea59986b75c966f9
|
df956432e88cf5c106b76389df50500eefe174a8
|
/Server/Player.cpp
|
16c98ac58f4c816081b8649cc70e36709df3c5da
|
[] |
no_license
|
BuzzBumble/BumbleMUD
|
a0ebd5a0000b29052b3fff12ea62c7636ebfde01
|
26d0a28e5848ffa122f706c6f39db1886cc33d58
|
refs/heads/master
| 2023-08-29T22:22:36.469672
| 2021-10-04T11:26:13
| 2021-10-04T11:26:13
| 375,313,670
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 358
|
cpp
|
Player.cpp
|
#include "Player.h"
Player::Player(const std::string& name, const std::string& description, const net::Address& addr, int sockfd)
: Character(name, description)
, addr(addr)
, sockfd(sockfd) {
}
bool Player::init() {
// Add character to the server
Character::init();
// If character was not added successfully
return false;
// Else
return true;
}
|
9d152c14a57e09a6f169820833471e139058c759
|
2c1fda822d7cab2ffae1cae1d22cab3ffc8b8047
|
/AFC/include/AObject.h
|
51e2043d4fd6fdaab11ae5551aa6c25b62be678a
|
[
"BSD-3-Clause"
] |
permissive
|
cnsuhao/BaijieCppUILib-2
|
9cd33a3f74364ccb3d1910b560748b86c55de928
|
7771f225d854c69bc129d983cfcb10d672e1eacd
|
refs/heads/master
| 2021-06-24T07:45:37.960105
| 2015-01-19T05:34:04
| 2015-01-19T05:34:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 732
|
h
|
AObject.h
|
#ifndef AOBJECT_H
#define AOBJECT_H
#define CLASS_INFO(TYPE,PARENT) \
public:\
AObject* ToClass(LPCTSTR pstrName)\
{\
if( pstrName != NULL && _tcscmp(pstrName,_T(#TYPE)) == 0 ) return this;\
else return A##PARENT::ToClass(pstrName);\
}\
LPCTSTR GetClass() const\
{\
return _T(#TYPE);\
}\
typedef A##TYPE self_class;\
typedef A##PARENT base_class;
class AFC_API AObject
{
public:
AObject();
virtual ~AObject();
virtual void Release();
virtual int AddRef();
virtual AObject* ToClass(LPCTSTR pstrName)
{
if( pstrName != NULL && _tcscmp(pstrName,_T("Object")) == 0 ) return this;
else return NULL;
}
virtual LPCTSTR GetClass() const
{
return _T("Object");
}
protected:
LONG m_iRefCount;
};
#endif
|
a6ab14cc1e75aa64d7917f1cf9b9624035b4d923
|
36cc691b0cc4935acd8554b30e5e162fe79b17e4
|
/algorithms/cscw.cpp
|
e99178db3d2cba925a5af89e4cc75361028ebce6
|
[] |
no_license
|
tangruize/coeditor
|
a216c75978bab042c1244344591af97c4185c9f3
|
696f4ff5ba53797078fe078e99a6e867f21aec7d
|
refs/heads/master
| 2021-01-23T16:12:54.891429
| 2019-03-07T03:05:12
| 2019-03-07T03:05:12
| 102,731,873
| 8
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,003
|
cpp
|
cscw.cpp
|
#include "data_trans.h"
const char *ALGO_VER = "CSCW";
static unsigned local, global;
static deque<trans_t> outgoing;
static void Generate(const op_t &op) {
trans_t msg;
msg.op = op;
msg.state = global;
writeRemote(msg);
msg.state = local;
outgoing.push_back(msg);
++local;
}
static void Receive(trans_t msg) {
/* Discard acknowledged messages. */
int i;
for (i = 0; i < outgoing.size(); ++i)
if (outgoing[i].state >= msg.state) break;
for (int j = 0; j < i; ++j) outgoing.pop_front();
/* Transform new message and the ones in the queue. */
for (i = 0; i < outgoing.size(); ++i)
if (xform(msg.op, outgoing[i].op) != 0) break;
writeLocal(msg.op);
++global;
}
/* client code */
void procLocal(const op_t &op) {
Generate(op);
}
void procServer(const trans_t &msg) {
Receive(msg);
}
/* server code */
void procRemote(const op_t &op) {
Generate(op);
}
void procClient(const trans_t &msg) {
Receive(msg);
}
|
14951a9423f94fdb386493c83a3b169db3551667
|
6d241b3146ecb542bc0cc469777c2175e2a341e5
|
/224A.cpp
|
754b928377175745aa30173d551a540cdc449f18
|
[] |
no_license
|
jagadeeshnelaturu/codeforces_solutions
|
d0a84f4c6e3ce94b6c8ee48b5139e4b5352eb902
|
9e058517d86d05b4770bfa1a4b2269edf796acac
|
refs/heads/master
| 2020-05-17T16:24:01.504974
| 2015-09-09T17:35:15
| 2015-09-09T17:35:15
| 42,130,641
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 285
|
cpp
|
224A.cpp
|
#include <iostream>
#include <cmath>
typedef long long int ll;
int main() {
ll a1, a2, a3;
std::cin >> a1 >> a2 >> a3;
ll x, y, z, product;
product = sqrt(a1 * a2 * a3);
x = product / a1;
y = product / a2;
z = product / a3;
std::cout << ((x + y + z) << 2) << '\n';
}
|
d7b700c6ec4e7e575a7fd856a667c143dbe571dd
|
4fcf2967da46f37c831b72b7b97f705d3364306d
|
/problems/acmicpc_13623.cpp
|
afd5ee86d957ba53ed0c89ae38ea4b2429aa5758
|
[
"MIT"
] |
permissive
|
qawbecrdtey/BOJ-sol
|
e2be11e60c3c19e88439665d586cb69234f2e5db
|
249b988225a8b4f52d27c5f526d7c8d3f4de557c
|
refs/heads/master
| 2023-08-03T15:04:50.837332
| 2023-07-30T08:25:58
| 2023-07-30T08:25:58
| 205,078,469
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 327
|
cpp
|
acmicpc_13623.cpp
|
#include <cstdio>
int main() {
int x = 0, y;
for(int i = 0; i < 3; i++) {
scanf("%d", &y);
x |= (y << i);
} switch(x) {
case 0:
case 7: printf("*"); break;
case 1:
case 6: printf("A"); break;
case 2:
case 5: printf("B"); break;
case 3:
case 4: printf("C"); break;
default: __builtin_unreachable();
}
}
|
9799e2c95f879d7f0c5a9f3219d18b46c636a477
|
0b9501f8fc7d6c00d54757d7258945d159ee8d64
|
/slsv_cnc/src/Coverage/ToggleCoverage.cpp
|
f15e16d903988bfeb2d318934359f6139e97f91d
|
[] |
no_license
|
command-paul/slsv-master
|
34f92f3b202f9c0ba4f76e1f563e5a25dc2bc956
|
a703bfaa8031e18e3fb74d3f1f2f4544c75a73ef
|
refs/heads/master
| 2021-03-30T15:36:12.004635
| 2018-08-20T23:23:42
| 2018-08-20T23:23:42
| 120,571,860
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 706
|
cpp
|
ToggleCoverage.cpp
|
#include"Coverage.hpp"
#include <iostream>
#include <vector>
// Public Access Status Functions
bool ToggleCoverage::update(){
return true;
}
std::pair<bool,std::vector<uint64_t>> ToggleCoverage::event(){
std::pair<bool,std::vector<uint64_t>> a;
return a;
}
std::pair<bool,std::pair<std::string,std::vector<uint64_t>>> ToggleCoverage::get_results(){
std::pair<bool,std::pair<std::string,std::vector<uint64_t>>> a;
return a;
}
uint32_t ToggleCoverage::get_event(uint32_t id){
return 0;
}
// How is a user supposed to declare these things genuis well your going to have to mask the parent class and make each of these available to wrap in swig,
// additional coverage addition can be worked out later
|
bddba0f01b0271e80a46cd6e36a6b68369bc4a4c
|
da7c499625123f5d1a28e3d75b037523df11ccb5
|
/devel/coda/src/evio/main/etst7.cc
|
0b79c0753a33dfb16949bd9e28bd447d0ded3753
|
[] |
no_license
|
emuikernel/BDXDaq
|
84d947b0a4c0c1799a855dbe6c59e9560a8fc4e2
|
cf678d3b71bdfb95996e8b7e97ad3657ef98262f
|
refs/heads/master
| 2021-01-18T07:26:38.855967
| 2015-06-08T15:45:58
| 2015-06-08T15:45:58
| 48,211,085
| 3
| 2
| null | 2015-12-18T02:56:53
| 2015-12-18T02:56:52
| null |
UTF-8
|
C++
| false
| false
| 2,527
|
cc
|
etst7.cc
|
// example of evio tree and bank manipulation
// ejw, 11-jan-2007
#include <vector>
#include "evioUtil.hxx"
#include "evioFileChannel.hxx"
using namespace evio;
using namespace std;
uint16_t tag;
uint8_t num;
int len;
ContainerType cType;
vector<uint32_t> uVec1,uVec2;
double dBuf[100];
int iBuf[100];
vector<int32_t> lVec;
evioDOMNodeP parent;
//-------------------------------------------------------------------------------
int main(int argc, char **argv) {
// fill vectors
for(int i=0; i<10; i++) uVec1.push_back(i),uVec2.push_back(2*i),dBuf[i]=i*10.0,lVec.push_back(100*i),iBuf[i]=100*i+i;
try {
// create a tree and root node
evioDOMTree event(tag=1, num=1);
// create a container node and add to tree
evioDOMNodeP cn1 = evioDOMNode::createEvioDOMNode(tag=3, num=7);
event << cn1;
// create another leaf node
evioDOMNodeP ln2 = evioDOMNode::createEvioDOMNode(tag=2, num=6, uVec1);
// test operator==()
if(*ln2==2) {
cout << endl << "test *ln2==2 succeeded" << endl << endl;
} else {
cerr << endl << "test *ln2==2 failed" << endl << endl;
}
if(*ln2==tagNum(2,6)) {
cout << endl << "test *ln2==(2,6) succeeded" << endl << endl;
} else {
cerr << endl << "test *ln2==(2,6) failed" << endl << endl;
}
// hang leaf nodes off cn1, note dereferencing of cn1
*cn1 << ln2
<< evioDOMNode::createEvioDOMNode(tag=2, num=7, dBuf, 10)
<< evioDOMNode::createEvioDOMNode(tag=2, num=8, lVec);
// add some more data to ln2
*ln2 << uVec2 << uVec1;
// create another sub-tree
evioDOMNodeP cn3 = evioDOMNode::createEvioDOMNode(tag=30, num=35, cType=BANK);
*cn3 << evioDOMNode::createEvioDOMNode(tag=31, num=36, uVec1)
<< evioDOMNode::createEvioDOMNode(tag=32, num=37, lVec)
<< evioDOMNode::createEvioDOMNode(tag=10, num=20, iBuf, 10)
<< evioDOMNode::createEvioDOMNode(tag=11, num=21, dBuf, 5)
<< evioDOMNode::createEvioDOMNode(tag=12, num=22, lVec);
// hang cn3 off cn1
*cn1 << cn3;
// test move
ln2->move(cn3);
// test cut
ln2->cutAndDelete();
// test cutAndDelete
cn3->cutAndDelete();
// print tree
cout << event.toString() << endl;
} catch (evioException e) {
cerr << e.toString() << endl;
}
}
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
|
09792784deb4b73631500242a36089d9fbd11f15
|
10eccad146f4cfa83c2dde2c78e7859ccbf752f1
|
/uitbc/src/gui/uifilenamefield.cpp
|
da51e17f1d252bff71f38a1070e802e1e272491a
|
[
"BSD-3-Clause"
] |
permissive
|
highfestiva/life
|
4b7098432efc46e8dae7bcede4eee39e090d2772
|
b05b592502d72980ab55e13e84330b74a966f377
|
refs/heads/master
| 2020-05-25T15:45:46.557932
| 2019-06-07T11:29:30
| 2019-06-07T11:29:30
| 58,243,887
| 10
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,223
|
cpp
|
uifilenamefield.cpp
|
/*
Class: FileNameField
Author: Jonas Byström
Copyright (c) Pixel Doctrine
*/
#include "pch.h"
#include "../../../lepra/include/diskfile.h"
#include "../../../lepra/include/path.h"
#include "../../include/gui/uifilenamefield.h"
#include "../../include/gui/uipopuplist.h"
#include "../../include/gui/uidesktopwindow.h"
#include <algorithm>
namespace uitbc {
FileNameField::FileNameField(Component* top_parent):
TextField(top_parent) {
}
FileNameField::FileNameField(Component* top_parent, unsigned border_style, int border_width, const Color& color):
TextField(top_parent, border_style, border_width, color) {
}
FileNameField::FileNameField(Component* top_parent, unsigned border_style, int border_width, Painter::ImageID image_id):
TextField(top_parent, border_style, border_width, image_id) {
}
FileNameField::FileNameField(Component* top_parent, const Color& color):
TextField(top_parent, color) {
}
FileNameField::FileNameField(Component* top_parent, Painter::ImageID image_id):
TextField(top_parent, image_id) {
}
FileNameField::~FileNameField() {
}
PopupList* FileNameField::CreatePopupList() {
str search_string = strutil::Encode(GetText());
search_string += "*";
Painter* painter = 0;
DesktopWindow* desktop_window = (DesktopWindow*)GetParentOfType(kDesktopwindow);
if (desktop_window != 0) {
painter = desktop_window->GetPainter();
}
std::list<FileInfo> file_list;
DiskFile::FindData find_data;
bool ok = DiskFile::FindFirst(search_string, find_data);
while (ok) {
bool file_extension_ok = true;
if (file_extension_list_.empty() == false && find_data.IsSubDir() == false) {
str _extension = Path::GetExtension(find_data.GetName());
strutil::ToLower(_extension);
file_extension_ok = std::find(file_extension_list_.begin(), file_extension_list_.end(), _extension) != file_extension_list_.end();
}
if (file_extension_ok == true) {
file_list.push_back(FileInfo(find_data.GetName(), find_data.IsSubDir()));
}
ok = DiskFile::FindNext(find_data);
}
PopupList* popup_list = 0;
if (!file_list.empty()) {
popup_list = new PopupList(kBorderSunken, 3, WHITE);
popup_list->SetStyle(ListControl::kSingleSelect);
file_list.sort();
std::list<FileInfo>::iterator iter;
int label_height = 0;
for (iter = file_list.begin(); iter != file_list.end(); ++iter) {
Label* label = new Label(GetTextColor(), wstrutil::Encode((*iter).name_));
label->SetPreferredSize(0, 12);
popup_list->AddChild(label);
if (iter == file_list.begin()) {
label_height = label->GetPreferredHeight(true);
}
}
popup_list->SetPreferredHeight(label_height * (int)std::min(popup_list->GetNumChildren(), 10));
}
return popup_list;
}
bool FileNameField::OnKeyDown(uilepra::InputManager::KeyCode key_code) {
Parent::OnKeyDown(key_code);
switch (key_code) {
case uilepra::InputManager::kInKbdEnter: {
FinalizeSelection();
} break;
default: break;
}
return (false);
}
bool FileNameField::NotifyDoubleClick(PopupList*, int mouse_x, int mouse_y) {
bool return_value = true;
Component* item = GetPopupList()->GetFirstSelectedItem();
if (item != 0 && item->IsOver(mouse_x, mouse_y)) {
FinalizeSelection();
return_value = false;
}
return return_value;
}
void FileNameField::ValidatePath(str& path) {
str normalized_path;
if (!Path::NormalizePath(path, normalized_path)) {
// TRICKY: nothing to do - this is not a path!
return;
}
DiskFile::FindData find_data;
bool ok = DiskFile::FindFirst(normalized_path, find_data);
if (ok == true) {
if (find_data.IsSubDir() && strutil::Right(normalized_path, 1) != "/") {
path += '/';
}
} else {
// TODO: verify code! How can the path exist if FindFirst did not find the path? Contradicting, to say the least.
ok = DiskFile::PathExists(normalized_path);
if (ok && strutil::Right(normalized_path, 2) == "..") {
normalized_path += '/';
}
}
path = normalized_path;
}
size_t FileNameField::FindSlash(str& path, int n) {
size_t index = path.length();
if (index > 0) {
int i = 0;
do {
int index1 = (int)path.rfind('/', index-1);
int index2 = (int)path.rfind('\\', index-1);
index = index1 > index2 ? index1 : index2;
i++;
} while(i < n);
}
return index;
}
void FileNameField::FinalizeSelection() {
if (GetPopupList() != 0) {
str text = strutil::Encode(GetText());
if (!text.empty()) {
// We have to remove everything from the last '/' or '\\'.
// Why?
// 1. If the user wrote "C:\Program" and then selected
// "Program Files", "Program Files" should replace "Program".
// 2. If the user wrote "C:\Program Files\", nothing is removed.
size_t index = FindSlash(text, 0);
text.erase(index + 1, text.length() - (index + 1));
}
ValidatePath(text);
Label* selected_item = (Label*)GetPopupList()->GetFirstSelectedItem();
text += strutil::Encode(selected_item->GetText());
ValidatePath(text);
const wstr wide_text = wstrutil::Encode(text);
SetText(wide_text);
DestroyPopupList();
SetMarkerPos(wide_text.length());
SetKeyboardFocus();
}
}
void FileNameField::AddFileExtension(const str& extension) {
str _extension(extension);
strutil::ToLower(_extension);
file_extension_list_.push_back(_extension);
}
}
|
b81bc0e934c14cc22e083fab07082cf2c62c0857
|
990417fd4a1b4997141356cba848384852a981b7
|
/P4-2/src/BigQ.h
|
a0bc67941bcebfbd74619e9abbd10ea02ee3c132
|
[] |
no_license
|
TonyBY/DataBase-System-Implementation
|
d56b857279047961776778e7d579e64ad1f9adce
|
1436dcfad78c3791913408a5d6c7fc9013ae718d
|
refs/heads/master
| 2022-04-25T13:55:34.374538
| 2020-04-28T18:50:04
| 2020-04-28T18:50:04
| 234,332,334
| 3
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,040
|
h
|
BigQ.h
|
#ifndef BIGQ_H
#define BIGQ_H
#include <algorithm> // std::sort
#include <iostream>
#include <pthread.h>
#include <queue>
#include <stdexcept>
#include <string>
#include <vector>
#include "Comparison.h"
#include "ComparisonEngine.h"
//#include "DBFile.h"
#include "Defs.h"
#include "Pipe.h"
#include "Schema.h"
#include "Util.h"
using namespace std;
// OrderMaker cannot specify sorting order (ascending or descending)
// So we wrap the Compare function and apply self-defined symbol SortOrder for specifying the sorting order.
enum SortOrder {Ascending, Descending};
//typedef void * (*THREADFUNCPTR)(void *);
/*
* Class for blocks in the second phase of TPMMS
*/
class Block {
private:
int m_blockSize;
int m_nextLoadPageIdx;
int m_runEndPageIdx;
File m_inputFile;
vector<Page*> m_pages;
public:
Block();
Block(int size, pair<int, int> runStartEndPageIdx ,File &inputFile);
// returns false if there are pages left in current run,
// true if the run has exhausted
bool noMorePages();
// check if this block is full of pages
bool isFull();
// check if this block is empty
bool isEmpty();
// Load the next page for current run
// Returns 1 -> success; 0 -> failure
int loadPage();
// Get the front record without popping it
// Returns 1 -> success; 0 -> failure
int getFrontRecord(Record& front);
// Pop the front record
// Returns 1 -> success; 0 -> failure
int popFrontRecord();
};
class BigQ {
private:
Pipe *m_inputPipe;
Pipe *m_outputPipe;
static SortOrder m_sortMode;
static OrderMaker m_attOrder;
int m_runLength; // The maximum number of pages in one run
int m_numRuns; // The number of runs after the first phase. This cannot be pre-determined.
string m_sortTmpFilePath;
//Schema* m_myS;
// Record page indices where each run starts (inclusive) and ends at (exclusive) in file
// [(startPageIdx, endPageIdx), (startPageIdx, endPageIdx), ...]
vector< pair<int, int> > m_runStartEndLoc;
// Compare functions used in std::sort() and std::priority_queue
/*
* Compare function for two Records, this is used in std::sort()
*/
static bool compare4Sort(Record *left, Record *right);
/*
* Compare function for Records in two pairs, this is used in std::priority_queue
* The first element in the pair is index of block the record belongs to
* The second element is the record itself
*/
//bool compare4PQ(pair<int, Record>& left, pair<int, Record>& right);
struct compare4PQ {
bool operator() (pair<int, Record*>& left, pair<int, Record*>& right) {
return compare4Sort(left.second, right.second);
}
};
//void printVec(vector<Record*> &recs);
void sortRecords(vector<Record*> &recs, const OrderMaker &order, SortOrder mode);
void TPMMS_Phase1(File &outputFile);
public:
/*
* Min or Max heap used in TPMMS phase 2 for merging all runs
*/
priority_queue< pair<int, Record*>, vector< pair<int, Record*> >, compare4PQ > m_heap;
/*
* Safely pushes a record into the heap / prioroty_queue
*/
void safeHeapPush(int idx, Record* pushMe);
// Returns index of the next block which will pop its front record to output pipe
// In another word, finds which block contains the min or max front record currently
// and returns its index in vector 'blocks'
// NOTE: This function can be improved to speed up
int nextPopBlock(vector<Block>& blocks);
// Merge all blocks and write them to output pipe
void mergeBlocks(vector<Block>& blocks);
void TPMMS_Phase2(File &inputFile);
void TPMMS();
BigQ() {}
BigQ (Pipe &inputPipe, Pipe &outputPipe, OrderMaker &order, int runLength);//, Schema* myS); // HERE
~BigQ();
};
#endif
|
28889aced81b41cfb5af71fdff8d8003ec765d5c
|
749e36171eb184f5a3941b129040edca63679f6e
|
/src/Context.cpp
|
2ad4b1570e5e75725cd93db780a52615566ded8a
|
[
"MIT"
] |
permissive
|
droidream/dukv8
|
822d9d3ea65d6cb9603cdd5c495de02ae3262bf4
|
2eb03526b680ad50055e5499141fe45f70a6bbfe
|
refs/heads/master
| 2021-01-10T12:19:05.401428
| 2015-06-03T04:56:49
| 2015-06-03T04:56:49
| 36,780,487
| 2
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,577
|
cpp
|
Context.cpp
|
//
// Created by Jiang Lu on 6/2/15.
//
#include <cassert>
#include <dukv8/Context.h>
#include <dukv8/Persistent.h>
#include <dukv8/Isolate.h>
#include <dukv8/Local.h>
#include <dukv8/Object.h>
namespace v8 {
Context *Context::s_current_context_ = NULL;
Context::Context() :
previous_context_(NULL) {
// printf("%s\n", __PRETTY_FUNCTION__);
}
Context::~Context() {
// printf("%s\n", __PRETTY_FUNCTION__);
}
/**
* Returns the global proxy object or global object itself for
* detached contexts.
*
* Global proxy object is a thin wrapper whose prototype points to
* actual context's global object with the properties like Object, etc.
* This is done that way for security reasons (for more details see
* https://wiki.mozilla.org/Gecko:SplitWindow).
*
* Please note that changes to global proxy object prototype most probably
* would break VM---v8 expects only global object as a prototype of
* global proxy object.
*
* If DetachGlobal() has been invoked, Global() would return actual global
* object until global is reattached with ReattachGlobal().
*/
Local<Object> Context::Global() {
Isolate *isolate = Isolate::GetCurrent();
duk_context *ctx = isolate->GetDukContext();
duk_push_global_object(ctx);
void *obj_heap_ptr = duk_get_heapptr(ctx, -1);
duk_pop(ctx);
return Local<Object>::New(Handle<Object>(new Object(ctx, obj_heap_ptr)));
}
/** Creates a new context.
*
* Returns a persistent handle to the newly allocated context. This
* persistent handle has to be disposed when the context is no
* longer used so the context can be garbage collected.
*
* \param extensions An optional extension configuration containing
* the extensions to be installed in the newly created context.
*
* \param global_template An optional object template from which the
* global object for the newly created context will be created.
*
* \param global_object An optional global object to be reused for
* the newly created context. This global object must have been
* created by a previous call to Context::New with the same global
* template. The state of the global object will be completely reset
* and only object identify will remain.
*/
Persistent<Context> Context::New(
ExtensionConfiguration *extensions,
Handle<ObjectTemplate> global_template,
Handle<Value> global_object) {
Handle<Context> context(new Context());
// Handle<Object> global;
//
// if (!global_object.IsEmpty() && global_object->IsObject()) {
// global = context->external_global_object_ = global_object->ToObject();
// } else {
// global = context->global_object_;
// }
// apply global object template to global object
if (!global_template.IsEmpty() && !global_object.IsEmpty()) {
// global_template->ApplyToObject(global_object);
// internal::Helper *helper = global_object->GetHelper();
// helper->m_object_template = global_template;
// helper->SetInternalFieldCount(global_template->m_internal_field_count);
}
return Persistent<Context>::New(context);
}
void Context::Enter() {
previous_context_ = s_current_context_;
s_current_context_ = this;
// printf("%s\n", __PRETTY_FUNCTION__);
}
void Context::Exit() {
// printf("%s\n", __PRETTY_FUNCTION__);
assert(s_current_context_ == this);
s_current_context_ = previous_context_;
}
Local<Context> Context::GetCurrent() {
if (s_current_context_) {
return Local<Context>::New(Handle<Context>(s_current_context_));
}
return Local<Context>();
}
}
|
b69ed6ec49042cc158e91dbdc2903dcb1b1ec3b5
|
b6a1a60bb089d9ffc20d0e8c1f49c49b767c7df2
|
/CS375/Longest Common Subsequence/program1.cpp
|
2db5b4383e87a157daa82182f8370f0fede17047
|
[] |
no_license
|
audendana/University-Work
|
bcb275d8e016f1b25208aec67a9e9e76658a9389
|
83c6a8137958c3a6fafc73479dfc67a99d076748
|
refs/heads/master
| 2020-04-29T14:05:49.724441
| 2019-03-28T19:53:31
| 2019-03-28T19:53:31
| 176,184,947
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,538
|
cpp
|
program1.cpp
|
#include <iostream>
#include <string>
#include <fstream>
#include "readInput.h"
using namespace std;
void lcs(string str1, string str2, string outputFile){
int m = str1.length();
int n = str2.length();
int LCS[m+1][n+1]; // create matrix
for(int i=0;i<=m;i++){
for(int j=0;j<=n;j++){
if(i==0 || j==0){ // c[i,j] = 0 if i=0 or j=0
LCS[i][j] = 0;
} else if(str1[i-1] == str2[j-1]){ // c[i,j] = c[i-1,j-1] if i,j >0 & x_i = y_i
LCS[i][j] = LCS[i-1][j-1]+1;
} else {
LCS[i][j] = max(LCS[i][j-1], LCS[i-1][j]); // c[i,j] = max(c[i,j-1], c[i-1,j]) if i,j >0 & x_i != y_i
}
}
}
int indexOfLCS = LCS[m][n]; // counter for printing
int lenOfLCS = indexOfLCS; // actual length of LCS
string lcsString;
lcsString.resize(indexOfLCS+1); // resizes string to fit the right size;
int i=m;
int j=n;
while(i>0 && j>0){
if(str1[i-1]==str2[j-1]){ // if x_i = y_i we know its shared so add it to the LCS string.
lcsString[indexOfLCS-1] = str1[i-1]; // then decrement counters
i--;
j--;
indexOfLCS--;
} else if(LCS[i-1][j] > LCS[i][j-1]){
i--;
} else {
j--;
}
}
if(m <=10 && n <=10){
ofstream output;
output.open(outputFile);
if(!output){
cout << "Error outputting to " << outputFile << endl;
exit(1);
}
for(int a=0;a<=m;a++){
for(int b=0;b<=n;b++){
output << LCS[a][b] << " ";
}
output << endl;
}
output << "The LCS of " << str1 << " and " << str2<< " is " << lcsString << endl;
output <<"The length of LCS: " << lenOfLCS << endl;
output <<"T(n) = m*n" << endl;
output.close();
} else {
ofstream output;
output.open(outputFile);
if(!output){
cout << "Error outputting to " << outputFile << endl;
exit(1);
}
output <<"The length of LCS: " << lenOfLCS << endl;
output <<"T(n) = m*n" << endl;
output.close();
}
}
int main(int argc, char * const argv[]){
if(argc == 4){
string filex = argv[1];
string filey = argv[2];
string outputFile = argv[3];
string filexLine = readInput(filex);
string fileyLine = readInput(filey);
lcs(filexLine, fileyLine, outputFile);
}
}
|
ad8d0d3791816d2e9ec257974b31aeed5c4e0984
|
15d0f88893f33bc0b60154b303b58ba0fdca7d53
|
/src/queuethread.cpp
|
60794d585bc63b110ed7fce4362b0d4c778e6e9e
|
[] |
no_license
|
fxh707/VisionSDK
|
ed1ad0e7c706af0ccdd703b5fd276123b81bee74
|
7eac0f6720a3ce4e0ac0d8d7330963f62a852011
|
refs/heads/master
| 2020-08-10T10:34:20.473987
| 2019-02-28T04:47:28
| 2019-02-28T04:47:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,090
|
cpp
|
queuethread.cpp
|
#include "queuethread.h"
QueueThread::QueueThread(QObject *parent) : QThread(parent)
{
m_stop = false;
s_pause = false;
b_pause = true;
}
QueueThread::~QueueThread()
{
stop();
while(isRunning()) wait(100);
qDebug() << "QueueThread : Terminated" << endl;
}
void QueueThread::move(int src, int dst)
{
if(dst >= algorithmList.size()) dst = algorithmList.size()-1;
mutex_list.lock();
algorithmList.move(src, dst);
mutex_list.unlock();
}
void QueueThread::setProcImage(const cv::Mat &value)
{
//gpu///
srcImage = value.clone();
}
void QueueThread::run()
{
while(1){
if(m_stop){
for(int i=0;i<algorithmList.size();i++){
algorithmList.at(i)->close();
delete algorithmList.at(i);
algorithmList.removeAt(i);
}
qDebug() << "QueueThread : Stop and Delete all widgets" << endl;
break;
} else if(b_pause){
mutex_wait.lock();
qDebug() << "QueueThread : Wait for RUN Button " << endl;
b_pause = false;
btnCondition.wait(&mutex_wait);
mutex_wait.unlock();
} else if(s_pause){
mutex_wait.lock();
qDebug() << "QueueThread : Wait for GUI Signal " << endl;
s_pause = false;
sigCondition.wait(&mutex_wait);
mutex_wait.unlock();
}
// running statment entry
if(m_stop) continue;
// qDebug() << "Thread Running" << endl;
step(srcImage);
wait4sig();
}
qDebug() << "QueueThread : Stoped" << endl;
}
void QueueThread::step(cv::Mat procImage)
{
mutex_list.lock();
for(int i=0;i<algorithmList.size();i++)
// gpuImageMODE
procImage = algorithmList.at(i)->runCpu(procImage);
mutex_list.unlock();
//TODO : emit gpuMODE
// emit updateProcessing( mat2qimage(procImage) );
emit updateProc(procImage);
usleep(300);
}
|
996236e9664519f4606e8e6a9f00905df5b7c769
|
07b73cd7a7a00829a3c234d73f9e14cdd1a774d9
|
/lib/include/xnetwork/algorithms/centrality/tests/test_eigenvector_centrality.h
|
afd7e30586c53962f27577dedd8aed191a378059
|
[
"MIT"
] |
permissive
|
luk036/xnetwork
|
b70b0a27e46f9a78c82925786b35d9122ad28180
|
462c25da3aead6b834e6027f4d679dc47965b134
|
refs/heads/master
| 2021-07-23T18:42:16.184275
| 2021-07-13T10:41:07
| 2021-07-13T10:41:07
| 136,568,996
| 2
| 1
|
MIT
| 2021-06-29T06:43:39
| 2018-06-08T05:07:19
|
C++
|
UTF-8
|
C++
| false
| false
| 5,064
|
h
|
test_eigenvector_centrality.h
|
// !file C++17
import math
from nose import SkipTest
from nose.tools import *
#include <xnetwork.hpp> // as xn
class TestEigenvectorCentrality: public object {
numpy = 1 // nosetests attribute, use nosetests -a "not numpy" to skip test
/// @classmethod
auto setupClass(cls) {
global np
try {
import numpy as np
import scipy
} catch (ImportError) {
throw SkipTest("SciPy not available.");
auto test_K5() {
/** Eigenvector centrality: K5*/
G = xn::complete_graph(5);
b = xn::eigenvector_centrality(G);
v = math.sqrt(1 / 5.0);
b_answer = dict.fromkeys(G, v);
for (auto n : sorted(G) {
assert_almost_equal(b[n], b_answer[n]);
nstart = dict([(n, 1) for n : G]);
b = xn::eigenvector_centrality(G, nstart=nstart);
for (auto n : sorted(G) {
assert_almost_equal(b[n], b_answer[n]);
b = xn::eigenvector_centrality_numpy(G);
for (auto n : sorted(G) {
assert_almost_equal(b[n], b_answer[n], places=3);
auto test_P3() {
/** Eigenvector centrality: P3*/
G = xn::path_graph(3);
b_answer = {0: 0.5, 1: 0.7071, 2: 0.5}
b = xn::eigenvector_centrality_numpy(G);
for (auto n : sorted(G) {
assert_almost_equal(b[n], b_answer[n], places=4);
b = xn::eigenvector_centrality(G);
for (auto n : sorted(G) {
assert_almost_equal(b[n], b_answer[n], places=4);
auto test_P3_unweighted() {
/** Eigenvector centrality: P3*/
G = xn::path_graph(3);
b_answer = {0: 0.5, 1: 0.7071, 2: 0.5}
b = xn::eigenvector_centrality_numpy(G, weight=None);
for (auto n : sorted(G) {
assert_almost_equal(b[n], b_answer[n], places=4);
/// /// @raises(xn::PowerIterationFailedConvergence);
auto test_maxiter() {
G = xn::path_graph(3);
b = xn::eigenvector_centrality(G, max_iter=0);
class TestEigenvectorCentralityDirected: public object {
numpy = 1 // nosetests attribute, use nosetests -a "not numpy" to skip test
/// @classmethod
auto setupClass(cls) {
global np
try {
import numpy as np
import scipy
} catch (ImportError) {
throw SkipTest("SciPy not available.");
auto setUp() {
G = xn::DiGraph();
edges = [(1, 2), (1, 3), (2, 4), (3, 2), (3, 5), (4, 2), (4, 5), (4, 6),
(5, 6), (5, 7), (5, 8), (6, 8), (7, 1), (7, 5),
(7, 8), (8, 6), (8, 7)];
G.add_edges_from(edges, weight=2.0);
this->G = G.reverse();
this->G.evc = [0.25368793, 0.19576478, 0.32817092, 0.40430835,
0.48199885, 0.15724483, 0.51346196, 0.32475403];
H = xn::DiGraph();
edges = [(1, 2), (1, 3), (2, 4), (3, 2), (3, 5), (4, 2), (4, 5), (4, 6),
(5, 6), (5, 7), (5, 8), (6, 8), (7, 1), (7, 5),
(7, 8), (8, 6), (8, 7)];
G.add_edges_from(edges);
this->H = G.reverse();
this->H.evc = [0.25368793, 0.19576478, 0.32817092, 0.40430835,
0.48199885, 0.15724483, 0.51346196, 0.32475403];
auto test_eigenvector_centrality_weighted() {
G = this->G
p = xn::eigenvector_centrality(G);
for (auto [a, b] : zip(list(p.values()), this->G.evc) {
assert_almost_equal(a, b, places=4);
auto test_eigenvector_centrality_weighted_numpy() {
G = this->G
p = xn::eigenvector_centrality_numpy(G);
for (auto [a, b] : zip(list(p.values()), this->G.evc) {
assert_almost_equal(a, b);
auto test_eigenvector_centrality_unweighted() {
G = this->H
p = xn::eigenvector_centrality(G);
for (auto [a, b] : zip(list(p.values()), this->G.evc) {
assert_almost_equal(a, b, places=4);
auto test_eigenvector_centrality_unweighted_numpy() {
G = this->H
p = xn::eigenvector_centrality_numpy(G);
for (auto [a, b] : zip(list(p.values()), this->G.evc) {
assert_almost_equal(a, b);
class TestEigenvectorCentralityExceptions: public object {
numpy = 1 // nosetests attribute, use nosetests -a "not numpy" to skip test
/// @classmethod
auto setupClass(cls) {
global np
try {
import numpy as np
import scipy
} catch (ImportError) {
throw SkipTest("SciPy not available.");
/// /// @raises(xn::XNetworkException);
auto test_multigraph() {
e = xn::eigenvector_centrality(xn::MultiGraph());
/// /// @raises(xn::XNetworkException);
auto test_multigraph_numpy() {
e = xn::eigenvector_centrality_numpy(xn::MultiGraph());
/// /// @raises(xn::XNetworkException);
auto test_empty() {
e = xn::eigenvector_centrality(xn::Graph());
/// /// @raises(xn::XNetworkException);
auto test_empty_numpy() {
e = xn::eigenvector_centrality_numpy(xn::Graph());
|
49f972a7c8d9fca3dfb486e71d42e7b6d66d757a
|
fa7feda744825b8bfd84a739905f00ec5efee395
|
/10 - May 26/I/I.cpp
|
e337330e8bf8ab64afeb41a2b96f86cccdedd392
|
[] |
no_license
|
thomasokubo/MC521
|
7c8dcfa185cea96cb6bd02ffe29972aa90479e25
|
54e415b1a43e2b48683df0227d43dba6bcc216b1
|
refs/heads/master
| 2020-03-23T08:03:26.855365
| 2018-07-25T22:26:43
| 2018-07-25T22:26:43
| 141,305,758
| 1
| 0
| null | 2018-07-24T22:56:50
| 2018-07-17T15:03:06
|
C++
|
UTF-8
|
C++
| false
| false
| 969
|
cpp
|
I.cpp
|
#include<cstdio>
#include<cmath>
int n, l, d;
inline double abs(double x) {
return x > 0 ? x : -x;
}
inline double maxtetal(int alturas[], int n, int jard) {
double x, y, teta;
double maximum = 0;
for(int i = jard-1; i >= 0; i--) {
x = (jard-i)*d+(jard-i)*l;
teta = atan(alturas[i]/x);
if(teta > maximum)
maximum = teta;
}
return maximum;
}
inline double maxtetar(int alturas[], int n, int jard) {
double x, y, teta;
double maximum = 0;
for(int i = jard+1; i < n; i++) {
x = (i-jard)*d+(i-jard)*l;
teta = atan(alturas[i]/x);
if(teta > maximum)
maximum = teta;
}
return maximum;
}
int main() {
int alturas[100];
int jard;
double tetal, tetar;
while(scanf("%d %d %d ", &n, &l, &d) != EOF) {
for(int i = 0; i < n; i++) {
scanf(" %d", &alturas[i]);
if(alturas[i] == 0)
jard = i;
}
tetal = abs(maxtetal(alturas, n, jard));
tetar = abs(maxtetar(alturas, n, jard));
printf("%.2lf\n", (960*(M_PI-tetal-tetar))/M_PI);
}
}
|
16a4a333485824bee189f63b7c9a389cf18e9d01
|
e1f47354fad7be71d783529fa3376f9b337d09ae
|
/src/ffmpegmediatypes.cpp
|
3a7d202ab169ba3802fa3ec9228c543807a6d39b
|
[
"BSD-2-Clause"
] |
permissive
|
hokiedsp/matlab-ffmpeg
|
eb35db927eb15f05d926f945ce82df3a1a035f56
|
60162157ab8e6ac1c4a4e6e8894e95a6eb2099ed
|
refs/heads/master
| 2021-01-25T04:41:37.515833
| 2019-11-17T15:39:44
| 2019-11-17T15:39:44
| 93,463,831
| 5
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,341
|
cpp
|
ffmpegmediatypes.cpp
|
#include <memory>
#include <mex.h>
extern "C"
{
#include <libavformat/avformat.h>
#if CONFIG_AVDEVICE
#include <libavdevice/avdevice.h>
#endif
}
#include "utils/ffmpegMxProbe.h"
#include <ffmpegException.h>
#include "utils/mxutils.h"
// types = ffmpegmediatypes(filename)
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
if (nlhs > 1 || nrhs != 1)
mexErrMsgTxt("Takes exactly 1 input argument and produces 1 output.");
if (!mxIsChar(prhs[0]))
mexErrMsgTxt("Filename must be given as a character array.");
// initialize FFmpeg
avformat_network_init();
#if CONFIG_AVDEVICE
avdevice_register_all();
#endif
// initialize ffmpeg::Exception
ffmpeg::Exception::initialize();
// // testing logging capability
// ffmpeg::Exception::av_log_level = AV_LOG_INFO;
// ffmpeg::Exception::log_fcn = [](const std::string &msg) { mexPrintf("%s", msg.c_str()); };
// ffmpeg::Exception::log(AV_LOG_INFO, "executing ffmpegmediatypes...");
char *filename = mxArrayToUTF8String(prhs[0]);
mxAutoFree(filename);
ffmpeg::MxProbe mediafile(filename);
auto types = mediafile.getMediaTypes();
plhs[0] = mxCreateCellMatrix(types.size(), 1);
for (int i = 0; i < types.size(); ++i)
mxSetCell(plhs[0], i, mxCreateString(types[i].c_str()));
}
|
2d5b96cac3385cf689179e2e969a1b2bf3850b1d
|
2afdff5b63f166f413a1129d98f0f12bfc83784f
|
/src/example_binding.cpp
|
61c0b0101c9ff274ba928e1aac81f73b7816cf49
|
[
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
skoch9/libigl-python-binding-experiments
|
5f2df60b40c384a320582eafb87a07ab9f3b85f0
|
eead802dbddda5b69ad36693f3da2d9bfa1fd9ab
|
refs/heads/master
| 2020-03-21T13:37:35.529542
| 2018-06-17T18:32:25
| 2018-06-17T18:32:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,276
|
cpp
|
example_binding.cpp
|
#include <pybind11/pybind11.h>
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/arrayobject.h>
#include <pybind11/numpy.h>
#include <igl/cotmatrix.h>
#include <iostream>
#include <tuple>
#include "eigen_typedefs.h"
namespace py = pybind11;
using namespace std;
#define CRAZY1
#define CRAZY2
#define CRAZY3
#define CRAZY4
#define CRAZY5
#ifdef CRAZY1
#include "crazy_binding1.h"
#endif
#ifdef CRAZY2
#include "crazy_binding2.h"
#endif
#ifdef CRAZY3
#include "crazy_binding3.h"
#endif
#ifdef CRAZY4
#include "crazy_binding_4.h"
#endif
#ifdef CRAZY5
#include "crazy_binding_5.h"
#endif
PYBIND11_MODULE(pyigl_proto, m) {
m.doc() = R"pbdoc(
Playground for prototyping libIGL functions
-----------------------
.. currentmodule:: pyigl_proto
.. autosummary::
:toctree: _generate
array_info
cotmatrx
)pbdoc";
m.def("array_info", [](py::array v) {
pybind11::dtype v_type = v.dtype();
int v_flags = v.flags(); // PyArrayObject.flags
cout << "PyArrayObject.descr.kind: " << v_type.kind() << endl;
cout << "PyArrayObject.descr.type: " << v_type.type() << endl;
cout << "PyArrayObject.descr.byteorder: " << v_type.byteorder() << endl;
cout << "PyArrayObject.descr.flags: " << v_type.flags() << endl;
cout << "PyArrayObject.descr.type_num: " << v_type.type_num() << endl;
cout << "PyArrayObject.descr.elsize: " << v_type.elsize() << endl;
cout << "PyArrayObject.descr.alignment: " << v_type.alignment() << endl;
cout << endl;
cout << "PyArrayObject.flags: " << v_flags << endl;
cout << "PyArrayObject.flags & NPY_ARRAY_C_CONTIGUOUS: " << (v_flags & NPY_ARRAY_C_CONTIGUOUS) << endl;
cout << "PyArrayObject.flags & NPY_ARRAY_F_CONTIGUOUS: " << (v_flags & NPY_ARRAY_F_CONTIGUOUS) << endl;
cout << "PyArrayObject.flags & NPY_ARRAY_OWNDATA: " << (v_flags & NPY_ARRAY_OWNDATA) << endl;
cout << "PyArrayObject.flags & NPY_ARRAY_ALIGNED: " << (v_flags & NPY_ARRAY_ALIGNED) << endl;
cout << "PyArrayObject.flags & NPY_ARRAY_WRITEABLE: " << (v_flags & NPY_ARRAY_WRITEABLE) << endl;
cout << "PyArrayObject.flags & NPY_ARRAY_UPDATEIFCOPY: " << (v_flags & NPY_ARRAY_UPDATEIFCOPY) << endl;
});
m.def("type_lookup", [](py::array v) {
const char t = v.dtype().type();
StorateOrder so = (v.flags() & NPY_ARRAY_F_CONTIGUOUS) ? RowMajor : (v.flags() & NPY_ARRAY_C_CONTIGUOUS ? ColMajor : NoContig);
return get_type_id(t, so);
});
m.def("return_an_int", [](py::array v) {
return v.flags();
});
#ifdef CRAZY1
m.def("cotmatrix_branch", [](py::array v, py::array f) {
return crazy_ass_branching_cot_matrix(v, f);
});
#endif
#ifdef CRAZY2
m.def("cotmatrix_branch2", [](py::array v, py::array f) {
return crazier_ass_branching_cot_matrix(v, f);
});
#endif
#ifdef CRAZY3
m.def("cotmatrix_branch3", [](py::array v, py::array f) {
return craziest_ass_branching_cot_matrix(v, f);
});
#endif
#ifdef CRAZY4
m.def("cotmatrix_branch4", [](py::array v1, py::array v2, py::array v3, py::array v4) {
return krazi_ass_branching_cot_matrix(v1, v2, v3, v4);
});
#endif
#ifdef CRAZY5
m.def("cotmatrix_branch5", [](py::array v1, py::array v2, py::array v3, py::array v4, py::array v5) {
return krazier_ass_branching_cot_matrix(v1, v2, v3, v4, v5);
});
#endif
m.def("cotmatrix", [](py::array v, py::array f) {
// we care about the following attributes for each py::array
// type
// row-major/column-major/neither
// alignment
//
// So a unique descriptor for one type is:
// (type_num, [row|col|dyn], aligned_[none|8|16|32|64|128])
// |----> In practice we will not support unaligned types because that makes life difficult
//
// We need a way of mapping this to an integer for each type then doing a lookup to find the right overload
// So we need the following:
// (1) - Generate a unique integer per descriptor type
// (2) - Generate a static table of void* function pointers which correspond to each possible overload (this could be huge)
// (3) - Perfect hashing to map list of ids to function call
//
// Other things to note:
// - We only support up to 2 dimensions in Eigen (there are no tensors yet) so we should probably check that things are 2d or less
// - It's possible to have weird but constant strides, if the stride is not the "expected" stride, then use Eigen::Dynamic for now
// - Let's not support unaligned data.
py::dtype v_dtype = v.dtype();
int v_shape0 = v.shape()[0];
int v_shape1 = v.shape()[1];
std::float_t* v_data = (std::float_t*)(v.data(0));
Eigen::Map<Type_f32_rm, Eigen::Aligned> V(v_data, v_shape0, v_shape1);
int f_shape0 = f.shape()[0];
int f_shape1 = f.shape()[1];
std::int32_t* f_data = (std::int32_t*)(f.data(0));
Eigen::Map<Type_i32_rm, Eigen::Aligned> F(f_data, f_shape0, f_shape1);
Eigen::SparseMatrix<std::float_t> L;
return std::make_tuple<int, int>(V.rows(), F.rows());
// igl::cotmatrix(V, F, L);
// return L.rows();
// cout << "Output cotmatrix dims: " << L.rows() << " x " << L.cols() << endl;
// igl::cotmatrix<std::float_t, std::int8_t>();
// igl::cotmatrix<std::float_t, std::int16_t>();
// igl::cotmatrix<std::float_t, std::int64_t>();
// igl::cotmatrix<std::float_t, std::uint8_t>();
// igl::cotmatrix<std::float_t, std::uint16_t>();
// igl::cotmatrix<std::float_t, std::uint32_t>();
// igl::cotmatrix<std::float_t, std::uint64_t>();
// igl::cotmatrix<std::double_t, std::int8_t>();
// igl::cotmatrix<std::double_t, std::int16_t>();
// igl::cotmatrix<std::double_t, std::int32_t>();
// igl::cotmatrix<std::double_t, std::int64_t>();
// igl::cotmatrix<std::double_t, std::uint8_t>();
// igl::cotmatrix<std::double_t, std::uint16_t>();
// igl::cotmatrix<std::double_t, std::uint32_t>();
// igl::cotmatrix<std::double_t, std::uint64_t>();
});
#ifdef VERSION_INFO
m.attr("__version__") = VERSION_INFO;
#else
m.attr("__version__") = "dev";
#endif
}
|
43b7248e066cb1fa26310559acef3b458ac67413
|
54ec3f947ba946f649a62e59a787f2d9f7650b4e
|
/Spike Engine/src/UI/Widget/Widget.cpp
|
f6bd47299ea18723484d6193de3ea862ad159aae
|
[] |
no_license
|
mandliors/SpikeEngine
|
144e146961f687b5b616934df01462b92c274a28
|
12814cf3fdebf36421904a5ba7902d5c6358c4c9
|
refs/heads/master
| 2023-08-22T03:43:29.062250
| 2021-10-04T18:41:08
| 2021-10-04T18:41:08
| 284,740,495
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,544
|
cpp
|
Widget.cpp
|
#include "Widget.h"
#include "Input/Input.h"
#include "Math/Math.h"
namespace Spike {
Constraint* Widget::GetConstraint()
{
return m_Constraint;
}
void Widget::SetConstraint(Constraint* constraint)
{
if (m_Constraint != nullptr)
delete m_Constraint;
m_Constraint = constraint;
Recalculate();
}
void Widget::Show()
{
m_Hidden = false;
}
void Widget::Hide()
{
m_Hidden = true;
}
void Widget::Update()
{
//mouse click, focus
if (Input::GetMouseButtonUp(0))
{
if (Utility::OverlapPoint(Input::GetMousePosition(), m_Position, m_Size))
{
if (!m_Focused) OnFocusEnter();
m_Focused = true;
OnClick();
}
else if (m_Focused) { m_Focused = false; OnFocusLeave(); }
}
//mouse movement
if (Utility::OverlapPoint(Input::GetMousePosition(), m_Position, m_Size))
{
if (m_Hovering) OnMouseHover();
else { m_Hovering = true; OnMouseEnter(); OnMouseHover(); }
}
else
if (m_Hovering) { m_Hovering = false; OnMouseLeave(); }
//keyboard
if (m_Focused)
{
std::vector<int> keysDown = Input::GetKeysDown();
if (keysDown.size() != 0)
for (int i : keysDown) OnKeyDown(i);
}
//mouse press
if (Input::GetMouseButton(0) && m_Hovering)
{
m_Pressing = true;
OnMousePressing();
}
else m_Pressing = false;
}
void Widget::Recalculate()
{
if (m_Parent != nullptr)
{
m_Position = m_Constraint->CalculatePosition(m_Parent);
m_Size = m_Constraint->CalculateSize(m_Parent);
}
}
void Widget::Render()
{
std::cout << "Render" << std::endl;
}
}
|
d12df6bcc33b699bfcd19833d3058b2bfa3d7e85
|
0254f2ee4fde7362762a32cf8e59612271c63c87
|
/src/plugins/schedule/dayselector.cpp
|
56126cafdec0cd763c548faf22780df216e99fde
|
[] |
no_license
|
alexey-zayats/athletic
|
9a97f7f221bd3671df43ac65642df2916ba42a0b
|
0c65552d32a7bf581b03f0311e6764aaa60e1690
|
refs/heads/master
| 2020-05-22T01:31:14.186306
| 2017-07-10T12:06:58
| 2017-07-10T12:06:58
| 64,463,265
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,051
|
cpp
|
dayselector.cpp
|
#include "dayselector.h"
#include "monthline.h"
#include "scheduleicons.h"
#include <QLabel>
#include <QToolButton>
#include <QHBoxLayout>
#include <QDate>
namespace Schedule
{
DaySelector::DaySelector(QWidget *parent)
: QWidget(parent),
m_calendarButton(0),
m_currentLabel(0),
m_monthLine(0)
{
/*
1. Month selector
2. Current moth, day(?)
3. Days as a buttons to show by day schedule
*/
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_calendarButton = new QToolButton(this);
m_calendarButton->setIcon ( Icons::CALENDAR_SELECTOR.icon() );
m_currentLabel = new QLabel(this);
m_currentLabel->setText ( QDate::currentDate().toString ( QLatin1String("dd.MM.yyyy") ) );
m_monthLine = new MonthLine(this);
QHBoxLayout *layout = new QHBoxLayout();
layout->setSpacing (5);
layout->setMargin (0);
layout->addWidget (m_calendarButton);
layout->addWidget (m_currentLabel);
layout->addWidget (m_monthLine, 1);
setLayout (layout);
}
}
|
a0c3663b8fa65000c285d2c57deeefbd130cc7fd
|
bb90ad20468f9fe2039b8c16858bd8eae8bbc050
|
/src/http/http2_callbacks.h
|
45634231ca5ae67d86fae4ca06c89e6f68794273
|
[
"Apache-2.0"
] |
permissive
|
microsoft/CCF
|
0997fd81a924d36d775b219720b26b4ff196b18a
|
2fbf87840b9e8334c141f4a9c9b25aae979b0540
|
refs/heads/main
| 2023-09-05T15:39:37.265089
| 2023-09-05T15:27:25
| 2023-09-05T15:27:25
| 180,112,558
| 687
| 229
|
Apache-2.0
| 2023-09-14T14:28:39
| 2019-04-08T09:13:04
|
C++
|
UTF-8
|
C++
| false
| false
| 8,583
|
h
|
http2_callbacks.h
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache 2.0 License.
#pragma once
#include "ccf/ds/logger.h"
#include "ccf/http_configuration.h"
#include "http/http_exceptions.h"
#include "http2_types.h"
#include "http2_utils.h"
namespace http2
{
static ssize_t read_outgoing_callback(
nghttp2_session* session,
StreamId stream_id,
uint8_t* buf,
size_t length,
uint32_t* data_flags,
nghttp2_data_source* source,
void* user_data)
{
auto* stream_data = get_stream_data(session, stream_id);
if (stream_data->outgoing.state == StreamResponseState::Uninitialised)
{
LOG_FAIL_FMT(
"http2::read_outgoing_callback error: unexpected state {}",
stream_data->outgoing.state);
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
auto& body = stream_data->outgoing.body.ro_data();
size_t to_read = std::min(body.size(), length);
if (
to_read == 0 &&
stream_data->outgoing.state == StreamResponseState::Streaming)
{
// Early out: when streaming, avoid calling this callback
// repeatedly when there no data to read
return NGHTTP2_ERR_DEFERRED;
}
if (to_read > 0)
{
memcpy(buf, body.data(), to_read);
body = body.subspan(to_read);
}
if (stream_data->outgoing.state == StreamResponseState::Closing)
{
if (body.empty())
{
*data_flags |= NGHTTP2_DATA_FLAG_EOF;
}
if (stream_data->outgoing.has_trailers)
{
*data_flags |= NGHTTP2_DATA_FLAG_NO_END_STREAM;
}
}
return to_read;
}
static int on_begin_frame_recv_callback(
nghttp2_session* session, const nghttp2_frame_hd* hd, void* user_data)
{
const auto& stream_id = hd->stream_id;
LOG_TRACE_FMT(
"http2::on_begin_frame_recv_callback, type: {}, stream_id: {}",
hd->type,
stream_id);
// nghttp2 does not handle
// https://www.rfc-editor.org/rfc/rfc7540#section-5.1.1 (see
// https://github.com/nghttp2/nghttp2/issues/1300)
// > An endpoint that receives an unexpected stream identifier MUST
// > respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
//
// So can catch this case early in this callback by making sure that _new_
// stream ids are not less than the most recent stream id on this session.
auto* p = get_parser(user_data);
if (
stream_id != DEFAULT_STREAM_ID && p->get_stream(stream_id) == nullptr &&
hd->type == NGHTTP2_HEADERS)
{
if (stream_id < p->get_last_stream_id())
{
LOG_TRACE_FMT(
"http2::on_begin_frame_recv_callback: cannot process stream id {} "
"< last stream id {}",
stream_id,
p->get_last_stream_id());
return NGHTTP2_ERR_PROTO;
}
p->create_stream(stream_id);
}
return 0;
}
static int on_frame_recv_callback(
nghttp2_session* session, const nghttp2_frame* frame, void* user_data)
{
LOG_TRACE_FMT("http2::on_frame_recv_callback, type: {}", frame->hd.type);
const auto stream_id = frame->hd.stream_id;
auto* stream_data = get_stream_data(session, stream_id);
switch (frame->hd.type)
{
case NGHTTP2_DATA:
case NGHTTP2_HEADERS:
{
LOG_TRACE_FMT("Headers/Data frame");
// For DATA and HEADERS frame, this callback may be called after
// on_stream_close_callback so check that stream_data still alive.
if (stream_data == nullptr)
{
LOG_FAIL_FMT("No stream_data");
return 0;
}
// If the request is complete, process it
if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)
{
auto* p = get_parser(user_data);
p->handle_completed(stream_id, stream_data);
}
break;
}
default:
{
break;
}
}
return 0;
}
static int on_begin_headers_callback(
nghttp2_session* session, const nghttp2_frame* frame, void* user_data)
{
LOG_TRACE_FMT("http2::on_begin_headers_callback");
const auto& stream_id = frame->hd.stream_id;
auto* p = get_parser(user_data);
auto stream_data = p->get_stream(stream_id);
if (stream_data == nullptr)
{
// Streams are created in on_begin_frame_recv_callback
throw std::logic_error(
fmt::format("Stream {} should already exist", stream_id));
}
auto rc = nghttp2_session_set_stream_user_data(
session, stream_id, stream_data.get());
if (rc != 0)
{
throw std::logic_error(fmt::format(
"HTTP/2: Could not set user data for stream {}: {}",
stream_id,
nghttp2_strerror(rc)));
}
return 0;
}
static int on_header_callback(
nghttp2_session* session,
const nghttp2_frame* frame,
const uint8_t* name,
size_t namelen,
const uint8_t* value,
size_t valuelen,
uint8_t flags,
void* user_data)
{
const auto& stream_id = frame->hd.stream_id;
auto k = std::string(name, name + namelen);
auto v = std::string(value, value + valuelen);
LOG_TRACE_FMT("http2::on_header_callback: {}, {}:{}", stream_id, k, v);
auto* p = get_parser(user_data);
const auto& configuration = p->get_configuration();
auto const& max_header_size =
configuration.max_header_size.value_or(http::default_max_header_size);
if (namelen > max_header_size)
{
throw http::RequestHeaderTooLargeException(
fmt::format(
"Header key for '{}' is too large (max size allowed: {})",
k,
max_header_size),
stream_id);
}
if (valuelen > max_header_size)
{
throw http::RequestHeaderTooLargeException(
fmt::format(
"Header value for '{}' is too large (max size allowed: {})",
v,
max_header_size),
stream_id);
}
auto* stream_data = get_stream_data(session, stream_id);
const auto max_headers_count =
configuration.max_headers_count.value_or(http::default_max_headers_count);
if (stream_data->incoming.headers.size() >= max_headers_count)
{
throw http::RequestHeaderTooLargeException(
fmt::format(
"Too many headers (max number allowed: {})", max_headers_count),
stream_id);
}
stream_data->incoming.headers.emplace(k, v);
return 0;
}
static int on_data_callback(
nghttp2_session* session,
uint8_t flags,
StreamId stream_id,
const uint8_t* data,
size_t len,
void* user_data)
{
LOG_TRACE_FMT("http2::on_data_callback: {}, {} bytes", stream_id, len);
auto* stream_data = get_stream_data(session, stream_id);
auto* p = get_parser(user_data);
const auto& configuration = p->get_configuration();
stream_data->incoming.body.insert(
stream_data->incoming.body.end(), data, data + len);
auto const& max_body_size =
configuration.max_body_size.value_or(http::default_max_body_size);
if (stream_data->incoming.body.size() > max_body_size)
{
throw http::RequestPayloadTooLargeException(
fmt::format(
"HTTP request body is too large (max size allowed: {})",
max_body_size),
stream_id);
}
return 0;
}
static int on_stream_close_callback(
nghttp2_session* session,
StreamId stream_id,
uint32_t error_code,
void* user_data)
{
LOG_TRACE_FMT(
"http2::on_stream_close_callback: {}, {}", stream_id, error_code);
auto* p = get_parser(user_data);
p->destroy_stream(stream_id);
return 0;
}
static ssize_t on_data_source_read_length_callback(
nghttp2_session* session,
uint8_t frame_type,
int32_t stream_id,
int32_t session_remote_window_size,
int32_t stream_remote_window_size,
uint32_t remote_max_frame_size,
void* user_data)
{
auto* p = get_parser(user_data);
const auto& configuration = p->get_configuration();
const auto& max_frame_size =
configuration.max_frame_size.value_or(http::default_max_frame_size);
LOG_TRACE_FMT(
"http2::on_data_source_read_length_callback: {}, {}, allowed [1, "
"min({},{},{})]",
stream_id,
max_frame_size,
session_remote_window_size,
stream_remote_window_size,
remote_max_frame_size);
return max_frame_size;
}
static int on_error_callback(
nghttp2_session* session,
int lib_error_code,
const char* msg,
size_t len,
void* user_data)
{
LOG_DEBUG_FMT("HTTP/2 error: {}", std::string(msg, msg + len));
return 0;
}
}
|
717d60631a6e8bfc3eb6d708e6ce3a73b4dd7540
|
d7784cb9ce174ec5091d327b21ebcf4c6c507388
|
/atcoder/abc/045/a.cpp
|
abc00b7f1b527a808601e837c63ad59b967f28d9
|
[] |
no_license
|
mmxsrup/procon
|
3a349b10c852ad593ecedcdd1c9fdb93cb8d8f3b
|
af059cc3f6786db71f0077d1ec5d902171b9860a
|
refs/heads/master
| 2021-01-17T15:05:05.580007
| 2017-12-06T07:52:53
| 2017-12-06T07:52:53
| 84,103,106
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 157
|
cpp
|
a.cpp
|
#include <iostream>
#include <cstdio>
using namespace std;
int main(void){
int a, b, h;
cin >> a >> b >> h;
printf("%d\n", (a + b) * h / 2);
return 0;
}
|
9a0667cebc89de083519e31484d4ef8802de2144
|
826c2762805e39ac1c080091e7f4f642fb41e19a
|
/ouniverse_2019_UE4_source/retired code/UiDraft2(UMG)/UiBase.h
|
56c5af4c94bfbc7ce09707d5bcabcfa8ded6a403
|
[] |
no_license
|
legendofceo/ouniverse_ue_cpp_source_deprecated_pre2022
|
fe625f69210c9c038202b8305495bdf373657ea8
|
729f12569f805ce74e602f8b13bab0ac318358a5
|
refs/heads/main
| 2023-08-12T19:14:39.216646
| 2021-10-17T16:19:29
| 2021-10-17T16:19:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,321
|
h
|
UiBase.h
|
//Copyright 2015-2019, All Rights Reserved.
#pragma once
#include "Blueprint/UserWidget.h"
#include "UiBase.generated.h"
UCLASS(Blueprintable)
class OUNIVERSE_API UUiBase : public UUserWidget
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "BaseOpen"))
void BaseOpen();
UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "BaseClose"))
void BaseClose();
virtual FReply EventMouseButtonDown(int ElementID, const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) { return FReply::Handled(); };
virtual FReply EventMouseButtonUp(int ElementID, const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) { return FReply::Handled(); };
virtual FReply EventMouseClick(int ElementID, const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) { return FReply::Handled(); };
virtual FReply EventMouseMove(int ElementID, const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) { return FReply::Handled(); };
virtual void EventMouseEnter(int ElementID, const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) { };
virtual void EventMouseLeave(int ElementID, const FPointerEvent& MouseEvent) { };
virtual void UiPathRequest(int ID, int Type, int Var) {};
virtual void EventUi(int WidgetID, int InEventID, UUserWidget* InWidget) {};
};
|
f380582d0362fe944d8b40641a0578f2d5503749
|
229f25ccda6d721f31c6d4de27a7bb85dcc0f929
|
/solutions/uri/graph/1469 Boss/solution.cpp
|
c69cf63b27af444789072b50048a581d73696fd5
|
[] |
no_license
|
camil0palacios/Competitive-programming
|
e743378a8791a66c90ffaae29b4fd4cfb58fff59
|
4211fa61e516cb986b3404d87409ad1a49f78132
|
refs/heads/master
| 2022-11-01T20:35:21.541132
| 2022-10-27T03:13:42
| 2022-10-27T03:13:42
| 155,419,333
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,452
|
cpp
|
solution.cpp
|
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
const int INF = 1e9;
const int MXN = 505;
int n, m, q;
int ages[MXN];
int emp_node[MXN], node_emp[MXN];
bool vis[MXN];
vector<int> g[MXN];
int dfs(int u) {
vis[u] = 1;
int ans = ages[node_emp[u]];
for(auto & v: g[u]) {
if(!vis[v]) ans = min(ans, dfs(v));
}
return ans;
}
int main() {
ios_base::sync_with_stdio(false); cin.tie(NULL);
while(cin >> n >> m >> q) {
for(int i = 0; i < n; i++) {
cin >> ages[i];
g[i].clear();
emp_node[i] = node_emp[i] = i;
}
for(int i = 0; i < m; i++) {
int u, v; cin >> u >> v;
u--, v--;
g[v].emplace_back(u);
}
for(int qq = 0; qq < q; qq++) {
char t; int u;
cin >> t >> u;
u--;
if(t == 'P') {
int mn = INF;
for(int i = 0; i < n; i++) vis[i] = 0;
for(auto & v : g[emp_node[u]]) {
mn = min(mn, dfs(v));
}
if(mn < INF) cout << mn << endl;
else cout << "*" << endl;
} else {
int v; cin >> v;
v--;
int nu = emp_node[u], nv = emp_node[v];
swap(emp_node[u], emp_node[v]);
swap(node_emp[nu], node_emp[nv]);
}
}
}
return 0;
}
|
9a5c410f3941bcccc440b1a7d93d3b441e2a5858
|
a94b34cd84828067d2e7aa66c298944b6e8f44b6
|
/tanks/tanks/movement.cpp
|
aa32f7bed7867bcb32c79e80c41859d68784c9cc
|
[] |
no_license
|
RMan135/Tanks
|
8d32290fef150989a6778497f98121c73c3ffa7e
|
255b7b2f88072f7bf140df44474028a7e3d01eb0
|
refs/heads/master
| 2021-06-10T09:41:04.594512
| 2017-02-09T09:11:33
| 2017-02-09T09:11:33
| 75,870,478
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,982
|
cpp
|
movement.cpp
|
#include "movement.h"
#include <cmath>
double distance(double x1, double y1, double x2, double y2)
{
return sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
}
bool canMoveStraightAtoB(double x1, double y1, double x2, double y2, double x3, double y3,
short stepsSoFar, short nrSteps)
{
if (stepsSoFar > nrSteps) return 1;
return ((canReach[(short)x1][(short)y1] >= 2) &&
(canReach[(short)x2][(short)y2] >= 2) &&
canMoveStraightAtoB(x1, y1, (x1+x2)/2, (y1+y2)/2, x2, y2, stepsSoFar+1, nrSteps) &&
canMoveStraightAtoB(x2, y2, (x2+x3)/2, (y2+y3)/2, x3, y3, stepsSoFar+1, nrSteps) );
}
bool canFireFromAtoB(double x1, double y1, double x2, double y2, double x3, double y3,
short stepsSoFar, short nrSteps)
{
if (stepsSoFar > nrSteps) return 1;
return ((!collisionMap.tiles[(short)x1][(short)y1]) &&
(!collisionMap.tiles[(short)x2][(short)y2]) &&
canFireFromAtoB(x1, y1, (x1+x2)/2, (y1+y2)/2, x2, y2, stepsSoFar+1, nrSteps) &&
canFireFromAtoB(x2, y2, (x2+x3)/2, (y2+y3)/2, x3, y3, stepsSoFar+1, nrSteps) );
}
bool canMove(double x1, double y1, double x2, double y2)
{
short dist, nrSteps = 1, nrIncrements = 1;
dist = distance(x1, x2, y1, y2);
while (nrIncrements <= dist)
{
nrSteps++;
nrIncrements *= 2;
}
return canMoveStraightAtoB(x1, y1, (x1+x2)/2, (y1+y2)/2, x2, y2, 1, nrSteps);
}
bool canFire(double x1, double y1, double x2, double y2)
{
short dist, nrSteps = 1, nrIncrements = 1;
dist = distance(x1, x2, y1, y2);
while (nrIncrements <= dist * 16)
{
nrSteps++;
nrIncrements *= 2;
}
return canFireFromAtoB(x1, y1, (x1+x2)/2, (y1+y2)/2, x2, y2, 1, nrSteps);
}
void getClosestReachableTile (short &x, short &y)
{
if (canReach[x][y] >= 2) return;
short coordNextX[] = {0, 1, 0, -1, -1, -1, 1, 1},
coordNextY[] = {1, 0, -1, 0, 1, -1, 1, -1};
for (short k = 0; k < 8; ++k)
if (canReach[x + coordNextX[k]][y + coordNextY[k]] >= 2)
{
x = x + coordNextX[k];
y = y + coordNextY[k];
break;
}
}
short route(short x1, short y1, short x2, short y2, short movX[200], short movY[200], short &routeLength)
{
bool reachedEnd = 0;
short qEnd = 0, qPos = 0, k, i, j, length,
coordNextX[] = {0, 1, 0, -1},
coordNextY[] = {1, 0, -1, 0},
steps[MAX_TILES_WIDTH][MAX_TILES_HEIGHT];
short qi[1000], qj[1000];
getClosestReachableTile(x2, y2);
for (i = 0; i < collisionMap.width + 2; ++i)
for (j = 0; j < collisionMap.height + 2; ++j)
steps[i][j] = -1;
qi[qPos] = x1;
qj[qPos] = y1;
steps[x1][y1] = 0;
while (qPos <= qEnd)
{
for (k = 0; k < 4; ++k)
{
i = qi[qPos] + coordNextX[k];
j = qj[qPos] + coordNextY[k];
if (canReach[i][j] >= 2 && steps[i][j]==-1)
{
qEnd++;
qi[qEnd] = i;
qj[qEnd] = j;
steps[i][j] = steps[qi[qPos]][qj[qPos]] + 1;
if (i == x2 && j == y2)
{
reachedEnd = 1;
break;
}
}
}
if (reachedEnd) break;
qPos++;
}
length = steps[i][j];
for (short l = length; l > 1; --l)
{
for (k = 0; k < 4; ++k)
if (steps[i+coordNextX[k]][j+coordNextY[k]] == steps[i][j] - 1)
{
i = i+coordNextX[k];
j = j+coordNextY[k];
movX[l] = i;
movY[l] = j;
break;
}
}
movX[1] = x1;
movY[1] = y1;
routeLength = length;
return 0;
}
|
ebfd5c049b7ff82098e6de7fc051ea44118ae423
|
9d9bf840c132949bda9b5c1402ba45509b0c82b1
|
/include/MarsTrickery.h
|
56d39af8ed537ab5972088316a0121ef76eced74
|
[] |
no_license
|
oderayi/cpp
|
5fcbffd70ea8fde3590403065d450ea7d6021c00
|
57395bdf194f185eaefbcffa321facc8572cdd6d
|
refs/heads/master
| 2020-03-25T22:01:21.929938
| 2018-08-25T07:08:40
| 2018-08-25T07:08:40
| 144,201,512
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 266
|
h
|
MarsTrickery.h
|
#ifndef MARSTRICKERY_H
#define MARSTRICKERY_H
class MarsTrickery
{
public:
void setItems(int _items[]);
void add(int left, int right, int inc);
void print();
protected:
private:
int items[];
};
#endif // MARSTRICKERY_H
|
839668b0bbb01ffdd36ddb666b4076a7d890cf8c
|
b5f75cea3c0ce1b0016178b5e0a1408628665801
|
/src/graphics/Color.cpp
|
0ee1b75ffeada329ee6e7ddbbaf7f1ca175caaf7
|
[] |
no_license
|
nonvirtualthunk/axc
|
9c688fc314ab0be48d4ee9ea39e2c305cb2bbe4d
|
99c0bb58484035e3434a8dd5e603c09b39bdec5e
|
refs/heads/master
| 2020-04-10T21:57:16.783110
| 2016-10-03T14:52:28
| 2016-10-03T14:52:42
| 65,208,455
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 204
|
cpp
|
Color.cpp
|
//
// Created by nvt on 8/21/16.
//
#include "Color.h"
Color Color::operator*(const glm::vec4& v) {
return Color((uint8_t) (r * v.r), (uint8_t) (g * v.g), (uint8_t) (b * v.b), (uint8_t) (a * v.a));
}
|
2d7e37ae7d9472c49e30b5b7fd573d35176674b8
|
7bf1ab093afb6c0e580383ae4733ba03a34bdb96
|
/Fila.h
|
446e0af60ec1050fe7ff224d9b9bdaf03d71d90b
|
[] |
no_license
|
gabrieldep/FilaUploadAlmas
|
986ae3e9561830db27c518693fe20624af8df1c3
|
2acd36f9b6f23c2387296a49d99e82bd5b017cb6
|
refs/heads/main
| 2023-07-02T21:19:35.411192
| 2021-07-26T02:26:56
| 2021-07-26T02:26:56
| 382,723,765
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 272
|
h
|
Fila.h
|
#pragma once
#include "TipoCelula.h"
class Fila
{
private:
int tamanho;
TipoCelula* frente;
TipoCelula* tras;
public:
Fila();
~Fila();
int GetTamanho();
bool Vazia();
void Enfileira(TipoCelula tipoCelula);
TipoCelula Desenfilera();
void Limpa();
};
|
43504e4667df305cd80995f87bd82341bed9409c
|
13d1081bc5d46f979580438a772f47b7dc15550c
|
/Projects/Engine/MGEngine/Src/DEHScroll.cpp
|
d98e885a06232accc6fdce9d857f07ded9505229
|
[] |
no_license
|
hackerlank/code-2
|
090035cc470d77a13a589419da7b04d0b97419e8
|
c8e72ad7ce7440001293a10619cd01efe5cfd22f
|
refs/heads/master
| 2021-01-13T15:50:39.784391
| 2014-06-16T14:00:06
| 2014-06-16T14:00:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,869
|
cpp
|
DEHScroll.cpp
|
//*************************************************************************************************************
#include "stdafx.h"
#include "DEHScroll.h"
//*************************************************************************************************************
namespace MG
{
std::map<MyGUI::HScroll*, PVOIDINT_CALLBACK> DEHScroll::mMapScrollChangePosition;
//------------------------------------------------------------------------------------------------
DEHScroll::DEHScroll()
:mEGHScroll(NULL)
{
}
//------------------------------------------------------------------------------------------------
MG::Bool DEHScroll::setEGHScroll( MyGUI::Widget* p )
{
DYNAMIC_ASSERT(p);
mEGHScroll = p->castType<MyGUI::HScroll>();
DYNAMIC_ASSERT(mEGHScroll);
setEGWidget(p);
return true;
}
//------------------------------------------------------------------------------------------------
IWidget* DEHScroll::getWidget()
{
DYNAMIC_ASSERT(mEGHScroll);
setEGWidget(mEGHScroll);
return this;
}
//------------------------------------------------------------------------------------------------
void DEHScroll::setScrollRange( size_t _value )
{
DYNAMIC_ASSERT(mEGHScroll);
mEGHScroll->setScrollPage(_value);
}
//------------------------------------------------------------------------------------------------
size_t DEHScroll::getScrollRange()
{
DYNAMIC_ASSERT(mEGHScroll);
return mEGHScroll->getScrollRange();
}
//------------------------------------------------------------------------------------------------
void DEHScroll::setScrollPosition( size_t _value )
{
DYNAMIC_ASSERT(mEGHScroll);
mEGHScroll->setScrollPosition(_value);
}
//------------------------------------------------------------------------------------------------
size_t DEHScroll::getScrollPosition()
{
DYNAMIC_ASSERT(mEGHScroll);
return mEGHScroll->getScrollPosition();
}
//------------------------------------------------------------------------------------------------
void DEHScroll::setScrollPage( size_t _value )
{
DYNAMIC_ASSERT(mEGHScroll);
mEGHScroll->setScrollPage(_value);
}
//------------------------------------------------------------------------------------------------
size_t DEHScroll::getScrollPage()
{
DYNAMIC_ASSERT(mEGHScroll);
return mEGHScroll->getScrollPage();
}
//------------------------------------------------------------------------------------------------
void DEHScroll::setScrollViewPage( size_t _value )
{
DYNAMIC_ASSERT(mEGHScroll);
mEGHScroll->setScrollViewPage(_value);
}
//------------------------------------------------------------------------------------------------
size_t DEHScroll::getScrollViewPage()
{
DYNAMIC_ASSERT(mEGHScroll);
return mEGHScroll->getScrollViewPage();
}
//------------------------------------------------------------------------------------------------
void DEHScroll::setMoveToClick( bool _value )
{
DYNAMIC_ASSERT(mEGHScroll);
mEGHScroll->setMoveToClick(_value);
}
//------------------------------------------------------------------------------------------------
bool DEHScroll::getMoveToClick()
{
DYNAMIC_ASSERT(mEGHScroll);
return mEGHScroll->getMoveToClick();
}
//------------------------------------------------------------------------------------------------
void DEHScroll::setPosition( const VecI2& _value )
{
DYNAMIC_ASSERT(mEGHScroll);
MyGUI::IntPoint tempPos;
tempPos.left = _value.x;
tempPos.top = _value.y;
mEGHScroll->setPosition(tempPos);
}
//------------------------------------------------------------------------------------------------
void DEHScroll::setSize( const VecI2& _value )
{
DYNAMIC_ASSERT(mEGHScroll);
MyGUI::IntSize tempSize;
tempSize.width = _value.x;
tempSize.height = _value.y;
mEGHScroll->setSize(tempSize);
}
//------------------------------------------------------------------------------------------------
void DEHScroll::setCoord( const CoordI& _value )
{
DYNAMIC_ASSERT(mEGHScroll);
MyGUI::IntCoord tempCoord;
tempCoord.left = _value.left;
tempCoord.top = _value.top;
tempCoord.width = _value.width;
tempCoord.height = _value.height;
mEGHScroll->setCoord(tempCoord);
}
//------------------------------------------------------------------------------------------------
void DEHScroll::setScrollChangePositionEvent( PVOIDINT_CALLBACK func )
{
mMapScrollChangePosition[mEGHScroll] = func;
mEGHScroll->eventScrollChangePosition = MyGUI::newDelegate(this, &DEHScroll::notifyScrollChangePositionEvent);
}
//------------------------------------------------------------------------------------------------
void DEHScroll::notifyScrollChangePositionEvent( MyGUI::VScroll* scorll, size_t pos )
{
DYNAMIC_ASSERT(scorll);
mEGHScroll = scorll->castType<MyGUI::HScroll>();
mMapScrollChangePosition[mEGHScroll](this, pos);
}
}
|
136095e9f74817b9946143e9ef8d6c6e39603b60
|
7b797061b0caa328b416fae14805d1296300b9d5
|
/Source/Autotest/matrixtestsuite.h
|
cf8730e6602fedd5be817b77b1d724fc0e074cfb
|
[] |
no_license
|
kevinchannon/gslpp
|
038087253bb39cef5cdccea8072393420a30e80b
|
5fdc3513a44dbcdf1a24f14685578693cb5f5f11
|
refs/heads/master
| 2020-12-24T13:17:22.854378
| 2012-03-04T10:39:51
| 2012-03-04T10:39:51
| 2,242,915
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,131
|
h
|
matrixtestsuite.h
|
#pragma once
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include "globals.h"
class MatrixTestSuite : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE ( MatrixTestSuite );
CPPUNIT_TEST ( Construction );
CPPUNIT_TEST ( MatricesAreEqual );
CPPUNIT_TEST ( ElementAccess );
CPPUNIT_TEST ( ElementwiseArithmetic );
CPPUNIT_TEST ( RowsColsAndDiagonals );
CPPUNIT_TEST ( MatrixMatrixMultiplication );
CPPUNIT_TEST ( MatrixVectorMultiplication );
CPPUNIT_TEST ( Transpose );
CPPUNIT_TEST ( SwapRowsAndCols );
CPPUNIT_TEST ( SetRowsAndCols );
CPPUNIT_TEST ( MinMax );
CPPUNIT_TEST ( RealBooleanComparisons );
// CPPUNIT_TEST ( Swap );
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
void tearDown();
protected:
void Construction();
void MatricesAreEqual();
void ElementAccess();
void ElementwiseArithmetic();
void RowsColsAndDiagonals();
void MatrixMatrixMultiplication();
void MatrixVectorMultiplication();
void Transpose();
void SwapRowsAndCols();
void SetRowsAndCols();
void MinMax();
void RealBooleanComparisons();
// void Swap();
};
|
8e160cfd3dadbdd567fa79503e9a12425f1a2746
|
2153a7ecfa69772797e379ff5642d52072a69b7c
|
/ext/Objects/setobject-test.cpp
|
3bddbfcb9da0e2c89967ce75aba7b6d036148e6e
|
[
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"Python-2.0"
] |
permissive
|
KCreate/skybison
|
a3789c84541f39dc6f72d4d3eb9783b9ed362934
|
d1740e08d8de85a0a56b650675717da67de171a0
|
refs/heads/trunk
| 2023-07-26T04:50:55.898224
| 2021-08-31T08:20:46
| 2021-09-02T19:25:08
| 402,908,053
| 1
| 0
|
NOASSERTION
| 2021-09-03T22:05:57
| 2021-09-03T22:05:57
| null |
UTF-8
|
C++
| false
| false
| 12,737
|
cpp
|
setobject-test.cpp
|
// Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
#include "Python.h"
#include "gtest/gtest.h"
#include "capi-fixture.h"
#include "capi-testing.h"
namespace py {
namespace testing {
using SetExtensionApiTest = ExtensionApi;
TEST_F(SetExtensionApiTest, AddWithNonSetReturnsNegative) {
PyObjectPtr dict(PyDict_New());
PyObjectPtr key(PyLong_FromLong(1));
EXPECT_EQ(PySet_Add(dict, key), -1);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_SystemError));
}
TEST_F(SetExtensionApiTest, AnySetCheckWithNonSetReturnsFalse) {
PyObjectPtr set(PyDict_New());
EXPECT_FALSE(PyAnySet_Check(set));
}
TEST_F(SetExtensionApiTest, AnySetCheckWithAnySetSubclassReturnsTrue) {
PyRun_SimpleString(R"(
class FrozenSub(frozenset):
pass
class SetSub(set):
pass
frozen_instance = FrozenSub()
set_instance = SetSub()
)");
PyObjectPtr frozen(mainModuleGet("frozen_instance"));
PyObjectPtr set(mainModuleGet("set_instance"));
EXPECT_TRUE(PyAnySet_Check(frozen));
EXPECT_TRUE(PyAnySet_Check(set));
}
TEST_F(SetExtensionApiTest, AnySetCheckWithAnySetReturnsTrue) {
PyObjectPtr frozenset(PyFrozenSet_New(nullptr));
PyObjectPtr set(PySet_New(nullptr));
EXPECT_TRUE(PyAnySet_Check(frozenset));
EXPECT_TRUE(PyAnySet_Check(set));
}
TEST_F(SetExtensionApiTest, AnySetCheckExactWithNonSetReturnsFalse) {
PyObjectPtr set(PyDict_New());
EXPECT_FALSE(PyAnySet_CheckExact(set));
}
TEST_F(SetExtensionApiTest, AnySetCheckExactWithAnySetSubclassReturnsFalse) {
PyRun_SimpleString(R"(
class FrozenSub(frozenset):
pass
class SetSub(set):
pass
frozen_instance = FrozenSub()
set_instance = SetSub()
)");
PyObjectPtr frozen(mainModuleGet("frozen_instance"));
PyObjectPtr set(mainModuleGet("set_instance"));
EXPECT_FALSE(PyAnySet_CheckExact(frozen));
EXPECT_FALSE(PyAnySet_CheckExact(set));
}
TEST_F(SetExtensionApiTest, AnySetCheckExactWithAnySetReturnsTrue) {
PyObjectPtr frozenset(PyFrozenSet_New(nullptr));
PyObjectPtr set(PySet_New(nullptr));
EXPECT_TRUE(PyAnySet_CheckExact(frozenset));
EXPECT_TRUE(PyAnySet_CheckExact(set));
}
TEST_F(SetExtensionApiTest, FrozenSetCheckWithSetReturnsFalse) {
PyObjectPtr set(PySet_New(nullptr));
EXPECT_FALSE(PyFrozenSet_Check(set));
}
TEST_F(SetExtensionApiTest, FrozenSetCheckWithFrozenSetSubclassReturnsTrue) {
PyRun_SimpleString(R"(
class C(frozenset):
pass
c = C()
)");
PyObjectPtr c(mainModuleGet("c"));
EXPECT_TRUE(PyFrozenSet_Check(c));
}
TEST_F(SetExtensionApiTest, FrozenSetCheckWithFrozenSetReturnsTrue) {
PyObjectPtr set(PyFrozenSet_New(nullptr));
EXPECT_TRUE(PyFrozenSet_Check(set));
}
TEST_F(SetExtensionApiTest, FrozenSetCheckExactWithSetReturnsFalse) {
PyObjectPtr set(PySet_New(nullptr));
EXPECT_FALSE(PyFrozenSet_CheckExact(set));
}
TEST_F(SetExtensionApiTest,
FrozenSetCheckExactWithFrozenSetSubclassReturnsFalse) {
PyRun_SimpleString(R"(
class C(frozenset):
pass
c = C()
)");
PyObjectPtr c(mainModuleGet("c"));
EXPECT_FALSE(PyFrozenSet_CheckExact(c));
}
TEST_F(SetExtensionApiTest, FrozenSetCheckExactWithFrozenSetReturnsTrue) {
PyObjectPtr set(PyFrozenSet_New(nullptr));
EXPECT_TRUE(PyFrozenSet_CheckExact(set));
}
TEST_F(SetExtensionApiTest, SetCheckWithFrozenSetReturnsFalse) {
PyObjectPtr set(PyFrozenSet_New(nullptr));
EXPECT_FALSE(PySet_Check(set));
}
TEST_F(SetExtensionApiTest, SetCheckWithSetSubclassReturnsTrue) {
PyRun_SimpleString(R"(
class C(set):
pass
c = C()
)");
PyObjectPtr c(mainModuleGet("c"));
EXPECT_TRUE(PySet_Check(c));
}
TEST_F(SetExtensionApiTest, SetCheckWithSetReturnsTrue) {
PyObjectPtr set(PySet_New(nullptr));
EXPECT_TRUE(PySet_Check(set));
}
TEST_F(SetExtensionApiTest, ContainsReturnsPositiveAfterAdd) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr key(PyLong_FromLong(1));
ASSERT_EQ(PySet_Contains(set, key), 0);
ASSERT_EQ(PySet_Add(set, key), 0);
EXPECT_EQ(PySet_Contains(set, key), 1);
}
TEST_F(SetExtensionApiTest, ContainsWithEmptySetReturnsFalse) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr key(PyLong_FromLong(1));
EXPECT_EQ(PySet_Contains(set, key), 0);
}
TEST_F(SetExtensionApiTest, ContainsWithNonSetReturnsNegative) {
PyObjectPtr dict(PyDict_New());
PyObjectPtr key(PyLong_FromLong(1));
EXPECT_EQ(PySet_Contains(dict, key), -1);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_SystemError));
}
TEST_F(SetExtensionApiTest, NewWithDictCopiesKeys) {
PyObjectPtr dict(PyDict_New());
PyObjectPtr key1(PyLong_FromLong(1));
PyObjectPtr key2(PyLong_FromLong(2));
PyObjectPtr key3(PyLong_FromLong(3));
PyObjectPtr value(PyLong_FromLong(4));
PyDict_SetItem(dict, key1, value);
PyDict_SetItem(dict, key2, value);
PyDict_SetItem(dict, key3, value);
PyObjectPtr set(PySet_New(dict));
EXPECT_EQ(PySet_Contains(set, key1), 1);
EXPECT_EQ(PySet_Contains(set, key2), 1);
EXPECT_EQ(PySet_Contains(set, key3), 1);
}
TEST_F(SetExtensionApiTest, NewFromSet) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr one(PyLong_FromLong(1));
PyObjectPtr two(PyLong_FromLong(2));
ASSERT_EQ(PySet_Add(set, one), 0);
ASSERT_EQ(PySet_Add(set, two), 0);
PyObjectPtr set_copy(PySet_New(set));
EXPECT_EQ(PySet_Contains(set_copy, one), 1);
EXPECT_EQ(PySet_Contains(set_copy, two), 1);
EXPECT_EQ(PySet_Size(set_copy), 2);
}
TEST_F(SetExtensionApiTest, NewWithList) {
PyObjectPtr one(PyLong_FromLong(1));
PyObjectPtr two(PyLong_FromLong(2));
PyObjectPtr list(PyList_New(0));
PyList_Append(list, one);
PyList_Append(list, two);
PyList_Append(list, one);
PyObjectPtr set(PySet_New(list));
EXPECT_EQ(PySet_Contains(set, one), 1);
EXPECT_EQ(PySet_Contains(set, two), 1);
EXPECT_EQ(PySet_Size(set), 2);
}
TEST_F(SetExtensionApiTest, NewWithNonIterableReturnsNull) {
PyObjectPtr num(PyLong_FromLong(1));
EXPECT_EQ(PySet_New(num), nullptr);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_TypeError));
}
TEST_F(SetExtensionApiTest, NewWithNullReturnsEmpty) {
PyObjectPtr set(PySet_New(nullptr));
ASSERT_NE(set, nullptr);
EXPECT_EQ(PySet_Size(set), 0);
}
TEST_F(SetExtensionApiTest, NextEntryWithNonSetRaisesSystemError) {
PyObject* key = nullptr;
Py_hash_t hash = 0;
Py_ssize_t pos = 0;
PyObjectPtr nonset(PyDict_New());
EXPECT_EQ(_PySet_NextEntry(nonset, &pos, &key, &hash), -1);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_SystemError));
}
TEST_F(SetExtensionApiTest, NextEntryWithEmptySetReturnsFalse) {
PyObject* key = nullptr;
Py_hash_t hash = 0;
Py_ssize_t pos = 0;
PyObjectPtr set(PySet_New(nullptr));
EXPECT_EQ(_PySet_NextEntry(set, &pos, &key, &hash), 0);
ASSERT_EQ(PyErr_Occurred(), nullptr);
}
TEST_F(SetExtensionApiTest, NextEntryWithNonEmptySetReturnsKeysAndHashes) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr one(PyLong_FromLong(1));
ASSERT_EQ(PySet_Add(set, one), 0);
PyObjectPtr two(PyLong_FromLong(2));
ASSERT_EQ(PySet_Add(set, two), 0);
Py_ssize_t pos = 0;
PyObject* key = nullptr;
Py_hash_t hash = -1;
ASSERT_EQ(_PySet_NextEntry(set, &pos, &key, &hash), 1);
ASSERT_EQ(PyErr_Occurred(), nullptr);
EXPECT_EQ(key, one);
EXPECT_EQ(hash, PyObject_Hash(one));
ASSERT_EQ(_PySet_NextEntry(set, &pos, &key, &hash), 1);
ASSERT_EQ(PyErr_Occurred(), nullptr);
EXPECT_EQ(key, two);
EXPECT_EQ(hash, PyObject_Hash(two));
ASSERT_EQ(_PySet_NextEntry(set, &pos, &key, &hash), 0);
ASSERT_EQ(PyErr_Occurred(), nullptr);
}
TEST_F(SetExtensionApiTest, SizeIncreasesAfterAdd) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr one(PyLong_FromLong(1));
PyObjectPtr two(PyLong_FromLong(2));
EXPECT_EQ(PySet_Size(set), 0);
ASSERT_EQ(PySet_Add(set, one), 0);
EXPECT_EQ(PySet_Size(set), 1);
ASSERT_EQ(PySet_Add(set, one), 0);
EXPECT_EQ(PySet_Size(set), 1);
ASSERT_EQ(PySet_Add(set, two), 0);
EXPECT_EQ(PySet_Size(set), 2);
}
TEST_F(SetExtensionApiTest, SizeOfNonSetReturnsNegative) {
PyObjectPtr list(PyList_New(2));
EXPECT_EQ(PySet_Size(list), -1);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_SystemError));
}
TEST_F(SetExtensionApiTest, FrozenSetNewWithDictCopiesKeys) {
PyObjectPtr dict(PyDict_New());
PyObjectPtr value(PyLong_FromLong(4));
PyObjectPtr key1(PyLong_FromLong(1));
PyDict_SetItem(dict, key1, value);
PyObjectPtr key2(PyLong_FromLong(2));
PyDict_SetItem(dict, key2, value);
PyObjectPtr key3(PyLong_FromLong(3));
PyDict_SetItem(dict, key3, value);
PyObjectPtr set(PyFrozenSet_New(dict));
ASSERT_EQ(PyErr_Occurred(), nullptr);
EXPECT_EQ(PySet_Contains(set, key1), 1);
EXPECT_EQ(PySet_Contains(set, key2), 1);
EXPECT_EQ(PySet_Contains(set, key3), 1);
}
TEST_F(SetExtensionApiTest, FrozenSetNewFromSetContainsElementsOfSet) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr one(PyLong_FromLong(1));
ASSERT_EQ(PySet_Add(set, one), 0);
PyObjectPtr two(PyLong_FromLong(2));
ASSERT_EQ(PySet_Add(set, two), 0);
PyObjectPtr set_copy(PyFrozenSet_New(set));
ASSERT_EQ(PyErr_Occurred(), nullptr);
EXPECT_EQ(PySet_Contains(set_copy, one), 1);
EXPECT_EQ(PySet_Contains(set_copy, two), 1);
EXPECT_EQ(PySet_Size(set_copy), 2);
}
TEST_F(SetExtensionApiTest, FrozenSetNewWithListContainsElementsOfList) {
PyObjectPtr list(PyList_New(0));
PyObjectPtr one(PyLong_FromLong(1));
PyList_Append(list, one);
PyObjectPtr two(PyLong_FromLong(2));
PyList_Append(list, two);
PyObjectPtr set(PyFrozenSet_New(list));
ASSERT_EQ(PyErr_Occurred(), nullptr);
EXPECT_EQ(PySet_Contains(set, one), 1);
EXPECT_EQ(PySet_Contains(set, two), 1);
EXPECT_EQ(PySet_Size(set), 2);
}
TEST_F(SetExtensionApiTest, FrozenSetNewWithNonIterableRaisesTypeError) {
PyObjectPtr num(PyLong_FromLong(1));
EXPECT_EQ(PyFrozenSet_New(num), nullptr);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_TypeError));
}
TEST_F(SetExtensionApiTest, FrozenSetNewWithNullReturnsEmpty) {
PyObjectPtr set(PyFrozenSet_New(nullptr));
ASSERT_NE(set, nullptr);
EXPECT_EQ(PySet_Size(set), 0);
}
TEST_F(SetExtensionApiTest, ContainsWithFrozenSetDoesNotRaiseSystemError) {
PyObjectPtr set(PyFrozenSet_New(nullptr));
EXPECT_EQ(PySet_Contains(set, Py_None), 0);
EXPECT_EQ(PyErr_Occurred(), nullptr);
}
TEST_F(SetExtensionApiTest, SizeWithFrozenSetDoesNotRaiseSystemError) {
PyObjectPtr set(PyFrozenSet_New(nullptr));
EXPECT_EQ(PySet_Size(set), 0);
EXPECT_EQ(PyErr_Occurred(), nullptr);
}
TEST_F(SetExtensionApiTest, ClearWithNonSetRaisesSystemError) {
ASSERT_EQ(PySet_Clear(Py_None), -1);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_SystemError));
}
TEST_F(SetExtensionApiTest, ClearRemovesAllItems) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr one(PyLong_FromLong(1));
PySet_Add(set, one);
PyObjectPtr two(PyLong_FromLong(2));
PySet_Add(set, two);
PyObjectPtr three(PyLong_FromLong(3));
PySet_Add(set, three);
ASSERT_EQ(PySet_Clear(set), 0);
ASSERT_EQ(PyErr_Occurred(), nullptr);
EXPECT_EQ(PySet_Size(set), 0);
}
TEST_F(SetExtensionApiTest, PopWithNonSetRaisesSystemError) {
ASSERT_EQ(PySet_Pop(Py_None), nullptr);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_SystemError));
}
TEST_F(SetExtensionApiTest, PopWithEmptySetRaisesKeyError) {
PyObjectPtr set(PySet_New(nullptr));
ASSERT_EQ(PySet_Pop(set), nullptr);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_KeyError));
}
TEST_F(SetExtensionApiTest, PopWithNonEmptySetRemovesItem) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr elt(PyLong_FromLong(5));
ASSERT_EQ(PySet_Add(set, elt), 0);
ASSERT_EQ(PySet_Size(set), 1);
PyObjectPtr result(PySet_Pop(set));
ASSERT_EQ(result, elt);
EXPECT_EQ(PySet_Size(set), 0);
}
TEST_F(SetExtensionApiTest, PopWithSetContainingErrorsRemovesItem) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr elt(PyExc_KeyError);
ASSERT_EQ(PySet_Add(set, elt), 0);
ASSERT_EQ(PySet_Size(set), 1);
ASSERT_EQ(PySet_Pop(set), elt);
EXPECT_EQ(PySet_Size(set), 0);
}
TEST_F(SetExtensionApiTest, DiscardWithNonSetRaisesSystemError) {
ASSERT_EQ(PySet_Discard(Py_None, Py_None), -1);
ASSERT_NE(PyErr_Occurred(), nullptr);
EXPECT_TRUE(PyErr_ExceptionMatches(PyExc_SystemError));
}
TEST_F(SetExtensionApiTest, DiscardWithSetRemovesItem) {
PyObjectPtr set(PySet_New(nullptr));
PyObjectPtr elt(PyLong_FromLong(5));
ASSERT_EQ(PySet_Add(set, elt), 0);
ASSERT_EQ(PySet_Size(set), 1);
ASSERT_EQ(PySet_Discard(set, elt), 1);
ASSERT_EQ(PyErr_Occurred(), nullptr);
EXPECT_EQ(PySet_Size(set), 0);
}
} // namespace testing
} // namespace py
|
251ddc55767d2b07142a4e54d780a91876960e41
|
293c8b540a413496b04a9e8391d1444bde4a7051
|
/estruturas.h
|
6c589d570e6d24b7a4d4a8c76959f5277dd3edd8
|
[] |
no_license
|
wpramio/cpd-trabalho_final
|
b1214ae39987fefb0c50437e55fe8184ea01ab6c
|
a0728196921270309d9bd7595761065429ae6d8f
|
refs/heads/master
| 2020-09-16T14:48:58.940037
| 2019-11-28T20:02:22
| 2019-11-28T20:02:22
| 223,804,804
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,961
|
h
|
estruturas.h
|
#ifndef _ESTRUTURAS_H
#define _ESTRUTURAS_H
#include <string>
#include <list>
#include "trietree.h"
#include "hashtable.h"
#include "Timer.h"
using namespace std;
#define KILO 1000
#define MEGA 1000000
class date
{
public:
int year;
int month;
int day;
int hour;
int minutes;
int seconds;
};
class rating
{
public:
int rating_id; //MAYBE
int user_id;
int movie_id;
double rating_value;
date timestamp;
};
class movie
{
public:
int id;
string title;
list<string> genres_list;
double global_rating;
double rating_sum;
int rating_count;
double get_global_rating()
{
return (rating_sum/(double)rating_count);
};
};
class tag
{
public:
int user_id;
string tag_content;
list<int> movie_id_list;
date timestamp; // precisa?
};
class user
{
public:
int id;
list<rating> ratings_list; // precisa?
list<tag> tags_list; // precisa?
};
class control_stats
{
public:
double exec_time;
trie_tree* movies_trie;
hashtable* movies_hash;
hashtable* users_hash;
void monitorate_trie(trie_tree& T)
{
movies_trie = &T;
};
void monitorate_movies_hash(hashtable& Ht)
{
movies_hash = &Ht;
};
void monitorate_users_hash(hashtable& Ht)
{
users_hash = &Ht;
};
void start_timer()
{
my_timer.start();
};
void print_time_stats()
{
exec_time = my_timer.get_lap();
cout << "Tempo de execucao: " << exec_time << " ms" << endl;
};
void print_total_time_stats()
{
exec_time = my_timer.get_total();
cout << "Tempo total de execucao: " << exec_time << " ms" << endl;
};
void print_size_stats_of(string struc_option="all")
{
if (struc_option == "all" || struc_option == "movies_trie")
cout << "Tamanho da arvore trie de filmes: " << movies_trie->get_memory_used(KILO) << " KB" << endl;
if (struc_option == "all" || struc_option == "movies_hash")
cout << "Tamanho da hashtable de filmes: " << movies_hash->get_memory_used(KILO) << " KB" << endl;
if (struc_option == "all" || struc_option == "users_hash")
cout << "Tamanho da hashtable de user: " << users_hash->get_memory_used(KILO) << " KB" << endl;
};
void print_all_stats()
{
print_time_stats();
print_size_stats_of("all");
};
void print_status_message(int message_code)
{
#define READING_RATINGS 1
#define READING_MOVIES 2
#define READING_TAGS 3
#define CREATING_TRIE 4
#define CREATING_HASH 5
switch (message_code)
{
case READING_RATINGS:
cout << "Lendo arquivo de ratings." << endl;
break;
case READING_MOVIES:
cout << "Lendo arquivo de filmes." << endl;
break;
case READING_TAGS:
cout << "Lendo arquivo de tags." << endl;
break;
case CREATING_TRIE:
cout << "Criando arvore trie." << endl;
break;
case CREATING_HASH:
cout << "Criando tabela hash." << endl;
break;
}
};
private:
Timer my_timer;
} ctrl_stats;
#endif
|
2e8b1a2109ab4390873554f45863c81a3114648e
|
419a522a345fe17fcc8d8feac6c2a2268fa62461
|
/GfxPrimitives/Line.cpp
|
5cf6ba5dc299aa0d9b30b1603139f87074c72f45
|
[] |
no_license
|
nehlsen/Mates-for-LEDs
|
0621010833c8afd99212ed7a3403dafec7fc07a8
|
61da9f69fe91dacb2f68a9d9b8974a986ac35a9b
|
refs/heads/master
| 2023-02-27T06:35:26.477555
| 2020-11-02T18:48:44
| 2021-02-01T20:35:02
| 263,846,675
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,445
|
cpp
|
Line.cpp
|
#include "Line.h"
#include "../LedMatrix/color_utils.h"
// line calc code adapted from AdafruitGfxLib
// TODO add proper attribution
Line::Line():
Line(0, 0, 0, 0, CRGB(0, 0, 0))
{}
Line::Line(int16_t x0, int16_t y0, int16_t x1, int16_t y1):
Line(x0, y0, x1, y1, CRGB(0, 0, 0))
{}
Line::Line(int16_t x0, int16_t y0, int16_t x1, int16_t y1, const CRGB &color):
m_x0(x0), m_y0(y0), m_x1(x1), m_y1(y1), m_color(color), m_gradient(CRGB(0, 0, 0))
{
update();
}
Line::Line(Point p0, Point p1):
Line(p0.x, p0.y, p1.x, p1.y, CRGB(0, 0, 0))
{}
int16_t Line::getX0() const
{
return m_x0;
}
int16_t Line::getY0() const
{
return m_y0;
}
Line& Line::setStart(int16_t x, int16_t y)
{
m_x0 = x;
m_y0 = y;
update();
return *this;
}
int16_t Line::getX1() const
{
return m_x1;
}
int16_t Line::getY1() const
{
return m_y1;
}
Line& Line::setEnd(int16_t x, int16_t y)
{
m_x1 = x;
m_y1 = y;
update();
return *this;
}
const CRGB &Line::getColor() const
{
return m_color;
}
Line& Line::setColor(const CRGB &color)
{
m_color = color;
m_useGradient = false;
update();
return *this;
}
const CRGBPalette16 & Line::getGradient() const
{
return m_gradient;
}
Line & Line::setGradient(const CRGBPalette16 &gradient)
{
m_gradient = gradient;
m_useGradient = true;
update();
return *this;
}
void Line::update()
{
int16_t x0 = m_x0;
int16_t y0 = m_y0;
int16_t x1= m_x1;
int16_t y1 = m_y1;
int16_t steep = abs(y1 - y0) > abs(x1 - x0);
if (steep) {
std::swap(x0, y0);
std::swap(x1, y1);
}
if (x0 > x1) {
std::swap(x0, x1);
std::swap(y0, y1);
}
int16_t dx, dy;
dx = x1 - x0;
dy = abs(y1 - y0);
int16_t err = dx / 2;
int16_t ystep;
if (y0 < y1) {
ystep = 1;
} else {
ystep = -1;
}
auto colorAtX = [this, x0, x1](int16_t x) {
if (!m_useGradient) {
return m_color;
}
return ColorFromPalette(m_gradient, map(x, x0, x1, 0, 255));
};
Pixels newPixels;
for (; x0 <= x1; x0++) {
if (steep) {
newPixels.push_back(Pixel(y0, x0, colorAtX(x0)));
} else {
newPixels.push_back(Pixel(x0, y0, colorAtX(x0)));
}
err -= dy;
if (err < 0) {
y0 += ystep;
err += dx;
}
}
m_pixels = newPixels;
}
|
65413314cb5e4343f8d5737c66a037ead7fc4657
|
95ce9468473a899ad81d9e07c91a637b4af01659
|
/Cardlib/deck.h
|
97d433bc29a0911850faf6c109d4933c3071a329
|
[] |
no_license
|
daxingyou/pdk_jb
|
b9322b836eaee24c1efcbfeb8cfb0eb3221b6c35
|
2837210ddc3f94c8f6798f12247dc805aa448cbe
|
refs/heads/master
| 2021-09-18T09:07:18.132693
| 2018-07-12T09:49:34
| 2018-07-12T09:49:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,809
|
h
|
deck.h
|
#ifndef _DECK_H_
#define _DECK_H_
#include <vector>
#include "card.h"
#include "hole_cards.h"
//#include "community_cards.h"
using namespace std;
class Deck
{
public:
static void initcards(std::vector<Card>& v);
void fill(int type = 0);
void empty();
int count() const;
int type;
bool push(Card card);
bool pop(Card &card);
bool remove_d(Card &card);
bool shuffle(int seed);
int random_num(int start, int end, int seed);
void get_hole_cards(HoleCards &holecards);
int get_random_card();
//void make_cards(HoleCards &holecards, int type);
void debug();
void makecards();
void make_card();
//void make_plane(HoleCards &holecards);
void make_boom(HoleCards &holecards);
void make_one_line(HoleCards &holecards);
//void make_two_line(HoleCards &holecards);
void make_three_line(HoleCards &holecards);
void make_three_two(HoleCards &holecards);
void make_double(HoleCards &holecards);
void make_one(HoleCards &holecards);
void create_duizi(HoleCards &holecards);
void create_zhadan(HoleCards &holecards);
void create_sandai(HoleCards &holecards);
void create_shunzi(HoleCards &holecards);
void create_liandui(HoleCards &holecards);
void create_feiji(HoleCards &holecards);
void create_one(HoleCards &holecards);
public:
vector<Card> cards;
vector<Card> goodcards;
private:
int _cardNo;
/*void make_plane(HoleCards &holecards);
void make_boom(HoleCards &holecards);
void make_one_line(HoleCards &holecards);
void make_two_line(HoleCards &holecards);
void make_three_line(HoleCards &holecards);
void make_three_two(HoleCards &holecards);
void make_double(HoleCards &holecards);
*/
void make_plane();
void make_boom();
void make_one_line();
void make_two_line();
void make_three_line();
void make_three_two();
void make_double();
};
#endif /* _DECK_H_ */
|
25d950670821e13f93606eb36f195f520d5d29ed
|
f75023d84d96482b5b3214128bea6da51f23c7fb
|
/cpp/data/grid.cpp
|
48b3c3342be5cf04491a497b758c5cf5fdc943ec
|
[
"Apache-2.0"
] |
permissive
|
Noxoomo/ml_lib
|
2c5b57c7b319fd7255b5c5879894243111c7baf7
|
69c6b9ea67540b014524b41ebf4da3431ead1954
|
refs/heads/master
| 2021-07-15T15:31:47.313523
| 2020-05-21T21:18:31
| 2020-05-21T21:18:31
| 150,850,473
| 1
| 1
|
Apache-2.0
| 2019-05-03T11:05:52
| 2018-09-29T09:50:48
|
C++
|
UTF-8
|
C++
| false
| false
| 1,223
|
cpp
|
grid.cpp
|
#include "grid.h"
#include <util/io.h>
void Grid::binarize(ConstVecRef<float> row, VecRef<uint8_t> dst) const {
for (uint64_t f = 0; f < features_.size(); ++f) {
dst[f] = computeBin(row[origFeatureIndex(f)], borders_[f]);
}
}
void Grid::binarize(const Vec& x, Buffer<uint8_t>& to) const {
assert(x.device().deviceType() == ComputeDeviceType::Cpu);
assert(to.device().deviceType() == ComputeDeviceType::Cpu);
const auto values = x.arrayRef();
const auto dst = to.arrayRef();
binarize(values, dst);
}
void Grid::serialize(std::ostream& out) const {
out.write("g{", 2);
int fCount = fCount_;
out.write((char*)&fCount, sizeof(fCount));
int nzFCount = nzFeaturesCount();
writeEnclosed(out, &nzFCount, sizeof(nzFCount), "s");
for (int fId = 0; fId < (int)nzFeaturesCount(); ++fId) {
int origFId = origFeatureIndex(fId);
out.write((char*)&origFId, sizeof(origFId));
ConstVecRef<float> fborders = borders(fId);
int size = fborders.size();
writeEnclosed(out, &size, sizeof(size), "s");
for (float border : fborders) {
out.write((char*)&border, sizeof(border));
}
}
out.write("}", 1);
}
|
6f7c7094bd566566e628c4fe787699d84531757e
|
a3bc904f9d730daf899400b9d9ed591bce351d5c
|
/include/Game/StateMachine/StateEnemyAttack.h
|
bfa7b8e2be39e32cca18eb82acd6ff5f615c921d
|
[] |
no_license
|
Kipetrovitchy/DabuitOverflow
|
068a1b7294d450a4235a69e22ce51c1b2c47afbc
|
aaf7f5aa5bfc36ac37d8840ed7bd8279e9b7c70e
|
refs/heads/master
| 2020-06-14T19:06:54.467954
| 2019-07-03T17:17:35
| 2019-07-03T17:17:35
| 195,097,401
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,168
|
h
|
StateEnemyAttack.h
|
#ifndef __STATE_ENEMY_ATTACK_H__
#define __STATE_ENEMY_ATTACK_H__
#include <vector>
#include "IController.h"
#include "GameObject.h"
#include "StateEnemy.h"
namespace Game::StateMachines
{
#pragma region Typedefs
typedef LowRenderer::GameObject GameObject;
typedef Resources::Scene Scene;
typedef Inputs::InputMgr InputMgr;
#pragma endregion
class StateEnemyAttack : public StateEnemy
{
public:
#pragma region Constructors
StateEnemyAttack();
StateEnemyAttack(const StateEnemyAttack& se);
StateEnemyAttack(Enemy* e);
StateEnemyAttack(Enemy* e, const std::vector<Transition*>& transitions);
virtual ~StateEnemyAttack() = default;
#pragma endregion
#pragma region Operators
StateEnemyAttack& operator=(const StateEnemyAttack& se) noexcept;
#pragma endregion
#pragma region Functions
State& update(Scene& scene, float deltaTime) noexcept override;
#pragma endregion
};
} // namespace Game::StateMachine
#endif //__STATE_ENEMY_ATTACK_H__
|
c7538c889610f8a7a7d505c7e7850b86180a5bc2
|
eaf6fe7d073112da33afe81ebbb6f68ed61aa977
|
/修饰者模式/Beverage_Eg/Beverage/Soy.h
|
3785f55c9b0dd78813c3113bae02f132161e8a09
|
[] |
no_license
|
DoWeb0504/DesignPatterns
|
3762c9dde9bac952eeaa9a91944227de4c0cd9c6
|
e345f94713d00bf345dd6173fb8195700a182222
|
refs/heads/master
| 2020-05-15T22:21:27.703885
| 2019-04-26T13:12:45
| 2019-04-26T13:12:45
| 182,523,982
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 287
|
h
|
Soy.h
|
#pragma once
#include "CondimentDecoration.h"
class Soy :
public CondimentDecoration
{
public:
Soy(Beverage* beverage);
~Soy();
Beverage* beverage;
string getDescription() {
return beverage->getDescription() + ", Soy";
}
double cost() {
return beverage->cost() + 0.15;
}
};
|
7679f9a7b45aaaa212536c6bee315568d143c328
|
9fe626e7f45240360ecef4efe4116be5a599e530
|
/src/miner/blockbuilder.h
|
b225fecba787b150ad1eb5827762f0f98d0923aa
|
[
"MIT"
] |
permissive
|
chain2/chain2
|
263d87ac6beb9b501a6a9428289068a8431ef537
|
62a44f5f56a4c2033e3b5b5e12b8bcdd684fa8ef
|
refs/heads/master
| 2023-08-07T13:52:56.225424
| 2023-07-28T02:36:39
| 2023-07-28T02:36:39
| 166,445,629
| 4
| 4
|
MIT
| 2019-12-17T18:20:08
| 2019-01-18T17:14:15
|
C++
|
UTF-8
|
C++
| false
| false
| 2,928
|
h
|
blockbuilder.h
|
#ifndef BITCOIN_MINER_BLOCKBUILDER
#define BITCOIN_MINER_BLOCKBUILDER
#include "consensus/tx_verify.h"
#include "versionbits.h" // ThresholdState
#include "miner.h" // UpdateTime
namespace miner {
class BuilderEntry {
public:
BuilderEntry(const CTransaction* t, uint32_t sigopcount, const CAmount& fee)
: tx(t), sigOpCount(sigopcount), nFee(fee) {
}
const uint256& GetHash() const {
assert(IsValid());
return tx->GetHash();
}
bool IsFinalTx(const int nHeight, int64_t nLockTimeCutoff) const {
assert(IsValid());
return ::IsFinalTx(*tx, nHeight, nLockTimeCutoff);
}
const CTransaction& GetTx() const {
assert(IsValid());
return *tx;
}
const uint32_t& GetSigOpCount() const {
return sigOpCount;
}
const CAmount& GetFee() const {
return nFee;
}
bool IsCoinBase() const {
assert(IsValid());
return tx->IsCoinBase();
}
bool IsValid() const {
return tx != nullptr;
}
private:
const CTransaction* tx;
uint32_t sigOpCount;
CAmount nFee;
};
inline bool EntryHashCmp(const BuilderEntry& a, const BuilderEntry& b) {
return a.GetHash() < b.GetHash();
}
class BlockBuilder {
public:
virtual bool UpdateTime(const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev) = 0;
virtual void SetTime(uint32_t t) = 0;
virtual uint32_t GetTime() const = 0;
virtual void SetVersion(uint32_t v) = 0;
virtual uint32_t GetVersion() const = 0;
virtual void SetCoinbase(BuilderEntry tx) = 0;
virtual void AddTx(BuilderEntry tx) = 0;
virtual void SetBits(uint32_t bits) = 0;
virtual void SetHashPrevBlock(const uint256& hash) = 0;
// As BlockBuilder only holds references to transactions, this needs to be
// called before any of them go out of scope.
virtual void Finalize(const Consensus::Params&) = 0;
// Sanity check.
// Validates the block contents and throws if it's not valid.
//
// This check is optional and can be slow, as
// a CBlock needs to be constructed.
virtual void CheckValidity(CBlockIndex* pindexPrev) = 0;
// If the interface requires some or all of the extended metadata required
// by 'getblocktemplate' (aka GBT).
//
// If this functions return false, calling the GBT functions is optional.
virtual bool NeedsGBTMetadata() const = 0;
// Below are methods for feeding GBT with data. If NeedsGBTMetadata is true,
// these must be called.
virtual void SetBlockMinTime(int64_t) = 0;
virtual void SetBlockHeight(int32_t) = 0;
virtual void SetBIP135State(const std::map<Consensus::DeploymentPos, ThresholdState>& state) = 0;
virtual void SetBlockSizeLimit(uint64_t limit) = 0;
virtual void SetBlockSigopLimit(uint64_t limit) = 0;
virtual void SetCoinbaseAuxFlags(CScript) = 0;
};
} // ns miner
#endif
|
cd2d314617e2929a4a334cdf7db22e0ed182745a
|
a5a71616f19712ef856fdce7d8cb518aeedb0e30
|
/main_oud.cpp
|
e97d2226cfd8a17d4b694ffd7204cb80e4ec3228
|
[] |
no_license
|
pjvksoft/opengl5
|
11d7b26544f6ca46a91ad49bf20c0ec6b8cdbad2
|
6d692ff4246d24627c05669a1f13efed1acefdec
|
refs/heads/master
| 2020-05-30T00:20:56.509168
| 2015-01-02T01:49:23
| 2015-01-02T01:49:23
| 28,700,162
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,366
|
cpp
|
main_oud.cpp
|
#include <iostream>
#include <cstdlib>
//#include <cstdlib>
#include <cmath>
#include <vector>
#include <GL/glut.h>
#include "RgbImage.h"
#define PI 3.141592653 //.....
//map
float map[100][100];
float x,y,z;
float rx,ry,rz;
float spinx=0.0;
float spinz=0.0;
float hoekbeen=0.0;
float hoekarm1=0.0;
float hoekarm2=0.0;
float hoogte;
int r;
int geld;
//textures
#define FILEAANTAL 1
char* filenameh[FILEAANTAL]={"gras.bmp"};
GLuint* textures;
char str[100];
float relief[100][100];
//*********************************************************
//* world gelinkte matrix
//*********************************************************
void glutPrint(float xxx, float yyy, char* text, float rr, float gg, float bb, float aa)
{
if(!text || !strlen(text)) return;
bool blending = false;
if(glIsEnabled(GL_BLEND)) blending = true;
//glEnable(GL_BLEND);
glColor4f(rr,gg,bb,aa);
glRasterPos3f(xxx,yyy,0.0);
glDisable(GL_TEXTURE_2D);
while (*text) {
glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24 , *text);
text++;
}
if(!blending) glDisable(GL_BLEND);
}
void loadTexture(int res,GLint param)
{
int i;
//textures= (GLuint*)malloc(sizeof(GLuint)*2);
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
textures=(GLuint*) calloc(FILEAANTAL,sizeof(GLuint));
glGenTextures(FILEAANTAL,textures);
RgbImage theTexMap;
for(i=0;i<FILEAANTAL;i++){
glBindTexture(GL_TEXTURE_2D,textures[i]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
theTexMap.LoadBmpFile(filenameh[i]);
glTexImage2D(GL_TEXTURE_2D, 0, 3,theTexMap.GetNumCols(), theTexMap.GetNumRows(), 0,GL_RGB, GL_UNSIGNED_BYTE, theTexMap.ImageData() );
}
}
void drawScene(void)
{
int i,j,k,l,m,n,o,p;
GLfloat light_pos1[] = { 20,0,0.0,1 }; //licht
glEnable(GL_LIGHTING);
//glLightfv(GL_LIGHT0,GL_POSITION, light_pos1);
GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_position[] = { 1.0, 1.0, 1.0, 10.0 };
//glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
//glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
//glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glEnable(GL_LIGHT0);
glColorMaterial ( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ) ;
glEnable ( GL_COLOR_MATERIAL ) ;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
gluLookAt(x, y, z, x+cos(spinz/180.*PI)*cos(spinx/180.*PI), y+sin(spinz/180*PI)*cos(spinx/180.*PI), z-sin(spinx/180.*PI), 0, 0,1);
//teken ondergrond
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,textures[0] );
glBegin(GL_QUADS);
//glNormal3f(0.0,0.0,1.0);
for(i=0;i<99;i++){
for(j=0;j<99;j++){
glTexCoord2f(0.0, 0.0);glVertex3f(10*i, 10*j, relief[i][j]);
glTexCoord2f(0.0, 1.0);glVertex3f(10*i, 10*j+10, relief[i][j+1]);
glTexCoord2f(1.0, 1.0);glVertex3f(10*i+10, 10*j+10, relief[i+1][j+1]);
glTexCoord2f(1.0, 0.0);glVertex3f(10*i+10,10*j, relief[i+1][j]);
}
}
glEnd();
glDisable(GL_TEXTURE_2D);
glLoadIdentity();
glTranslated(0,0,-1);
sprintf(str,"(x=%f,y=%f,z=%f,spinx=%f,spinz=%f)",x,y,z,spinx,spinz);
glutPrint(-1.0, 0.5, str, 1, 1, 1, 0);
glutSwapBuffers();
}
void motion(int xm, int ym)
{
float rx,ry,rz,f;
spinz = -xm;
spinx = (ym-(768./2))/10.;
printf("\n ym=%d,spinx=%f",ym,spinx);
if(spinx>30.)
spinx=30.;
if(spinx<-30.)
spinx=-30.;
glutPostRedisplay();
}
void resizeWindow(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(60.0, (GLfloat)w/h, 1, 1200);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(0, 0, 0, 1, 0, 0, 0, 0,1);
glClearColor(0, 1, 1, 1);
//glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);
//glLightfv(GL_LIGHT0,GL_DIFFUSE, light_pos);
//glEnable(GL_LIGHTING);
//glEnable(GL_LIGHT0);
//glEnable(GL_NORMALIZE);
//glEnable(GL_QUADRATIC_ATTENUATION);
//glShadeModel(GL_SMOOTH);
}
void keyboard(unsigned char key, int xx, int yy)
{
char message[100];
long answer;
static int toggle = 0;
int i,j,k,ij;
printf("keyboard %c, x=%f y=%f sinz=%f",key,x,y,spinz);
switch (key) {
case 27:
exit(0);
case ' ':
break;
case 'z':
x=x+cos(spinz/180.*PI);
y=y+sin(spinz/180.*PI);
break;
case 's':
x=x-cos(spinz/180.*PI);
y=y-sin(spinz/180.*PI);
break;
case 'd':
x=x+sin(spinz/180.*PI);
y=y-cos(spinz/180.*PI);
r=3;
break;
case 'q':
x=x-sin(spinz/180.*PI);
y=y+cos(spinz/180.*PI);
r=1;
break;
case 'c':
printf("vrije knop c\n");
break;
case 'v':
printf("vrije knop v\n");
break;
case 'e':
break;
case 'r':
spinx+=5.0;
break;
case 't':
spinz+=5.0;
break;
case 'h':
z++;
break;
case 'l':
z--;
break;
}
glutPostRedisplay();
}
void makerelief(){
int i,j,k;
for(i=0;i<100;i++){
for(j=0;j<100;j++){
relief[i][j]=(float) (rand()%100);
if(i==0||j==0||i==99||j==99)
relief[i][j]=100.;
}
}
for(k=0;k<10;k++){
for(i=1;i<99;i++){
for(j=1;j<99;j++){
relief[i][j]=(4*relief[i][j]+relief[i+1][j]+relief[i-1][j]+relief[i][j+1]+relief[i][j-1])/8;
}
}
}
}
void idle(void){
glutPostRedisplay();
}
int main(int argc, char** argv){
makerelief();
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(1366, 768);
glutInitWindowPosition(0, 0);
glutCreateWindow(argv[0]);
loadTexture(0,0);
x=0;y=0;z=100;
glutDisplayFunc(drawScene);
glutReshapeFunc(resizeWindow);
glutKeyboardFunc(keyboard);
glutMotionFunc(motion);
//glutMouseFunc(mouse);
//glutPassiveMotionFunc(motionpassief);
//glutIdleFunc(idle);
glutMainLoop();
system("PAUSE");
}
|
02bfa228ef26a5162926cf2d753e52b28d53606a
|
819d76719682d05726f9dbde730889e40c8b8f6b
|
/MFCWindowsProgramming/WindMill.cpp
|
829d2e2c193d72bbd03386937c673a4848217dd9
|
[] |
no_license
|
kolibreath/HomeWorks
|
8df16374572efee13b82094cf2f6666bfae87d27
|
db051161b4ddb9ce0d7cb9a88afb0b7345c196e5
|
refs/heads/master
| 2021-06-20T17:45:28.152383
| 2019-09-26T02:12:54
| 2019-09-26T02:12:54
| 134,393,265
| 1
| 2
| null | 2018-12-02T13:04:19
| 2018-05-22T09:38:07
|
C++
|
UTF-8
|
C++
| false
| false
| 4,016
|
cpp
|
WindMill.cpp
|
/*-----------------------------------------------------
SCRNSIZE.C -- Displays screen size in a message box
(c) Charles Petzold, 1998
-----------------------------------------------------*/
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <math.h>
#define PI 3.1415926
double alpha = 0.0;
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT("SysMets2");
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = hInstance;
wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = szAppName;
if (!RegisterClass(&wndclass))
{
MessageBox(NULL, TEXT("This program requires Windows NT!"),
szAppName, MB_ICONERROR);
return 0;
}
hwnd = CreateWindow(szAppName, TEXT("Get System Metrics No. 2"),
WS_OVERLAPPEDWINDOW | WS_VSCROLL,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
NULL, NULL, hInstance, NULL);
ShowWindow(hwnd, iCmdShow);
UpdateWindow(hwnd);
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static int cxChar, cxCaps, cyChar, cyClient, iVscrollPos;
HDC hdc;
int i, y;
PAINTSTRUCT ps;
TCHAR szBuffer[10];
TEXTMETRIC tm;
RECT clientRect;
HPEN hpen;
HBRUSH hbrush;
//风车的半径 和 中心坐标
int xOrg, yOrg, rWinmill;
switch (message)
{
case WM_CREATE:
SetTimer(hwnd, 9999, 100, NULL);
break;
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &clientRect);
hpen = (HPEN)GetStockObject(BLACK_PEN);
hbrush = CreateSolidBrush(RGB(255, 220, 220));
SelectObject(hdc, hpen);
SelectObject(hdc, hbrush);
xOrg = (clientRect.left + clientRect.right) / 2;
yOrg = (clientRect.top + clientRect.bottom) / 2;
//每次遍历增加i度
alpha ++;
rWinmill = min(xOrg, yOrg) - 50;
int rectLeftTopX = xOrg - rWinmill, rectLeftTopY = yOrg - rWinmill, rectBottomX = xOrg + rWinmill, rectBottomY = yOrg + rWinmill;
hbrush = CreateSolidBrush(RGB(200, 255, 200));
SelectObject(hdc, hbrush);
// 当 alpha等于0 起始的形状类似于 奔驰的标志
// 从原点(xOrg,yOrg) -> (aEndX,aEndY) 是一条边
// 从原点(xOrg,yOrg) -> (bEndX,bEndY) 是一条边
// 从原点(xOrg,yOrg) -> (cEndX,cEndY) 是一条边
//三条边的夹角是120度
int aEndX = xOrg + rWinmill * sin((alpha )/180*PI );
int aEndY = yOrg + rWinmill * cos((alpha )/ 180*PI);
int bEndX = xOrg + rWinmill * sin((alpha + 120 )/180*PI );
int bEndY = yOrg + rWinmill * cos((alpha + 120 )/ 180*PI);
int cEndX = xOrg + rWinmill * sin((alpha + 240 )/180*PI );
int cEndY = yOrg + rWinmill * cos((alpha + 240 )/ 180*PI);
int startX = xOrg;
int startY = yOrg;
//绘制饼图
Pie(hdc,
rectLeftTopX, rectLeftTopY,
rectBottomX, rectBottomY,
aEndX, aEndY,
bEndX, bEndY);
//修改颜色绘制后续的饼图
hbrush = CreateSolidBrush(RGB(255, 255, 200));
SelectObject(hdc, hbrush);
Pie(hdc,
rectLeftTopX, rectLeftTopY,
rectBottomX, rectBottomY,
bEndX, bEndY,
cEndX, cEndY);
hbrush = CreateSolidBrush(RGB(200, 255, 255));
SelectObject(hdc, hbrush);
Pie(hdc,
rectLeftTopX, rectLeftTopY,
rectBottomX, rectBottomY,
cEndX, cEndY,
aEndX, aEndY);
case WM_TIMER:
if (wParam == 9999) {
InvalidateRect(hwnd, NULL, TRUE);
}
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
|
e8c461f81b1e6b13b0292a13e323eea551d4b3b2
|
0577a46d8d28e1fd8636893bbdd2b18270bb8eb8
|
/ui/views/vivaldi_bookmark_menu_views.h
|
cd25141edb5e1f0578d75164b88eea0bac48b6b6
|
[
"BSD-3-Clause"
] |
permissive
|
ric2b/Vivaldi-browser
|
388a328b4cb838a4c3822357a5529642f86316a5
|
87244f4ee50062e59667bf8b9ca4d5291b6818d7
|
refs/heads/master
| 2022-12-21T04:44:13.804535
| 2022-12-17T16:30:35
| 2022-12-17T16:30:35
| 86,637,416
| 166
| 41
|
BSD-3-Clause
| 2021-03-31T18:49:30
| 2017-03-29T23:09:05
| null |
UTF-8
|
C++
| false
| false
| 1,974
|
h
|
vivaldi_bookmark_menu_views.h
|
//
// Copyright (c) 2019 Vivaldi Technologies AS. All rights reserved.
//
#ifndef UI_VIEWS_VIVALDI_BOOKMARK_MENU_VIEWS_H_
#define UI_VIEWS_VIVALDI_BOOKMARK_MENU_VIEWS_H_
// Used by all desktop platforms
#include "chrome/browser/ui/views/bookmarks/bookmark_menu_controller_observer.h"
#include "ui/vivaldi_context_menu.h"
class BookmarkMenuController;
namespace bookmarks {
class BookmarkNode;
}
namespace views {
class MenuItemView;
class Widget;
} // namespace views
namespace content {
class PageNavigator;
}
namespace vivaldi {
class VivaldiBookmarkMenuViews : public VivaldiBookmarkMenu,
public BookmarkMenuControllerObserver {
public:
~VivaldiBookmarkMenuViews() override;
VivaldiBookmarkMenuViews(content::WebContents* web_contents,
const BookmarkMenuContainer* container,
const bookmarks::BookmarkNode* node,
int offset,
const gfx::Rect& button_rect);
VivaldiBookmarkMenuViews(const VivaldiBookmarkMenuViews&) = delete;
VivaldiBookmarkMenuViews& operator=(const VivaldiBookmarkMenuViews&) = delete;
bool CanShow() override;
void Show() override;
void set_observer(VivaldiBookmarkMenuObserver* observer) override;
// BookmarkMenuControllerObserver
void BookmarkMenuControllerDeleted(
BookmarkMenuController* controller) override;
private:
base::RepeatingCallback<content::PageNavigator*()> GetPageNavigatorGetter();
private:
content::WebContents* web_contents_;
gfx::Rect button_rect_;
BookmarkMenuController* controller_; // Deletes iself
VivaldiBookmarkMenuObserver* observer_;
// Returns WeakPtrs used in GetPageNavigatorGetter(). Used to ensure
// safety if BookmarkBarView is deleted after getting the callback.
base::WeakPtrFactory<VivaldiBookmarkMenuViews> weak_ptr_factory_{this};
};
} // namespace vivaldi
#endif // UI_VIEWS_VIVALDI_BOOKMARK_MENU_VIEWS_H_
|
914c59f7bed32722d6241cfac01e98a7c6a8c887
|
76dbbc75c67d0f620dea9ff81473102dca0e05c8
|
/03-group-assignments/01-assignment/PriorityString.hpp
|
2610a9834de373d6948427072110f76e16615a58
|
[] |
no_license
|
darthHunterous/mac0219
|
7821f57d3ecb8b43b25335f25e2a3cfbd8f8449e
|
bcb2fe0c8cd563b11942ce0b78ee939aa035a801
|
refs/heads/master
| 2020-05-04T16:43:28.547842
| 2019-09-24T12:08:49
| 2019-09-24T12:08:49
| 179,286,073
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 351
|
hpp
|
PriorityString.hpp
|
#include <stdio.h>
#include <stdlib.h>
#include <string>
using namespace std;
class PriorityString {
public:
long long priority;
string value;
PriorityString(long long _priority, string const stringvalue);
bool operator< (PriorityString const& other) const;
bool operator> (PriorityString const& other) const;
};
|
196238b8657b8f48ded35d4229ce664034118d67
|
14140c915a0b30c455ab11edb3f2ab31b682d8dc
|
/game.hpp
|
a46fcb633186e3647a576295b3f4fbeabd1ca5ea
|
[] |
no_license
|
shanirub/cpp-project
|
297dcd60cc62b7f673087855eb7262b9ad2f10ed
|
867f304dff85cc92a098fe8205b8bc8401086c03
|
refs/heads/master
| 2020-12-09T22:40:49.975394
| 2020-02-27T20:05:53
| 2020-02-27T20:05:53
| 233,437,393
| 1
| 0
| null | 2020-09-04T16:27:24
| 2020-01-12T18:18:12
|
C++
|
UTF-8
|
C++
| false
| false
| 1,672
|
hpp
|
game.hpp
|
#include<string>
using namespace std;
class game
{
private:
int MAX_NMISS = 10; // max. number of misses allowed
string VALID_GUESS = "abcdefghijklmnopqrstuvwxyz"; // a string containing the allowed guesses (all the letter)
int nguess; // number of guesses made so far
int nmiss; // number of misses so far
string wordtoguess; // the original word
string wordsofar; // the word as shown during the game. each letter is represented as "-" until correctly guessed
string oldguess; // a string containing the former guesses (in lower case)
public:
game(); // default constructor - should call the other constructor with a default word???
game(string wordtosolve); // constructor with a word to solve
~game(); // deconstructor - what should it do???
bool isguessinword(char guess); // returns true if the guess is correct
bool isnewguess(char guess); // returns true if the guess was not guessed before (according to oldguess)
bool issolved(); // returns true when the entire word was guessed. game ends - win
bool ismaxguess(); // returns true when max. number of misses was reached. game ends - loss
char readguess(); // reads the guess, and returns it
bool isvalidguess(char guess); // returns true if the guess is a letter (upper or lower case)
void correctguess(char guess); // updates wordsofar, oldguess, nguess
void wrongguess(char guess); // updates oldguess, nguess, nmiss
void gamewon(); // what happens when a game is lost
void gamelost(); // what happens when a game is won
};
|
693b94e3b4b46249b5068d27b65171293ccafa1e
|
f60e3fec8cc4ad4ee27b3fd600d98f832aa5e610
|
/include/latbuilder/Task/Eval.h
|
964cd2589b9f6c9eac54defb52f298eac548647d
|
[
"Apache-2.0"
] |
permissive
|
umontreal-simul/latnetbuilder
|
9ccb4dddd0e9f56b7c231fbf6761425e70776ccc
|
369fbeffcc70fc8706f237089d32f9d7473dce61
|
refs/heads/master
| 2022-11-05T19:56:26.541869
| 2022-10-27T13:18:13
| 2022-10-27T13:18:13
| 54,502,469
| 13
| 3
|
NOASSERTION
| 2022-10-22T01:43:22
| 2016-03-22T19:19:51
|
C++
|
UTF-8
|
C++
| false
| false
| 3,546
|
h
|
Eval.h
|
// This file is part of LatNet Builder.
//
// Copyright (C) 2012-2021 The LatNet Builder author's, supervised by Pierre L'Ecuyer, Universite de Montreal.
//
// 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 LATBUILDER__TASK__EVAL_H
#define LATBUILDER__TASK__EVAL_H
#include "latbuilder/Task/CBCBasedSearch.h"
#include "latbuilder/Task/macros.h"
#include "latbuilder/WeightedFigureOfMerit.h"
#include "latbuilder/CoordUniformFigureOfMerit.h"
#include "latbuilder/MeritSeq/CBC.h"
#include "latbuilder/GenSeq/GeneratingValues.h"
#include "latbuilder/Util.h"
#include <vector>
namespace LatBuilder { namespace Task {
template <LatticeType LR, EmbeddingType ET, Compress COMPRESS, PerLevelOrder PLO, class FIGURE>
struct EvalTag {};
/// Explicit construction (evaluates a figure of merit for a single lattice).
template <LatticeType LR, EmbeddingType ET, Compress COMPRESS, PerLevelOrder PLO, class FIGURE> using Eval =
CBCBasedSearch<EvalTag<LR, ET, COMPRESS, PLO, FIGURE>>;
/// Explicit construction (evaluates a figure of merit for a single lattice).
template <class FIGURE, LatticeType LR, EmbeddingType ET, Compress COMPRESS, PerLevelOrder PLO>
Eval<LR, ET, COMPRESS, PLO, FIGURE> eval(
Storage<LR, ET, COMPRESS, PLO> storage,
Dimension dimension,
FIGURE figure,
typename LatticeTraits<LR>::GeneratingVector genVec
)
{ return Eval<LR, ET, COMPRESS, PLO, FIGURE>(std::move(storage), dimension, std::move(figure), std::move(genVec)); }
template <LatticeType LR, EmbeddingType ET, Compress COMPRESS, PerLevelOrder PLO, class FIGURE>
struct CBCBasedSearchTraits<EvalTag<LR, ET, COMPRESS, PLO, FIGURE>> {
typedef LatBuilder::Task::Search<LR, ET> Search;
typedef LatBuilder::Storage<LR, ET, COMPRESS, PLO> Storage;
typedef typename LatBuilder::Storage<LR, ET, COMPRESS, PLO>::SizeParam SizeParam;
typedef typename CBCSelector<LR, ET, COMPRESS, PLO, FIGURE>::CBC CBC;
typedef typename LatticeTraits<LR>::GeneratingVector GeneratingVector;
typedef std::vector< typename LatticeTraits<LR>::GenValue> GenSeqType;
CBCBasedSearchTraits(GeneratingVector genVec): genVec(std::move(genVec)) {}
virtual ~CBCBasedSearchTraits() {}
std::vector<GenSeqType> genSeqs(const SizeParam& sizeParam, Dimension dimension) const
{
if (dimension > genVec.size())
throw std::runtime_error("dimension > generating vector size");
std::vector<GenSeqType> out(dimension);
for (size_t j = 0; j < dimension; j++)
out[j] = GenSeqType{genVec[j]};
return out;
}
std::string name() const
{ using TextStream::operator<<;
std::ostringstream stream;
stream << "Task: LatBuilder Evaluation of a " << to_string(LR) << " lattice";
return stream.str(); }
void init(LatBuilder::Task::Eval<LR, ET, COMPRESS, PLO, FIGURE>& search) const
{ connectCBCProgress(search.cbc(), search.minObserver(), search.filters().empty()); }
GeneratingVector genVec;
};
TASK_FOR_ALL(TASK_EXTERN_TEMPLATE, CBCBasedSearch, Eval);
}}
#endif
|
8e4e8e81d97fa258ab0deaacfa407b78f6b05e89
|
edbecc215abe91f188e9f979dd8857051efe88c3
|
/CoinMaster.cpp/Product.h
|
0db4457327dbccce90d6828b7b72fd428ee3a5f2
|
[] |
no_license
|
Allie251B/Object-Oriented-Programming_practicum_2021
|
8ce36d290129b217278bde434038e41d0678e844
|
a2a137aac2a73c93f027a03bb220235bde776673
|
refs/heads/main
| 2023-04-20T14:25:07.443182
| 2021-05-16T14:10:21
| 2021-05-16T14:10:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 631
|
h
|
Product.h
|
#pragma once
#include "Coin.h"
class Product
{
private:
char* product_name;
double product_price; // cenata e v lev.
double product_discount;
coinSide discount_chance;
public:
Product();
Product(Product& other);
Product(const char* name, double _price, double _discount);
~Product();
void setName(const char* _name);
void setPrice(double _price);
void setDiscount(double _discount);
void setDiscountChance(coinSide _discount_chance);
char* getNameOfProduct();
size_t getSide();
double getPrice();
double getDiscount();
coinSide getDiscountChance();
void print_product() const;
};
|
0bb5e9304018c6921f2a34ee13d60d7333daa3f3
|
5e2961e1aa978c822a626c8e31a2eef0a3998546
|
/temperature.ino
|
129ba6b6470c7a9e8d0386e50dfc335183037df2
|
[
"Unlicense"
] |
permissive
|
Greyroot328/Arduino-with-LM35-TemperatureSensor
|
e0083e85c179a6ee3b9732f505900b6c7982dc91
|
da15d019b1e4cba70c2b210c3363abc790cf4c54
|
refs/heads/master
| 2021-07-04T23:11:08.807183
| 2020-10-04T17:02:36
| 2020-10-04T17:02:36
| 183,558,972
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 660
|
ino
|
temperature.ino
|
// Copyright to Naman Sinha
// https://namansinha.in
int Relay1=8;
int Relay3=10;
float temp;
void setup() {
Serial.begin(9600);
pinMode(Relay1,OUTPUT);
pinMode(Relay3,OUTPUT);
digitalWrite(Relay1,LOW);
digitalWrite(Relay3,LOW);
}
void loop() {
temp = analogRead(A0);
temp = temp * 0.48828125 ; //Converting Temperature to celsius
Serial.print(temp);
Serial.println();
if(temp>40){
digitalWrite(Relay1,HIGH);
digitalWrite(Relay3,HIGH);
delay(1500);
}
else {
digitalWrite(Relay1,LOW);
digitalWrite(Relay3,LOW);
delay(1500);
}
delay(2000);
}
|
f0440d56021fb3cf834483b6fef8c41f465f1fd8
|
11433a3d403e232913aefdff439d6a59fbbda4c5
|
/src/binutils_macros.h
|
cf7740b8d672de97c17f76ce60000ac480d3f142
|
[] |
no_license
|
google-code/binutils
|
4e63d44a98854018dd8559b333042cca852967f3
|
a9c55ac88fc53fb5b9684007391ad424d45c36d7
|
refs/heads/master
| 2016-09-06T23:06:33.602768
| 2015-03-15T22:28:31
| 2015-03-15T22:28:31
| 32,287,392
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,896
|
h
|
binutils_macros.h
|
/**
* =============================================================================
* binutils
* Copyright(C) 2013 Ayuto. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
**/
#ifndef _BINUTILS_MACROS_H
#define _BINUTILS_MACROS_H
// ============================================================================
// >> INCLUDES
// ============================================================================
#include "boost/python.hpp"
using namespace boost::python;
// ============================================================================
// This macro allows us to call a Python function OR Python method. It decides
// what we need to use.
// boost::python::object retval = CALL_PY_FUNC(PyObject*, ...);
// ============================================================================
#define CALL_PY_FUNC(pCallable, ...) \
PyObject_HasAttrString(pCallable, "__self__") ? call_method<object>(PyObject_GetAttrString(pCallable, "__self__"), extract<const char*>(PyObject_GetAttrString(pCallable, "__name__")), ##__VA_ARGS__) : call<object>(pCallable, ##__VA_ARGS__)
// ============================================================================
// Surround boost python statements with this macro in order to handle
// exceptions.
// ============================================================================
#define BEGIN_BOOST_PY() \
try {
#define END_BOOST_PY( ... ) \
} catch( ... ) { \
PyErr_Print(); \
PyErr_Clear(); \
return __VA_ARGS__; \
}
#define END_BOOST_PY_NORET( ... ) \
} catch( ... ) { \
PyErr_Print(); \
PyErr_Clear(); \
}
// ============================================================================
// Use this macro to expose a variadic function.
// ============================================================================
#define BOOST_VARIADIC_FUNCTION(name, function, ...) \
def("__" name, &function, ##__VA_ARGS__); \
exec("def " name "(*args): __" name "(args)", scope().attr("__dict__"))
// ============================================================================
// Use this macro to expose a variadic class method. Don't forget to call
// DEFINE_CLASS_METHOD_VARIADIC after that.
// ============================================================================
#define CLASS_METHOD_VARIADIC(name, method, ...) \
.def("__" name, method, ##__VA_ARGS__)
// ============================================================================
// Use this macro to define a variadic class method.
// ============================================================================
#define DEFINE_CLASS_METHOD_VARIADIC(classname, method) \
scope().attr(#classname).attr(#method) = eval("lambda self, *args: self.__" #method "(args)")
// ============================================================================
// Use this macro to raise a Python exception.
// ============================================================================
#define BOOST_RAISE_EXCEPTION( exceptionName, exceptionString ) \
{ \
PyErr_SetString(exceptionName, exceptionString); \
throw_error_already_set(); \
}
// ============================================================================
// These typedefs save some typing. Use this policy for any functions that return
// a newly allocated instance of a class which you need to delete yourself.
// ============================================================================
typedef return_value_policy<manage_new_object> manage_new_object_policy;
// ============================================================================
// Use this policy for objects that someone else will free.
// ============================================================================
typedef return_value_policy<reference_existing_object> reference_existing_object_policy;
// ============================================================================
// Use this policy for functions that return const objects.
// ============================================================================
typedef return_value_policy<copy_const_reference> copy_const_reference_policy;
#endif // _BINUTILS_MACROS_H
|
52833678bf9b70183aa879d9c2550aa3b8b4d939
|
8f50c262f89d3dc4f15f2f67eb76e686b8f808f5
|
/TileCalorimeter/TileEvent/src/TileRawChannel.cxx
|
cc44d76b1100b2ad60ff7c6e0930688e439d5711
|
[
"Apache-2.0"
] |
permissive
|
strigazi/athena
|
2d099e6aab4a94ab8b636ae681736da4e13ac5c9
|
354f92551294f7be678aebcd7b9d67d2c4448176
|
refs/heads/master
| 2022-12-09T02:05:30.632208
| 2020-09-03T14:03:18
| 2020-09-03T14:03:18
| 292,587,480
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,761
|
cxx
|
TileRawChannel.cxx
|
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
//*****************************************************************************
// Filename : TileRawChannel.cxx
// Author : Ed Frank, Ambreesh Gupta, Frank Merritt
// Created : Jan, 2001
//
// DESCRIPTION:
// Implementation comments only. Class level comments go in .h file.
//
// HISTORY:
// 02Mar02: Created to replace TileRawCell
//
// BUGS:
//
//
//
//*****************************************************************************
#include "TileEvent/TileRawChannel.h"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
TileRawChannel::TileRawChannel( const Identifier& id,
float amplitude, float time, float quality, float ped )
: TileRawData( id )
, m_amplitude(1,amplitude)
, m_time(1,time)
, m_quality(1,quality)
, m_pedestal(ped)
{
}
TileRawChannel::TileRawChannel( const HWIdentifier& HWid,
float amplitude, float time, float quality, float ped )
: TileRawData( HWid )
, m_amplitude(1,amplitude)
, m_time(1,time)
, m_quality(1,quality)
, m_pedestal(ped)
{
}
TileRawChannel::TileRawChannel(const HWIdentifier& HWid,
std::vector<float>&& amplitude,
std::vector<float>&& time,
std::vector<float>&& quality,
float ped /*= 0.0*/)
: TileRawData( HWid ),
m_amplitude (std::move(amplitude)),
m_time (std::move(time)),
m_quality (std::move(quality)),
m_pedestal (ped)
{
}
int TileRawChannel::add(float amplitude, float time, float quality) {
m_amplitude.push_back(amplitude);
m_time.push_back(time);
m_quality.push_back(quality);
return m_amplitude.size();
}
void TileRawChannel::scaleAmplitude(float scale) {
std::transform(m_amplitude.begin(), m_amplitude.end(),
m_amplitude.begin(),
std::bind1st(std::multiplies<float>(),scale));
}
void TileRawChannel::insertTime(float time) {
m_time.insert(m_time.begin(), time); // put new time in front
}
int TileRawChannel::insert(float amplitude, float time, float quality) {
m_amplitude.insert(m_amplitude.begin(), amplitude);
m_time.insert(m_time.begin(), time);
m_quality.insert(m_quality.begin(), quality);
return m_amplitude.size();
}
void TileRawChannel::print() const {
std::cout << (std::string) (*this) << std::endl;
}
TileRawChannel::operator std::string() const {
std::ostringstream text(std::ostringstream::out);
text << TileRawData::operator std::string();
print_to_stream(m_amplitude, " ampl =", text);
print_to_stream(m_time, " time =", text);
print_to_stream(m_quality, " qual =", text);
return text.str();
}
|
5e024a40087a3b65a773bd15a7af0025aed8d0b8
|
47fe86a1380157209586eeaf3fe98bd7add472e1
|
/block.h
|
56b2a5dd63e5fa4888483fdffb4cbd08436959a7
|
[] |
no_license
|
SeventhHelix/Quadris
|
cbf927bc14db1119cf55aaa75a8587338cdc1a8d
|
b8deb9ed51b67fac8c691ec236d9c4973cbea87c
|
refs/heads/master
| 2021-01-23T22:15:49.897290
| 2012-01-16T21:53:25
| 2012-01-16T21:53:25
| 3,175,188
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 782
|
h
|
block.h
|
#ifndef __BLOCK_H__
#define __BLOCK_H__
struct Coord {
int x, y;
void setCoord(int x, int y);
void setCoord(Coord c);
};
class Block {
char level, type;
int peerPosn, width, height;
int *peerCount;
Block **peers;
Coord coord;
public:
Block(Block** &peers, int *numPeers, char difficulty, char charType, int x, int y, int width, int height);
~Block();
bool coordBelongs(int x, int y);
bool coordBelongs(Coord c);
// getters
char getType();
char getLevel();
Block** getPeers();
int getPeerCount();
int getWidth();
int getHeight();
Coord getCoord();
// setters
void setCoord(int x, int y);
void setCoord(Coord c);
void setDimensions(int width, int height);
};
#endif
|
d3363ad4d6256be9bba587b71d2be3dc402a6291
|
d161e85db8956d5b1b684dcc3e73ce02f4cf7e4a
|
/Leetcode/119. Pascal's Triangle II.cpp
|
c3f374a34d9e43f0088bb0d67518e7249dad57e9
|
[] |
no_license
|
Yuuoniy/Leetcode
|
c084fb9a659cf1d68411946328ac17909a44a2b2
|
bbc6edaa859dc322e55a741d5924d7b2490cb889
|
refs/heads/master
| 2022-02-20T18:27:59.438573
| 2019-09-17T12:48:33
| 2019-09-17T12:48:33
| 162,166,989
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 773
|
cpp
|
119. Pascal's Triangle II.cpp
|
/*
* @Author: Yuuoniy
* @Date: 2017-11-05 10:48:51
* @Last Modified by: Yuuoniy
* @Last Modified time: 2017-11-05 11:12:14
*/
class Solution {
public:
vector<int> getRow(int rowIndex) {
vector<int> res, temp(1, 1);
for (int i = 0; i <= rowIndex; ++i) {
res.resize(i + 1);
res[0] = res[i] = 1;
for (int j = 1; j < i; ++j) {
res[j] = temp[j - 1] + temp[j];
}
temp = res;
}
return res;
}
};
// 改进版:
class Solution {
public:
vector<int> getRow(int rowIndex) {
vector<int> res(rowIndex + 1);
res[0] = 1;
for (int i = 0; i <= rowIndex; ++i) {
for (int j = i; j > 0; --j) { //从后往前运算才不会影响
res[j] = res[j] + res[j - 1];
}
}
return res;
}
};
|
12734f9451e536c1214146a8d4fcb6d49a9c9d1e
|
038df27dfb74a68f7b2fef2f63e5cc6bfe720962
|
/include/fast_io_core_impl/transmit_once.h
|
88fbec8f973ecf96887110ed2bf974f2356370ec
|
[
"MIT"
] |
permissive
|
klmr/fast_io
|
6226db934bbda0b78ae1fac80d20c635106db2c1
|
1393ef01b82dffa87f3008ec0898431865870a1f
|
refs/heads/master
| 2022-07-28T12:34:10.173427
| 2020-05-25T11:25:38
| 2020-05-25T11:25:38
| 266,780,867
| 2
| 0
|
NOASSERTION
| 2020-05-25T13:03:19
| 2020-05-25T13:03:19
| null |
UTF-8
|
C++
| false
| false
| 995
|
h
|
transmit_once.h
|
#pragma once
namespace fast_io
{
template<output_stream output,input_stream input>
inline constexpr std::size_t transmit_once(output& outp,input& inp)
{
if constexpr(mutex_input_stream<input>)
{
typename input::lock_guard_type lg{mutex(inp)};
decltype(auto) uh{unlocked_handle(inp)};
return transmit_once(outp,uh);
}
else if constexpr(buffer_input_stream<input>)
{
std::size_t bytes{};
if(ibuffer_curr(inp)!=ibuffer_end(inp))[[unlikely]]
{
write(outp,ibuffer_curr(inp),ibuffer_end(inp));
bytes += ibuffer_end(inp)-ibuffer_curr(inp);
}
if(!underflow(inp))[[unlikely]]
return bytes;
write(outp,ibuffer_curr(inp),ibuffer_end(inp));
bytes += ibuffer_end(inp)-ibuffer_curr(inp);
ibuffer_set_curr(inp,ibuffer_end(inp));
return bytes;
}
else
{
using char_type = typename input::char_type;
std::array<char_type,65536> buffer;
auto it{read(inp,buffer.data(),buffer.data()+buffer.size())};
write(outp,buffer.data(),it);
return it-buffer.data();
}
}
}
|
afea67a9a6f73ae22f76b5e60120290a51ecc6bd
|
2446fa8f7dacb45b6df43c5d4e4109caa4468f1b
|
/Sprite.h
|
169f8dd872d12c34c2cf757eea92c0174b2368fe
|
[] |
no_license
|
giloppo/MeteorDefense
|
5ff1f9542639391086cb280a0c6e08a014ef28e4
|
0acd6f5df94f6ee3cba7871b9651eaad3e1abc6c
|
refs/heads/master
| 2020-04-04T03:10:41.988761
| 2014-02-20T07:54:38
| 2014-02-20T07:54:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,943
|
h
|
Sprite.h
|
#pragma once
#include "Bitmap.h"
#include <stdlib.h>
#include <windows.h>
//------
//定義邊界行為
//------
typedef WORD BOUNDSACTION;
const BOUNDSACTION BA_STOP = 0, BA_WRAP = 1, BA_BOUNCE = 2, BA_DIE = 3;
typedef WORD SPRITEACTION;
const SPRITEACTION SA_NONE = 0x0000L, SA_KILL = 0x0001L;
//------
//子畫面類
//------
class Sprite
{
protected:
Bitmap * m_pBitmap;
RECT m_rcPosition, m_rcBounds, m_rcCollision;
POINT m_ptVelocity;
int m_iZOrder;
BOOL m_bHidden;
BOUNDSACTION m_baBoundsAction;
int m_iNumFrames, m_iCurFrame, m_iFrameDelay, m_iFrameTrigger;
BOOL m_bDying, m_bOneCycle;
//------
//設置碰撞檢測邊界
//------
virtual void CalcCollisionRect()
{
int iXShrink = (m_rcPosition.left - m_rcPosition.right) / 12;
int iYShrink = (m_rcPosition.top - m_rcPosition.bottom) / 12;
CopyRect(&m_rcCollision, &m_rcPosition);
InflateRect(&m_rcCollision, iXShrink, iYShrink);
}
//------
//每次將幀計時器減一 減到零則跳至下一幀 到達最後一幀時跳至第一幀
//------
void UpdateFrame()
{
if((m_iFrameDelay >= 0) && (--m_iFrameTrigger <= 0))
{
m_iFrameTrigger = m_iFrameDelay;
if(++m_iCurFrame >= m_iNumFrames)
{
if(m_bOneCycle)
{
m_bDying = TRUE;
}
else
{
m_iCurFrame = 0;
}
}
}
}
public:
Sprite(Bitmap * pBitmap);
Sprite(Bitmap * pBitmap, RECT &rcBounds, BOUNDSACTION baBoundsAction = BA_STOP);
Sprite(Bitmap * pBitmap, POINT ptPosition, POINT ptVelocity, int iZOrder, RECT &rcBounds, BOUNDSACTION baBoundsAction = BA_STOP);
virtual ~ Sprite();
virtual SPRITEACTION Update();
void Draw(HDC hDC);
//------
//判斷是否檢測到碰撞
//------
BOOL TestCollision(Sprite * pTestSprite)
{
RECT & rcTest = pTestSprite -> GetCollision();
return (m_rcCollision.left <= rcTest.right && m_rcCollision.right >= rcTest.left && m_rcCollision.top <= rcTest.bottom && m_rcCollision.bottom >= rcTest.top);
}
//------
//判斷一個點是否在一個矩形內 很有用的方法
//------
BOOL IsPointInside(int x, int y)
{
POINT ptPoint;
ptPoint.x = x;
ptPoint.y = y;
return PtInRect(&m_rcPosition, ptPoint);
}
void Kill()
{
m_bDying = TRUE;
}
RECT & GetCollision()
{
return m_rcCollision;
}
RECT & GetPosition()
{
return m_rcPosition;
}
void SetPosition(int x, int y)
{
OffsetRect(&m_rcPosition, x - m_rcPosition.left, y - m_rcPosition.top);
CalcCollisionRect();
}
void SetPosition(POINT ptPosition)
{
OffsetRect(&m_rcPosition, ptPosition.x - m_rcPosition.left, ptPosition.y - m_rcPosition.top);
CalcCollisionRect();
}
void SetPosition(RECT & rcPosition)
{
CopyRect(&m_rcPosition, &rcPosition);
}
void OffsetPosition(int x, int y)
{
OffsetRect(&m_rcPosition, x, y);
CalcCollisionRect();
}
POINT GetVelocity()
{
return m_ptVelocity;
}
void SetVelocity(int x, int y)
{
m_ptVelocity.x = x;
m_ptVelocity.y = y;
}
void SetVelocity(POINT ptVelocity)
{
m_ptVelocity.x = ptVelocity.x;
m_ptVelocity.y = ptVelocity.y;
}
BOOL GetZOrder()
{
return m_iZOrder;
}
void SetZOrder(int iZOrder)
{
m_iZOrder = iZOrder;
}
void SetBounds(RECT & rcBounds)
{
CopyRect(&m_rcBounds, &rcBounds);
}
void SetBoundsAction(BOUNDSACTION ba)
{
m_baBoundsAction = ba;
}
BOOL IsHidden()
{
return m_bHidden;
}
void SetHidden(BOOL bHidden)
{
m_bHidden = bHidden;
}
Bitmap * GetBitmap()
{
return m_pBitmap;
}
int GetWidth()
{
return m_pBitmap -> GetWidth();
}
int GetHeight()
{
return (m_pBitmap -> GetHeight() / m_iNumFrames);
}
//------
//設置幀數并將圖像大小設置為每一幀的大小
//------
void SetNumFrames(int iNumFreams, BOOL bOneCycle = FALSE)
{
m_iNumFrames = iNumFreams;
m_bOneCycle = bOneCycle;
RECT rcRect = GetPosition();
rcRect.bottom = rcRect.top + ((rcRect.bottom - rcRect.top) / iNumFreams);
SetPosition(rcRect);
}
void SetFrameDelay(int iFrameDelay)
{
m_iFrameDelay = iFrameDelay;
}
};
|
5a895973843a8c17d7db968834fc568fed45cd98
|
a2fc06cf458f896d2217592ac92098863e755a9c
|
/src/program/ladybug_calibrator/cropped_video_writer.cpp
|
65ae1368ea982a3ec81b0b481f22fd0960d205fa
|
[] |
no_license
|
MrBrood/Stanford-Junior-self-driving-car
|
ba3f2a07a9366d3566def59fd25f90bad55748d2
|
d999e94bb287933666dac82129cad6702923a8e1
|
refs/heads/master
| 2023-07-18T04:56:02.055754
| 2020-08-21T01:31:46
| 2020-08-21T01:31:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,657
|
cpp
|
cropped_video_writer.cpp
|
#include "cropped_video_writer.h"
using namespace std;
CroppedVideoWriter::CroppedVideoWriter(const string& filename, IplImage* test_img,
int fourcc, int fps,
double scaling,
double pct_crop_top,
double pct_crop_bot) :
resized_(NULL),
cropped_(NULL),
filename_(filename),
scaling_(scaling),
pct_crop_top_(pct_crop_top),
pct_crop_bot_(pct_crop_bot),
fps_(fps),
fourcc_(fourcc)
{
initialize(test_img);
}
CroppedVideoWriter::~CroppedVideoWriter() {
if(resized_)
cvReleaseImage(&resized_);
if(cropped_)
cvReleaseImage(&cropped_);
cvReleaseVideoWriter(&writer_);
}
void CroppedVideoWriter::initialize(IplImage* test_img) {
uncropped_video_size_ = cvSize(test_img->width * scaling_, test_img->height * scaling_);
cropped_video_size_.height = (1.0 - pct_crop_bot_ - pct_crop_top_) * uncropped_video_size_.height;
cropped_video_size_.width = uncropped_video_size_.width;
int is_color = 1;
writer_ = cvCreateVideoWriter(filename_.c_str(), fourcc_, fps_, cropped_video_size_, is_color);
assert(writer_);
}
void CroppedVideoWriter::write(IplImage* img) {
if(resized_)
cvReleaseImage(&resized_);
if(cropped_)
cvReleaseImage(&cropped_);
resized_ = cvCreateImage(uncropped_video_size_, img->depth, img->nChannels);
cvResize(img, resized_);
cvSetImageROI(resized_, cvRect(0, pct_crop_top_ * resized_->height, cropped_video_size_.width, cropped_video_size_.height));
cropped_ = cvCreateImage(cvGetSize(resized_), resized_->depth, resized_->nChannels);
cvCopy(resized_, cropped_);
cvResetImageROI(resized_);
cvWriteFrame(writer_, cropped_);
}
|
a87f0c380b6dc33e1e25fe520322ee1e1dcf5425
|
84897b6a25f876b21246c2c7e1404c9c411be987
|
/src/include/format/7z/RC7zDecoder.h
|
0b4efb247dee1f784da9cf5c8c6b9ffb21d3c2bd
|
[] |
no_license
|
drivestudy/HaoZip
|
07718a53e38bc5893477575ddf3fccfb3b18c5fd
|
9e0564b4a11870224543357004653b798fd625e0
|
refs/heads/master
| 2021-07-24T06:33:24.651453
| 2017-11-05T01:19:18
| 2017-11-05T01:19:18
| null | 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 4,131
|
h
|
RC7zDecoder.h
|
/********************************************************************************
* 版权所有(C)2008,2009,2010,好压软件工作室,保留所有权利。 *
********************************************************************************
* 作者 : HaoZip *
* 版本 : 1.7 *
* 联系方式: haozip@gmail.com *
* 官方网站: www.haozip.com *
********************************************************************************/
#ifndef __RC7zDecoder_h_
#define __RC7zDecoder_h_ 1
#include "format/common/RCCoderMixerMT.h"
#include "format/7z/RC7zItem.h"
#include "interface/IPassword.h"
#include "interface/ICoder.h"
#include "interface/IStream.h"
BEGIN_NAMESPACE_RCZIP
struct RC7zBindInfoEx:
public RCCoderMixserBindInfo
{
/** 编码器id
*/
RCVector<RCMethodID> m_coderMethodIDs;
/** 清除
*/
void Clear()
{
RCCoderMixserBindInfo::Clear() ;
m_coderMethodIDs.clear() ;
}
};
class RC7zDecoder
{
public:
/** 默认构造函数
*/
RC7zDecoder() ;
/** 默认析构函数
*/
~RC7zDecoder() ;
public:
/** 解码
@param [in] codecsInfo 编码管理器
@param [in] inStream 输入流
@param [in] startPos 起始位置
@param [in] packSizes 包大小
@param [in] folderInfo 文件夹信息
@param [in] outStream 输出流
@param [in] compressProgress 压缩进度管理器
@param [in] getTextPassword 密码管理器
@param [in] passwordIsDefined 是否有密码
@param [in] numThreads 线程数
@return 成功返回RC_S_OK,否则返回错误号
*/
HResult Decode(ICompressCodecsInfo* codecsInfo,
IInStream* inStream,
uint64_t startPos,
const uint64_t* packSizes,
const RC7zFolder& folderInfo,
ISequentialOutStream* outStream,
ICompressProgressInfo* compressProgress,
ICryptoGetTextPassword* getTextPassword,
bool& passwordIsDefined,
uint32_t numThreads) ;
private:
/** 从文件夹信息得到绑定信息
@param [in] folder 文件夹信息
@param [out] bindInfo 返回绑定信息
*/
static void ConvertFolderItemInfoToBindInfo(const RC7zFolder& folder,
RC7zBindInfoEx& bindInfo) ;
/** 编码是否相等
@param [in] a1 编码1
@param [in] a2 编码2
@return 相等返回true,否则返回false
*/
static bool AreCodersEqual(const RCCoderMixserCoderStreamsInfo& a1,
const RCCoderMixserCoderStreamsInfo& a2) ;
/** 混合编码绑定信息中的绑定序列是否相等
@param [in] a1 混合编码绑定信息1
@param [in] a2 混合编码绑定信息2
@return 相等返回true,否则返回false
*/
static bool AreBindPairsEqual(const RCCoderMixerBindPair& a1,
const RCCoderMixerBindPair& a2) ;
/** 绑定扩展信息是否相等
@param [in] a1 绑定扩展信息1
@param [in] a2 绑定扩展信息2
@return 相等返回true,否则返回false
*/
static bool AreBindInfoExEqual(const RC7zBindInfoEx& a1,
const RC7zBindInfoEx& a2) ;
private:
/** 是否有绑定信息
*/
bool m_bindInfoExPrevIsDefined ;
/** 绑定信息
*/
RC7zBindInfoEx m_bindInfoExPrev ;
/** 多线程的混合编码
*/
RCCoderMixerMT* m_mixerCoderMTSpec ;
/** 混合编码公共信息
*/
RCCoderMixer* m_mixerCoderCommon ;
/** 混合编码器
*/
ICompressCoder2Ptr m_mixerCoder;
/** 解码器
*/
RCVector<IUnknownPtr> m_decoders;
};
END_NAMESPACE_RCZIP
#endif //__RC7zDecoder_h_
|
b41c5a6cfa9e54ea4aa5abee660fc6d13d624fe8
|
9aec001b4c8b01310df4c0cd6d380b6d3f930cb6
|
/Question02/Function.cpp
|
abe30f3239b08ade3f8436e18203265d2fe7dd86
|
[] |
no_license
|
tanmay02711/LAB01
|
7f14702db7e9c42649cb5e45f8d22b0804f3d966
|
642f3d54838b5d78bfbefea17ecda7492dc847f2
|
refs/heads/master
| 2021-05-23T09:01:04.147731
| 2020-04-05T12:24:09
| 2020-04-05T12:24:09
| 253,211,433
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 325
|
cpp
|
Function.cpp
|
#include<iostream>
#include<cmath>
//Display in the terminal the following function :f(x) = sin(x) + ln(x) //
void func()
{
double func;
for(int i=1 ;i <=10;i++)
{
func=sin(i)+log(i);
std::cout<<"x range from[1 10] :"<< func<<std::endl;
}
}
int main()
{
std::cout<<"f(x)= sin(x)+ln(x)"<<std::endl;
func();
}
|
dbbd5a8b3b8b6d06c6462ea09c9c7a078a7b603b
|
c237c1e42a306927d0225d04cdba6f02c74c7b15
|
/Various arduino/wyjscie_pwm2.ino
|
eebb3fa678a75dc1740e6643b81e8679c925ef81
|
[] |
no_license
|
Uadi/Code-examples
|
5381d9a21fbfd7369fb61831c428e0ecbeb26b8f
|
31bc2336b5e647bf8fe5c2057c2d98d149cabbd2
|
refs/heads/master
| 2021-04-15T18:45:00.534063
| 2018-03-25T17:16:30
| 2018-03-25T17:16:30
| 126,689,097
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 660
|
ino
|
wyjscie_pwm2.ino
|
int wypelnienie = 0;
int zmiana = 5;
int i = 0;
boolean rosnie = true;
void setup() {
pinMode(3, OUTPUT); // konfiguracja pinu jako wyjscie
}
void loop() {
while (rosnie == true) {
analogWrite(3, wypelnienie); //generowanie sygnalu o danym wypelnieniu
wypelnienie += zmiana;
delay(10);
if (wypelnienie == 255) {
analogWrite(3, wypelnienie);
rosnie = false;
delay(100);
}
}
while (rosnie == false) {
analogWrite(3, wypelnienie); //generowanie sygnalu o danym wypelnieniu
wypelnienie -= zmiana;
delay(15);
if (wypelnienie == 0) {
analogWrite(3, wypelnienie);
rosnie = true;
delay(100);
}
}
}
|
5fa4f4664173b7c43eb9d4e4a7d916276b41da5a
|
57943207d080f5136c61d2d4727e45c760c7e973
|
/Include/latest/um/abi/windows.phone.restricted.cellular.videotelephony.h
|
ec804d357afedab770f8e22969f3af01e4867f67
|
[
"MIT"
] |
permissive
|
Watch-Later/windows-sdk-headers
|
e43a22d0e323455c78789c3d8ab9af48aa122601
|
e83bf2af3df09ec5420725bd79ccfe1bb534722c
|
refs/heads/master
| 2022-11-12T09:39:11.748130
| 2020-07-04T22:16:07
| 2020-07-04T22:16:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 197,815
|
h
|
windows.phone.restricted.cellular.videotelephony.h
|
/* Header file automatically generated from windows.phone.restricted.cellular.videotelephony.idl */
/*
* File built with Microsoft(R) MIDLRT Compiler Engine Version 10.00.0229
*/
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* 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 __windows2Ephone2Erestricted2Ecellular2Evideotelephony_h__
#define __windows2Ephone2Erestricted2Ecellular2Evideotelephony_h__
#ifndef __windows2Ephone2Erestricted2Ecellular2Evideotelephony_p_h__
#define __windows2Ephone2Erestricted2Ecellular2Evideotelephony_p_h__
#pragma once
// Ensure that the setting of the /ns_prefix command line switch is consistent for all headers.
// If you get an error from the compiler indicating "warning C4005: 'CHECK_NS_PREFIX_STATE': macro redefinition", this
// indicates that you have included two different headers with different settings for the /ns_prefix MIDL command line switch
#if !defined(DISABLE_NS_PREFIX_CHECKS)
#define CHECK_NS_PREFIX_STATE "always"
#endif // !defined(DISABLE_NS_PREFIX_CHECKS)
#pragma push_macro("MIDL_CONST_ID")
#undef MIDL_CONST_ID
#define MIDL_CONST_ID const __declspec(selectany)
// API Contract Inclusion Definitions
#if !defined(SPECIFIC_API_CONTRACT_DEFINITIONS)
#if !defined(WINDOWS_APPLICATIONMODEL_ACTIVATION_ACTIVATEDEVENTSCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_ACTIVATION_ACTIVATEDEVENTSCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_APPLICATIONMODEL_ACTIVATION_ACTIVATEDEVENTSCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_ACTIVATION_ACTIVATIONCAMERASETTINGSCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_ACTIVATION_ACTIVATIONCAMERASETTINGSCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_APPLICATIONMODEL_ACTIVATION_ACTIVATIONCAMERASETTINGSCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_ACTIVATION_CONTACTACTIVATEDEVENTSCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_ACTIVATION_CONTACTACTIVATEDEVENTSCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_APPLICATIONMODEL_ACTIVATION_CONTACTACTIVATEDEVENTSCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_ACTIVATION_WEBUISEARCHACTIVATEDEVENTSCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_ACTIVATION_WEBUISEARCHACTIVATEDEVENTSCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_APPLICATIONMODEL_ACTIVATION_WEBUISEARCHACTIVATEDEVENTSCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_CALLS_BACKGROUND_CALLSBACKGROUNDCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_CALLS_BACKGROUND_CALLSBACKGROUNDCONTRACT_VERSION 0x20000
#endif // defined(WINDOWS_APPLICATIONMODEL_CALLS_BACKGROUND_CALLSBACKGROUNDCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_CALLS_CALLSPHONECONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_CALLS_CALLSPHONECONTRACT_VERSION 0x50000
#endif // defined(WINDOWS_APPLICATIONMODEL_CALLS_CALLSPHONECONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_CALLS_CALLSVOIPCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_CALLS_CALLSVOIPCONTRACT_VERSION 0x40000
#endif // defined(WINDOWS_APPLICATIONMODEL_CALLS_CALLSVOIPCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_CALLS_LOCKSCREENCALLCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_CALLS_LOCKSCREENCALLCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_APPLICATIONMODEL_CALLS_LOCKSCREENCALLCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_COMMUNICATIONBLOCKING_COMMUNICATIONBLOCKINGCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_COMMUNICATIONBLOCKING_COMMUNICATIONBLOCKINGCONTRACT_VERSION 0x20000
#endif // defined(WINDOWS_APPLICATIONMODEL_COMMUNICATIONBLOCKING_COMMUNICATIONBLOCKINGCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_FULLTRUSTAPPCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_FULLTRUSTAPPCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_APPLICATIONMODEL_FULLTRUSTAPPCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_SEARCH_SEARCHCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_SEARCH_SEARCHCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_APPLICATIONMODEL_SEARCH_SEARCHCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_STARTUPTASKCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_STARTUPTASKCONTRACT_VERSION 0x30000
#endif // defined(WINDOWS_APPLICATIONMODEL_STARTUPTASKCONTRACT_VERSION)
#if !defined(WINDOWS_APPLICATIONMODEL_WALLET_WALLETCONTRACT_VERSION)
#define WINDOWS_APPLICATIONMODEL_WALLET_WALLETCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_APPLICATIONMODEL_WALLET_WALLETCONTRACT_VERSION)
#if !defined(WINDOWS_DEVICES_PRINTERS_EXTENSIONS_EXTENSIONSCONTRACT_VERSION)
#define WINDOWS_DEVICES_PRINTERS_EXTENSIONS_EXTENSIONSCONTRACT_VERSION 0x20000
#endif // defined(WINDOWS_DEVICES_PRINTERS_EXTENSIONS_EXTENSIONSCONTRACT_VERSION)
#if !defined(WINDOWS_DEVICES_SMARTCARDS_SMARTCARDBACKGROUNDTRIGGERCONTRACT_VERSION)
#define WINDOWS_DEVICES_SMARTCARDS_SMARTCARDBACKGROUNDTRIGGERCONTRACT_VERSION 0x30000
#endif // defined(WINDOWS_DEVICES_SMARTCARDS_SMARTCARDBACKGROUNDTRIGGERCONTRACT_VERSION)
#if !defined(WINDOWS_DEVICES_SMARTCARDS_SMARTCARDEMULATORCONTRACT_VERSION)
#define WINDOWS_DEVICES_SMARTCARDS_SMARTCARDEMULATORCONTRACT_VERSION 0x60000
#endif // defined(WINDOWS_DEVICES_SMARTCARDS_SMARTCARDEMULATORCONTRACT_VERSION)
#if !defined(WINDOWS_DEVICES_SMS_LEGACYSMSAPICONTRACT_VERSION)
#define WINDOWS_DEVICES_SMS_LEGACYSMSAPICONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_DEVICES_SMS_LEGACYSMSAPICONTRACT_VERSION)
#if !defined(WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION)
#define WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION 0x40000
#endif // defined(WINDOWS_FOUNDATION_FOUNDATIONCONTRACT_VERSION)
#if !defined(WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION)
#define WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION 0xa0000
#endif // defined(WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION)
#if !defined(WINDOWS_GAMING_INPUT_GAMINGINPUTPREVIEWCONTRACT_VERSION)
#define WINDOWS_GAMING_INPUT_GAMINGINPUTPREVIEWCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_GAMING_INPUT_GAMINGINPUTPREVIEWCONTRACT_VERSION)
#if !defined(WINDOWS_MEDIA_CAPTURE_APPBROADCASTCONTRACT_VERSION)
#define WINDOWS_MEDIA_CAPTURE_APPBROADCASTCONTRACT_VERSION 0x20000
#endif // defined(WINDOWS_MEDIA_CAPTURE_APPBROADCASTCONTRACT_VERSION)
#if !defined(WINDOWS_MEDIA_CAPTURE_APPCAPTURECONTRACT_VERSION)
#define WINDOWS_MEDIA_CAPTURE_APPCAPTURECONTRACT_VERSION 0x40000
#endif // defined(WINDOWS_MEDIA_CAPTURE_APPCAPTURECONTRACT_VERSION)
#if !defined(WINDOWS_MEDIA_CAPTURE_APPCAPTUREMETADATACONTRACT_VERSION)
#define WINDOWS_MEDIA_CAPTURE_APPCAPTUREMETADATACONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_MEDIA_CAPTURE_APPCAPTUREMETADATACONTRACT_VERSION)
#if !defined(WINDOWS_MEDIA_CAPTURE_CAMERACAPTUREUICONTRACT_VERSION)
#define WINDOWS_MEDIA_CAPTURE_CAMERACAPTUREUICONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_MEDIA_CAPTURE_CAMERACAPTUREUICONTRACT_VERSION)
#if !defined(WINDOWS_MEDIA_CAPTURE_GAMEBARCONTRACT_VERSION)
#define WINDOWS_MEDIA_CAPTURE_GAMEBARCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_MEDIA_CAPTURE_GAMEBARCONTRACT_VERSION)
#if !defined(WINDOWS_MEDIA_DEVICES_CALLCONTROLCONTRACT_VERSION)
#define WINDOWS_MEDIA_DEVICES_CALLCONTROLCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_MEDIA_DEVICES_CALLCONTROLCONTRACT_VERSION)
#if !defined(WINDOWS_MEDIA_MEDIACONTROLCONTRACT_VERSION)
#define WINDOWS_MEDIA_MEDIACONTROLCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_MEDIA_MEDIACONTROLCONTRACT_VERSION)
#if !defined(WINDOWS_MEDIA_PROTECTION_PROTECTIONRENEWALCONTRACT_VERSION)
#define WINDOWS_MEDIA_PROTECTION_PROTECTIONRENEWALCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_MEDIA_PROTECTION_PROTECTIONRENEWALCONTRACT_VERSION)
#if !defined(WINDOWS_NETWORKING_CONNECTIVITY_WWANCONTRACT_VERSION)
#define WINDOWS_NETWORKING_CONNECTIVITY_WWANCONTRACT_VERSION 0x20000
#endif // defined(WINDOWS_NETWORKING_CONNECTIVITY_WWANCONTRACT_VERSION)
#if !defined(WINDOWS_NETWORKING_SOCKETS_CONTROLCHANNELTRIGGERCONTRACT_VERSION)
#define WINDOWS_NETWORKING_SOCKETS_CONTROLCHANNELTRIGGERCONTRACT_VERSION 0x30000
#endif // defined(WINDOWS_NETWORKING_SOCKETS_CONTROLCHANNELTRIGGERCONTRACT_VERSION)
#if !defined(WINDOWS_PHONE_PHONECONTRACT_VERSION)
#define WINDOWS_PHONE_PHONECONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_PHONE_PHONECONTRACT_VERSION)
#if !defined(WINDOWS_PHONE_PHONEINTERNALCONTRACT_VERSION)
#define WINDOWS_PHONE_PHONEINTERNALCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_PHONE_PHONEINTERNALCONTRACT_VERSION)
#if !defined(WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION)
#define WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION)
#if !defined(WINDOWS_SECURITY_ENTERPRISEDATA_ENTERPRISEDATACONTRACT_VERSION)
#define WINDOWS_SECURITY_ENTERPRISEDATA_ENTERPRISEDATACONTRACT_VERSION 0x50000
#endif // defined(WINDOWS_SECURITY_ENTERPRISEDATA_ENTERPRISEDATACONTRACT_VERSION)
#if !defined(WINDOWS_STORAGE_PROVIDER_CLOUDFILESCONTRACT_VERSION)
#define WINDOWS_STORAGE_PROVIDER_CLOUDFILESCONTRACT_VERSION 0x40000
#endif // defined(WINDOWS_STORAGE_PROVIDER_CLOUDFILESCONTRACT_VERSION)
#if !defined(WINDOWS_SYSTEM_SYSTEMMANAGEMENTCONTRACT_VERSION)
#define WINDOWS_SYSTEM_SYSTEMMANAGEMENTCONTRACT_VERSION 0x70000
#endif // defined(WINDOWS_SYSTEM_SYSTEMMANAGEMENTCONTRACT_VERSION)
#if !defined(WINDOWS_UI_SHELL_SECURITYAPPMANAGERCONTRACT_VERSION)
#define WINDOWS_UI_SHELL_SECURITYAPPMANAGERCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_UI_SHELL_SECURITYAPPMANAGERCONTRACT_VERSION)
#if !defined(WINDOWS_UI_VIEWMANAGEMENT_VIEWMANAGEMENTVIEWSCALINGCONTRACT_VERSION)
#define WINDOWS_UI_VIEWMANAGEMENT_VIEWMANAGEMENTVIEWSCALINGCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_UI_VIEWMANAGEMENT_VIEWMANAGEMENTVIEWSCALINGCONTRACT_VERSION)
#if !defined(WINDOWS_UI_WEBUI_CORE_WEBUICOMMANDBARCONTRACT_VERSION)
#define WINDOWS_UI_WEBUI_CORE_WEBUICOMMANDBARCONTRACT_VERSION 0x10000
#endif // defined(WINDOWS_UI_WEBUI_CORE_WEBUICOMMANDBARCONTRACT_VERSION)
#endif // defined(SPECIFIC_API_CONTRACT_DEFINITIONS)
// Header files for imported files
#include "inspectable.h"
#include "AsyncInfo.h"
#include "EventToken.h"
#include "windowscontracts.h"
#include "Windows.Foundation.h"
#include "Windows.Graphics.Display.h"
// Importing Collections header
#include <windows.foundation.collections.h>
#if defined(__cplusplus) && !defined(CINTERFACE)
/* Forward Declarations */
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface ILocalVideoStream;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::ILocalVideoStream
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IRemoteVideoStream;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRemoteVideoStream
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IResolutionChangeEventArgs;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IResolutionChangeEventArgs
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IRotationChangeEventArgs;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRotationChangeEventArgs
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IVideoCall;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoCall
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IVideoCallFactory;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoCallFactory
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IVideoCallInitializationParameters;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoCallInitializationParameters
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IVideoQualityChangeEventArgs;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoQualityChangeEventArgs
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IVideoStateChangeEventArgs;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStateChangeEventArgs
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IVideoStream;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStream
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
interface IVideoStreamExt;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStreamExt
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_FWD_DEFINED__
// Parameterized interface forward declarations (C++)
// Collection interface definitions
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
class RemoteVideoStream;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
class RotationChangeEventArgs;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_USE
#define DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_USE
#if !defined(RO_NO_TEMPLATE_NAME)
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("b4758f55-75f0-53c2-b199-5d9590f1be42"))
ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::RemoteVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::RotationChangeEventArgs*> : ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::RemoteVideoStream*, ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRemoteVideoStream*>,ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::RotationChangeEventArgs*, ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRotationChangeEventArgs*>>
{
static const wchar_t* z_get_rc_name_impl()
{
return L"Windows.Foundation.TypedEventHandler`2<Windows.Phone.Restricted.Cellular.VideoTelephony.RemoteVideoStream, Windows.Phone.Restricted.Cellular.VideoTelephony.RotationChangeEventArgs>";
}
};
// Define a typedef for the parameterized interface specialization's mangled name.
// This allows code which uses the mangled name for the parameterized interface to access the
// correct parameterized interface specialization.
typedef ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::RemoteVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::RotationChangeEventArgs*> __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_t;
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_t
/* Foundation */ } /* Windows */ } /* ABI */ }
//// Define an alias for the C version of the interface for compatibility purposes.
//#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRemoteVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRotationChangeEventArgs*>
//#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_t ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRemoteVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRotationChangeEventArgs*>
#endif // !defined(RO_NO_TEMPLATE_NAME)
#endif /* DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_USE */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
class VideoQualityChangeEventArgs;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_USE
#define DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_USE
#if !defined(RO_NO_TEMPLATE_NAME)
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("ca109493-57a8-5118-9be5-b139acbfe98e"))
ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::RemoteVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoQualityChangeEventArgs*> : ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::RemoteVideoStream*, ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRemoteVideoStream*>,ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoQualityChangeEventArgs*, ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoQualityChangeEventArgs*>>
{
static const wchar_t* z_get_rc_name_impl()
{
return L"Windows.Foundation.TypedEventHandler`2<Windows.Phone.Restricted.Cellular.VideoTelephony.RemoteVideoStream, Windows.Phone.Restricted.Cellular.VideoTelephony.VideoQualityChangeEventArgs>";
}
};
// Define a typedef for the parameterized interface specialization's mangled name.
// This allows code which uses the mangled name for the parameterized interface to access the
// correct parameterized interface specialization.
typedef ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::RemoteVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoQualityChangeEventArgs*> __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_t;
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_t
/* Foundation */ } /* Windows */ } /* ABI */ }
//// Define an alias for the C version of the interface for compatibility purposes.
//#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRemoteVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoQualityChangeEventArgs*>
//#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_t ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRemoteVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoQualityChangeEventArgs*>
#endif // !defined(RO_NO_TEMPLATE_NAME)
#endif /* DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_USE */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
class VideoStream;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
class ResolutionChangeEventArgs;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_USE
#define DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_USE
#if !defined(RO_NO_TEMPLATE_NAME)
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("89be92a7-be21-5f45-a03f-6ecd7fd37d2e"))
ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::ResolutionChangeEventArgs*> : ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStream*, ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStream*>,ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::ResolutionChangeEventArgs*, ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IResolutionChangeEventArgs*>>
{
static const wchar_t* z_get_rc_name_impl()
{
return L"Windows.Foundation.TypedEventHandler`2<Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStream, Windows.Phone.Restricted.Cellular.VideoTelephony.ResolutionChangeEventArgs>";
}
};
// Define a typedef for the parameterized interface specialization's mangled name.
// This allows code which uses the mangled name for the parameterized interface to access the
// correct parameterized interface specialization.
typedef ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::ResolutionChangeEventArgs*> __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_t;
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_t
/* Foundation */ } /* Windows */ } /* ABI */ }
//// Define an alias for the C version of the interface for compatibility purposes.
//#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IResolutionChangeEventArgs*>
//#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_t ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IResolutionChangeEventArgs*>
#endif // !defined(RO_NO_TEMPLATE_NAME)
#endif /* DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_USE */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
class VideoStateChangeEventArgs;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_USE
#define DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_USE
#if !defined(RO_NO_TEMPLATE_NAME)
namespace ABI { namespace Windows { namespace Foundation {
template <>
struct __declspec(uuid("8957cc9a-a959-5706-8d1f-aa2281b7fd2e"))
ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStateChangeEventArgs*> : ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStream*, ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStream*>,ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStateChangeEventArgs*, ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStateChangeEventArgs*>>
{
static const wchar_t* z_get_rc_name_impl()
{
return L"Windows.Foundation.TypedEventHandler`2<Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStream, Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStateChangeEventArgs>";
}
};
// Define a typedef for the parameterized interface specialization's mangled name.
// This allows code which uses the mangled name for the parameterized interface to access the
// correct parameterized interface specialization.
typedef ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStateChangeEventArgs*> __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_t;
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_t
/* Foundation */ } /* Windows */ } /* ABI */ }
//// Define an alias for the C version of the interface for compatibility purposes.
//#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStateChangeEventArgs*>
//#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_t ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStream*,ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoStateChangeEventArgs*>
#endif // !defined(RO_NO_TEMPLATE_NAME)
#endif /* DEF___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_USE */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef ____x_ABI_CWindows_CFoundation_CIAsyncAction_FWD_DEFINED__
#define ____x_ABI_CWindows_CFoundation_CIAsyncAction_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Foundation {
interface IAsyncAction;
} /* Foundation */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CFoundation_CIAsyncAction ABI::Windows::Foundation::IAsyncAction
#endif // ____x_ABI_CWindows_CFoundation_CIAsyncAction_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CFoundation_CIClosable_FWD_DEFINED__
#define ____x_ABI_CWindows_CFoundation_CIClosable_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Foundation {
interface IClosable;
} /* Foundation */
} /* Windows */
} /* ABI */
#define __x_ABI_CWindows_CFoundation_CIClosable ABI::Windows::Foundation::IClosable
#endif // ____x_ABI_CWindows_CFoundation_CIClosable_FWD_DEFINED__
namespace ABI {
namespace Windows {
namespace Foundation {
typedef struct Size Size;
} /* Foundation */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Graphics {
namespace Display {
typedef enum DisplayOrientations : unsigned int DisplayOrientations;
} /* Display */
} /* Graphics */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
typedef enum CameraLocation : int CameraLocation;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
typedef enum StreamIdentifier : int StreamIdentifier;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
typedef enum VideoQuality : int VideoQuality;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
typedef enum VideoStreamState : int VideoStreamState;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
class LocalVideoStream;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
class VideoCall;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
class VideoCallInitializationParameters;
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
/*
*
* Struct Windows.Phone.Restricted.Cellular.VideoTelephony.CameraLocation
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [v1_enum, contract] */
enum CameraLocation : int
{
CameraLocation_Front = 0,
CameraLocation_Back = 1,
};
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Struct Windows.Phone.Restricted.Cellular.VideoTelephony.StreamIdentifier
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [v1_enum, contract] */
enum StreamIdentifier : int
{
StreamIdentifier_LocalPreview = 0,
StreamIdentifier_RemoteView = 1,
};
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Struct Windows.Phone.Restricted.Cellular.VideoTelephony.VideoQuality
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [v1_enum, contract] */
enum VideoQuality : int
{
VideoQuality_Low = 0,
VideoQuality_Average = 1,
VideoQuality_High = 2,
};
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Struct Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStreamState
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [v1_enum, contract] */
enum VideoStreamState : int
{
VideoStreamState_Initialized = 0,
VideoStreamState_ResourcesAcquired = 1,
VideoStreamState_Playing = 2,
VideoStreamState_Paused = 3,
VideoStreamState_Destroyed = 4,
};
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.ILocalVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.LocalVideoStream
*
*
* Any object which implements this interface must also implement the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_ILocalVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.ILocalVideoStream";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("54024241-6C0B-49BB-B200-E4A6EC2BDEED"), exclusiveto, contract] */
MIDL_INTERFACE("54024241-6C0B-49BB-B200-E4A6EC2BDEED")
ILocalVideoStream : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE SetDeviceOrientation(
/* [in] */ABI::Windows::Graphics::Display::DisplayOrientations orientation
) = 0;
};
extern MIDL_CONST_ID IID & IID_ILocalVideoStream=_uuidof(ILocalVideoStream);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IRemoteVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.RemoteVideoStream
*
*
* Any object which implements this interface must also implement the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IRemoteVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IRemoteVideoStream";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("71EC305F-7CAD-4BBF-953A-810DB7D68D4C"), exclusiveto, contract] */
MIDL_INTERFACE("71EC305F-7CAD-4BBF-953A-810DB7D68D4C")
IRemoteVideoStream : public IInspectable
{
public:
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_Rotation(
/* [retval, out] */__RPC__out INT32 * degreesCw
) = 0;
/* [eventadd] */virtual HRESULT STDMETHODCALLTYPE add_RotationChanged(
/* [in] */__RPC__in_opt __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs * handler,
/* [retval, out] */__RPC__out EventRegistrationToken * registrationToken
) = 0;
/* [eventremove] */virtual HRESULT STDMETHODCALLTYPE remove_RotationChanged(
/* [in] */EventRegistrationToken registrationToken
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_Quality(
/* [retval, out] */__RPC__out ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoQuality * quality
) = 0;
/* [eventadd] */virtual HRESULT STDMETHODCALLTYPE add_QualityChanged(
/* [in] */__RPC__in_opt __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs * handler,
/* [retval, out] */__RPC__out EventRegistrationToken * registrationToken
) = 0;
/* [eventremove] */virtual HRESULT STDMETHODCALLTYPE remove_QualityChanged(
/* [in] */EventRegistrationToken registrationToken
) = 0;
};
extern MIDL_CONST_ID IID & IID_IRemoteVideoStream=_uuidof(IRemoteVideoStream);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IResolutionChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.ResolutionChangeEventArgs
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IResolutionChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IResolutionChangeEventArgs";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("01F51655-5E82-4D53-BED4-EE2551467495"), exclusiveto, contract] */
MIDL_INTERFACE("01F51655-5E82-4D53-BED4-EE2551467495")
IResolutionChangeEventArgs : public IInspectable
{
public:
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_Resolution(
/* [retval, out] */__RPC__out ABI::Windows::Foundation::Size * value
) = 0;
};
extern MIDL_CONST_ID IID & IID_IResolutionChangeEventArgs=_uuidof(IResolutionChangeEventArgs);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IRotationChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.RotationChangeEventArgs
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IRotationChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IRotationChangeEventArgs";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("16DF4E9D-FB47-40B7-B8B8-55CFFAEA4251"), exclusiveto, contract] */
MIDL_INTERFACE("16DF4E9D-FB47-40B7-B8B8-55CFFAEA4251")
IRotationChangeEventArgs : public IInspectable
{
public:
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_Rotation(
/* [retval, out] */__RPC__out INT32 * degreesCw
) = 0;
};
extern MIDL_CONST_ID IID & IID_IRotationChangeEventArgs=_uuidof(IRotationChangeEventArgs);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCall
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCall
*
*
* Any object which implements this interface must also implement the following interfaces:
* Windows.Foundation.IClosable
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoCall[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCall";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("5EF23627-E34A-4CB3-8C41-5A5E8265A9DA"), exclusiveto, contract] */
MIDL_INTERFACE("5EF23627-E34A-4CB3-8C41-5A5E8265A9DA")
IVideoCall : public IInspectable
{
public:
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_Id(
/* [retval, out] */__RPC__out INT32 * callId
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_CameraLocation(
/* [retval, out] */__RPC__out ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::CameraLocation * cameraLocation
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_RemoteStream(
/* [retval, out] */__RPC__deref_out_opt ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IRemoteVideoStream * * remoteStream
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_LocalStream(
/* [retval, out] */__RPC__deref_out_opt ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::ILocalVideoStream * * localStream
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_Visibility(
/* [retval, out] */__RPC__out ::boolean * visible
) = 0;
virtual HRESULT STDMETHODCALLTYPE SetVisibilityChangeAsync(
/* [in] */::boolean visible,
/* [retval, out] */__RPC__deref_out_opt ABI::Windows::Foundation::IAsyncAction * * asyncAction
) = 0;
virtual HRESULT STDMETHODCALLTYPE SetCameraLocationAsync(
/* [in] */ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::CameraLocation cameraLocation,
/* [retval, out] */__RPC__deref_out_opt ABI::Windows::Foundation::IAsyncAction * * asyncAction
) = 0;
};
extern MIDL_CONST_ID IID & IID_IVideoCall=_uuidof(IVideoCall);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallFactory
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCall
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoCallFactory[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallFactory";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("8E7C1701-821A-4CCC-9CB8-889BC3CC8468"), exclusiveto, contract] */
MIDL_INTERFACE("8E7C1701-821A-4CCC-9CB8-889BC3CC8468")
IVideoCallFactory : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateVideoCall(
/* [in] */__RPC__in_opt ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoCallInitializationParameters * parameters,
/* [retval, out] */__RPC__deref_out_opt ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::IVideoCall * * videoCall
) = 0;
};
extern MIDL_CONST_ID IID & IID_IVideoCallFactory=_uuidof(IVideoCallFactory);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallInitializationParameters
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCallInitializationParameters
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoCallInitializationParameters[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallInitializationParameters";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("A166B7F6-A433-4326-85B1-0F532180E6D4"), exclusiveto, contract] */
MIDL_INTERFACE("A166B7F6-A433-4326-85B1-0F532180E6D4")
IVideoCallInitializationParameters : public IInspectable
{
public:
/* [propput] */virtual HRESULT STDMETHODCALLTYPE put_CallId(
/* [in] */INT32 callId
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_CallId(
/* [retval, out] */__RPC__out INT32 * callId
) = 0;
/* [propput] */virtual HRESULT STDMETHODCALLTYPE put_LocalOrientation(
/* [in] */ABI::Windows::Graphics::Display::DisplayOrientations value
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_LocalOrientation(
/* [retval, out] */__RPC__out ABI::Windows::Graphics::Display::DisplayOrientations * value
) = 0;
/* [propput] */virtual HRESULT STDMETHODCALLTYPE put_CameraLocation(
/* [in] */ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::CameraLocation cameraLocation
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_CameraLocation(
/* [retval, out] */__RPC__out ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::CameraLocation * cameraLocation
) = 0;
/* [propput] */virtual HRESULT STDMETHODCALLTYPE put_LocalSurface(
/* [in] */__RPC__in HSTRING localSurface
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_LocalSurface(
/* [retval, out] */__RPC__deref_out_opt HSTRING * localSurface
) = 0;
/* [propput] */virtual HRESULT STDMETHODCALLTYPE put_RemoteSurface(
/* [in] */__RPC__in HSTRING remoteSurface
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_RemoteSurface(
/* [retval, out] */__RPC__deref_out_opt HSTRING * remoteSurface
) = 0;
};
extern MIDL_CONST_ID IID & IID_IVideoCallInitializationParameters=_uuidof(IVideoCallInitializationParameters);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoQualityChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoQualityChangeEventArgs
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoQualityChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoQualityChangeEventArgs";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("69646776-1DFB-4DB4-9EDB-8D15AF3C00C4"), exclusiveto, contract] */
MIDL_INTERFACE("69646776-1DFB-4DB4-9EDB-8D15AF3C00C4")
IVideoQualityChangeEventArgs : public IInspectable
{
public:
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_Quality(
/* [retval, out] */__RPC__out ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoQuality * value
) = 0;
};
extern MIDL_CONST_ID IID & IID_IVideoQualityChangeEventArgs=_uuidof(IVideoQualityChangeEventArgs);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStateChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStateChangeEventArgs
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoStateChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStateChangeEventArgs";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("5E77A448-094D-4DCE-95AC-CDD849826FED"), exclusiveto, contract] */
MIDL_INTERFACE("5E77A448-094D-4DCE-95AC-CDD849826FED")
IVideoStateChangeEventArgs : public IInspectable
{
public:
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_State(
/* [retval, out] */__RPC__out ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStreamState * value
) = 0;
};
extern MIDL_CONST_ID IID & IID_IVideoStateChangeEventArgs=_uuidof(IVideoStateChangeEventArgs);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("71867226-5936-4D2F-837E-A902EA3B4213"), contract] */
MIDL_INTERFACE("71867226-5936-4D2F-837E-A902EA3B4213")
IVideoStream : public IInspectable
{
public:
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_Id(
/* [retval, out] */__RPC__out ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::StreamIdentifier * streamId
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_CallId(
/* [retval, out] */__RPC__out INT32 * callId
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_State(
/* [retval, out] */__RPC__out ABI::Windows::Phone::Restricted::Cellular::VideoTelephony::VideoStreamState * state
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_Resolution(
/* [retval, out] */__RPC__out ABI::Windows::Foundation::Size * resolution
) = 0;
/* [propget] */virtual HRESULT STDMETHODCALLTYPE get_BroadcastingPort(
/* [retval, out] */__RPC__deref_out_opt HSTRING * port
) = 0;
/* [eventadd] */virtual HRESULT STDMETHODCALLTYPE add_ResolutionChanged(
/* [in] */__RPC__in_opt __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs * handler,
/* [retval, out] */__RPC__out EventRegistrationToken * registrationToken
) = 0;
/* [eventremove] */virtual HRESULT STDMETHODCALLTYPE remove_ResolutionChanged(
/* [in] */EventRegistrationToken registrationToken
) = 0;
/* [eventadd] */virtual HRESULT STDMETHODCALLTYPE add_StateChanged(
/* [in] */__RPC__in_opt __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs * handler,
/* [retval, out] */__RPC__out EventRegistrationToken * registrationToken
) = 0;
/* [eventremove] */virtual HRESULT STDMETHODCALLTYPE remove_StateChanged(
/* [in] */EventRegistrationToken registrationToken
) = 0;
};
extern MIDL_CONST_ID IID & IID_IVideoStream=_uuidof(IVideoStream);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoStreamExt[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt";
namespace ABI {
namespace Windows {
namespace Phone {
namespace Restricted {
namespace Cellular {
namespace VideoTelephony {
/* [object, uuid("9010592C-61F3-48C7-8F2D-33944E7A5DA3"), contract] */
MIDL_INTERFACE("9010592C-61F3-48C7-8F2D-33944E7A5DA3")
IVideoStreamExt : public IInspectable
{
public:
virtual HRESULT STDMETHODCALLTYPE SetResolution(
/* [in] */ABI::Windows::Foundation::Size resolution
) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSwapChainHandleForProcess(
/* [in] */UINT32 targetProcessId,
/* [retval, out] */__RPC__out UINT64 * phSwapChain
) = 0;
};
extern MIDL_CONST_ID IID & IID_IVideoStreamExt=_uuidof(IVideoStreamExt);
} /* VideoTelephony */
} /* Cellular */
} /* Restricted */
} /* Phone */
} /* Windows */
} /* ABI */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.LocalVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.ILocalVideoStream ** Default Interface **
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_LocalVideoStream_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_LocalVideoStream_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_LocalVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.LocalVideoStream";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.RemoteVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IRemoteVideoStream ** Default Interface **
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_RemoteVideoStream_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_RemoteVideoStream_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_RemoteVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.RemoteVideoStream";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.ResolutionChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IResolutionChangeEventArgs ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_ResolutionChangeEventArgs_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_ResolutionChangeEventArgs_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_ResolutionChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.ResolutionChangeEventArgs";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.RotationChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IRotationChangeEventArgs ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_RotationChangeEventArgs_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_RotationChangeEventArgs_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_RotationChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.RotationChangeEventArgs";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCall
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCall ** Default Interface **
* Windows.Foundation.IClosable
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCall_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCall_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCall[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCall";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCallInitializationParameters
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallInitializationParameters ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCallInitializationParameters_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCallInitializationParameters_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCallInitializationParameters[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCallInitializationParameters";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoQualityChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoQualityChangeEventArgs ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoQualityChangeEventArgs_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoQualityChangeEventArgs_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoQualityChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoQualityChangeEventArgs";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStateChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStateChangeEventArgs ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStateChangeEventArgs_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStateChangeEventArgs_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStateChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStateChangeEventArgs";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream ** Default Interface **
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStream_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStream_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStream";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#else // !defined(__cplusplus)
/* Forward Declarations */
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_FWD_DEFINED__
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt;
#endif // ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_FWD_DEFINED__
// Parameterized interface forward declarations (C)
// Collection interface definitions
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_INTERFACE_DEFINED__)
#define ____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_INTERFACE_DEFINED__
typedef interface __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs;
// Declare the parameterized interface IID.
EXTERN_C const IID IID___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs;
typedef struct __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs * This);
ULONG ( STDMETHODCALLTYPE *Release )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs * This);
HRESULT ( STDMETHODCALLTYPE *Invoke )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs * This,/* [in] */ __RPC__in_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * sender,/* [in] */ __RPC__in_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs * e);
END_INTERFACE
} __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgsVtbl;
interface __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs
{
CONST_VTBL struct __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_Invoke(This,sender,e) \
( (This)->lpVtbl -> Invoke(This,sender,e) )
#endif /* COBJMACROS */
#endif // ____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs_INTERFACE_DEFINED__
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_INTERFACE_DEFINED__)
#define ____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_INTERFACE_DEFINED__
typedef interface __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs;
// Declare the parameterized interface IID.
EXTERN_C const IID IID___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs;
typedef struct __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs * This);
ULONG ( STDMETHODCALLTYPE *Release )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs * This);
HRESULT ( STDMETHODCALLTYPE *Invoke )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs * This,/* [in] */ __RPC__in_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * sender,/* [in] */ __RPC__in_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs * e);
END_INTERFACE
} __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgsVtbl;
interface __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs
{
CONST_VTBL struct __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_Invoke(This,sender,e) \
( (This)->lpVtbl -> Invoke(This,sender,e) )
#endif /* COBJMACROS */
#endif // ____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs_INTERFACE_DEFINED__
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_INTERFACE_DEFINED__)
#define ____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_INTERFACE_DEFINED__
typedef interface __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs;
// Declare the parameterized interface IID.
EXTERN_C const IID IID___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs;
typedef struct __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs * This);
ULONG ( STDMETHODCALLTYPE *Release )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs * This);
HRESULT ( STDMETHODCALLTYPE *Invoke )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs * This,/* [in] */ __RPC__in_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * sender,/* [in] */ __RPC__in_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs * e);
END_INTERFACE
} __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgsVtbl;
interface __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs
{
CONST_VTBL struct __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_Invoke(This,sender,e) \
( (This)->lpVtbl -> Invoke(This,sender,e) )
#endif /* COBJMACROS */
#endif // ____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs_INTERFACE_DEFINED__
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_INTERFACE_DEFINED__)
#define ____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_INTERFACE_DEFINED__
typedef interface __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs;
// Declare the parameterized interface IID.
EXTERN_C const IID IID___FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs;
typedef struct __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs * This);
ULONG ( STDMETHODCALLTYPE *Release )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs * This);
HRESULT ( STDMETHODCALLTYPE *Invoke )(__RPC__in __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs * This,/* [in] */ __RPC__in_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * sender,/* [in] */ __RPC__in_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs * e);
END_INTERFACE
} __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgsVtbl;
interface __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs
{
CONST_VTBL struct __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_Invoke(This,sender,e) \
( (This)->lpVtbl -> Invoke(This,sender,e) )
#endif /* COBJMACROS */
#endif // ____FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs_INTERFACE_DEFINED__
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef ____x_ABI_CWindows_CFoundation_CIAsyncAction_FWD_DEFINED__
#define ____x_ABI_CWindows_CFoundation_CIAsyncAction_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CFoundation_CIAsyncAction __x_ABI_CWindows_CFoundation_CIAsyncAction;
#endif // ____x_ABI_CWindows_CFoundation_CIAsyncAction_FWD_DEFINED__
#ifndef ____x_ABI_CWindows_CFoundation_CIClosable_FWD_DEFINED__
#define ____x_ABI_CWindows_CFoundation_CIClosable_FWD_DEFINED__
typedef interface __x_ABI_CWindows_CFoundation_CIClosable __x_ABI_CWindows_CFoundation_CIClosable;
#endif // ____x_ABI_CWindows_CFoundation_CIClosable_FWD_DEFINED__
typedef struct __x_ABI_CWindows_CFoundation_CSize __x_ABI_CWindows_CFoundation_CSize;
typedef enum __x_ABI_CWindows_CGraphics_CDisplay_CDisplayOrientations __x_ABI_CWindows_CGraphics_CDisplay_CDisplayOrientations;
typedef enum __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CCameraLocation __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CCameraLocation;
typedef enum __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CStreamIdentifier __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CStreamIdentifier;
typedef enum __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoQuality __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoQuality;
typedef enum __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoStreamState __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoStreamState;
/*
*
* Struct Windows.Phone.Restricted.Cellular.VideoTelephony.CameraLocation
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/* [v1_enum, contract] */
enum __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CCameraLocation
{
CameraLocation_Front = 0,
CameraLocation_Back = 1,
};
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Struct Windows.Phone.Restricted.Cellular.VideoTelephony.StreamIdentifier
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/* [v1_enum, contract] */
enum __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CStreamIdentifier
{
StreamIdentifier_LocalPreview = 0,
StreamIdentifier_RemoteView = 1,
};
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Struct Windows.Phone.Restricted.Cellular.VideoTelephony.VideoQuality
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/* [v1_enum, contract] */
enum __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoQuality
{
VideoQuality_Low = 0,
VideoQuality_Average = 1,
VideoQuality_High = 2,
};
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Struct Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStreamState
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/* [v1_enum, contract] */
enum __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoStreamState
{
VideoStreamState_Initialized = 0,
VideoStreamState_ResourcesAcquired = 1,
VideoStreamState_Playing = 2,
VideoStreamState_Paused = 3,
VideoStreamState_Destroyed = 4,
};
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.ILocalVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.LocalVideoStream
*
*
* Any object which implements this interface must also implement the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_ILocalVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.ILocalVideoStream";
/* [object, uuid("54024241-6C0B-49BB-B200-E4A6EC2BDEED"), exclusiveto, contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStreamVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
HRESULT ( STDMETHODCALLTYPE *SetDeviceOrientation )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream * This,
/* [in] */__x_ABI_CWindows_CGraphics_CDisplay_CDisplayOrientations orientation
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStreamVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStreamVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_SetDeviceOrientation(This,orientation) \
( (This)->lpVtbl->SetDeviceOrientation(This,orientation) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IRemoteVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.RemoteVideoStream
*
*
* Any object which implements this interface must also implement the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IRemoteVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IRemoteVideoStream";
/* [object, uuid("71EC305F-7CAD-4BBF-953A-810DB7D68D4C"), exclusiveto, contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStreamVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_Rotation )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This,
/* [retval, out] */__RPC__out INT32 * degreesCw
);
/* [eventadd] */HRESULT ( STDMETHODCALLTYPE *add_RotationChanged )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This,
/* [in] */__RPC__in_opt __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRotationChangeEventArgs * handler,
/* [retval, out] */__RPC__out EventRegistrationToken * registrationToken
);
/* [eventremove] */HRESULT ( STDMETHODCALLTYPE *remove_RotationChanged )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This,
/* [in] */EventRegistrationToken registrationToken
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_Quality )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoQuality * quality
);
/* [eventadd] */HRESULT ( STDMETHODCALLTYPE *add_QualityChanged )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This,
/* [in] */__RPC__in_opt __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CRemoteVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoQualityChangeEventArgs * handler,
/* [retval, out] */__RPC__out EventRegistrationToken * registrationToken
);
/* [eventremove] */HRESULT ( STDMETHODCALLTYPE *remove_QualityChanged )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * This,
/* [in] */EventRegistrationToken registrationToken
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStreamVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStreamVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_get_Rotation(This,degreesCw) \
( (This)->lpVtbl->get_Rotation(This,degreesCw) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_add_RotationChanged(This,handler,registrationToken) \
( (This)->lpVtbl->add_RotationChanged(This,handler,registrationToken) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_remove_RotationChanged(This,registrationToken) \
( (This)->lpVtbl->remove_RotationChanged(This,registrationToken) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_get_Quality(This,quality) \
( (This)->lpVtbl->get_Quality(This,quality) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_add_QualityChanged(This,handler,registrationToken) \
( (This)->lpVtbl->add_QualityChanged(This,handler,registrationToken) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_remove_QualityChanged(This,registrationToken) \
( (This)->lpVtbl->remove_QualityChanged(This,registrationToken) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IResolutionChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.ResolutionChangeEventArgs
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IResolutionChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IResolutionChangeEventArgs";
/* [object, uuid("01F51655-5E82-4D53-BED4-EE2551467495"), exclusiveto, contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_Resolution )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CFoundation_CSize * value
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgsVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_get_Resolution(This,value) \
( (This)->lpVtbl->get_Resolution(This,value) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIResolutionChangeEventArgs_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IRotationChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.RotationChangeEventArgs
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IRotationChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IRotationChangeEventArgs";
/* [object, uuid("16DF4E9D-FB47-40B7-B8B8-55CFFAEA4251"), exclusiveto, contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_Rotation )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs * This,
/* [retval, out] */__RPC__out INT32 * degreesCw
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgsVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_get_Rotation(This,degreesCw) \
( (This)->lpVtbl->get_Rotation(This,degreesCw) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRotationChangeEventArgs_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCall
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCall
*
*
* Any object which implements this interface must also implement the following interfaces:
* Windows.Foundation.IClosable
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoCall[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCall";
/* [object, uuid("5EF23627-E34A-4CB3-8C41-5A5E8265A9DA"), exclusiveto, contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_Id )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [retval, out] */__RPC__out INT32 * callId
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_CameraLocation )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CCameraLocation * cameraLocation
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_RemoteStream )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [retval, out] */__RPC__deref_out_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIRemoteVideoStream * * remoteStream
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_LocalStream )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [retval, out] */__RPC__deref_out_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CILocalVideoStream * * localStream
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_Visibility )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [retval, out] */__RPC__out boolean * visible
);
HRESULT ( STDMETHODCALLTYPE *SetVisibilityChangeAsync )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [in] */boolean visible,
/* [retval, out] */__RPC__deref_out_opt __x_ABI_CWindows_CFoundation_CIAsyncAction * * asyncAction
);
HRESULT ( STDMETHODCALLTYPE *SetCameraLocationAsync )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * This,
/* [in] */__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CCameraLocation cameraLocation,
/* [retval, out] */__RPC__deref_out_opt __x_ABI_CWindows_CFoundation_CIAsyncAction * * asyncAction
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_get_Id(This,callId) \
( (This)->lpVtbl->get_Id(This,callId) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_get_CameraLocation(This,cameraLocation) \
( (This)->lpVtbl->get_CameraLocation(This,cameraLocation) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_get_RemoteStream(This,remoteStream) \
( (This)->lpVtbl->get_RemoteStream(This,remoteStream) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_get_LocalStream(This,localStream) \
( (This)->lpVtbl->get_LocalStream(This,localStream) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_get_Visibility(This,visible) \
( (This)->lpVtbl->get_Visibility(This,visible) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_SetVisibilityChangeAsync(This,visible,asyncAction) \
( (This)->lpVtbl->SetVisibilityChangeAsync(This,visible,asyncAction) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_SetCameraLocationAsync(This,cameraLocation,asyncAction) \
( (This)->lpVtbl->SetCameraLocationAsync(This,cameraLocation,asyncAction) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallFactory
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCall
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoCallFactory[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallFactory";
/* [object, uuid("8E7C1701-821A-4CCC-9CB8-889BC3CC8468"), exclusiveto, contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
HRESULT ( STDMETHODCALLTYPE *CreateVideoCall )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory * This,
/* [in] */__RPC__in_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * parameters,
/* [retval, out] */__RPC__deref_out_opt __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCall * * videoCall
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactoryVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_CreateVideoCall(This,parameters,videoCall) \
( (This)->lpVtbl->CreateVideoCall(This,parameters,videoCall) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallFactory_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallInitializationParameters
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCallInitializationParameters
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoCallInitializationParameters[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallInitializationParameters";
/* [object, uuid("A166B7F6-A433-4326-85B1-0F532180E6D4"), exclusiveto, contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParametersVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
/* [propput] */HRESULT ( STDMETHODCALLTYPE *put_CallId )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [in] */INT32 callId
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_CallId )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [retval, out] */__RPC__out INT32 * callId
);
/* [propput] */HRESULT ( STDMETHODCALLTYPE *put_LocalOrientation )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [in] */__x_ABI_CWindows_CGraphics_CDisplay_CDisplayOrientations value
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_LocalOrientation )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CGraphics_CDisplay_CDisplayOrientations * value
);
/* [propput] */HRESULT ( STDMETHODCALLTYPE *put_CameraLocation )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [in] */__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CCameraLocation cameraLocation
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_CameraLocation )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CCameraLocation * cameraLocation
);
/* [propput] */HRESULT ( STDMETHODCALLTYPE *put_LocalSurface )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [in] */__RPC__in HSTRING localSurface
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_LocalSurface )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [retval, out] */__RPC__deref_out_opt HSTRING * localSurface
);
/* [propput] */HRESULT ( STDMETHODCALLTYPE *put_RemoteSurface )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [in] */__RPC__in HSTRING remoteSurface
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_RemoteSurface )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters * This,
/* [retval, out] */__RPC__deref_out_opt HSTRING * remoteSurface
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParametersVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParametersVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_put_CallId(This,callId) \
( (This)->lpVtbl->put_CallId(This,callId) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_get_CallId(This,callId) \
( (This)->lpVtbl->get_CallId(This,callId) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_put_LocalOrientation(This,value) \
( (This)->lpVtbl->put_LocalOrientation(This,value) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_get_LocalOrientation(This,value) \
( (This)->lpVtbl->get_LocalOrientation(This,value) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_put_CameraLocation(This,cameraLocation) \
( (This)->lpVtbl->put_CameraLocation(This,cameraLocation) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_get_CameraLocation(This,cameraLocation) \
( (This)->lpVtbl->get_CameraLocation(This,cameraLocation) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_put_LocalSurface(This,localSurface) \
( (This)->lpVtbl->put_LocalSurface(This,localSurface) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_get_LocalSurface(This,localSurface) \
( (This)->lpVtbl->get_LocalSurface(This,localSurface) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_put_RemoteSurface(This,remoteSurface) \
( (This)->lpVtbl->put_RemoteSurface(This,remoteSurface) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_get_RemoteSurface(This,remoteSurface) \
( (This)->lpVtbl->get_RemoteSurface(This,remoteSurface) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoCallInitializationParameters_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoQualityChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoQualityChangeEventArgs
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoQualityChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoQualityChangeEventArgs";
/* [object, uuid("69646776-1DFB-4DB4-9EDB-8D15AF3C00C4"), exclusiveto, contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_Quality )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoQuality * value
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgsVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_get_Quality(This,value) \
( (This)->lpVtbl->get_Quality(This,value) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoQualityChangeEventArgs_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStateChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Interface is a part of the implementation of type Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStateChangeEventArgs
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoStateChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStateChangeEventArgs";
/* [object, uuid("5E77A448-094D-4DCE-95AC-CDD849826FED"), exclusiveto, contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_State )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoStreamState * value
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgsVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_get_State(This,value) \
( (This)->lpVtbl->get_State(This,value) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStateChangeEventArgs_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream";
/* [object, uuid("71867226-5936-4D2F-837E-A902EA3B4213"), contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_Id )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CStreamIdentifier * streamId
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_CallId )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [retval, out] */__RPC__out INT32 * callId
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_State )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CVideoStreamState * state
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_Resolution )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [retval, out] */__RPC__out __x_ABI_CWindows_CFoundation_CSize * resolution
);
/* [propget] */HRESULT ( STDMETHODCALLTYPE *get_BroadcastingPort )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [retval, out] */__RPC__deref_out_opt HSTRING * port
);
/* [eventadd] */HRESULT ( STDMETHODCALLTYPE *add_ResolutionChanged )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [in] */__RPC__in_opt __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CResolutionChangeEventArgs * handler,
/* [retval, out] */__RPC__out EventRegistrationToken * registrationToken
);
/* [eventremove] */HRESULT ( STDMETHODCALLTYPE *remove_ResolutionChanged )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [in] */EventRegistrationToken registrationToken
);
/* [eventadd] */HRESULT ( STDMETHODCALLTYPE *add_StateChanged )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [in] */__RPC__in_opt __FITypedEventHandler_2_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStream_Windows__CPhone__CRestricted__CCellular__CVideoTelephony__CVideoStateChangeEventArgs * handler,
/* [retval, out] */__RPC__out EventRegistrationToken * registrationToken
);
/* [eventremove] */HRESULT ( STDMETHODCALLTYPE *remove_StateChanged )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream * This,
/* [in] */EventRegistrationToken registrationToken
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_get_Id(This,streamId) \
( (This)->lpVtbl->get_Id(This,streamId) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_get_CallId(This,callId) \
( (This)->lpVtbl->get_CallId(This,callId) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_get_State(This,state) \
( (This)->lpVtbl->get_State(This,state) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_get_Resolution(This,resolution) \
( (This)->lpVtbl->get_Resolution(This,resolution) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_get_BroadcastingPort(This,port) \
( (This)->lpVtbl->get_BroadcastingPort(This,port) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_add_ResolutionChanged(This,handler,registrationToken) \
( (This)->lpVtbl->add_ResolutionChanged(This,handler,registrationToken) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_remove_ResolutionChanged(This,registrationToken) \
( (This)->lpVtbl->remove_ResolutionChanged(This,registrationToken) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_add_StateChanged(This,handler,registrationToken) \
( (This)->lpVtbl->add_StateChanged(This,handler,registrationToken) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_remove_StateChanged(This,registrationToken) \
( (This)->lpVtbl->remove_StateChanged(This,registrationToken) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStream_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Interface Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#if !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_INTERFACE_DEFINED__)
#define ____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_INTERFACE_DEFINED__
extern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_Windows_Phone_Restricted_Cellular_VideoTelephony_IVideoStreamExt[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt";
/* [object, uuid("9010592C-61F3-48C7-8F2D-33944E7A5DA3"), contract] */
typedef struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExtVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface)(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject
);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt * This
);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt * This
);
HRESULT ( STDMETHODCALLTYPE *GetIids )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt * 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_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt * This,
/* [out] */ __RPC__deref_out_opt HSTRING *className
);
HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )(
__RPC__in __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt * This,
/* [OUT ] */ __RPC__out TrustLevel *trustLevel
);
HRESULT ( STDMETHODCALLTYPE *SetResolution )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt * This,
/* [in] */__x_ABI_CWindows_CFoundation_CSize resolution
);
HRESULT ( STDMETHODCALLTYPE *GetSwapChainHandleForProcess )(
__x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt * This,
/* [in] */UINT32 targetProcessId,
/* [retval, out] */__RPC__out UINT64 * phSwapChain
);
END_INTERFACE
} __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExtVtbl;
interface __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt
{
CONST_VTBL struct __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExtVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl->QueryInterface(This,riid,ppvObject) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_AddRef(This) \
( (This)->lpVtbl->AddRef(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_Release(This) \
( (This)->lpVtbl->Release(This) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_GetIids(This,iidCount,iids) \
( (This)->lpVtbl->GetIids(This,iidCount,iids) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_GetRuntimeClassName(This,className) \
( (This)->lpVtbl->GetRuntimeClassName(This,className) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_GetTrustLevel(This,trustLevel) \
( (This)->lpVtbl->GetTrustLevel(This,trustLevel) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_SetResolution(This,resolution) \
( (This)->lpVtbl->SetResolution(This,resolution) )
#define __x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_GetSwapChainHandleForProcess(This,targetProcessId,phSwapChain) \
( (This)->lpVtbl->GetSwapChainHandleForProcess(This,targetProcessId,phSwapChain) )
#endif /* COBJMACROS */
EXTERN_C const IID IID___x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt;
#endif /* !defined(____x_ABI_CWindows_CPhone_CRestricted_CCellular_CVideoTelephony_CIVideoStreamExt_INTERFACE_DEFINED__) */
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.LocalVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.ILocalVideoStream ** Default Interface **
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_LocalVideoStream_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_LocalVideoStream_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_LocalVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.LocalVideoStream";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.RemoteVideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IRemoteVideoStream ** Default Interface **
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_RemoteVideoStream_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_RemoteVideoStream_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_RemoteVideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.RemoteVideoStream";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.ResolutionChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IResolutionChangeEventArgs ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_ResolutionChangeEventArgs_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_ResolutionChangeEventArgs_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_ResolutionChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.ResolutionChangeEventArgs";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.RotationChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IRotationChangeEventArgs ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_RotationChangeEventArgs_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_RotationChangeEventArgs_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_RotationChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.RotationChangeEventArgs";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCall
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCall ** Default Interface **
* Windows.Foundation.IClosable
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCall_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCall_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCall[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCall";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCallInitializationParameters
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoCallInitializationParameters ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCallInitializationParameters_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCallInitializationParameters_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoCallInitializationParameters[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoCallInitializationParameters";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoQualityChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoQualityChangeEventArgs ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoQualityChangeEventArgs_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoQualityChangeEventArgs_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoQualityChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoQualityChangeEventArgs";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStateChangeEventArgs
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStateChangeEventArgs ** Default Interface **
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStateChangeEventArgs_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStateChangeEventArgs_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStateChangeEventArgs[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStateChangeEventArgs";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
/*
*
* Class Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStream
*
* Introduced to Windows.Phone.Restricted.Cellular.VideoTelephony.InternalVideoTelephonyContract in version 1.0
*
*
* Class implements the following interfaces:
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStream ** Default Interface **
* Windows.Phone.Restricted.Cellular.VideoTelephony.IVideoStreamExt
*
*/
#if WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#ifndef RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStream_DEFINED
#define RUNTIMECLASS_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStream_DEFINED
extern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_Windows_Phone_Restricted_Cellular_VideoTelephony_VideoStream[] = L"Windows.Phone.Restricted.Cellular.VideoTelephony.VideoStream";
#endif
#endif // WINDOWS_PHONE_RESTRICTED_CELLULAR_VIDEOTELEPHONY_INTERNALVIDEOTELEPHONYCONTRACT_VERSION >= 0x10000
#endif // defined(__cplusplus)
#pragma pop_macro("MIDL_CONST_ID")
#endif // __windows2Ephone2Erestricted2Ecellular2Evideotelephony_p_h__
#endif // __windows2Ephone2Erestricted2Ecellular2Evideotelephony_h__
|
6cefa019890ba08866bf11c908810b0c0938d3ea
|
cd99ca9461435d1417cb146d966e54272fbcc7ad
|
/3rd party/maxsdk/samples/render/RapidRTRenderer/Translators/Translator_RTIRenderAttributes.h
|
16bf3d894629cf811d6bbcfd71d2f880245e3d23
|
[] |
no_license
|
mortany/xray15
|
eacce7965e785dd71d1877eae25c1f9eff680eec
|
72a13fb24e9b388850bc769427c231da8f599228
|
refs/heads/master
| 2020-08-02T20:45:23.493981
| 2019-10-14T18:48:48
| 2019-10-14T18:48:48
| 211,499,718
| 0
| 0
| null | 2019-09-28T12:50:47
| 2019-09-28T12:50:46
| null |
UTF-8
|
C++
| false
| false
| 2,500
|
h
|
Translator_RTIRenderAttributes.h
|
//////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk license
// agreement provided at the time of installation or download, or which
// otherwise accompanies this software in either electronic or hard copy form.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
#include "BaseTranslator_to_RTI.h"
#include <RenderingAPI/Translator/GenericTranslatorKeys.h>
#include <rti/scene/RenderAttributes.h>
namespace Max
{;
namespace RapidRTTranslator
{;
// Translates: Struct ==> rti::RenderAttributes
class Translator_RTIRenderAttributes :
public BaseTranslator_to_RTI
{
public:
struct Attributes
{
Attributes();
Attributes(
const bool is_matte,
const bool is_emissive,
const bool generates_caustics,
const bool visible_to_primary_rays);
bool operator==(const Attributes& rhs) const;
bool is_matte = false;
bool is_emissive = false;
bool generates_caustics = false;
bool visible_to_primary_rays = false;
};
struct AttributesHash
{
size_t operator()(const Attributes& attributes) const;
};
typedef GenericTranslatorKey_Struct<Translator_RTIRenderAttributes, Attributes, AttributesHash> Key;
// Constructs this translator with the key passed to the translator factory
Translator_RTIRenderAttributes(const Key& key, TranslatorGraphNode& translator_graph_node);
~Translator_RTIRenderAttributes();
// Returns the rti::RenderAttributes created by this class
rti::RenderAttributesHandle get_output_attributes() const;
// -- inherited from Translator
virtual TranslationResult Translate(const TimeValue t, Interval& validity, ITranslationProgress& translation_progress, KeyframeList& keyframesNeeded) override;
virtual Interval CheckValidity(const TimeValue t, const Interval& previous_validity) const override;
virtual void PreTranslate(const TimeValue translationTime, Interval& validity) override;
virtual void PostTranslate(const TimeValue translationTime, Interval& validity) override;
virtual MSTR GetTimingCategory() const override;
private:
const Attributes m_attributes;
};
}} // namespace
#include "Translator_RTIRenderAttributes.inline.h"
|
33373314a44abbd10d6ce8c9ac0422986f77cbe7
|
c49f7cb6035e44cbafb434469f11b8483c040f67
|
/State.h
|
c1ccb57266605a23f075596f7f272dba8405daa1
|
[] |
no_license
|
pentaxoptio/Projet_ISN
|
324968faf18c99fc850acb7fd300c6aacfa74336
|
bdd0d6b5cd99a1801c72785ecc4e1674bfaec96c
|
refs/heads/master
| 2020-12-30T10:36:43.498505
| 2015-05-20T12:31:25
| 2015-05-20T12:31:25
| 32,672,264
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,755
|
h
|
State.h
|
#ifndef STATE_H
#define STATE_H
#include <SFML/Graphics.hpp>
#include "Utils.h"
class StateStack;
//Cet enum permet de caractériser chaque State et sont nécessaires pour le StateStack (cf. StateStack.h)
enum StateId
{
Opening,
MainMenu,
PlayMenu,
Game,
Win,
NoState
};
//Classe State
//* Cette classe représente un State, un "état" du jeu qui peut être par exemple un menu ou le jeu en lui-même. Il s'agit d'une réplique de l'App (en effet, on retrouve les 3 fonctions principales) encapsulée dans le StateStack.
class State
{
public :
//Cette classe prend en paramètre de son constructeur une référence vers le stack car elle a parfois besoin de faire des appels comme "requestStackPop()" ou "getGlobalSettings()".
State(StateStack& stack, Context context);
virtual ~State();
//Les 3 fonctions principales. Notez que update et handleEvents revoie un booléen. En effet, si le State revoie false, alors la fonction (update ou handleEvent) ne sera pas transmise aux State inférieurs. C'est le cas par exemple en cas de victoire, la State "WinState" est affichée en transparence au dessus de GameState, alors qu'il est impossible d'interragir avec le jeu.
virtual void render() = 0;
virtual bool update(sf::Time dt) = 0;
virtual bool handleEvent(sf::Event const &event) = 0;
protected :
//Toutes ces fonctions "protected" permettent d'accèder au StateStack et à le modifier.
void requestStackPush(StateId id);
void requestStackPop();
void requestStackClear();
Context getContext() const;
GlobalSettings getGlobalSettings() const;
GlobalSettings& accessGlobalSettings();
private :
//Pointeur vers le stack
StateStack* m_stack;
//Le contexte (cf. Utils.h)
Context m_context;
};
#endif
|
d74713d4c907ce9be2a89c6178cb9afb335e8d1e
|
1f304d3fc227606b07638b2b25a65bc8ba8576d4
|
/CS 11 Assignment 6 - MyString Class/mystring.h
|
cb134abd7d210a2194a45f0d929aad5673e3a89d
|
[] |
no_license
|
Fidget-Cube/Old-C--Assignments
|
e1590310078ddf54102aaaeb32f125893adb1737
|
a25e658faf9d89932d1ed41e168e14dea7644b4e
|
refs/heads/master
| 2022-04-09T14:03:26.214246
| 2020-02-27T23:37:57
| 2020-02-27T23:37:57
| 188,118,968
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,671
|
h
|
mystring.h
|
//=======================================================================//
// Max vonBlankenburg, CS 11, Harden, 2/22/18, mystring.h & mystring.cpp //
// This "MyString" class includes one data member, a character string, //
// and several member and friend functions to work with this character //
// string. These include the "big 3" constructors and a destructor, a //
// function that returns the length of the string, insertion and //
// extraction operator overloads, a "read" function that acts like a //
// cin.getline function for c-strings, and overloads for the square //
// brackets [], concatenation +, concatenation & assignment +=, and //
// all relational operators. //
//-----------------------------------------------------------------------//
// MyString();
//
// pre: A MyString object has been created with no parameters.
// post: The object's "stringData" member variable is initialized to "".
//
// MyString(const char[]);
//
// pre: A MyString object has been created with character array "stringy"
// as its parameter.
// post: The object's "stringData" member variable is initialized to stringy.
//
// MyString operator=(const MyString&);
//
// pre: A MyString object or character array "stringy" is called by the
// assignment operator.
// post: The calling object's "stringData" variable is assigned to the
// value of stringy.
//
// MyString(const MyString&);
//
// pre: A MyString object has been created with MyString object "stringy"
// as its parameter.
// post: The object's "stringData" variable is initialized to match stringy's
// "stringData" variable.
//
// ~MyString();
//
// pre: A MyString object is being destroyed.
// post: The data referenced by the object's "stringData" variable is
// deallocated.
//
// int length() const;
//
// pre: A MyString object calls a parameter-less function.
// post: The function returns the length of the object's "stringData"
// c-string variable.
//
// friend std::ostream &operator << (std::ostream&, const MyString&);
//
// pre: The insertion operator calls ostream variable "out" and MyString
// object "stringy" as parameters.
// post: The function sends stringy's "stringData" variable to the output
// stream, then returns out.
//
// friend std::istream &operator >> (std::istream&, MyString&);
//
// pre: The extraction operator calls istream variable "in" and MyString
// object "stringy" as parameters.
// post: Input is obtained from the user and stored in stringy's "stringData"
// variable, then the function returns in.
//
// void read(std::istream&, char);
//
// pre: This function calls istream variable "in" and char "delimiter" as
// parameters.
// post: A line of input is obtained from the user and stored in the
// calling object's "stringData" variable.
//
// char operator[](int) const;
//
// pre: The square brackets operator calls int variable "index" as a parameter.
// post: If "index" is between 0 and the length of the calling object's "stringData"
// variable, the function returns the character in stringData at the
// array index "index".
//
// char& operator[](int);
//
// pre: The square brackets operator calls int variable "index" as a parameter.
// post: If "index" is between 0 and the length of the calling object's "stringData"
// variable, the function returns a reference to the character in stringData
// at the array index "index".
//
// friend MyString operator+(const MyString&, const MyString&);
//
// pre: The + operator calls two MyString objects "left" and "right" as parameters.
// post: The function returns a character array holding the value of left appended
// to the value of right.
//
// MyString operator+=(const MyString&);
//
// pre: The += operator calls MyString object "stringy" as a parameter.
// post: The function appends stringy's "stringData" variable the calling
// object's stringData variable, then returns the result.
//
// friend bool operator<(const MyString&, const MyString&);
//
// pre: The < operator calls two MyString objects "left" and "right" as parameters.
// post: The function returns true if the ascii value of left is less than right,
// false otherwise.
//
// friend bool operator<=(const MyString&, const MyString&);
//
// pre: The <= operator calls two MyString objects "left" and "right" as parameters.
// post: The function returns true if the ascii value of left is less than or equal
// to right, false otherwise.
//
// friend bool operator>(const MyString&, const MyString&);
//
// pre: The > operator calls two MyString objects "left" and "right" as parameters.
// post: The function returns true if the ascii value of left is greater than right,
// false otherwise.
//
// friend bool operator>=(const MyString&, const MyString&);
//
// pre: The >= operator calls two MyString objects "left" and "right" as parameters.
// post: The function returns true if the ascii value of left is greater than or equal
// to right, false otherwise.
//
// friend bool operator==(const MyString&, const MyString&);
//
// pre: The == operator calls two MyString objects "left" and "right" as parameters.
// post: The function returns true if the ascii value of left is equal to right,
// false otherwise.
//
// friend bool operator!=(const MyString&, const MyString&);
//
// pre: The != operator calls two MyString objects "left" and "right" as parameters.
// post: The function returns true if the ascii value of left is not equal to right,
// false otherwise.
//
//====================================================================================//
#include <iostream>
namespace cs_mystring {
class MyString {
private:
char *stringData;
public:
MyString();
MyString(const char[]);
MyString operator=(const MyString&);
MyString(const MyString&);
~MyString();
int length() const;
friend std::ostream &operator << (std::ostream&, const MyString&);
friend std::istream &operator >> (std::istream&, MyString&);
void read(std::istream&, char);
char operator[](int) const;
char& operator[](int);
friend MyString operator+(const MyString&, const MyString&);
MyString operator+=(const MyString&);
friend bool operator<(const MyString&, const MyString&);
friend bool operator<=(const MyString&, const MyString&);
friend bool operator>(const MyString&, const MyString&);
friend bool operator>=(const MyString&, const MyString&);
friend bool operator==(const MyString&, const MyString&);
friend bool operator!=(const MyString&, const MyString&);
};
}
|
4fa6b0dc54f64f82b9ba91420693aa878890d45d
|
09b62b21d4450cf737a62da16d2d6006dbcba86a
|
/yl_32/sourcecode/include/onlinegamemodule/kmoduledef.h
|
b78a7cfbebd2b6dcab320bec31038001e26c993f
|
[] |
no_license
|
hw233/clua_yol
|
fa16cf913092286f9ea3d11db1e911568f569363
|
bbc2e55290c185f6cfff72af9e1b9a96f9e6f074
|
refs/heads/master
| 2020-03-19T06:24:23.486101
| 2016-02-23T10:04:58
| 2016-02-23T10:04:58
| null | 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 2,189
|
h
|
kmoduledef.h
|
#pragma once
// 修改此枚举需要更新协议版本号kprotocol.h
// 各模块实现IKModuleInterface* GetModuleInterFace<>()接口,并在kmodulelist.cpp中加入模块列表
// -------------------------------------------------------------------------
enum KE_MODULE_ID
{
emKMODULE_NONE = 0,
emKMODULE_RPG = 1, // 基础服务模块,包括Timer等基础功能
emMODULE_TEAM = 3,
emKMODULE_ITEM = 4,
//emKMODULE_FACTION, //职业系统
emKMODULE_TASK = 6, //任务系统
emKMODULE_PURSE = 7, //钱袋
emKMODULE_CHAT_NEW = 8, // 聊天
emKMODULE_GLOBALDATA = 9, // 全局变量
emKMODULE_MAP = 10,
emKMODULE_AI = 11, //AI
emKMODULE_MAIL = 12, //邮件
emKMODULE_FINDPATH = 13, //寻路
emMODULE_BUFFER_ = 14, // 游龙Buffer
emMODULE_FIGHT_SKILL = 15, // 游龙战斗技能
emMODULE_FACTION = 16, // 游龙门派系统
emMODULE_SHOP = 17, // 商店
emMODULE_MYSTERYSHOP = 18, // 神秘商店////////////////////////////记得去掉
emMODULE_KIN = 19, // 家族
emMODULE_RELATION = 20, // 好友关系
emMODULE_PET = 21, // 宠物
emMODULE_AUTOMATIC = 22, // 自动任务只占位
emMODULE_ESCORT = 23, // 修仙
emMODULE_AUCTION = 24, // 拍卖行
emMODULE_AWARD = 25, // 奖励
emMODULE_QUIZ = 26, // 问答题
emMODULE_ARENA = 28, // PVE竞技场
emMODULE_TOWER = 29, // 伐魔塔
emMODULE_STAGE = 30, // 关卡
emMODULE_TITLE = 31, //称号
emMODULE_INSTANCE = 32, // 副本
emMODULE_MEDITATION = 33, //打坐
emMODULE_REMIND = 34, //提醒
emMODULE_RANK = 35, // 排行榜
emMODULE_TARGET = 36, //目标
emMODULE_ACTIVITY = 37, // 活动
emMODULE_VIP = 38, //vip
emMODULE_AWARD_LOBBY = 39, //奖励大厅
emMODULE_BLADE = 40, // 变身
emMODULE_GEM = 41, //宝石
emMODULE_ARTIFACT = 42, //神器
emMODULE_BANK = 43, //钱庄
emMODULE_Opense = 44, //开服活动
// 最大为127, 扩展模块
emKGAMEEXT_RESERVED = 126, //GameExtension保留
emKMAX_ID = 127,
};
class IKModuleInterface;
extern IKModuleInterface** g_GetModuleList();
|
742d9f645813c41273a28f302ece581ca4baf5ab
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5652388522229760_1/C++/fastblood/a.cpp
|
c0a3f70ce7ba7deb5f449a10542227660d197984
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 945
|
cpp
|
a.cpp
|
#include <stdio.h>
#include <math.h>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <memory.h>
using namespace std;
typedef long long lint;
typedef unsigned long long ull;
#define pb push_back
#define mp make_pair
void solve(int testNumber)
{
lint n;
scanf("%lld", &n);
if (n == 0)
{
printf("INSOMNIA\n");
return;
}
bool used[10];
fill(used, used + 10, 0);
lint ans = 0;
while (true)
{
bool ok = true;
for (int i = 0; i < 10 && ok; i++)
ok = ok && used[i];
if (ok)
break;
ans++;
lint val = ans * n;
while (val)
{
used[val % 10] = true;
val /= 10;
}
}
printf("%lld\n", n * ans);
}
int main()
{
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
int tn;
scanf("%d", &tn);
for (int i = 0; i < tn; i++)
{
printf("Case #%d: ", i + 1);
solve(i + 1);
}
}
|
1a1872e19af170a955a80e02cd1cdbc4c1ab06c3
|
3630d8224ce44b66323cebbb28381e2a05b7bf2b
|
/rosbag2_snapshot/include/rosbag2_snapshot/snapshotter.hpp
|
1a587beae3a205124c10ea801cd8cba128f0cb0c
|
[] |
no_license
|
CourchesneA/rosbag2_snapshot
|
81a8bc15330edd98eb0caf8a4020f0d046934d73
|
0adc67f656b9ae5582ee10299fe173da44e70418
|
refs/heads/main
| 2023-08-31T19:09:28.987122
| 2021-10-24T14:34:37
| 2021-10-24T14:34:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 12,489
|
hpp
|
snapshotter.hpp
|
// Copyright (c) 2018-2021, Open Source Robotics Foundation, Inc., GAIA Platform, Inc., All rights reserved. // NOLINT
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the {copyright_holder} nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#ifndef ROSBAG2_SNAPSHOT__SNAPSHOTTER_HPP_
#define ROSBAG2_SNAPSHOT__SNAPSHOTTER_HPP_
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/time.hpp>
#include <rosbag2_snapshot_msgs/msg/topic_details.hpp>
#include <rosbag2_snapshot_msgs/srv/trigger_snapshot.hpp>
#include <std_srvs/srv/set_bool.hpp>
#include <rosbag2_cpp/writer.hpp>
#include <chrono>
#include <deque>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
namespace rosbag2_snapshot
{
using namespace std::chrono_literals; // NOLINT
using DetailsMsg = rosbag2_snapshot_msgs::msg::TopicDetails;
struct TopicDetails
{
std::string name;
std::string type;
TopicDetails() {}
TopicDetails(std::string name, std::string type)
: name(name), type(type) {}
bool operator==(const TopicDetails & t) const
{
return name == t.name && type == t.type;
}
bool operator<(const TopicDetails & t) const
{
return t.name < name || (t.name == name && t.type < type);
}
bool operator>(const TopicDetails & t) const
{
return t.name > name || (t.name == name && t.type > type);
}
DetailsMsg asMessage() const
{
DetailsMsg msg{};
msg.name = name;
msg.type = type;
return msg;
}
};
class Snapshotter;
/* Configuration for a single topic in the Snapshotter node. Holds
* the buffer limits for a topic by duration (time difference between newest and oldest message)
* and memory usage, in bytes.
*/
struct SnapshotterTopicOptions
{
// When the value of duration_limit_, do not truncate the buffer
// no matter how large the duration is
static const rclcpp::Duration NO_DURATION_LIMIT;
// When the value of memory_limit_, do not trunctate the buffer
// no matter how much memory it consumes (DANGROUS)
static const int32_t NO_MEMORY_LIMIT;
// When the value of duration_limit_, inherit the limit from
// the node's configured default
static const rclcpp::Duration INHERIT_DURATION_LIMIT;
// When the value of memory_limit_, inherit the limit from
// the node's configured default
static const int32_t INHERIT_MEMORY_LIMIT;
// Maximum difference in time from newest and oldest message in
// buffer before older messages are removed
rclcpp::Duration duration_limit_;
// Maximum memory usage of the buffer before older messages are removed
int32_t memory_limit_;
SnapshotterTopicOptions(
rclcpp::Duration duration_limit = INHERIT_DURATION_LIMIT,
int32_t memory_limit = INHERIT_MEMORY_LIMIT);
};
/* Configuration for the Snapshotter node. Contains default limits for memory and duration
* and a map of topics to their limits which may override the defaults.
*/
struct SnapshotterOptions
{
// Duration limit to use for a topic's buffer if one is not specified
rclcpp::Duration default_duration_limit_;
// Memory limit to use for a topic's buffer if one is not specified
int32_t default_memory_limit_;
// Flag if all topics should be recorded
bool all_topics_;
typedef std::map<TopicDetails, SnapshotterTopicOptions> topics_t;
// Provides list of topics to snapshot and their limit configurations
topics_t topics_;
SnapshotterOptions(
rclcpp::Duration default_duration_limit = rclcpp::Duration(30s),
int32_t default_memory_limit = -1);
// Add a new topic to the configuration, returns false if the topic was already present
bool addTopic(
const TopicDetails & topic_details,
rclcpp::Duration duration_limit = SnapshotterTopicOptions::INHERIT_DURATION_LIMIT,
int32_t memory_limit = SnapshotterTopicOptions::INHERIT_MEMORY_LIMIT);
};
/* Stores a buffered message of an ambiguous type and it's associated metadata (time of arrival),
* for later writing to disk
*/
struct SnapshotMessage
{
SnapshotMessage(
std::shared_ptr<const rclcpp::SerializedMessage> _msg,
rclcpp::Time _time);
std::shared_ptr<const rclcpp::SerializedMessage> msg;
// ROS time when messaged arrived (does not use header stamp)
rclcpp::Time time;
};
/* Stores a queue of buffered messages for a single topic ensuring
* that the duration and memory limits are respected by truncating
* as needed on push() operations.
*/
class MessageQueue
{
friend Snapshotter;
private:
// Logger for outputting ROS logging messages
rclcpp::Logger logger_;
// Locks access to size_ and queue_
std::mutex lock;
// Stores limits on buffer size and duration
SnapshotterTopicOptions options_;
// Current total size of the queue, in bytes
int64_t size_;
typedef std::deque<SnapshotMessage> queue_t;
queue_t queue_;
// Subscriber to the callback which uses this queue
std::shared_ptr<rclcpp::GenericSubscription> sub_;
public:
explicit MessageQueue(const SnapshotterTopicOptions & options, const rclcpp::Logger & logger);
// Add a new message to the internal queue if possible, truncating the front
// of the queue as needed to enforce limits
void push(const SnapshotMessage & msg);
// Removes the message at the front of the queue (oldest) and returns it
SnapshotMessage pop();
// Returns the time difference between back and front of queue, or 0 if size <= 1
rclcpp::Duration duration() const;
// Clear internal buffer
void clear();
// Store the subscriber for this topic's queue internaly so it is not deleted
void setSubscriber(std::shared_ptr<rclcpp::GenericSubscription> sub);
typedef std::pair<queue_t::const_iterator, queue_t::const_iterator> range_t;
// Get a begin and end iterator into the buffer respecting the start and
// end timestamp constraints
range_t rangeFromTimes(const rclcpp::Time & start, const rclcpp::Time & end);
// Return the total message size including the meta-information
int64_t getMessageSize(SnapshotMessage const & msg) const;
private:
// Internal push whitch does not obtain lock
void _push(SnapshotMessage const & msg);
// Internal pop which does not obtain lock
SnapshotMessage _pop();
// Internal clear which does not obtain lock
void _clear();
// Truncate front of queue as needed to fit a new message of specified size and time.
// Returns False if this is impossible.
bool preparePush(int32_t size, rclcpp::Time const & time);
};
// Snapshotter node. Maintains a circular buffer of the most recent messages
// from configured topics while enforcing limits on memory and duration.
// The node can be triggered to write some or all of these buffers to a bag
// file via a service call. Useful in live testing scenerios where interesting
// data may be produced before a user has the oppurtunity to "rosbag record" the data.
class Snapshotter : public rclcpp::Node
{
public:
explicit Snapshotter(const rclcpp::NodeOptions & options);
~Snapshotter();
private:
// Subscribe queue size for each topic
static const int QUEUE_SIZE;
SnapshotterOptions options_;
typedef std::map<TopicDetails, std::shared_ptr<MessageQueue>> buffers_t;
buffers_t buffers_;
// Locks recording_ and writing_ states.
std::shared_mutex state_lock_;
// True if new messages are being written to the internal buffer
bool recording_;
// True if currently writing buffers to a bag file
bool writing_;
rclcpp::Service<rosbag2_snapshot_msgs::srv::TriggerSnapshot>::SharedPtr
trigger_snapshot_server_;
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr enable_server_;
rclcpp::TimerBase::SharedPtr poll_topic_timer_;
// Convert parameter values into a SnapshotterOptions object
void parseOptionsFromParams();
// Replace individual topic limits with node defaults if they are
// flagged for it (see SnapshotterTopicOptions)
void fixTopicOptions(SnapshotterTopicOptions & options);
// If file is "prefix" mode (doesn't end in .bag), append current datetime and .bag to end
bool postfixFilename(std::string & file);
/// Return current local datetime as a string such as 2018-05-22-14-28-51.
// Used to generate bag filenames
std::string timeAsStr();
// Clear the internal buffers of all topics. Used when resuming after a pause to avoid time gaps
void clear();
// Subscribe to one of the topics, setting up the callback to add to the respective queue
void subscribe(
const TopicDetails & topic_details,
std::shared_ptr<MessageQueue> queue);
// Called on new message from any configured topic. Adds to queue for that topic
void topicCb(
std::shared_ptr<const rclcpp::SerializedMessage> msg,
std::shared_ptr<MessageQueue> queue);
// Service callback, write all of part of the internal buffers to a bag file
// according to request parameters
void triggerSnapshotCb(
const std::shared_ptr<rmw_request_id_t> request_header,
const rosbag2_snapshot_msgs::srv::TriggerSnapshot::Request::SharedPtr req,
rosbag2_snapshot_msgs::srv::TriggerSnapshot::Response::SharedPtr res
);
// Service callback, enable or disable recording (storing new messages into queue).
// Used to pause before writing
void enableCb(
const std::shared_ptr<rmw_request_id_t> request_header,
const std_srvs::srv::SetBool::Request::SharedPtr req,
std_srvs::srv::SetBool_Response::SharedPtr res
);
// Set recording_ to false and do nessesary cleaning, CALLER MUST OBTAIN LOCK
void pause();
// Set recording_ to true and do nesessary cleaning, CALLER MUST OBTAIN LOCK
void resume();
// Poll master for new topics
void pollTopics();
// Write the parts of message_queue within the time constraints of req to the queue
// If returns false, there was an error opening/writing the bag and an error message
// was written to res.message
bool writeTopic(
rosbag2_cpp::Writer & bag_writer, MessageQueue & message_queue,
const TopicDetails & topic_details,
const rosbag2_snapshot_msgs::srv::TriggerSnapshot::Request::SharedPtr & req,
const rosbag2_snapshot_msgs::srv::TriggerSnapshot::Response::SharedPtr & res);
};
// Configuration for SnapshotterClient
struct SnapshotterClientOptions
{
SnapshotterClientOptions();
enum Action
{
TRIGGER_WRITE,
PAUSE,
RESUME
};
// What to do when SnapshotterClient.run is called
Action action_;
// List of topics to write when action_ == TRIGGER_WRITE.
// If empty, write all buffered topics.
std::vector<TopicDetails> topics_;
// Name of file to write to when action_ == TRIGGER_WRITE, relative to snapshot node.
// If empty, use prefix
std::string filename_;
// Prefix of the name of file written to when action_ == TRIGGER_WRITE.
std::string prefix_;
};
// Node used to call services which interface with the snapshotter node to trigger
// write, pause, and resume
class SnapshotterClient : public rclcpp::Node
{
public:
explicit SnapshotterClient(const rclcpp::NodeOptions & options);
private:
void setSnapshotterClientOptions(SnapshotterClientOptions const & opts);
};
} // namespace rosbag2_snapshot
#endif // ROSBAG2_SNAPSHOT__SNAPSHOTTER_HPP_
|
417fab67b1c1c1d6205ce26744057eb0ea5884b4
|
a207b5ed342fda579baa0e8be80b7c0ea6731ab4
|
/pms.hpp
|
4d320767b29ef128b19f6b97e38cc7f1887e0bae
|
[] |
no_license
|
SmokWroclawski/SmokWroclawskiHW
|
78c074565624939371706dc3b083f8a6d4d6b53e
|
946dc500ab479cf461798fb62c05bfec94426324
|
refs/heads/master
| 2020-05-21T17:24:15.844980
| 2017-05-28T20:21:19
| 2017-05-28T20:21:19
| 84,639,374
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 332
|
hpp
|
pms.hpp
|
#ifndef pms_header
#define pms_header
#include <Arduino.h>
#include <stdint.h>
struct pms_state {
uint8_t buffer[100];
uint8_t buffer_position;
double pm25;
double pm10;
};
struct pms_state pms_init();
void pms_recv_byte(struct pms_state * state, uint8_t recv_byte);
void pms_process_frame(struct pms_state * state);
#endif
|
2c639dc275de79d81f1495e2af09f3c99ecc85de
|
9f9660f318732124b8a5154e6670e1cfc372acc4
|
/Case_save/Case0/case4/100/nut
|
9e67b59e9d04db00b7a798b446c91b263391ff01
|
[] |
no_license
|
mamitsu2/aircond5
|
9a6857f4190caec15823cb3f975cdddb7cfec80b
|
20a6408fb10c3ba7081923b61e44454a8f09e2be
|
refs/heads/master
| 2020-04-10T22:41:47.782141
| 2019-09-02T03:42:37
| 2019-09-02T03:42:37
| 161,329,638
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,913
|
nut
|
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "100";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField nonuniform List<scalar>
459
(
0.00166113
0.00186472
0.00200792
0.00209023
0.00207274
0.00197626
0.00188023
0.00178106
0.00168214
0.00158411
0.00149349
0.00140851
0.00132242
0.00122636
0.00111124
0.000666433
0.000773149
0.000879307
0.000977373
0.00103928
0.00103617
0.000973526
0.000903085
0.000840478
0.00078686
0.000740902
0.000701339
0.000666925
0.00063655
0.000609198
0.000583195
0.000556191
0.000525255
0.000479145
0.00189902
0.00412485
0.00442354
0.00445464
0.00462372
0.00466098
0.00459247
0.00443545
0.00423652
0.00402213
0.00375569
0.00342704
0.00304001
0.00256968
0.0019357
0.00118486
0.00104124
0.000649296
0.00131959
0.00234539
0.00323366
0.00389443
0.00395872
0.00267319
0.0022028
0.00190449
0.00169441
0.00153963
0.00142175
0.00133069
0.00125288
0.00116122
0.00106567
0.000973977
0.000916943
0.000514464
0.00209053
0.00498708
0.00443674
0.00420522
0.00438965
0.00456781
0.00464319
0.00462051
0.00453477
0.00441607
0.0042702
0.00407333
0.00379147
0.00337955
0.00279146
0.00207058
0.00111423
0.000629642
0.00119626
0.00209982
0.00339678
0.00453374
0.00461326
0.00127226
0.00111253
0.00097813
0.000868548
0.00077985
0.000708006
0.000649648
0.000603352
0.000571798
0.000670443
0.000806061
0.000979437
0.000530065
0.00208622
0.00386221
0.00374596
0.00387505
0.00416291
0.00443655
0.00461187
0.00468175
0.0046672
0.00461055
0.00453026
0.00439535
0.00417419
0.00383214
0.00333787
0.00268979
0.00172347
0.00113621
0.00106842
0.00147056
0.00262671
0.00425386
0.00567229
0.00578872
0.00148175
0.00137469
0.00128615
0.00121152
0.00114123
0.00107017
0.000995303
0.000914114
0.000821366
0.000728298
0.000750611
0.00100803
0.000544334
0.00207027
0.00292521
0.00343368
0.00378181
0.00419664
0.00462772
0.00494481
0.00513819
0.00521201
0.00521492
0.00509717
0.00489191
0.00461447
0.00426171
0.00383015
0.00332191
0.00269786
0.00246617
0.00271192
0.00369053
0.00527522
0.00690617
0.00812295
0.0085793
0.00756868
0.00685786
0.00629459
0.00562932
0.00490622
0.00415411
0.00338805
0.00261968
0.00187285
0.00126198
0.000960357
0.00101767
0.000658046
0.000534284
0.000561678
0.000672613
0.00246558
0.00385852
0.00407144
0.00416593
0.00468207
0.00539166
0.00590421
0.00624889
0.00646171
0.00630837
0.00598628
0.00563779
0.00529297
0.00495035
0.00463178
0.00437874
0.00425426
0.00469188
0.00591156
0.00754699
0.00908163
0.0101951
0.0107825
0.0108337
0.0103468
0.00963777
0.00872127
0.00769565
0.00661504
0.00551909
0.00443413
0.00338618
0.00242297
0.00165944
0.00124994
0.00113829
0.000862209
0.000832894
0.00105819
0.000813187
0.00297446
0.00537383
0.00457956
0.00445692
0.00571869
0.0075038
0.00815932
0.00809452
0.00770803
0.0073553
0.00702282
0.00672833
0.00648644
0.00631484
0.00628078
0.00648003
0.00706107
0.00830379
0.00991849
0.011307
0.0121749
0.0125481
0.0124757
0.012041
0.0113179
0.0103507
0.0092443
0.00807183
0.00688373
0.00572406
0.00463201
0.00364327
0.00278393
0.00208304
0.00171446
0.00153355
0.00130367
0.00124084
0.00124959
0.000913602
0.00298651
0.00511285
0.00384957
0.00608921
0.00782883
0.00877514
0.00916326
0.00912156
0.00887652
0.00865796
0.00849588
0.00840276
0.00839793
0.0085145
0.00881232
0.00938264
0.0103193
0.0115776
0.0127251
0.0134538
0.013648
0.0133843
0.0127749
0.0119222
0.0109097
0.009807
0.00865
0.00747755
0.00633405
0.00526769
0.00432549
0.00354479
0.00294098
0.00250718
0.00222024
0.00212738
0.00210625
0.00209364
0.00292362
0.00118689
0.00243575
0.00248841
0.00250401
0.00632983
0.00825472
0.00920417
0.00957387
0.00973234
0.0097929
0.00982204
0.00988992
0.0100202
0.0102333
0.0105556
0.0110177
0.011638
0.0123831
0.0131018
0.013549
0.0135888
0.0132178
0.0125185
0.0116009
0.0105626
0.0094744
0.00837269
0.00726739
0.0061668
0.00508567
0.00404714
0.00310351
0.0023634
0.00192274
0.00174748
0.0017211
0.00175082
0.0017826
0.00177659
0.00171316
0.00118498
0.00192807
0.00615389
0.00775411
0.00842722
0.00884821
0.00922563
0.00955868
0.00983421
0.0101075
0.0104064
0.0107421
0.0111193
0.0115296
0.0119383
0.0122706
0.0124104
0.0122572
0.0117854
0.0110447
0.0101313
0.00914757
0.00816998
0.00723574
0.00634609
0.00549034
0.0046676
0.00389198
0.00319092
0.00260337
0.00216978
0.00190768
0.00179555
0.00178651
0.00182584
0.00185765
0.00183454
0.00169063
0.00114037
0.00210266
0.00649011
0.0067184
0.00656463
0.00668103
0.0069389
0.00723181
0.00750885
0.00777944
0.00805926
0.0083426
0.00861714
0.00886024
0.00903443
0.00908791
0.00896701
0.00864861
0.00815769
0.00755878
0.0069289
0.0063262
0.00577613
0.00527862
0.00482307
0.00440062
0.00400807
0.00364603
0.00331622
0.00301995
0.00275731
0.0025277
0.00233252
0.00217653
0.00205908
0.00196161
0.00189628
0.00215502
0.00121631
0.00155339
0.00161651
0.00166492
0.00154874
0.00145892
0.00146347
0.00148383
0.00150825
0.00153387
0.00156042
0.00158399
0.00160243
0.00161476
0.00161967
0.00161548
0.00160041
0.00157325
0.00153443
0.00148707
0.001436
0.00138609
0.00134064
0.00130076
0.00126575
0.0012341
0.00120422
0.00117498
0.00114593
0.00111724
0.00108967
0.00106452
0.00104354
0.00102881
0.00102261
0.00102645
0.0010381
0.00104616
0.00102748
0.00100655
0.00101366
)
;
boundaryField
{
floor
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar>
29
(
0.000133722
8.06089e-05
9.36615e-05
0.000106435
0.000118075
0.000125354
0.00012499
0.000117622
0.000109271
0.000101786
9.53227e-05
8.97417e-05
8.49042e-05
8.06698e-05
7.69105e-05
7.35068e-05
7.02536e-05
6.68564e-05
6.29391e-05
5.70467e-05
5.70467e-05
6.15641e-05
6.35459e-05
6.5353e-05
0.000133722
8.06089e-05
7.84893e-05
7.60498e-05
0.000136621
)
;
}
ceiling
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar>
43
(
0.000184182
0.000191241
0.000196637
0.000183674
0.00017358
0.000174095
0.000176391
0.000179141
0.000182019
0.000184998
0.000187637
0.000189699
0.000191078
0.000191627
0.000191162
0.000189481
0.000186446
0.000182098
0.000176775
0.000171014
0.000165362
0.000160195
0.000155645
0.000151638
0.000148005
0.000144564
0.000141188
0.000137823
0.000134489
0.000131276
0.000128336
0.000125874
0.000124141
0.000123408
0.000123853
0.000125216
0.00012616
0.000123979
0.000121532
0.000122371
0.000280247
0.000285752
0.000244657
)
;
}
sWall
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.000184226;
}
nWall
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar> 6(8.12292e-05 9.85661e-05 0.000110553 0.000137163 0.00014595 0.000122377);
}
sideWalls
{
type empty;
}
glass1
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar> 9(0.000196455 0.000222733 0.000243616 0.000243073 0.00024137 0.000284236 0.000337716 0.000338894 0.000280764);
}
glass2
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar> 2(0.000142524 0.000142319);
}
sun
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar>
14
(
0.000196176
0.000218675
0.000234364
0.000243292
0.000241359
0.000230853
0.000220338
0.000209422
0.000198471
0.000187549
0.00017739
0.000167802
0.000158022
0.000147028
)
;
}
heatsource1
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar> 3(6.40841e-05 6.75113e-05 8.12325e-05);
}
heatsource2
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar> 4(0.00014224 0.00012555 0.00012555 0.000134063);
}
Table_master
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar> 9(0.000152325 0.0001339 0.000118164 0.00010515 9.44752e-05 8.57236e-05 7.85368e-05 7.27797e-05 6.88251e-05);
}
Table_slave
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar> 9(0.000176111 0.000164011 0.000153924 0.000145362 0.000137243 0.000128976 0.000120198 0.000110592 9.94942e-05);
}
inlet
{
type calculated;
value uniform 0.000100623;
}
outlet
{
type calculated;
value nonuniform List<scalar> 2(0.00155339 0.00161651);
}
}
// ************************************************************************* //
|
|
f97af70d30151c415db84ebac6e349e4ce8aa39f
|
3da6a519098b122a0acf37fea3d2ed7d4d007af0
|
/ListLinked.cpp
|
f96904d631c98bb556c20a5ab4ef014a3314ce71
|
[] |
no_license
|
JerryDGroom/Lab5
|
cec899d73e1f4c3a8eee2469b890948e76adf783
|
9fc8921bc05a6980e39eebc40cafd499259080a4
|
refs/heads/master
| 2020-05-18T19:43:41.529558
| 2015-03-26T11:40:21
| 2015-03-26T11:40:21
| 32,924,112
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,127
|
cpp
|
ListLinked.cpp
|
/*
*******************************************************************
LAB 5 Group
Linked List's
Jerry Groom & Christian Uwimana
3/1/15
*******************************************************************
*/
#include "ListLinked.h"
#include <iostream>
template <typename DataType>
List<DataType>::ListNode::ListNode(const DataType& nodeData, ListNode* nextPtr){
dataItem = nodeData;
next = nextPtr;
}
template <typename DataType>
List<DataType>::List(int ignored){
head = NULL;
cursor = NULL;
}
// Copy constructor. Creates a list which is equivalent in content
// to the "other" list.
template <typename DataType>
List<DataType>::List(const List& other)
: head(0), cursor(0)
{
operator=(other);
}
// Overloaded assignment operator. Reinitializes the list to be
// equivalent in content to the "other" list.
// Note: we include self-assignment protection by checking whether
// "this" object is identical to the "other" object.
template <typename DataType>
List<DataType>& List<DataType>::operator=(const List& other)
{
if( this != &other ) {
clear();
ListNode *otherPtr = other.head;
ListNode *holdCursor = 0;
while( otherPtr != 0 ) {
insert(otherPtr->dataItem);
if(otherPtr == other.cursor) {
holdCursor = cursor;
}
otherPtr = otherPtr->next;
}
cursor = holdCursor;
}
return *this;
}
// Destructor. Frees the memory used by a list.
template <typename DataType>
List<DataType>::~List()
{
clear();
}
template <typename DataType>
void List<DataType>::insert(const DataType& newDataItem) throw (logic_error){
if(isEmpty()){
ListNode* newNode = new ListNode(newDataItem,NULL);
newNode->dataItem = newDataItem;
newNode->next = NULL;
this->head = newNode;
cursor = newNode;
//insert new node with a pointer equal to address of previous nodes pointer
//adjust the previous objects pointer to point to new node.
//increment cursor by one.
}else{
if(cursor->next == NULL){
ListNode* newNode = new ListNode(newDataItem,NULL);
newNode->dataItem = newDataItem;
newNode->next = NULL;
cursor->next = newNode;
cursor = newNode;
}else{
ListNode* newNode = new ListNode(newDataItem,NULL);
newNode->dataItem = newDataItem;
ListNode* temp = cursor->next;
newNode->next = temp;
cursor->next = newNode;
cursor = newNode;
}
}
}
template <typename DataType>
void List<DataType>::remove() throw (logic_error){
if(isEmpty()){
cout <<"This is an empty list, there is nothing to delete"<< endl;
}else{
if (cursor->next != NULL) {
ListNode *oldcell = cursor->next;
cursor->next = oldcell->next;
delete cursor;
//clear();
}
}
}
template <typename DataType>
void List<DataType>::replace(const DataType& newDataItem) throw (logic_error){
if(isEmpty()){
cout <<"This is an empty list, there is nothing to replace."<< endl;
}else{
cursor->dataItem = newDataItem;
}
}
template <typename DataType>
void List<DataType>::clear(){
head = NULL;
cursor = NULL;
}
template <typename DataType>
bool List<DataType>::isEmpty() const{
if(head == NULL){
return true;
}else{
return false;
}
}
template <typename DataType>
bool List<DataType>::isFull() const{
return false;
}
template <typename DataType>
void List<DataType>::gotoBeginning() throw (logic_error){
if(head == NULL){
cout <<"This is an empty list"<< endl;
}else{
this->head = head;
cursor = head;
}
}
template <typename DataType>
void List<DataType>::gotoEnd() throw (logic_error){
if(cursor->next == NULL){
cout <<"This is the end of the list"<< endl;
}else{
while(cursor->next != NULL){
cursor = cursor->next;
}
}
}
template <typename DataType>
bool List<DataType>::gotoNext() throw (logic_error){
if(head == NULL){
cout <<"This is an Empty List"<< endl;
}else{
cursor = cursor->next;
return true;
}
return false;
}
template <typename DataType>
bool List<DataType>::gotoPrior() throw (logic_error){
if(head == NULL){
cout <<"This is an Empty List"<< endl;
}else{
cout<<this->cursor<< endl;
cout<<cursor<< endl;
ListNode *prev = head;
if (cursor != head){
while(prev->next != cursor) {
prev = prev->next;
}
cursor = prev;
return true;
}
return false;
}
}
//cellT *cp = start;
//if (cursor != start) {
//while (cp->link != cursor) {
//cp = cp->link;
//}
//cursor = cp;
//}
//}
template <typename DataType>
DataType List<DataType>::getCursor() const throw (logic_error){
if(isEmpty()){
cout <<"This is an empty list"<< endl;
}else{
return cursor->dataItem;
}
}
/*
// Programming exercise 2
template <typename DataType>
void List<DataType>::moveToBeginning () throw (logic_error){
if(isEmpty()){
cout <<"This is an empty list"<< endl;
}else{
}
// Programming exercise 3
template <typename DataType>
void List<DataType>::insertBefore(const DataType& newDataItem) throw (logic_error){
if(isEmpty()){
cout <<"This is an empty list"<< endl;
}else{
}
*/
template <typename DataType>
void List<DataType>::showStructure() const{
// Outputs the items in a list. If the list is empty, outputs
// "Empty list". This operation is intended for testing and
// debugging purposes only.
if ( isEmpty() )
{
cout << "Empty list" << endl;
}
else
{
for (ListNode* temp = head; temp != 0; temp = temp->next) {
if (temp == cursor) {
cout << "[";
}
// Assumes that dataItem can be printed via << because
// is is either primitive or operator<< is overloaded.
cout << temp->dataItem;
if (temp == cursor) {
cout << "]";
}
cout << " ";
}
cout << endl;
}
}
|
24a8ae3a821e4e96abf970683f12e220dc2bb691
|
131f20cb6925057479d072ed392940e9514b61de
|
/Data Structure/Assignment 6/uva732.cpp
|
ae48fe6778029750cff2745b03984c29b5b27be7
|
[] |
no_license
|
Derekwan1081546/1091
|
77d1c7a7e07c6a0d43c772006f52d37b58d0011a
|
caca66a980ddf376be6807037a74b0c995041f67
|
refs/heads/main
| 2023-08-24T06:48:25.326704
| 2021-10-17T17:30:39
| 2021-10-17T17:30:39
| 418,197,767
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 836
|
cpp
|
uva732.cpp
|
#include<iostream>
#include<stack>
#include<string>
using namespace std;
string str, target;
stack<char> s;
void dfs(int i1, int i2, string ret)
{
if (i2 == target.length())
{
cout << ret << '\n';
return;
}
if (i1 < str.length())
{
s.push(str[i1]);
dfs(i1 + 1, i2, ret + (ret.empty() ? "i" : " i"));
s.pop();
}
if (!s.empty() && s.top() == target[i2])
{
char tmp = s.top();
s.pop();
dfs(i1, i2 + 1, ret + (ret.empty() ? "o" : " o"));
s.push(tmp);
}
}
int main()
{
while (cin >> str >> target)
{
s = stack<char>();
cout << "[\n";
//if (str.length() == target.length() && !str.empty())
dfs(0, 0, "");
cout << "]\n";
}
return 0;
}
|
d359a56e13379975e7048a1a2061d0243320cc99
|
01fb222322f3f37b4fff999c53182162a24ce337
|
/libs/network/src/p2pservice/identity_cache.cpp
|
2a75e231946d7a74b1042b360ca225d49d2626ea
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-unknown"
] |
permissive
|
MissingNO57/ledger
|
51cc4b932909d9d25145ac9649b0caa193c5fb0e
|
0afeb1582da6ddae07155878b6a0c109c7ab2680
|
refs/heads/master
| 2020-05-29T17:19:02.935379
| 2019-05-29T13:59:39
| 2019-05-29T13:59:39
| 189,269,908
| 1
| 0
|
Apache-2.0
| 2020-02-24T11:02:56
| 2019-05-29T17:28:42
|
C++
|
UTF-8
|
C++
| false
| false
| 2,778
|
cpp
|
identity_cache.cpp
|
//------------------------------------------------------------------------------
//
// Copyright 2018-2019 Fetch.AI Limited
//
// 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.
//
//------------------------------------------------------------------------------
#include "network/p2pservice/identity_cache.hpp"
namespace fetch {
namespace p2p {
void IdentityCache::Update(ConnectionMap const &connections)
{
FETCH_LOCK(lock_);
for (auto const &element : connections)
{
auto const &address = element.first;
auto const &uri = element.second;
UpdateInternal(address, uri);
}
}
void IdentityCache::Update(Address const &address, Uri const &uri)
{
FETCH_LOCK(lock_);
UpdateInternal(address, uri);
}
bool IdentityCache::Lookup(Address const &address, Uri &uri) const
{
bool success = false;
FETCH_LOCK(lock_);
auto it = cache_.find(address);
if (it != cache_.end())
{
uri = it->second.uri;
success = true;
}
return success;
}
IdentityCache::AddressSet IdentityCache::FilterOutUnresolved(AddressSet const &addresses)
{
AddressSet resolvedAddresses;
{
FETCH_LOCK(lock_);
std::copy_if(addresses.begin(), addresses.end(),
std::inserter(resolvedAddresses, resolvedAddresses.begin()),
[this](Address const &address) {
bool resolved = false;
auto it = cache_.find(address);
if ((it != cache_.end()) && (it->second.uri.scheme() != Uri::Scheme::Muddle))
{
resolved = true;
}
return resolved;
});
}
return resolvedAddresses;
}
void IdentityCache::UpdateInternal(Address const &address, Uri const &uri)
{
auto cache_it = cache_.find(address);
if (cache_it != cache_.end())
{
auto &cache_entry = cache_it->second;
// if the cache entry exists them only update it if the
if (uri.scheme() != Uri::Scheme::Muddle)
{
cache_entry.uri = uri;
cache_entry.last_update = Clock::now();
cache_entry.resolve = false; // This entry is considered resolved
}
}
else
{
cache_.emplace(address, uri);
}
}
} // namespace p2p
} // namespace fetch
|
9944907095eb15208abb84b62f44876566fffd48
|
d932716790743d0e2ae7db7218fa6d24f9bc85dc
|
/gpu/command_buffer/service/command_executor.h
|
99d304830c9cd759772dfec049a07ee124ab111c
|
[
"BSD-3-Clause"
] |
permissive
|
vade/chromium
|
c43f0c92fdede38e8a9b858abd4fd7c2bb679d9c
|
35c8a0b1c1a76210ae000a946a17d8979b7d81eb
|
refs/heads/Syphon
| 2023-02-28T00:10:11.977720
| 2017-05-24T16:38:21
| 2017-05-24T16:38:21
| 80,049,719
| 19
| 3
| null | 2017-05-24T19:05:34
| 2017-01-25T19:31:53
| null |
UTF-8
|
C++
| false
| false
| 3,862
|
h
|
command_executor.h
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef GPU_COMMAND_BUFFER_SERVICE_COMMAND_EXECUTOR_H_
#define GPU_COMMAND_BUFFER_SERVICE_COMMAND_EXECUTOR_H_
#include <stdint.h>
#include <memory>
#include <queue>
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/shared_memory.h"
#include "base/memory/weak_ptr.h"
#include "gpu/command_buffer/service/async_api_interface.h"
#include "gpu/command_buffer/service/cmd_buffer_engine.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/gpu_export.h"
namespace gpu {
// This class schedules commands that have been flushed. They are received via
// a command buffer and forwarded to a command handler. TODO(apatrick): This
// class should not know about the decoder. Do not add additional dependencies
// on it.
class GPU_EXPORT CommandExecutor
: NON_EXPORTED_BASE(public CommandBufferEngine),
public base::SupportsWeakPtr<CommandExecutor> {
public:
static const int kParseCommandsSlice = 20;
CommandExecutor(CommandBufferServiceBase* command_buffer,
AsyncAPIInterface* handler,
gles2::GLES2Decoder* decoder);
~CommandExecutor() override;
bool SetGetBuffer(int32_t transfer_buffer_id);
void PutChanged();
// Sets whether commands should be processed by this scheduler. Setting to
// false unschedules. Setting to true reschedules.
void SetScheduled(bool scheduled);
bool scheduled() const { return scheduled_; }
// Returns whether the scheduler needs to be polled again in the future to
// process pending queries.
bool HasPendingQueries() const;
// Process pending queries and return. HasPendingQueries() can be used to
// determine if there's more pending queries after this has been called.
void ProcessPendingQueries();
// Implementation of CommandBufferEngine.
scoped_refptr<Buffer> GetSharedMemoryBuffer(int32_t shm_id) override;
void set_token(int32_t token) override;
void SetCommandProcessedCallback(const base::Closure& callback);
using PauseExecutionCallback = base::Callback<bool(void)>;
void SetPauseExecutionCallback(const PauseExecutionCallback& callback);
// Returns whether the scheduler needs to be polled again in the future to
// process idle work.
bool HasMoreIdleWork() const;
// Perform some idle work and return. HasMoreIdleWork() can be used to
// determine if there's more idle work do be done after this has been called.
void PerformIdleWork();
// Whether there is state that needs to be regularly polled.
bool HasPollingWork() const;
void PerformPollingWork();
private:
bool PauseExecution();
error::Error ProcessCommands(int num_commands);
// The CommandExecutor holds a weak reference to the CommandBuffer. The
// CommandBuffer owns the CommandExecutor and holds a strong reference to it
// through the ProcessCommands callback.
CommandBufferServiceBase* command_buffer_;
// This is used to execute commands.
AsyncAPIInterface* handler_;
// Does not own decoder. TODO(apatrick): The CommandExecutor shouldn't need a
// pointer to the decoder.
gles2::GLES2Decoder* decoder_;
CommandBufferOffset get_;
CommandBufferOffset put_;
volatile CommandBufferEntry* buffer_;
int32_t entry_count_;
// Whether the scheduler is currently able to process more commands.
bool scheduled_ = true;
base::Closure command_processed_callback_;
// If this callback returns true, exit PutChanged early.
PauseExecutionCallback pause_execution_callback_;
bool paused_ = false;
DISALLOW_COPY_AND_ASSIGN(CommandExecutor);
};
} // namespace gpu
#endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_EXECUTOR_H_
|
ee2f54381eaea2f033b30c2719434bfbf938971f
|
ef9f45769704fced7beefb0f20afc1f25f1024d4
|
/minimumDistances.cpp
|
305f007b157cee457be1675ffb60df0236722430
|
[] |
no_license
|
YogaVicky/Hackerrank-solutions
|
4a517b0272d994807895123e1a5c3a95bd86d7ac
|
f5d8a3b5cb4ab3bbf7116391aa4c3de17d366bf8
|
refs/heads/master
| 2020-05-30T08:57:29.006496
| 2019-12-17T19:11:19
| 2019-12-17T19:11:19
| 189,629,279
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 423
|
cpp
|
minimumDistances.cpp
|
#include <iostream>
#include<string>
using namespace std;
int main(){
int n , a[1000] , i , min , j , check = 0;
cin>>n;
for(i = 0;i < n;i++ ){
cin>>a[i];
}
min = n;
for(i = 0;i < n;i++ ){
for(j = i+1;j < n;j++ ){
if(a[i] == a[j]){
if(min > j-i){
min = j-i;
check++;
}
}
}
}
if(check==0)
cout<<-1;
else
cout<<min;
return 0;
}
|
b700a157d561010fa3d1a685f433c105095d1b0a
|
e28590d47cad17ab89f2d6b0ec9c728a213eaafa
|
/Design Patterns/Design Patterns/Hatchery.hpp
|
bf00636c544e2115d5a61bbedd4c767e386ff6d2
|
[] |
no_license
|
HuyTranQ/GangOfFour-DesignPatterns
|
ff999f67a78316b5ade4a7b4a99a1b39b8910522
|
bd206612d15690e5d02179fb60bef6208de62f5d
|
refs/heads/master
| 2016-08-12T21:19:54.560489
| 2015-11-05T03:49:08
| 2015-11-05T03:49:08
| 45,428,249
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 401
|
hpp
|
Hatchery.hpp
|
#pragma once
#include "Unit.hpp"
#include <iostream>
#include <string>
#include <vector>
using std::cout;
using std::string;
using std::vector;
class Hatchery
{
public:
enum ZergUnit
{
ZERGLING , HYDRALISK ,
MUTALISK , VIPER , Size
};
~Hatchery();
void hatch(ZergUnit ZergUnitType);
void notifyAttack();
void notifyRetreat();
private:
static string name[];
vector<Unit *> children;
};
|
e31825017af928e22636453fcf8d7634a826ef0c
|
71e8c69757b25c3496e54d6683d09c9af7a0184f
|
/source/platform/min/settings.h
|
e3e3a8ae22e3785b91758f66c9fb8c85f631859f
|
[
"Apache-2.0"
] |
permissive
|
Aaron-SP/mgl
|
2f8979f16c139deb7139c2a0e23223cc7221c393
|
3032f77d3cef30d363434ebde2e69abc0e612857
|
refs/heads/master
| 2022-09-15T08:28:58.647258
| 2022-08-15T22:44:48
| 2022-08-15T22:44:48
| 90,213,966
| 36
| 2
|
Apache-2.0
| 2018-07-10T16:14:28
| 2017-05-04T02:40:50
|
C++
|
UTF-8
|
C++
| false
| false
| 1,640
|
h
|
settings.h
|
/* Copyright [2013-2018] [Aaron Springstroh, Minimal Graphics Library]
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 _MGL_SETTINGS_MGL_
#define _MGL_SETTINGS_MGL_
#include <min/window.h>
#include <stdexcept>
#include <string>
namespace min
{
class settings
{
public:
inline static void initialize()
{
// Depth settings
glEnable(GL_DEPTH_TEST);
glClearDepthf(1.0f);
glClear(GL_DEPTH_BUFFER_BIT);
glDepthFunc(GL_LESS);
// Face culling settings
glEnable(GL_CULL_FACE);
glFrontFace(GL_CW);
// Allow setting point size in vertex shader for particles
#if !__EMSCRIPTEN__
glEnable(GL_PROGRAM_POINT_SIZE);
#endif
// Enable blending for rendering text
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
inline static void enable_gamma_correction()
{
#if !__EMSCRIPTEN__
if (GLEW_ARB_framebuffer_sRGB)
{
glEnable(GL_FRAMEBUFFER_SRGB);
}
else
{
throw std::runtime_error("settings: SRGB framebuffer not supported");
}
#endif
}
};
}
#endif
|
1c4b936b5fe03d9953310ca5831f4394dfc24b5a
|
34c2b4bdf676d4dba6ae81e2a547592b9f94b076
|
/math/7/7.cpp
|
7f3086a5ad78e800d3a6546131bfd9a64231b562
|
[] |
no_license
|
caonimadexinsang/Leetcode
|
80fd9e0c5ecac6c5edc17edd060c14755314e3f3
|
31cc2694e735335ae3a26788c169961d8dc0fa75
|
refs/heads/master
| 2021-01-02T22:54:04.499172
| 2018-01-10T10:16:02
| 2018-01-10T10:16:02
| 99,416,463
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 348
|
cpp
|
7.cpp
|
#include <stdio.h>
#include <iostream>
using namespace std;
void main() {
int x;
cin >> x;
int result = 0;
bool tt;
while (x != 0) {
if (result > INT_MAX / 10 || result < INT_MIN / 10)
// return 0;
result = result * 10 + x % 10;
x = x / 10;
}
//if (tt == true)
// result = result;
// else
// result = 0 - result;
cout << result;
}
|
4c4a8f66b16f7653642c34c28870d6bb649b35bd
|
25e950502aa744d34906eb3e669a127345dd3695
|
/Installer project example/Game/Source/Scene.h
|
7276f26f151ec3342031eb73431da822f36bb8c5
|
[
"LicenseRef-scancode-ian-piumarta",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
FeroXx07/Game-Installer-Creation
|
fa1ef8859949e3100bcbb7bf019ec803e85010e5
|
9c8d1525742619ec5fbd659fd413ebacbccc1140
|
refs/heads/main
| 2023-04-29T23:11:30.470374
| 2021-05-12T21:30:09
| 2021-05-12T21:30:09
| 363,747,901
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,286
|
h
|
Scene.h
|
#ifndef __SCENE_H__
#define __SCENE_H__
#include "Module.h"
#include "Physics.h"
#include "List.h"
#include "Animation.h"
struct SDL_Texture;
enum SceneType
{
MAIN_MENU = -1,
LEVEL_SELECTOR,
LEVEL_1,
LEVEL_2,
LEVEL_3,
PAUSE_MENU
};
enum PlanetType
{
ROCK,
WATER
};
struct Planet
{
public:
Planet(CircleCollider& planet_, CircleCollider& orbit_) : planet(planet_), orbit(orbit_)
{
orbit.x = planet.x;
orbit.y = planet.y;
}
DynamicBody* planetBody = nullptr;
DynamicBody* orbitBody = nullptr;
CircleCollider planet = { 0,0,0 };
CircleCollider orbit = { 0,0,0 };
PlanetType type = ROCK;
};
struct Meteor
{
public:
Meteor(Collider& meteor_) : colliderRect(meteor_) {}
DynamicBody* meteorBody = nullptr;
Collider colliderRect = { {0,0,0,0}, };
};
struct MMSelectorArrow
{
MMSelectorArrow() : position{ { -300, 0 }, {525, 675}, {525, 850} }{}
SDL_Texture* arrowTex;
const iPoint position[3]; //position[0] == OUT OF WINDOW // position[1] == PLAY GAME // position[2] == SKIP GAME
uint selection;
};
struct LSSelectorArrow
{
LSSelectorArrow() : position{ { -300, 0 }, {300 - 150, 540}, {825 - 150, 540}, {1350 - 150, 540}, {300, 810} } {}
SDL_Texture* arrowTex;
const iPoint position[5]; //position[0] == OUT OF WINDOW // position[1] == LEVEL 1 // position[2] == LEVEL 2 // position[3] == LEVEL 3 // position[4] == BACK TO MAIN MENU
uint selection;
};
struct PMSelectorArrow
{
PMSelectorArrow() : position{ { -300, 0 }, {650,440}, {600, 510}, {700, 580} } {}
SDL_Texture* arrowTex;
const iPoint position[4]; //position[0] == OUT OF WINDOW // position[1] == BACK TO GAME // position[2] == BACK TO LVL SELECT // position[3] == BACK TO MAIN MENU
uint selection;
};
class Scene : public Module
{
public:
Scene();
// Destructor
virtual ~Scene();
// Called before render is available
bool Awake();
// Called before the first frame
bool Start();
// Called before all Updates
bool PreUpdate(float dt);
// Called each loop iteration
bool Update(float dt);
// Called before all Updates
bool PostUpdate();
// Called before quitting
bool CleanUp();
SceneType GetScene() const
{
return scene;
}
void SetScene(SceneType changeScene);
private:
bool skip = false;
bool pause = false;
SceneType scene;
SceneType currentScene;
void UpdateMainMenu();
void UpdateLevelSelector();
void UpdateLevels();
void UpdatePauseMenu();
void SetMainMenu();
void SetLevelSelector();
void SetLevel1();
void SetLevel2();
void SetLevel3();
void SetPauseMenu();
void IterateMeteors();
void IteratePlanets();
private:
SDL_Texture* mainMenuBackgroundTex;
SDL_Texture* levelSelectBackgroundTex;
SDL_Texture* pauseMenuTex;
SDL_Texture* pauseMenuGradientTex;
SDL_Texture* levelsBackgroundTex;
SDL_Texture* meteorTexture;
SDL_Texture* rockPlanetTexture;
SDL_Texture* waterPlanetTexture;
SDL_Texture* orbitTexture;
SDL_Texture* theVoidTexture;
SDL_Texture* levelSelectionSpritesheet;
SDL_Texture* mainMenuSpritesheet;
SDL_Texture* mainMenuTitle;
SDL_Texture* ringAndMeteorTexture;
SDL_Texture* levelDifficultyTexture;
const SDL_Rect lvlSelect = { 0, 0, 506, 76 };
const SDL_Rect back = { 506, 0, 306, 76 };
const SDL_Rect pauseRect = { 0, 0, 585, 314 };
MMSelectorArrow mainMenuArrow;
LSSelectorArrow levelSelectArrow;
PMSelectorArrow pauseMenuArrow;
Animation arrowAnim;
Animation playAnim;
Animation quitAnim;
Animation titleAnim;
Animation theVoidAnim;
Animation selectLvl1Anim;
Animation selectLvl2Anim;
Animation selectLvl3Anim;
Animation pauseResume;
Animation pauseLS;
Animation pauseMM;
Animation theRingAnim;
Animation level1StartAnim;
Animation level2StartAnim;
Animation level3StartAnim;
Animation winnerAnim;
uint SFxOrbitEnter;
uint SFxDestroyed;
uint SFxSelectOption;
uint SFxChangeOption;
float counterSpawn;
float winCounter;
bool winnner = false;
CircleCollider listRandom[5];
int previousRandom;
float counter;
public:
List<Planet*> planets;
List<Body*> bodies;
List<Meteor*> meteors;
Planet* theVoid = nullptr;
Planet* theRing = nullptr;
Planet* AddPlanet(CircleCollider& orbit, int planetRadius, SString name = "rockPlanet")
{
CircleCollider planet = orbit;
planet.radius = planetRadius;
Planet* p = new Planet(planet, orbit);
p->planetBody = (DynamicBody*)app->physics->CreateBody(BodyType::DYNAMIC_BODY, ColliderType::UNDEFINED, { orbit.x,orbit.y }, NULL, &(p->orbit), { 0.0f,0.0f }, { 0.0f,0.0f });
p->planetBody->mass = 1000.0f;
p->planetBody->name.Create(name.GetString());
p->orbitBody = (DynamicBody*)app->physics->CreateBody(BodyType::DYNAMIC_BODY, ColliderType::UNDEFINED, { orbit.x,orbit.y }, NULL, &(p->planet), { 0.0f,0.0f }, { 0.0f,0.0f });
p->orbitBody->mass = 1000.0f;
p->orbitBody->name.Create("orbit");
planets.add(p);
return p;
}
Meteor* AddMeteor(Collider& meteor)
{
Meteor* m = new Meteor(meteor);
Collider* rect = new Collider(meteor);
m->meteorBody = (DynamicBody*)app->physics->CreateBody(BodyType::DYNAMIC_BODY, ColliderType::UNDEFINED, { (float)(rect->r1.x),(float)(rect->r1.y) }, NULL, rect, { 0.0f,0.0f }, { 0.0f,0.0f });
m->meteorBody->mass = 800.0f;
m->meteorBody->isCollidable = false;
m->meteorBody->name.Create("meteor");
meteors.add(m);
return m;
}
};
#endif // __SCENE_H__
|
d5c3879d333f1865a319692f5414b95214195880
|
4c378a1be91f9574cffb428ea1a493dbe7306773
|
/BST/Preorder Traversal and BST.cpp
|
e968ebef39c8be722a1382c5cb4d54ff23b95c12
|
[] |
no_license
|
nishantprajapati123/competitive-coding
|
81c09976833ff49d079e4edd0c5254203d0552d7
|
8cbac4be5cd36c3626af4676a8385a638f98654e
|
refs/heads/master
| 2021-07-07T14:02:21.646254
| 2020-08-26T07:36:28
| 2020-08-26T07:36:28
| 160,255,056
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 721
|
cpp
|
Preorder Traversal and BST.cpp
|
#include<bits/stdc++.h>
using namespace std;
bool ispreorder(vector<int>arr, int n, int &i, int min_, int max_)
{
if(i==n)
return true;
if(arr[i]>min_ && arr[i]<max_)
{
i++;
return ispreorder(arr,n,i,min_,arr[i-1]) ||
ispreorder(arr,n,i,arr[i-1],max_);
}
else
return false;
}
bool preorder(vector<int>arr, int n)
{
int i=0;
return ispreorder(arr,n,i,INT_MIN,INT_MAX);
}
int main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
vector<int>arr(n);
for(int i=0;i<n;i++)
cin>>arr[i];
if(preorder(arr,n))
cout<<"1"<<endl;
else
cout<<"0"<<endl;
}
}
|
50e471da61f91640ec305a8dfffcfdcb2db349a4
|
68cda4a9a53b61d865c42600c23aae613e44f426
|
/.vscode/cquery_cached_index/c@@users@jeste@vex@towertakeover_wcd/include@librobot@auto.hpp
|
295e756dc241ee7da3eb6e1ea84b84b9602b0859
|
[
"MIT"
] |
permissive
|
kettering-vex-u/TowerTakeover_WCD
|
1acf8b5dd300e96b4ffbafc514c95386f075acad
|
c74485d71d77f43f83c7715f5034032d17f44519
|
refs/heads/master
| 2021-07-12T06:32:19.537576
| 2021-02-27T19:32:16
| 2021-02-27T19:32:16
| 235,164,110
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 107
|
hpp
|
include@librobot@auto.hpp
|
#ifndef _AUTO_HPP_
#define _AUTO_HPP_
#include "main.h"
namespace auton {
void autoLeft();
}
#endif
|
9ac04e48f54a8ad63d6d24a71a72a0561204b872
|
37f5529f9d06940c6193ef9e4b9a03efe5c1a393
|
/ModuleManager.h
|
55a119b54dc31fbe737189d68d6bafe0b1a6f9df
|
[] |
no_license
|
dkodnik/o2c-lev0
|
f10acbcc8a072cacdde3a3039aa30e10fe9db74f
|
55a9bd7124ebca0166f00131bd68e740e2b8d441
|
refs/heads/master
| 2021-01-09T05:54:28.827201
| 2010-11-03T21:57:59
| 2010-11-03T21:57:59
| 80,862,237
| 1
| 0
| null | null | null | null |
WINDOWS-1251
|
C++
| false
| false
| 4,597
|
h
|
ModuleManager.h
|
// Авторские права - VTOOLS.RU (info@vtools.ru)
// ModuleManager.h: interface for the CModuleManager class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_ModuleManager_H__14109D1F_1492_4BF0_A344_0B8ED648F256__INCLUDED_)
#define AFX_ModuleManager_H__14109D1F_1492_4BF0_A344_0B8ED648F256__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//#include "Compiler/CompileModule.h"
#include "Compiler/ProcUnit.h"
#include "MetaData.h"
class CModuleManager* AfxGetModuleManager();
enum
{
TYPE_NONE=0,
TYPE_OBJECT_CONTEXT,
TYPE_METADATA_CONTEXT,
};
class CModuleManager
{
public:
CModuleManager();
virtual ~CModuleManager();
//АТРИБУТЫ:
CMetadata *pMetadata;//данные конфигурации
CMapStringToPtr ListModules;//список скомилированных модулей конфигурации
CMapStringToPtr ListRunModules;//список запущенных модулей
CDocument *pTree;
private:
CCompileModule *pCommonParent; //общий родитель всех объектов (складывается из общих модулей)
CProcUnit *pCommonRunParent; //запущенный общий родитель всех объектов (складывается из общих модулей)
//список родителей объектов (если у объекта есть общие модули, то
//их родителем является Общие модули конфигурации -> Общие модули объекта)
CMapStringToPtr ListObjectParent;
CMapStringToPtr ListObjectRunParent;
//масив для задания порядка запуска (сначала Модуль инициализации, затем объектов, заием конфигурации)
CArray <CProcUnit *,CProcUnit *> aRunModules;
private:
//static CModuleManager* afx_ModuleManager;
BOOL bConfigMode;
public:
CString csMetadataPath;
//МЕТОДЫ:
BOOL GetAttrVariable(CString csModuleName,CArray<CString,CString> &aVariable,CArray<CString,CString> &aTypeVariable);
private:
void GetAttrVariableFromMetaArray(class CValueArray *pArray,CArray<CString,CString> &aVariable,CArray<CString,CString> &aTypeVariable);
public:
void SetAttrVariable(CCompileModule *pModule);
CString GetObjectName(CString csModulePath,int &nType);
BOOL FindObject(CString csFormName0,CString csFileName,CMetaObject* &pObject,CString csObjGroup,CString csCommonObjGroup);
BOOL FindForm(CString csFormName0,CString csFileName,CMetaObject* &pObject);
CString GetTable(CString csFileName);
CString GetModule(CString csFileName);
int RunFormModal(CString csFormName,CValue Param,CString csFileName="",CString csFormID="");
int RunForm(CString csFormName0,CValue Param,CString csFileName="",CString csFormID="",int nMode=0);
BOOL IsCanDestroy();
CCompileModule *GetParent(CString csPath,CCompileModule *&pStopParent,CCompileModule *&pContinueParent,BOOL bEnterpriseModule=1);
CProcUnit *GetRunParent(CString csPath);
CProcUnit *GetRunParent(CCompileModule *pCompile);
//загрузка и инициализация конфигурации (компиляция общих модулей и макрообъектов конфигурации)
void Load(BOOL bRunFunction);
//извлечение модуля конфигурации (если еще не скомилирован - то производится компиляция)
CCompileModule *GetCompileModule(CString csModuleName,CCompileModule *pSetParent=0,CCompileModule *pSetStopParent=0,BOOL bRetZero=0);
CProcUnit *GetNewRunModule(CString csModuleName,BOOL bRunModule=1,CProcUnit *pSetRunParent=0);//запускает новую копию модуля на исполнение - возвращает новый объект - контекст исполнения
//получение уже адреса запущенного модуля (если такого нет, то он запускается)
CProcUnit *GetRunModule(CString csModuleName,BOOL bRunModule=0,CProcUnit *pSetRunParent=0);
// static CModuleManager* AfxGetModuleManager(){return afx_ModuleManager;};
private:
//извлечение и компилирование модуля конфигурации
CCompileModule *Compile2(CString csModuleName,CCompileModule *pSetParent=0);
void Clear();
void ClearCompileList(CMapStringToPtr &List);
void ClearRunList(CMapStringToPtr &List);
};
#endif // !defined(AFX_ModuleManager_H__14109D1F_1492_4BF0_A344_0B8ED648F256__INCLUDED_)
|
6aa956dcec7d9f2808e87a14de53a201bea580d0
|
2d37d9cd986919e974d5ba787ed02991e5d2bcb9
|
/6.phone.cpp
|
60d3220cbd202f54fb3a1636e760e2f4801442ce
|
[] |
no_license
|
alyona-/home_shag
|
86729cf8cd405654f8cb3ad8fa927fa299d7632c
|
066ac11f237cf488b4d5e11bfc3338822f9088a7
|
refs/heads/master
| 2021-01-19T10:42:22.103308
| 2014-09-23T05:36:08
| 2014-09-23T05:36:08
| 24,330,786
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 821
|
cpp
|
6.phone.cpp
|
#include <iostream>
using namespace std;
/*
6. Пользователь указывает цену одой минуты исходящего звонка с одного мобильного оператора другому, а также продолжительность разговора в минутах и секундах. Необходимо вычислить денежную сумму на которую был произведен звонок.
*/
void main(){
double mtc,kievstar,life,time;
cout << "MTC : \n";
cin >> mtc;
cout << "Kievstar : \n";
cin >> kievstar;
cout << "Life : \n";
cin >> life;
cout << "Enter time : \n";
cin >> time;
cout << "MTC : " << mtc*time << " rub \n";
cout << "Kievstar : " << kievstar*time << " rub \n";
cout << "Life : " << life*time << " rub \n";
}
|
3e21f3e56ca00fe1831cd2e54bf4bd488e990f96
|
17b22f7e6b831cfc2e27b37181ed4d8aae693a61
|
/Frameworks/XEScene.framework/Headers/XScopedBufferPtr.h
|
0688b0aac39980593cfef05c64ecb678944b4fac
|
[] |
no_license
|
cosmos33/MMXEScene
|
af3409c0d21bd2d56b5845b705564151d612d436
|
067373218035cead3b761831189c97ca2a024447
|
refs/heads/master
| 2020-05-07T13:00:45.392787
| 2019-06-16T13:41:32
| 2019-06-16T13:41:32
| 180,528,299
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 738
|
h
|
XScopedBufferPtr.h
|
/******************************************************************************
@File XTempMemBuffer.h
@Version 1.0
@Created 2017, 3, 6
@Description Temporary memory buffer wrapper.
@HISTORY:
******************************************************************************/
#ifndef _XTEMPMEMBUFFER_H_
#define _XTEMPMEMBUFFER_H_
#include "XTypes.h"
#include "XMemBase.h"
class XScopedBufferPtr : public XMemBase
{
public:
XScopedBufferPtr(xuint32 uSize);
~XScopedBufferPtr();
void Free();
void Resize(xuint32 uNewSize);
void* GetBuffer() const { return m_pBuffer; }
xuint32 GetSize() const { return m_uSize; }
private:
xuint32 m_uSize;
void* m_pBuffer;
};
#endif // _XTEMPMEMBUFFER_H_
|
3d12d998236378717f74fe7cc46cbe998eb36e08
|
4a66ebaccadb4cc8127e6a44569f7385d116f440
|
/Runtime/cpu.cpp
|
ee980b7bfa440f999c901f996e294eac68ef3c11
|
[
"Apache-2.0"
] |
permissive
|
d34d633f/GrinningSoul
|
b84b39b21bb7f49fc1763bee2bca8d978d135077
|
d35ac197dade35d8a831ffb10fffd2ec93a791ea
|
refs/heads/master
| 2023-01-12T15:11:25.872013
| 2020-11-22T00:09:48
| 2020-11-22T00:09:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 24,539
|
cpp
|
cpu.cpp
|
#include "gs.h"
#include <mach/mach.h>
#define _XOPEN_SOURCE
#include <ucontext.h>
#include <sys/_types/_ucontext64.h>
#include <signal.h>
#include <setjmp.h>
#include <sys/mman.h>
#include <iostream>
#include <ios>
#include <thread>
#ifdef USE_UNICORN
#include <unicorn/unicorn.h>
#include <state.h>
#define UCHECKED(expr) do { if(auto _cerr = (expr)) { printf("Call " #expr " failed with error: %u (%s)\n", _cerr, uc_strerror(_cerr)); exit(1); } } while(0)
#else
#include <metacpu.h>
#include <interface.h>
#endif
#include "trampoliner.h"
#include <pthread/introspection.h>
using namespace std;
thread_local Cpu CpuInstance;
thread_local bool ThreadHooked;
bool isArmCodePointer(uint64_t addr) {
vm_size_t vmsize;
int _basic64[VM_REGION_BASIC_INFO_COUNT_64];
auto info = (vm_region_basic_info_64_t) _basic64;
mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT_64;
memory_object_name_t object;
auto vmaddr = PAGEBASE(addr);
auto status = vm_region_64(mach_task_self(), (vm_address_t *) &vmaddr, &vmsize, VM_REGION_BASIC_INFO,
(vm_region_info_t) info, &info_count, &object);
if(status != KERN_SUCCESS) return false;
return (info->protection & VM_PROT_EXECUTE) != VM_PROT_EXECUTE;
}
extern "C" {
void secondtrampoline(stackcontext* context);
}
void secondtrampoline(stackcontext* context) {
//log("Second trampoline hit");
//log("Ensuring initialization...");
initializeImages();
//log("Handing off to emulator");
CpuInstance.nativeToArm(context);
log("Should never hit here!");
BAILOUT();
}
__attribute__((naked)) static void jmptrampoline() {
asm volatile(
"push %rdi\n"
"push %rax\n"
"push %rbx\n"
"push %rcx\n"
"push %rdx\n"
"push %rsi\n"
"push %rbp\n"
"push %r8\n"
"push %r9\n"
"push %r10\n"
"push %r11\n"
"push %r12\n"
"push %r13\n"
"push %r14\n"
"push %r15\n"
"mov %rsp, %rdi\n"
"jmp _secondtrampoline\n"
);
}
__attribute__((naked)) static void restorecontext(stackcontext* context) {
asm volatile(
"mov %rdi, %rsp\n"
"pop %r15\n"
"pop %r14\n"
"pop %r13\n"
"pop %r12\n"
"pop %r11\n"
"pop %r10\n"
"pop %r9\n"
"pop %r8\n"
"pop %rbp\n"
"pop %rsi\n"
"pop %rdx\n"
"pop %rcx\n"
"pop %rbx\n"
"pop %rax\n"
"pop %rdi\n"
"addq $8, %rsp\n"
"ret\n"
);
}
static void segfaultHandlerThread(mach_port_t port) {
#pragma pack(4)
struct {
mach_msg_header_t Head;
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
int64_t code[2];
int flavor;
mach_msg_type_number_t old_stateCnt;
natural_t old_state[x86_THREAD_STATE64_COUNT];
mach_msg_trailer_t trailer;
} msgIn;
struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[x86_THREAD_STATE64_COUNT];
} msgOut;
#pragma pack()
memset(&msgIn, 0xee, sizeof(msgIn));
memset(&msgOut, 0xee, sizeof(msgOut));
mach_msg_header_t* sendMsg = nullptr;
mach_msg_size_t sendSize = 0;
mach_msg_option_t option = MACH_RCV_MSG;
while(true) {
assert(!mach_msg_overwrite(sendMsg, option, sendSize, sizeof(msgIn), port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL, &msgIn.Head, 0));
if(msgIn.Head.msgh_id == MACH_NOTIFY_NO_SENDERS) {
mach_port_destroy(mach_task_self(), port);
return;
}
assert(msgIn.Head.msgh_id == 2406);
assert(msgIn.flavor == x86_THREAD_STATE64);
auto state = (x86_thread_state64_t*) msgIn.old_state;
//log("RIP at 0x{:x}", state->__rip);
msgOut.Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(msgIn.Head.msgh_bits), 0);
msgOut.Head.msgh_remote_port = msgIn.Head.msgh_remote_port;
msgOut.Head.msgh_local_port = MACH_PORT_NULL;
msgOut.Head.msgh_id = msgIn.Head.msgh_id + 100;
msgOut.NDR = msgIn.NDR;
vm_size_t vmsize;
int _basic64[VM_REGION_BASIC_INFO_COUNT_64];
auto info = (vm_region_basic_info_64_t) _basic64;
mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT_64;
memory_object_name_t object;
auto vmaddr = PAGEBASE(state->__rip);
auto status = vm_region_64(mach_task_self(), (vm_address_t*) &vmaddr, &vmsize, VM_REGION_BASIC_INFO, (vm_region_info_t) info, &info_count, &object);
if(status != KERN_SUCCESS || (info->protection & VM_PROT_EXECUTE)) {
log("Genuine segfault at 0x{:x}; passing along.", state->__rip);
if(status == KERN_SUCCESS)
log("Base address for segfault is 0x{:x} with size 0x{:x} and protection 0x{:x}", vmaddr, vmsize, info->protection);
msgOut.RetCode = KERN_FAILURE;
msgOut.flavor = 0;
msgOut.new_stateCnt = 0;
} else {
//log("Attempting to call into ARM code, I think! target 0x{:x} retaddr 0x{:x}", state->__rip, *((uint64_t*) state->__rsp));
auto knownTramp = TrampolinerInstance.asTrampoline(state->__rip);
if(knownTramp != nullptr) {
//log("Found known trampoline!");
if(knownTramp->isArmToNative()) {
//log("Actually A->N trampoline; cutting out middleman.");
state->__rip = knownTramp->target;
} else
state->__rip = knownTramp->trampoline & ~NATIVE_TO_ARM;
} else {
//log("Using generic trampoline");
state->__rsp -= 8;
*(uint64_t*) state->__rsp = state->__rip;
state->__rip = (uint64_t) jmptrampoline;
}
msgOut.RetCode = KERN_SUCCESS;
msgOut.flavor = x86_THREAD_STATE64;
msgOut.new_stateCnt = x86_THREAD_STATE64_COUNT;
memcpy(msgOut.new_state, msgIn.old_state, x86_THREAD_STATE64_COUNT * sizeof(natural_t));
//log("Attempting return to execution...");
}
msgOut.Head.msgh_size =
offsetof(__typeof__(msgOut), new_state) + msgOut.new_stateCnt * sizeof(natural_t);
sendMsg = &msgOut.Head;
sendSize = msgOut.Head.msgh_size;
option |= MACH_SEND_MSG;
}
}
mach_port_t debugPort;
pthread_introspection_hook_t prevThreadIntrospectionHook;
void threadHook(unsigned int event, pthread_t thread, void* addr, size_t size) {
if(event == PTHREAD_INTROSPECTION_THREAD_START) {
log("Got new pthread! Attaching our debug hooks.");
assert(!thread_set_exception_ports(pthread_mach_thread_np(thread), EXC_MASK_BAD_ACCESS, debugPort,
EXCEPTION_STATE | MACH_EXCEPTION_CODES, x86_THREAD_STATE64));
log("Attached. Should be good to go!");
}
if(prevThreadIntrospectionHook != nullptr) {
log("Passing pthread event to next handler.");
prevThreadIntrospectionHook(event, thread, addr, size);
}
}
#ifdef USE_UNICORN
bool unmpdFetchHook(uc_engine* uc, uc_mem_type type, uint64_t addr, uint32_t size, uint64_t value, void* user_data) {
log("Unmapped fetch! 0x" << hex << addr);
if(addr == -4ULL)
return false;
auto cpu = (Cpu*) user_data;
cpu->pullUnicornState();
if(cpu->isValidCodePointer(addr, &cpu->unicornState)) {
log("Mapping valid code pointer for page 0x" << hex << PAGEBASE(addr));
//uc_mem_map_ptr(uc, PAGEBASE(addr), 0x1000, UC_PROT_READ | UC_PROT_WRITE | UC_PROT_EXEC, (void*) PAGEBASE(addr));
vm_size_t vmsize;
int _basic64[VM_REGION_BASIC_INFO_COUNT_64];
auto info = (vm_region_basic_info_64_t) _basic64;
mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT_64;
memory_object_name_t object;
auto vmaddr = PAGEBASE(addr);
auto status = vm_region_64(mach_task_self(), (vm_address_t*) &vmaddr, &vmsize, VM_REGION_BASIC_INFO, (vm_region_info_t) info, &info_count, &object);
if(status != KERN_SUCCESS) {
log("This failed but should never be able to ... ?");
BAILOUT();
}
log("Found memory region from " << hex << vmaddr << " to " << vmaddr + vmsize);
//uc_mem_map_ptr(uc, vmaddr, vmsize, UC_PROT_READ | UC_PROT_WRITE | UC_PROT_EXEC, (void*) vmaddr);
auto bottom = max(vmaddr, LARGEPAGEBASE(addr));
auto top = min(vmaddr + vmsize, LARGEPAGEBASE(addr) + 0x4000);
log("Actually mapping " << hex << bottom << " to " << top);
uc_mem_map_ptr(uc, bottom, top - bottom, UC_PROT_READ | UC_PROT_WRITE | UC_PROT_EXEC, (void*) bottom);
return true;
} else {
log("Fetching bad address; native call maybe?");
return false;
}
}
bool unmpdRWHook(uc_engine* uc, uc_mem_type type, uint64_t addr, uint32_t size, uint64_t value, void* user_data) {
if(type == UC_MEM_READ_UNMAPPED)
log("Reading " << dec << size << " bytes of unmapped memory at 0x" << hex << addr);
else
log("Writing " << dec << size << " bytes of unmapped memory (0x" << hex << value << ") at 0x" << hex << addr);
uint64_t pc;
uc_reg_read(uc, UC_ARM64_REG_PC, &pc);
log("Current PC 0x" << hex << pc);
vm_size_t vmsize;
int _basic64[VM_REGION_BASIC_INFO_COUNT_64];
auto info = (vm_region_basic_info_64_t) _basic64;
mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT_64;
memory_object_name_t object;
auto vmaddr = PAGEBASE(addr);
auto status = vm_region_64(mach_task_self(), (vm_address_t*) &vmaddr, &vmsize, VM_REGION_BASIC_INFO, (vm_region_info_t) info, &info_count, &object);
if(status != KERN_SUCCESS) {
log("Actually unmapped page at 0x" << hex << PAGEBASE(addr));
BAILOUT();
}
log("Found memory region from " << hex << vmaddr << " to " << vmaddr + vmsize);
//uc_mem_map_ptr(uc, vmaddr, vmsize, UC_PROT_READ | UC_PROT_WRITE | UC_PROT_EXEC, (void*) vmaddr);
//uc_mem_map_ptr(uc, PAGEBASE(addr), 0x1000, UC_PROT_READ | UC_PROT_WRITE | UC_PROT_EXEC, (void*) PAGEBASE(addr));
auto bottom = max(vmaddr, LARGEPAGEBASE(addr));
auto top = min(vmaddr + vmsize, LARGEPAGEBASE(addr) + 0x4000);
log("Actually mapping " << hex << bottom << " to " << top);
uc_mem_map_ptr(uc, bottom, top - bottom, UC_PROT_READ | UC_PROT_WRITE | UC_PROT_EXEC, (void*) bottom);
return true;
}
#endif
// TODO: Work out lifetime issues; we're leaking memory here if a thread is killed after initializing CPU
Cpu::Cpu() {
static bool first = true;
if(first) {
first = false;
log("Creating segfault handler thread!");
mach_port_t previous;
assert(!mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &debugPort));
thread segfaultThread(segfaultHandlerThread, debugPort);
segfaultThread.detach();
assert(!mach_port_insert_right(mach_task_self(), debugPort, debugPort, MACH_MSG_TYPE_MAKE_SEND));
//assert(!task_set_exception_ports(mach_task_self(), EXC_MASK_BAD_ACCESS, debugPort, EXCEPTION_STATE | MACH_EXCEPTION_CODES, x86_THREAD_STATE64));
prevThreadIntrospectionHook = pthread_introspection_hook_install(threadHook);
}
thread_act_array_t threads;
mach_msg_type_number_t threadCount;
assert(task_threads(mach_task_self(), &threads, &threadCount) == KERN_SUCCESS);
for(auto i = 0; i < threadCount; ++i) {
//assert(!
thread_set_exception_ports(threads[i], EXC_MASK_BAD_ACCESS, debugPort, EXCEPTION_STATE | MACH_EXCEPTION_CODES, x86_THREAD_STATE64);
// );
mach_port_deallocate(mach_task_self(), threads[i]);
}
log("Initialized CPU");
//assert(!thread_set_exception_ports(mach_thread_self(), EXC_MASK_BAD_ACCESS, debugPort, EXCEPTION_STATE | MACH_EXCEPTION_CODES, x86_THREAD_STATE64));
//assert(!mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND, -1));
//assert(!mach_port_request_notification(mach_task_self(), port, MACH_NOTIFY_NO_SENDERS, 0, port, MACH_MSG_TYPE_MAKE_SEND_ONCE, &previous));
#ifdef USE_UNICORN
UCHECKED(uc_open(UC_ARCH_ARM64, UC_MODE_ARM, &uc));
auto fpv = 3 << 20;
UCHECKED(uc_reg_write(uc, UC_ARM64_REG_CPACR_EL1, &fpv));
uc_hook hookHandle;
UCHECKED(uc_hook_add(uc, &hookHandle, UC_HOOK_MEM_FETCH_UNMAPPED, (void *) unmpdFetchHook, this, 0, -1));
UCHECKED(uc_hook_add(uc, &hookHandle, UC_HOOK_MEM_READ_UNMAPPED | UC_HOOK_MEM_WRITE_UNMAPPED, (void *) unmpdRWHook, this, 0, -1));
#else
metaCpu = new MetaCpu(this);
//metaCpu->setBaseline(MetaMode::LightRecompiling);
metaCpu->setBaseline(MetaMode::Interpreting);
//metaCpu->enableOptimizer(MetaMode::LlvmRecompiling, 50);
metaCpu->initialize();
#endif
auto stacksize = 512 * 1024;
currentState()->SP = (uint64_t) malloc(stacksize) + stacksize;
}
Cpu::~Cpu() {
log("Terminating CPU with interface pointer 0x{:x}", (uint64_t) this);
}
void Cpu::dumpRegs() {
auto state = currentState();
string buf = "$STATE$\n";
for(auto i = 0; i < 32; i += 2)
buf += fmt::format("X{}={:x} X{}={:x}\n", i, state->X[i], i + 1, state->X[i + 1]);
buf += fmt::format("PC={:x} SP={:x}", state->PC, state->SP);
log("{}", buf);
}
void Cpu::nativeToArm(stackcontext* context) {
auto state = currentState();
CpuState savedState;
memcpy(&savedState, state, sizeof(CpuState));
auto target = context->target;
//log("In nativeToArm; target 0x{:x} retaddr 0x{:x}", target, context->retaddr);
auto newstack = (uint8_t*) malloc(512*1024);
memcpy(newstack + 512*1024 - 256, (void*) context, 256);
auto newsp = newstack + 512*1024 - 256;
state->X0 = context->rdi;
state->X1 = context->rsi;
state->X2 = context->rdx;
state->X3 = context->rcx;
state->X4 = context->r8;
state->X5 = context->r9;
state->X8 = context->rax;
state->X20 = context->r13;
state->X21 = context->r12;
state->SP = (uint64_t) newsp;
runFrom(target);
//log("Emulation done -- returning to native code!");
free(newstack);
auto maybeError = state->X21 != context->r12;
context->rax = state->X0;
context->rdx = state->X1;
context->rcx = state->X2;
context->r8 = state->X3;
context->r12 = state->X21;
//log("Native->Arm call to 0x{:x} from 0x{:x} Return values: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x}{}", target, context->retaddr, context->rax, context->rdx, context->rcx, context->r8, context->r12, maybeError ? " !!!ERRORMAYBE!!!" : "");
memcpy(state, &savedState, sizeof(CpuState));
//log("Actually jumping back!");
restorecontext(context);
}
bool Cpu::isValidCodePointer(CodeSource source, uint64_t addr, CpuState* state) {
//if(state != nullptr && !fromOptimizer)
// dumpRegs();
if(TrampolinerInstance.asTrampoline(addr) != nullptr)
return false;
auto page = addr & ~0xFFFULL;
if(lastPageChecked[source] == page)
return true;
if(addr >> 63) return false;
//log("Checking pointer validity: " << hex << addr);
vm_size_t vmsize;
int _basic64[VM_REGION_BASIC_INFO_COUNT_64];
auto info = (vm_region_basic_info_64_t) _basic64;
mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT_64;
memory_object_name_t object;
auto vmaddr = page;
auto status = vm_region_64(mach_task_self(), (vm_address_t*) &vmaddr, &vmsize, VM_REGION_BASIC_INFO, (vm_region_info_t) info, &info_count, &object);
if(status != KERN_SUCCESS) {
log("Actually unmapped page at 0x{:x}", page);
BAILOUT();
}
if(info->reserved) {
log("Reserved memory at 0x{:x} to 0x{:x}", vmaddr, vmaddr + vmsize);
BAILOUT();
}
if(!(info->protection & VM_PROT_READ)) {
//log("Checking bad page?? " << hex << page);
return false;
}
if(info->protection & VM_PROT_EXECUTE) {
//log("Trying to call into native code!");
return false;
}
lastPageChecked[source] = page;
return true;
}
bool Cpu::Svc(uint32_t svc, CpuState* state) {
BAILOUT();
return false;
}
uint64_t Cpu::SR(uint32_t op0, uint32_t op1, uint32_t crn, uint32_t crm, uint32_t op2) {
BAILOUT();
return 0UL;
}
void Cpu::SR(uint32_t op0, uint32_t op1, uint32_t crn, uint32_t crm, uint32_t op2, uint64_t value) {
BAILOUT();
}
void Cpu::Log(const std::string& message) {
log("{}", message);
}
void Cpu::Error(const std::string& message) {
log("{}", message);
BAILOUT();
}
static bool wasFirst = true;
thread_local bool isFirst = false;
void Cpu::runFrom(uint64_t addr) {
if(wasFirst) {
isFirst = true;
wasFirst = false;
}
auto state = currentState();
state->X30 = -4UL;
while(true) {
//TrampolinerInstance.checkCanaries();
/*if(isFirst) {
log("Starting emulation at 0x{:x}", addr);
dumpRegs();
}*/
/*log("PC 0x{:x}\n\tVector regs: D0 {} 0x{:x} D1 {} 0x{:x} D2 {} 0x{:x} D3 {} 0x{:x}\n\tVector regs: D4 {} 0x{:x} D5 {} 0x{:x} D6 {} 0x{:x} D7 {} 0x{:x}\n\tVector regs: D8 {} 0x{:x} D9 {} 0x{:x} D10 {} 0x{:x} D11 {} 0x{:x}",
addr,
*(double*) &state->V0, *(uint64_t*) &state->V0, *(double*) &state->V1, *(uint64_t*) &state->V1, *(double*) &state->V2, *(uint64_t*) &state->V2, *(double*) &state->V3, *(uint64_t*) &state->V3,
*(double*) &state->V4, *(uint64_t*) &state->V4, *(double*) &state->V5, *(uint64_t*) &state->V5, *(double*) &state->V6, *(uint64_t*) &state->V6, *(double*) &state->V7, *(uint64_t*) &state->V7,
*(double*) &state->V8, 000*(uint64_t*) &state->V8, *(double*) &state->V9, *(uint64_t*) &state->V9, *(double*) &state->V10, *(uint64_t*) &state->V10, *(double*) &state->V11, *(uint64_t*) &state->V11);*/
#ifdef USE_UNICORN
unicornState.PC = addr;
pushUnicornState();
auto ret = uc_emu_start(uc, addr, -0x1000ULL, 0, 0);
pullUnicornState();
if(ret != UC_ERR_FETCH_UNMAPPED) {
//log("Unicorn error? " << uc_strerror(ret));
//dumpRegs();
}
#else
metaCpu->run(addr, state->SP);
#endif
//log("Emulator returned from execution at " << hex << state->PC);
if(state->PC == -4UL) {
//log("Finished subemulation?");
break;
}
addr = state->PC;
/*if(isFirst) {
log("Completed emulation at 0x{:x}", addr);
dumpRegs();
}*/
if(addr == 0xDEADBEEFCAFEBAB0) { // Backdoor Log
log("Got backdoor log message: {}", (const char*) state->X0);
addr = state->PC = state->X30;
continue;
}
auto tt = TrampolinerInstance.asTrampoline(addr);
if(tt != nullptr) {
if(tt->isNativeToArm()) {
//log("Attempting to call ARM->ARM via trampoline");
addr = state->PC = tt->target;
} else {
//log("Attempting to call into native code; got trampoline instead!");
auto func = (void (*)()) (tt->trampoline & ~ARM_TO_NATIVE);
state->PC = state->X30;
//log("Going to return to " << hex << state->X30);
func();
//log("Returned from trampoline");
addr = state->PC;
}
} else if(isValidCodePointer(CodeSource::Execution, addr, state)) {
//log("For some reason, we bailed out of ARM code but shouldn't have. 0x" << hex << addr);
continue;
} else if((addr >> 62) == 0x2) {
//log("Attempting to call into native code; got wrapper instead!");
auto func = (void(*)(CpuState*)) (addr & ~(2ULL << 62));
state->PC = state->X30;
func(state);
//log("Returned from wrapper");
addr = state->PC;
} else {
auto lr = state->X30;
//log("Going to native code then returning to " << hex << lr);
auto ctramp = TrampolinerInstance.getKnownTrampoline(addr);
if(ctramp == 0) {
//log("Using generic ARM->Native trampoline for call to 0x{:x} from 0x{:x}", addr, lr);
trampoline(addr);
} else {
tt = TrampolinerInstance.asTrampoline(ctramp);
if(tt == nullptr) {
log("Got trampoline but it isn't a valid trampoline??");
BAILOUT();
}
((void (*)()) (tt->trampoline & ~ARM_TO_NATIVE))();
}
//log("Returning to " << hex << lr);
addr = lr;
if(addr == -4UL) {
//log("Skipping next subemulation?");
state->PC = addr;
break;
}
}
}
}
CpuState* Cpu::currentState() {
#ifdef USE_UNICORN
return &unicornState;
#else
return metaCpu->state;
#endif
}
#ifdef USE_UNICORN
void Cpu::pullUnicornState() {
for(auto i = 0; i < 29; ++i)
uc_reg_read(uc, UC_ARM64_REG_X0 + i, &unicornState.X[i]);
uc_reg_read(uc, UC_ARM64_REG_X29, &unicornState.X29);
uc_reg_read(uc, UC_ARM64_REG_X30, &unicornState.X30);
for(auto i = 0; i < 32; ++i)
uc_reg_read(uc, UC_ARM64_REG_V0 + i, &unicornState.V[i]);
uc_reg_read(uc, UC_ARM64_REG_SP, &unicornState.SP);
uc_reg_read(uc, UC_ARM64_REG_PC, &unicornState.PC);
}
void Cpu::pushUnicornState() {
for(auto i = 0; i < 29; ++i)
uc_reg_write(uc, UC_ARM64_REG_X0 + i, &unicornState.X[i]);
uc_reg_write(uc, UC_ARM64_REG_X29, &unicornState.X29);
uc_reg_write(uc, UC_ARM64_REG_X30, &unicornState.X30);
for(auto i = 0; i < 32; ++i)
uc_reg_write(uc, UC_ARM64_REG_V0 + i, &unicornState.V[i]);
uc_reg_write(uc, UC_ARM64_REG_SP, &unicornState.SP);
uc_reg_write(uc, UC_ARM64_REG_PC, &unicornState.PC);
}
#endif
void Cpu::precompile(uint64_t addr) {
}
void Cpu::trampoline(uint64_t addr) {
auto state = currentState();
auto sp = (uint64_t*) state->SP;
sp -= 128;
//dumpRegs();
assert(!((uint64_t) sp & 0xF));
memcpy(sp, (void*) state->SP, 128);
*--sp = state->X7;
*--sp = state->X6;
*--sp = state->X0;
*--sp = state->X1;
*--sp = state->X2;
*--sp = state->X3;
*--sp = state->X4;
*--sp = state->X5;
*--sp = state->X20;
*--sp = state->X21;
*--sp = state->X8;
/**--sp = ((uint64_t) *(uint32_t*) &state->V0) | (((uint64_t) *(uint32_t*) &state->V1) << 32);
*--sp = ((uint64_t) *(uint32_t*) &state->V2) | (((uint64_t) *(uint32_t*) &state->V3) << 32);
*--sp = ((uint64_t) *(uint32_t*) &state->V4) | (((uint64_t) *(uint32_t*) &state->V5) << 32);
*--sp = ((uint64_t) *(uint32_t*) &state->V6) | (((uint64_t) *(uint32_t*) &state->V7) << 32);
*--sp = ((uint64_t) *(uint32_t*) &state->V8) | (((uint64_t) *(uint32_t*) &state->V9) << 32);
*--sp = ((uint64_t) *(uint32_t*) &state->V10) | (((uint64_t) *(uint32_t*) &state->V11) << 32);*/
*--sp = *(uint64_t*) &state->V0;
*--sp = *(uint64_t*) &state->V1;
*--sp = *(uint64_t*) &state->V2;
*--sp = *(uint64_t*) &state->V3;
*--sp = *(uint64_t*) &state->V4;
*--sp = *(uint64_t*) &state->V5;
uint64_t ret0, ret1, ret2, ret3, eret;
log("Generic Arm->Native to 0x{:x} from 0x{:x}", addr, state->X30);
//dumpRegs();
asm volatile(
"mov %1, %%r10\n"
"mov %%rsp, %%rbx\n"
"mov %%rcx, %%rsp\n"
"pop %%rdx\n"
"movq %%rdx, %%xmm5\n"
"pop %%rdx\n"
"movq %%rdx, %%xmm4\n"
"pop %%rdx\n"
"movq %%rdx, %%xmm3\n"
"pop %%rdx\n"
"movq %%rdx, %%xmm2\n"
"pop %%rdx\n"
"movq %%rdx, %%xmm1\n"
"pop %%rdx\n"
"movq %%rdx, %%xmm0\n"
"pop %%rax\n"
"pop %%r12\n"
"pop %%r13\n"
"pop %%r9\n"
"pop %%r8\n"
"pop %%rcx\n"
"pop %%rdx\n"
"pop %%rsi\n"
"pop %%rdi\n"
"call *%%r10\n"
"mov %%rsp, %%r13\n"
"push %%rax\n"
"push %%rdx\n"
"push %%rcx\n"
"push %%r8\n"
"push %%r12\n"
"mov %%r13, %%rcx\n"
"mov %%rbx, %%rsp\n"
: "=c" (sp)
: "r" (addr), "c" (sp)
: "%rax", "%rbx", "%r9", "%r8", "%r10", "%r12", "%r13", "%rdx", "%rsi", "%rdi"
);
//log("Returned from native code -- stack at 0x" << hex << sp);
ret0 = *--sp;
ret1 = *--sp;
ret2 = *--sp;
ret3 = *--sp;
eret = *--sp;
auto maybeError = eret != state->X21;
log("Generic Arm->Native to 0x{:x} from 0x{:x} Return values 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x}{}", addr, state->X30, ret0, ret1, ret2, ret3, eret, maybeError ? " !!!ERRORMAYBE!!!" : "");
state->X0 = ret0;
state->X1 = ret1;
state->X2 = ret2;
state->X3 = ret3;
state->X21 = eret;
}
|
a6114b6cad51a24c620177dec1cf446f65bdedd9
|
817cc371e2eb56f37c400b7f96d658d0683476b1
|
/201907_practice/hdu04/1003.cpp
|
dc53ce8d85f966ee326b9e49d970055b59fb1a11
|
[] |
no_license
|
KanadeSiina/PracticeCode
|
c696495bd71395648ac62a41d0a41869f50c5eb4
|
146c8d5889eee7917a355feb8b03d1415a29ae9d
|
refs/heads/master
| 2020-09-05T00:49:29.165600
| 2020-06-30T12:48:15
| 2020-06-30T12:48:15
| 219,937,221
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,596
|
cpp
|
1003.cpp
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
#ifndef ONLINE_JUDGE
#define dbg(x...) do{cout << "\033[32;1m" << #x << "->" ; err(x);} while(0)
void err(){cout << "\033[39;0m" << endl;}
template<template<typename...> class T,typename t,typename... A>
void err(T<t> a,A... x){for (auto v:a) cout << v << ' '; err(x...);}
template<typename T,typename... A>
void err(T a,A... x){cout << a << ' '; err(x...);}
#else
#define dbg(...)
#endif
const int mod=998244353;
const int INF=0x3f3f3f3f;
ll quick(ll a,ll b)
{
ll ret=1;
while(b)
{
if(b&1)
ret=ret*a%mod;
a=a*a%mod;
b>>=1;
}
return ret;
}
const int maxn=1e5+7;
struct node{
int id;
ll num;
bool operator<(const node &a)const{
return num>a.num;
}
};
ll sum[maxn];
vector<int> ans[maxn];
ll inv(ll a){return quick(a,mod-2);}
int main()
{
int T;
scanf("%d",&T);
while(T--)
{
int n,k;
scanf("%d%d",&n,&k);
ll tot=1LL*n*(n+1)/2;
if(k==n)
{
if(n==1)
{
puts("yes");
puts("1 1");
}
else puts("no");
}
else{
if(tot%k!=0)
{
puts("no");
continue;
}
puts("yes");
for(int i=0;i<=k;i++) sum[i]=0;
priority_queue<node> q;
for(int i=1;i<=k;i++)
{
q.push(node{i,0});
ans[i].clear();
}
for(int i=1;i<=n;i++)
{
auto u=q.top();q.pop();
ans[u.id].push_back(i);
sum[u.id]+=i;
q.push(node{u.id,sum[u.id]});
}
for(int i=1;i<=k;i++)
{
for(auto u:ans[i])
printf("%d ",u);
puts("");
}
ll tar=tot/k;
for(int i=1;i<=k;i++)
{
cout<<i<<":"<<sum[i]<<endl;
}
}
}
}
|
0f75f95922fdb39a34e7d682e20631bcd4729aac
|
cf9ea43cd8dee7ed1f56098f8b5cea59ed9e2f56
|
/LogicBase/QTalkSecurity.h
|
889c5dbebc43608be1799202b4533bd11c61bd6c
|
[
"MIT"
] |
permissive
|
yueyz818/startalk_pc
|
1a9cc0e7a51628b104d866cd2923d5eab7a0934e
|
91916499af2ceea1c4a6000520f83f702ebc872d
|
refs/heads/master
| 2023-04-29T00:20:49.668802
| 2021-05-12T16:17:49
| 2021-05-12T16:17:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 456
|
h
|
QTalkSecurity.h
|
//
// Created by may on 2018/8/17.
//
#ifndef QTALKSECURITY_H
#define QTALKSECURITY_H
#include <string>
#include "../QtUtil/Entity/JID.h"
namespace QTalk {
namespace Security {
std::string pwd_key_plain(const std::string &user, const std::string &password, int loginType);
std::string chatRsaEncrypt(const std::string &value);
std::string normalRsaEncrypt(const std::string &value);
}
}
#endif //QTALKSECURITY_H
|
ce893595bdc36b0a7e8e7f5e56c73e466f9eb39d
|
8820071bb44ee9547cc33453d5400064c1b21f3f
|
/LunarEngine/source/LunarRenderer/LunarPrimitives/LunarTexture.cpp
|
8b3b6a0879d093e28d2c56be1c1a5e3e946c7e43
|
[] |
no_license
|
Leptron/LunarEngine
|
2f477138cdf2f4917c8ad7f260fd38954ae3a462
|
782968fedf0d8e82cf05c3f5ba05e865663f4017
|
refs/heads/master
| 2022-11-14T11:57:50.790480
| 2020-06-23T20:43:58
| 2020-06-23T20:43:58
| 266,502,607
| 1
| 0
| null | 2020-06-24T03:05:03
| 2020-05-24T08:46:34
|
C
|
UTF-8
|
C++
| false
| false
| 994
|
cpp
|
LunarTexture.cpp
|
#include "../../../public/LunarPrimitives/LunarTexture.h"
namespace Lunar2D {
LunarTexture::LunarTexture() {
}
LunarTexture::~LunarTexture() {
}
void LunarTexture::LoadTexture(std::string textureLoc) {
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture);
//wrapping / filtering options
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
LunarUtils::LunarImageLoader loader;
LunarUtils::ImageLoaded ldata = loader.load(textureLoc.c_str());
unsigned char* data = ldata.imageData;
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, ldata.width, ldata.height, 0, GL_RGB, GL_UNSIGNED_BYTE, data);
glGenerateMipmap(GL_TEXTURE_2D);
loader.free();
}
void LunarTexture::Use() {
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, texture);
}
}
|
34dbf274617987b48522aa8951c006774375e4d4
|
568fa24f8de432ed5b6c9f1d6ad0a9e32c5274b7
|
/source/app/collector/cc/obj.h
|
8bf6d3d4e5019c6acf8cfd20d5b0d8f83e024fa3
|
[] |
no_license
|
ankeesler/btool
|
2cb450041e589c78bf93e5a5d9eb238b3e494224
|
9f4a4c919cb4d40d6d91fa8aafd814d74edf7d09
|
refs/heads/main
| 2022-07-21T18:51:42.962440
| 2022-06-01T21:54:58
| 2022-06-01T21:54:58
| 188,036,175
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 596
|
h
|
obj.h
|
#ifndef BTOOL_APP_COLLECTOR_CC_OBJ_H_
#define BTOOL_APP_COLLECTOR_CC_OBJ_H_
#include <string>
#include "app/collector/base_collectini.h"
#include "app/collector/cc/resolver_factory.h"
#include "app/collector/store.h"
namespace btool::app::collector::cc {
class Obj : public ::btool::app::collector::BaseCollectini {
public:
Obj(ResolverFactory *rf) : rf_(rf) {}
void OnNotify(::btool::app::collector::Store *s,
const std::string &name) override;
private:
ResolverFactory *rf_;
};
}; // namespace btool::app::collector::cc
#endif // BTOOL_APP_COLLECTOR_CC_OBJ_H_
|
381a07d61858d1aae110e50eac425f62d510d69e
|
875532ce6eba934bcc28e384f843f7debd60dfda
|
/base/Bond.hpp
|
7c73e5083eb77ce28c3424eb25634113f0f0d7d7
|
[] |
no_license
|
portegys/Replicator
|
e59dc0034e2b3ab78763a95af8e5be02485e2ffd
|
6137741b3043028677d724d0f5e4aa303ffb7ba3
|
refs/heads/master
| 2020-07-15T15:21:01.870281
| 2019-08-31T21:03:39
| 2019-08-31T21:03:39
| 205,593,241
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 950
|
hpp
|
Bond.hpp
|
/*
* This software is provided under the terms of the GNU General
* Public License as published by the Free Software Foundation.
*
* Copyright (c) 2004 Tom Portegys, All Rights Reserved.
* Permission to use, copy, modify, and distribute this software
* and its documentation for NON-COMMERCIAL purposes and without
* fee is hereby granted provided that this copyright notice
* appears in all copies.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.
*/
/*
* Bond properties.
*/
#ifndef __BOND__
#define __BOND__
class Bond
{
public:
// Bond strength.
float strength;
// Constructor.
Bond();
Bond(float strength);
// Destructor.
~Bond();
// Get bond strength.
float getStrength();
};
#endif
|
44dbeb18f1c2fd881074ec45335251cff44b1bfb
|
240fa079de0405fa04dc9bab053af6602be1ba60
|
/pemrograman-kompetitif-dasar/11-algoritma-graf/a-les-piano.cpp
|
51928527cfaf31c9598a82a9e4a18eeae2a0796f
|
[] |
no_license
|
hyperforest/course-tlx
|
ab6d9009f56098f53ee22acad94dd7a77cdd6855
|
8d18adfa5b2750b13f24d339a5a2b1b301ae7f08
|
refs/heads/master
| 2021-04-01T21:40:21.276047
| 2020-03-18T12:01:00
| 2020-03-18T12:01:00
| 248,216,174
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,325
|
cpp
|
a-les-piano.cpp
|
/**
"Indeed, with every hardship comes ease" (Qur'an 94:6)
* Template *
Author : Rimba Erlangga
**/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define REP(i, a, b) for(int i = (a); i <= (b); i++)
#define REPP(i, a, b) for(int i = (a); i < (b); i++)
#define PER(i, a, b) for(int i = (a); i >= (b); i--)
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.end(), a.begin()
#define SORT(v) sort(ALL(v))
#define RSORT(v) sort(RALL(v))
#define ii pair<int, int>
#define fi first
#define se second
#define mp make_pair
#define vi vector<int>
#define vii vector<ii>
#define vvi vector<vi>
#define vl vector<ll>
#define mat vector<vl>
#define append push_back
const int MX = 5000;
const ll inf = 1e9;
int V, E, a, b;
ll dist[MX + 5]; // dist[v] = jarak dari vertex source ke vertex v
bool vis[MX + 5];
ll pred[MX + 5]; // pred[v] = predecessor dari vertex v di shortest path
vector<pair<ll, ll> > adj[MX + 5];
void reset(int N) {
for (int i = 0; i <= N; i++) {
dist[i] = inf;
vis[i] = false;
pred[i] = -1;
}
}
void dijkstra(int s) {
// hitung shortest path dari vertex s ke semua vertex lain
// simpen di array dist
dist[s] = 0;
while (true) {
int u = -1;
ll mins = inf;
for (int i = 1; i <= V; i++) {
// cari node yg belum dikunjungi dgn dist terkecil
if (!vis[i] and dist[i] < mins) {
u = i; mins = dist[i];
}
}
if (u == -1 or dist[u] == inf) break;
vis[u] = true;
for (int i = 0; i < adj[u].size(); i++) {
ll v = adj[u][i].first;
ll w = adj[u][i].second;
if (dist[v] > dist[u] + w) {
dist[v] = dist[u] + w;
pred[v] = u;
}
}
}
}
// permanent constant
const int md = 1000000007;
const ld pi = acos(-1.0);
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, 1, 0, -1};
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cin >> V >> E >> a >> b;
reset(V);
for (int i = 1; i <= E; i++) {
int u, v, w;
cin >> u >> v >> w;
adj[u].append({v, w});
adj[v].append({u, w});
}
dijkstra(a);
cout << dist[b] << endl;
return 0;
}
|
36bff8c6e8841dd0116938a8c4f1e424ef09f5e9
|
e40bd82b5a9dc7ad2589d3a943dca204d61ab636
|
/TerminalExtraction/Sources/Engine/COntent/ContentProvider/DescriptionProvider/BehaviourModelDescription.h
|
7b41693d932675a4857cd2d92b5f7ae66ab2ac64
|
[] |
no_license
|
yariksmirnov/TerminalExtraction
|
1a813b1a0f3deb25a44b8911303b24650aee5eae
|
2e6cd035006d643b0d34726bfa4e4b7c664a2b31
|
refs/heads/master
| 2020-05-15T22:32:28.154159
| 2012-12-07T12:38:06
| 2012-12-07T12:38:06
| 6,244,956
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,617
|
h
|
BehaviourModelDescription.h
|
//
// BehaviourModelDescription.h
// TerminalExtraction
//
// Created by Anton Katekov on 27.11.12.
//
//
#ifndef __TerminalExtraction__BehaviourModelDescription__
#define __TerminalExtraction__BehaviourModelDescription__
#include <iostream>
#include <string>
#include "BaseDescription.h"
#include "Geometry.h"
using namespace std;
class BehaviourModelDescription : public BaseDescription{
public:
int _type;
bool _isStatic;
GLKVector3 _centerOfMass;
int _shapeType;
int _physicShapeType;
GLKVector3 _shapeSize;
float _shapeRotationAngle;
GLKVector3 _shapeRotationAxis;
string _collisionMeshName;
float _mass;
BehaviourModelDescription(unsigned int id);
BehaviourModelDescription(unsigned int id,
int type,
bool isStatic,
GLKVector3 centerOfMass,
int shapeType,
int physicShapeType,
GLKVector3 shapeSize,
float shapeRotationAngle,
GLKVector3 shapeRotationAxis,
string collisionMeshName,
float mass);
virtual void mapValueWithName(void* value, string name);
};
#endif /* defined(__TerminalExtraction__BehaviourModelDescription__) */
|
fdab5665ee642d24c1997627672ad89ebe9b97ca
|
78d31f7946dac510ef230316d1a174275b06b4c6
|
/Lobelia/Graphics/Environment/Environment.hpp
|
35560af57db357f530c2dcae9e8ca1569d09349b
|
[] |
no_license
|
LobeliaSnow/LobeliaEngine
|
10b25746b3d02fdb9c26286e15124f7fd7b764ba
|
8121e83998da656a047cc14eb6bd029ae8c2d63d
|
refs/heads/master
| 2021-05-02T17:27:55.403882
| 2018-07-29T17:40:53
| 2018-07-29T17:40:53
| 120,646,038
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 711
|
hpp
|
Environment.hpp
|
#pragma once
namespace Lobelia::Graphics {
class Environment :public Utility::Singleton<Environment> {
friend class Utility::Singleton<Environment>;
private:
struct Constant {
Math::Vector4 dir;
Math::Vector4 color;
Math::Vector4 fogInfo;
};
std::unique_ptr<ConstantBuffer<Constant>> constantBuffer;
Constant buffer;
private:
Environment();
~Environment();
public:
Environment(const Environment&) = delete;
Environment(Environment&&) = delete;
Environment& operator=(const Environment&) = delete;
Environment& operator=(Environment&&) = delete;
public:
void SetLightDirection(const Math::Vector3& dir);
void SetAmbientColor(Utility::Color color);
void Activate();
};
}
|
cf7e8ffc0cc7860cbc6c2b483723f2f478863ebb
|
654a5013e146c3db9741a553208f90ea1ab15b91
|
/dnssec-tools/validator/apps/dnssec-nodes/LogFilePicker.h
|
c5fc4d8fca000f6ccc1377a7df2acdb82dbf9ebb
|
[
"BSD-3-Clause"
] |
permissive
|
DNSSEC-Tools/DNSSEC-Tools
|
01de5540f079f20f864f62b82bf579151a74a24a
|
2f762779e4f072facfc0704cfd806ed5a2fa1e55
|
refs/heads/master
| 2022-07-07T10:12:08.562422
| 2022-06-23T17:04:29
| 2022-06-23T17:04:29
| 65,027,086
| 42
| 15
| null | 2022-06-23T17:04:30
| 2016-08-05T14:57:51
|
Perl
|
UTF-8
|
C++
| false
| false
| 537
|
h
|
LogFilePicker.h
|
#ifndef LOGFILEPICKER_H
#define LOGFILEPICKER_H
#include <QDialog>
#include <QtGui/QHBoxLayout>
#include <QtGui/QVBoxLayout>
#include <QtGui/QLineEdit>
#include <QtCore/QString>
#include <QtGui/QCheckBox>
class LogFilePicker : public QDialog
{
Q_OBJECT
public:
explicit LogFilePicker(QString defaultFile = "", QWidget *parent = 0);
QString file();
bool skipToEnd();
signals:
public slots:
void openBrowseWindow();
private:
QLineEdit *m_fileEditBox;
QCheckBox *m_skipToEnd;
};
#endif // LOGFILEPICKER_H
|
6882d54d5ca76d69086c0ee8cc82e86c43b45a04
|
52afc107da56d0486ba5fc743c597895c91882d8
|
/AggCow.cpp
|
d0ebbc9c505d25b847c22d1599926ad774206bd4
|
[] |
no_license
|
pranavr93/All-codes
|
b45360826855acdc7518dd6cb48063ea456384b2
|
d61565350ba2bdbafc46089ee2f98ff62480a017
|
refs/heads/master
| 2021-01-10T19:44:58.825602
| 2014-10-29T20:31:32
| 2014-10-29T20:31:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,644
|
cpp
|
AggCow.cpp
|
/* Author : Pranav
BITS PILANI Hyderabad Campus */
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
//#include <sstream>
using namespace std;
#define sz(a) int((a).size())
#define pb push_back
#define pop pop_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define fr(i,n) for(ll i=0; i<n; i++)
#define N 10005
#define INF 1000000
#define mod 1000000007
#define f first
#define s second
#define mp(x,y) make_pair(x,y)
#define sc(x) scanf("%lld",&x);
#define pr(x) printf("%lld\n",x);
typedef long long ll;
ll cows;
ll check(ll *a,ll x,ll n){
ll ptr=0;
ll ct=1;
for(ll i=1;i<n;i++){
if(a[i]-a[ptr]>=x){
ptr=i;
ct++;
}
if(ct==cows){return 1;}
}
return 0;
}
ll bin_search(ll *a,ll low,ll high,ll n){
ll mid;
while(high-low>1){
mid=(low+high)/2;
if(check(a,mid,n)){
low=mid;
}
else{
high=mid;
}
}
return low;
}
ll main(){
ll t;
ll n;
ll arr[100005];
cin>>t;
while(t--){
cin>>n;cin>>cows;
fr(i,n)cin>>arr[i];
sort(arr,arr+n);
//cout<<check(arr,3,n);
// return 0;
ll low=0;ll high=arr[n-1]-arr[0]+1;
cout<<bin_search(arr,low,high,n)<<endl;
}
return 0;
}
|
b7c08b7aad2588750d296f41d3b03fba73c0b8ad
|
6a32899c339841376ac1a9df49e13e84c9be435c
|
/src/GameMaster.cpp
|
0c2f8921e33d8aa65c732bccb809cda5bf1c96e3
|
[
"MIT"
] |
permissive
|
tanacchi/othello_game
|
8435527934ca1208fe4d8d3252ef242d5c9c2968
|
45a0b7aafdd70ebac809b0116bb508724a016423
|
refs/heads/master
| 2021-01-23T05:30:12.422324
| 2019-04-24T16:18:17
| 2019-04-24T16:18:17
| 86,313,588
| 3
| 1
|
MIT
| 2018-09-08T05:49:34
| 2017-03-27T09:00:23
|
C++
|
UTF-8
|
C++
| false
| false
| 4,628
|
cpp
|
GameMaster.cpp
|
#include "../include/GameMaster.hpp"
HandList::HandList(short turn, BoardSeries::Stone stone, BoardSeries::Position position)
: turn_{turn},
stone_{stone},
position_{position}
{
}
void HandList::rewrite(BoardSeries::GameBoard& game_board) const
{
game_board.insert(position_, stone_);
game_board.reverse(position_);
game_board.switch_active_stone(); // ここで?
}
void HandList::report(std::ofstream& log_file) const
{
log_file << turn_ + 1 << ','
<< BoardSeries::to_char(stone_) << ','
<< static_cast<short>(position_.x + 1) << ','
<< static_cast<short>(position_.y + 1) << std::endl;
}
GameMaster::GameMaster(Vector2D board_size, Player* player[])
: board_ {board_size},
participant_ {player[0], player[1]},
active_player_{participant_[0]},
turn_ {0},
pos_ {-1, -1},
hand_list_ {},
log_file_ {}
{
}
GameMaster::Task GameMaster::run(Task mode)
{
switch (mode) {
case Task::Init: return task_init();
case Task::Op: return task_op();
case Task::Set: return task_set();
case Task::Insert: return task_insert();
case Task::Revert: return task_revert();
case Task::Write: return task_write();
case Task::Judge: return task_judge();
case Task::Switch: return task_switch();
case Task::Ask: return task_ask();
case Task::Ed:
default: return Task::Ed;
}
}
GameMaster::Task GameMaster::task_init()
{
board_.init();
active_player_ = participant_[0];
turn_ = 0;
hand_list_.clear();
return Task::Op;
}
GameMaster::Task GameMaster::task_op()
{
std::cout << "turn : " << turn_ + 1 << std::endl;
board_.put_dots();
show(board_);
static int pass_turn;
if (!board_.count_stone(BoardSeries::Stone::Dot)) { std::cout << "PASS !!!" << std::endl; return (++pass_turn < 2) ? Task::Judge : Task::Ask; }
else pass_turn = 0;
board_.remove_dots();
return Task::Set;
}
GameMaster::Task GameMaster::task_set()
{
try {
active_player_->set_hand(board_);
}
catch (std::string src) {
if (src == "revert") return Task::Revert;
}
pos_ = active_player_->get_hand();
if (board_.is_available_position(pos_)) return Task::Insert;
std::cout << "It's invalid hand !! Try again." << std::endl;
return Task::Set;
}
GameMaster::Task GameMaster::task_insert()
{
board_.insert(pos_);
board_.reverse(pos_);
return Task::Write;
}
GameMaster::Task GameMaster::task_revert()
{
std::string input_buff;
std::cout << "Set the turn you wanna play back !" << std::endl;
std::cout << " > " << std::flush;
std::cin >> input_buff;
short destination = std::atoi(input_buff.c_str()) - 1;
if (destination < 0 || turn_ < destination) {
std::cout << "Pardon ?" << std::endl; return Task::Set;
}
hand_list_.erase(hand_list_.begin() + destination, hand_list_.end());
board_.init();
for (const auto& hl : hand_list_) hl.rewrite(board_);
active_player_ = participant_[destination%2];
turn_ = destination;
return Task::Op;
}
GameMaster::Task GameMaster::task_write()
{
hand_list_.push_back(HandList(turn_, board_.get_active_stone(), pos_)); // !!!
return Task::Judge;
}
GameMaster::Task GameMaster::task_judge()
{
show(board_);
return (board_.can_continue()) ? Task::Switch : Task::Ask;
}
GameMaster::Task GameMaster::task_switch()
{
++turn_;
active_player_ = participant_[turn_ % 2];
board_.switch_active_stone();
return Task::Op;
}
GameMaster::Task GameMaster::task_ask()
{
std::cout << "WHITE STONE (O) : " << board_.count_stone(BoardSeries::Stone::White) << '\n'
<< "BLACK STONE (X) : " << board_.count_stone(BoardSeries::Stone::Black) << '\n'
<<std::endl;
record_hand_list();
std::cout << "Continue ?? (yes/no)\n > " << std::flush;
std::string answer;
std::cin >> answer;
return
(answer == "yes") ? Task::Init :
(answer == "no") ? Task::Ed :
Task::Ask;
}
void GameMaster::record_hand_list()
{
const std::string participant_1 = participant_[0]->get_myname();
const std::string participant_2 = participant_[1]->get_myname();
log_file_.open("log/"+participant_1+"_vs_"+participant_2+".csv", std::ios::app);
log_file_ << participant_1 << ",O" << std::endl;
log_file_ << participant_2 << ",X" << std::endl;
log_file_ << "~~BEGIN~~" << std::endl;
for (const auto& hl : hand_list_) hl.report(log_file_);
log_file_ << "~~END~~" << std::endl;
log_file_ << "WHITE," << board_.count_stone(BoardSeries::Stone::White) << std::endl;
log_file_ << "BLACK," << board_.count_stone(BoardSeries::Stone::Black) << '\n' << std::endl;
log_file_.close();
}
|
4ec6c4e3ccfa70b5b5d8d134e86236d047fc53b9
|
495117139c32075cfed8784140bcf94db5d516bc
|
/chapter4.cpp
|
29da96e1bb64ad117b8a94ac184c2ac00211897a
|
[] |
no_license
|
victorybringer/Data-Structure
|
ed53630babed578aa2cd14fadaaccac61cf145d6
|
ba3ae3ca042e37064ea448d2e79cdb00d5abbd68
|
refs/heads/master
| 2020-09-22T18:16:34.838422
| 2019-12-09T12:17:19
| 2019-12-09T12:17:19
| 225,297,795
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 17,000
|
cpp
|
chapter4.cpp
|
#define maxsize 50
using namespace std;
#include "iostream"
#include "string"
typedef struct BiTNode{
BiTNode *lchild= nullptr;
BiTNode *rchild= nullptr;
int data;
BiTNode(int data){
this->data=data;
}
}* BiTree;
typedef struct ThreadNode{
int data;
int ltag;
int rtag;
ThreadNode * lchild=nullptr;
ThreadNode * rchild=nullptr;
ThreadNode(int data,int ltag,int rtag){
this->data=data;
this->ltag=ltag;
this->rtag=rtag;
}
}*ThreadTree;
typedef struct Sqlist{
int data[maxsize];
int length=0;
};
typedef struct BiTNode2{
char data;
BiTNode2 * left=nullptr;
BiTNode2 * right=nullptr;
BiTNode2(char data){
this->data=data;
}
} * BiTree2;
typedef struct Queue{
BiTree data[maxsize];
int rear=0;
int front=0;
int tag=0;
};
typedef struct SqStack{
BiTree data[maxsize];
int top=-1;
};
bool isEmpty(SqStack &stack){
if(stack.top!=-1)
return 0;
else
return 1;
}
bool Push(SqStack &stack,BiTree x){
if(stack.top==maxsize-1)
return 0;
stack.data[++stack.top]=x;
return 1;
}
bool Pop(SqStack &stack,BiTree &x){
if(isEmpty(stack))
return 0;
x=stack.data[stack.top--];
return 1;
}
bool GetTop(SqStack &stack,BiTree &x){
if(isEmpty(stack))
return 0;
x=stack.data[stack.top];
return 1;
}
bool isEmpty(Queue Q){
if(Q.tag==0&&Q.front==Q.rear)
return 1;
else
return 0;
}
bool EnQueue(Queue &Q, BiTree x) {
if (Q.tag == 1 && Q.front == Q.rear)
return 0;
else {
Q.data[Q.rear] = x;
Q.rear = (Q.rear + 1) % maxsize;
Q.tag = 1;
return 1;
}
}
bool DeQueue(Queue &Q,BiTree &x){
if(isEmpty(Q))
return 0;
else{
x=Q.data[Q.front];
Q.front=(Q.front+1)%maxsize;
Q.tag=0;
return 1;
}
}
void PreOrder(BiTree T){ //先序遍历
if(T){
cout<<T->data<<endl;
PreOrder(T->lchild);
PreOrder(T->rchild);
}
}
void InOrder(BiTree T){ //中序遍历
if(T){
InOrder(T->lchild);
cout<<T->data<<endl;
InOrder(T->rchild);
}
}
void PostOrder(BiTree T){ //后序遍历
if(T){
PostOrder(T->lchild);
PostOrder(T->rchild);
cout<<T->data<<endl;
}
}
void LevelOrder(BiTree T){ //层次遍历
Queue Q;
EnQueue(Q,T);
BiTNode *p;
while(!isEmpty(Q)){
DeQueue(Q,p);
cout<<p->data<<endl;
if(p->lchild)
EnQueue(Q,p->lchild);
if(p->rchild)
EnQueue(Q,p->rchild);
}
}
void InOrderTraversal(BiTree T){ //中序非递归
BiTNode *p=T;
SqStack stack;
while(stack.top!=-1||p){
if(p){
Push(stack,p);
p=p->lchild;
}
else{
Pop(stack,p);
cout<<p->data<<endl;
p=p->rchild;
}
}
}
void PreOrderTraversal(BiTree T){ //先序非递归
BiTNode *p=T;
SqStack stack;
while(stack.top!=-1||p){ //栈不空或指针不空时循环
if(p){
cout<<p->data<<endl;
Push(stack,p);
p=p->lchild;
}
else{
Pop(stack,p);
p=p->rchild;
}
}
}
int commonancestor(int i,int j){ //顺序存储的树中两个编号的最近公共结点
while(i!=j)
i>j?i/=2:j/=2;
return i;
}
void ReverseLevelOrder(BiTree T){ //逆序层次遍历
BiTNode *p=T;
Queue Q;
SqStack stack;
EnQueue(Q,p);
while(!(isEmpty(Q))){
DeQueue(Q,p);
Push(stack,p);
// cout<<p->data<<endl;
if(p->lchild){
EnQueue(Q,p->lchild);
}
if(p->rchild){
EnQueue(Q,p->rchild);
}
}
while(stack.top>-1){
cout<<stack.data[stack.top--]->data<<endl;
}
}
int findDepth(BiTree T){
if(!T)
return 0;
else
return 1+(findDepth(T->lchild)>findDepth(T->rchild)?findDepth(T->lchild):findDepth(T->rchild));
}
int findDepthLevelly(BiTree T){ //层序遍历求树的高度
if(!T)
return 0;
int level=0;
Queue Q;
EnQueue(Q,T);
int last=Q.rear; //指向下一层的第一个结点的位置
BiTNode *p;
while(!isEmpty(Q)){
DeQueue(Q,p);
if(p->lchild)
EnQueue(Q,p->lchild);
if(p->rchild)
EnQueue(Q,p->rchild);
if(Q.front==last){
level++;
last=Q.rear;
}
}
return level;
}
void PostOrderTraversal(BiTree T ){ //后序遍历递归
SqStack stack;
BiTree p=T;
BiTree r= nullptr; //新建一个指针,判断返回时是从左侧还是右侧返回的
while(p||stack.top!=-1){
if(p){
Push(stack,p);
p=p->lchild;
}
else{
GetTop(stack,p); //这里暂时先不出栈
if(p->rchild&&p->rchild!=r) //说明右子树未访问
p=p->rchild;
else{
Pop(stack,p);
cout<<p->data<<endl; //确认左右子树均访问过,再访问
r=p; //标记为已访问
p= nullptr; //指针置空,等待取栈顶
}
}
}
}
void ancestorX(BiTree T ,int x){ //后序遍历递归,打印值为x的节点的祖先
SqStack stack;
BiTree p=T;
BiTree r= nullptr; //新建一个指针,判断返回时是从左侧还是右侧返回的
while(p||stack.top!=-1){
if(p){
Push(stack,p);
p=p->lchild;
}
else{
GetTop(stack,p); //这里暂时先不出栈
if(p->rchild&&p->rchild!=r) //说明右子树未访问
p=p->rchild;
else{ //说明从右子树返回,这时栈中元素为祖先结点
Pop(stack,p);
if(p->data==x){
cout<<p->data<<endl;
while(stack.top!=-1){
Pop(stack,p);
cout<<p->data<<endl;
}
}
r=p;
p= nullptr;
}
}
}
}
BiTNode * findcommonancestor2(BiTree T ,BiTNode *p1,BiTNode * p2){ //二叉链表中寻找公共祖先
SqStack stack;
SqStack stack2;
BiTree p=T;
BiTree r= nullptr;
while(p||stack.top!=-1){
if(p){
Push(stack,p);
p=p->lchild;
}
else{
GetTop(stack,p);
if(p->rchild&&p->rchild!=r){
p=p->rchild;
}
else{
Pop(stack,p);
if(p==p1){
for(int i=0;i<=stack.top;++i){
Push(stack2,stack.data[i]);
}
}
if(p==p2){
for(int i=stack.top;i>=0;--i){
for(int j=stack2.top;j>=0;--j){
if(stack2.data[j]==stack.data[i]) {
cout << "find nearest common ancestor " << stack.data[i]->data << endl;
return stack2.data[j];
}
}
}
}
r=p;
p= nullptr;
}
}
}
return nullptr;
}
void pretopost (int s[],int length){ //先序满二叉树转后序
if(length>0){ //相当于递归遍历中指针不为Null,这里是顺序存储所以用数组长度大于0
int lchild[(length - 1) / 2]; //分成左子树,右子树
for (int i = 1; i <= (length - 1) / 2; ++i) {
lchild[i-1] = s[i];
}
int rchild[(length - 1) / 2];
for (int i = 1; i <= (length - 1) / 2; ++i) {
rchild[i-1] = s[i + (length - 1) / 2 ];
}
pretopost(lchild, (length - 1) / 2);
pretopost(rchild, (length - 1) / 2);
cout<<s[0]<<endl;
}
}
void formula(BiTree2 T,int deep){//输出中缀表达式。含括号
if(T== nullptr)
return;
else if(T->left== nullptr&&T->right== nullptr)
cout<<T->data; //叶结点
else { //有子树
if(deep>1) cout<<'('; // 深度为1不需要再加括号了
formula(T->left,deep+1);
cout<<T->data;
formula(T->right,deep+1);
if(deep>1) cout<<')';
}
}
void InorderPostpre(ThreadTree T,ThreadNode *p){ //中序线索二叉树的后续前驱
if(p->rtag==0)
cout<<p->rchild->data;
else if(p->ltag==0)
cout<<p->rchild->data;
else if(p->lchild== nullptr)
cout<<"无后续前驱"<<endl;
else {
while(p->ltag==1&&p->lchild!= nullptr) {//一直沿着线索找到一个由左子树的祖先
p=p->lchild;
if(p->ltag==0)
cout<<p->lchild->data<<endl;
else
cout<<""<<endl;
}
}
}
void changechild(BiTree &T){ //左右子树交换 自上而下,递归
BiTNode * temp;
temp=T->lchild;
T->lchild=T->rchild;
T->rchild=temp;
if(T->lchild)
changechild(T->lchild);
if(T->rchild)
changechild(T->rchild);
}
bool isComplete(BiTree T){ //判断是否为完全二叉树
if(!T)
return 0;
BiTNode *p=T;
Queue Q;
EnQueue(Q,p);
while(!(Q.front==Q.rear&&Q.tag==0)){
DeQueue(Q,p);
// cout<<p->data<<endl;
if(p){
EnQueue(Q,p->lchild); //空结点也入列
EnQueue(Q,p->rchild);
}
else{
while(!(Q.front==Q.rear&&Q.tag==0)) {
DeQueue(Q,p); //空结点后不能有非空,否则说明不是和编号一一对应
if(p)
return 0;
}
}
}
return 1;
}
void hasTwoChild(BiTree T,int &count){
if(T->lchild&&T->rchild)
count++;
if(T->lchild)
hasTwoChild(T->lchild,count);
if(T->rchild)
hasTwoChild(T->rchild,count);
}
int deletex(BiTree &tree,int x){ //递归删除根结点值为X的子树
if(!tree||tree->data==x)
tree=nullptr;
else{
deletex(tree->lchild, x);
deletex( tree->rchild,x);
}
}
int findWidthLevelly(BiTree T){ //层序遍历求树的宽度
if(!T)
return 0;
int width=0;
int count=0;
int level=0;
Queue Q;
EnQueue(Q,T);
int last=Q.rear; //指向下一层的第一个结点的位置
BiTNode *p;
while(!isEmpty(Q)){
DeQueue(Q,p);
count++;
if(p->lchild)
EnQueue(Q,p->lchild);
if(p->rchild)
EnQueue(Q,p->rchild);
if(Q.front==last){
last=Q.rear;
level++;
if(count>width)
width=count;
count=0;
}
}
return width;
}
ThreadNode * first(ThreadTree T){ //中序线索二叉树第一个结点
while(T->ltag==0){
T=T->lchild;
}
return T;
}
ThreadNode * last(ThreadTree T){//中序线索二叉树最后一个结点
while(T->rtag==0){
T=T->rchild;
}
return T;
}
ThreadNode * ordernext(ThreadTree T){//中序线索二叉树后继结点
if(T->rtag==1)
return T->rchild;
else
return first(T->rchild);
}
ThreadNode * orderbefore(ThreadTree T){//中序线索二叉树前驱结点
if(T->ltag==1)
return T->lchild;
else
return last(T->lchild);
}
BiTNode *head,*rear= nullptr;
void LinkAllleaf(BiTree tree){
if(tree){
LinkAllleaf(tree->lchild);
if(!tree->lchild&&!tree->rchild){
if(!rear){
head=tree;
rear=tree;
}
else{
rear->rchild=tree;
rear=tree;
}
}
LinkAllleaf(tree->rchild);
}
}
BiTNode * LinkAllleaf2(BiTree T){ //层序遍历连接所有叶结点
if(!T)
return nullptr;
Queue Q;
EnQueue(Q,T);
BiTNode *p;
BiTNode *head= nullptr;
BiTNode *rear=nullptr;
while(!isEmpty(Q)){
DeQueue(Q,p);
if(!p->lchild&&!p->rchild){
if(!rear){
head=p;
rear=p;
}
else{
rear->rchild=p;
rear=p;
}
}
else{
if(p->lchild)
EnQueue(Q,p->lchild);
if(p->rchild)
EnQueue(Q,p->rchild);
}
}
return head;
}
bool similar(BiTree T1,BiTree T2){ //两棵树相似
if((!T1&&!T2)||(T1&&T2&&!T1->lchild&&!T2->lchild&&!T1->rchild&&!T2->rchild))//两树为空或都只有一个根节点
return 1;
if((T1||T2)&&!(T1&&T2)) //两树之一为空
return 0;
return similar(T1->lchild, T2->lchild)&& similar(T1->rchild, T2->rchild);//递归
}
void PreorderNok(BiTree tree,int &count,int k){ //先序第K个元素
if(tree){
count++;
if(count==k)
cout<<tree->data<<endl;
else{
PreorderNok(tree->lchild,count,k);
PreorderNok(tree->rchild,count,k);}
}
}
void WPL(BiTree tree,int depth,int &total){ //带权路径长度之和
if(tree){
if(!tree->lchild&&!tree->rchild)
total+=tree->data*depth;
WPL(tree->lchild,depth+1,total);
WPL(tree->rchild,depth+1,total);
}
}
void Height(BiTree tree,int depth,int &max){ //递归求树的高度
if(tree){
depth++;
cout<<tree->data<<",depth="<<depth<<endl;
if(depth>max)
max=depth;
Height(tree->lchild,depth,max);
Height(tree->rchild,depth,max);
}
}
int ifbalance(BiTree T){ //判断是否为平衡二叉树
if(!T)
return 0;
else{
int lheight=ifbalance(T->lchild);
int rheight=ifbalance(T->rchild);
if(abs(lheight-rheight)<=1)
return 1+(lheight>rheight?lheight:rheight);
else
cout<<"find unbalanced"<<T->data<<endl;
}
}
int main(){
BiTree tree=new BiTNode(1);;
tree->lchild=new BiTNode(2);
tree->lchild->rchild=new BiTNode(5);
tree->rchild=new BiTNode(3);
tree->rchild->rchild=new BiTNode(5);
tree->rchild->rchild->lchild=new BiTNode(4);
tree->rchild->rchild->rchild=new BiTNode(6);
tree->rchild->rchild->rchild->rchild=new BiTNode(8);
//ReverseLevelOrder(tree);
//cout<<findDepth(tree)<<endl;
//int x=0;
// hasTwoChild(tree,x);
//cout<<x<<endl;
//cout<<commonancestor(4,7)<<endl;
// deletex(tree,5);
//LevelOrder(tree);
// cout<<findWidthLevelly(tree)<<endl;
ThreadTree threadTree=new ThreadNode(4,0,0);
threadTree->lchild=new ThreadNode(2,0,0);
threadTree->lchild->lchild=new ThreadNode(1,1,1);
threadTree->lchild->lchild->rchild=threadTree->lchild;
threadTree->lchild->rchild=new ThreadNode(3,1,1);
threadTree->lchild->rchild->lchild=threadTree->lchild;
threadTree->lchild->rchild->rchild=threadTree;
threadTree->rchild=new ThreadNode(6,0,0);
threadTree->rchild->lchild=new ThreadNode(5,1,1);
threadTree->rchild->lchild->lchild=threadTree;
threadTree->rchild->lchild->rchild=threadTree->rchild;
threadTree->rchild->rchild=new ThreadNode(7,1,1);
threadTree->rchild->rchild->lchild= threadTree->rchild;
// PreorderNok(tree,x,4);
// PreHeight(tree,1,x);
// PostOrderTraversal(tree);
//cout<<LinkAllleaf2(tree)->rchild->data<<endl;
findcommonancestor2(tree, tree->rchild->rchild->lchild, tree->rchild->rchild->rchild->rchild);
BiTree tree2=new BiTNode(1);;
tree2->lchild=new BiTNode(2);
tree2->rchild=new BiTNode(3);
tree2->lchild->lchild=new BiTNode(4);
tree2->lchild->rchild=new BiTNode(5);
tree2->rchild->lchild=new BiTNode(6);
tree2->rchild->rchild=new BiTNode(7);
int list[7]={1,2,3,4,5,6,7};
// pretopost(list,7);
BiTree2 tree3=new BiTNode2('*');;
tree3->left=new BiTNode2('+');
tree3->left->right=new BiTNode2('b');
tree3->left->left=new BiTNode2('a');
tree3->right=new BiTNode2('*');
tree3->right->left=new BiTNode2('c');
tree3->right->right=new BiTNode2('-');
tree3->right->right->right=new BiTNode2('d');
// formula(tree3,1);
// InorderPostpre(threadTree,threadTree->rchild->lchild);
// ifbalance(tree);
// int x=0;
// Height(tree,0,x);
// cout<<x<<endl;
}
|
19d081556f43825dafd8449e6c6df6a4d67d160e
|
d6dcb28b864b22a047c0d316ed67f8baa68cb113
|
/femriCommon/vtkfemriImageToKSpaceFFTw.cxx
|
40befc0518cab74549a7a7de5976e8073b8c7903
|
[
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
alexandermm/FEMRI
|
03ea2ae7ca5bedc0e32a34812b9bf6d63446215f
|
727f3ee6acd45754ab20ebb5ceb90ddf05792b2e
|
refs/heads/master
| 2020-12-24T19:18:23.659687
| 2017-05-11T14:42:04
| 2017-05-11T14:42:04
| 1,404,687
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,057
|
cxx
|
vtkfemriImageToKSpaceFFTw.cxx
|
/*=========================================================================
Program: FEMRI
Module: $RCSfile: vtkfemriImageToKSpaceFFTw.cxx,v $
Language: C++
Date: $Date: 2007/03/19 13:31:25 $
Version: $Revision: 1.1.1.1 $
Copyright (c) Luca Antiga, David Steinman. All rights reserved.
See LICENCE file for details.
Portions of this code are covered under the VTK copyright.
See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "vtkfemriImageToKSpaceFFTw.h"
#include "vtkImageData.h"
#include "vtkDoubleArray.h"
#include "vtkPointData.h"
#include "vtkMath.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkObjectFactory.h"
//alexmbcm: to use use this file you need to install fftw
// http://www.fftw.org/
#include <fftw3.h>
#include <iostream>
using namespace std;
vtkStandardNewMacro(vtkfemriImageToKSpaceFFTw);
vtkCxxRevisionMacro(vtkfemriImageToKSpaceFFTw, "$Revision: 1.1.1.1 $");
vtkfemriImageToKSpaceFFTw::vtkfemriImageToKSpaceFFTw()
{
this->Translation[0] = this->Translation[1] = this->Translation[2] = 0.0;
this->SetNumberOfInputPorts(1);
//TODO: force working with number of components = 2
}
vtkfemriImageToKSpaceFFTw::~vtkfemriImageToKSpaceFFTw()
{
}
int vtkfemriImageToKSpaceFFTw::RequestData(
vtkInformation* vtkNotUsed( request ),
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
vtkInformation *outInfo = outputVector->GetInformationObject(0);
vtkImageData *output = vtkImageData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
int updateExtent[6];
outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),updateExtent);
output->SetExtent(updateExtent);
output->AllocateScalars();
vtkDataObject::SetPointDataActiveScalarInfo(outInfo, VTK_DOUBLE, 2);
vtkDoubleArray* newScalars = vtkDoubleArray::SafeDownCast(output->GetPointData()->GetScalars());
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
vtkImageData *input = vtkImageData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkDataArray* inScalars = input->GetPointData()->GetScalars();
int kSpaceDimensions[3];
double kSpaceSpacing[3];
int extent[6];
double* value;
output->GetWholeExtent(extent);
output->GetSpacing(kSpaceSpacing);
output->GetDimensions(kSpaceDimensions);
//cout << *(inScalars->GetTuple(26)) << endl;
//cout << extent[0] << " " << extent[1] << " " << extent[2] << " " << extent[3] << " " << extent[4] << " " << extent[5] << endl;
//Initialize the data array AFTER generating plan (data might be overwriten)
int ijk[3];
for (ijk[2]=extent[2]; ijk[2]<=extent[5]; ijk[2]++)
{
for (ijk[1]=extent[1]; ijk[1]<=extent[3]; ijk[1]++)
{
for (ijk[0]=extent[0]; ijk[0]<=extent[1]; ijk[0]++)
{
vtkIdType pointId = input->ComputePointId(ijk);
value = inScalars->GetTuple(pointId);
newScalars->SetComponent(pointId,0,*value);
newScalars->SetComponent(pointId,1,0.0);
}
}
}
return 1;
}
void vtkfemriImageToKSpaceFFTw::ShiftPhase(double value[2], double frequency[3], double translation[3], double shiftedValue[2])
{
double phaseShift = -2.0 * vtkMath::Pi() * (frequency[0] * translation[0] + frequency[1] * translation[1] + frequency[2] * translation[2]);
double shiftComplex[2];
shiftComplex[0] = cos(phaseShift);
shiftComplex[1] = sin(phaseShift);
shiftedValue[0] = value[0] * shiftComplex[0] - value[1] * shiftComplex[1];
shiftedValue[1] = value[0] * shiftComplex[1] + value[1] * shiftComplex[0];
}
void vtkfemriImageToKSpaceFFTw::PrintSelf(ostream& os, vtkIndent indent)
{
Superclass::PrintSelf(os,indent);
}
|
83826b02afe483fa8da5a905d261bac47e705885
|
615142138564ecf3c3eed6c798e707abc27be00e
|
/BWCell.cpp
|
28b86215286d71f6b80ab1369d9f5c5514acdf0c
|
[] |
no_license
|
StasDeep/NonogramSolver
|
ddb63328beb7af2cb0ba97931821f7f9e0c61d2e
|
845ded68db470b4aa91e5cf90e303d9a5818cd0b
|
refs/heads/master
| 2021-01-18T21:29:45.567934
| 2016-05-27T21:36:54
| 2016-05-27T21:36:54
| 52,895,147
| 2
| 3
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,254
|
cpp
|
BWCell.cpp
|
#include "stdafx.h"
#include "BWCell.h"
int BWCell::ChangeStateClick(int butt)
{
changed = true;
switch (butt)
{
case 0:
{
if (state == 0 || state == 2)
{
cellsprite.setTextureRect(IntRect(128, 0, 128, 128));
state = DBLACK;
return 1;
}
else
{
cellsprite.setTextureRect(IntRect(0, 0, 128, 128));
state = PWHITE;
return 0;
}
break;
}
case 1:
{
if (state == 0 || state == 1)
{
cellsprite.setTextureRect(IntRect(256, 0, 128, 128));
state = DWHITE;
return 2;
}
else
{
cellsprite.setTextureRect(IntRect(0, 0, 128, 128));
state = PWHITE;
return 0;
}
break;
}
/*case 2:
{
cellsprite.setTextureRect(IntRect(0, 0, 128, 128));
state = PWHITE;
return 0;
break;
}*/
default:
break;
}
}
/* Used when dragged or while solving.*/
void BWCell::ChangeStateSolve(int newstate)
{
switch (newstate)
{
case 0:
cellsprite.setTextureRect(IntRect(0, 0, 128, 128));
state = PWHITE;
break;
case 1:
cellsprite.setTextureRect(IntRect(128, 0, 128, 128));
state = DBLACK;
break;
case 2:
cellsprite.setTextureRect(IntRect(256, 0, 128, 128));
state = DWHITE;
break;
default:
break;
}
}
|
dc50ddc496c6565995b765c51d0f92c34ef410de
|
d1b103ef570d1f2b3b23a4c0deecc85adb3bd0fe
|
/leetcode_day1/Q27_remove_element.h
|
e4caa0a514ac4e41a7a7032ebe5939b4a54e88c9
|
[] |
no_license
|
maverick-zhang/Algorithms-Leetcode
|
da77e73bf949731a8528da39445ca50761c56513
|
dd4197305e9dcdb9efe6779ed69b9dbe3dbd28d9
|
refs/heads/master
| 2020-10-01T10:47:35.499791
| 2020-02-26T11:13:11
| 2020-02-26T11:13:11
| 227,519,712
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,272
|
h
|
Q27_remove_element.h
|
//
// Created by maverick on 2019/12/23.
//
#ifndef ALGORITHMS_Q27_REMOVE_ELEMENT_H
#define ALGORITHMS_Q27_REMOVE_ELEMENT_H
#include <vector>
using namespace std;
//给定一个数组 nums 和一个值 val,你需要原地移除所有数值等于 val 的元素,返回移除后数组的新长度。
//
//不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完成。
//
//元素的顺序可以改变。你不需要考虑数组中超出新长度后面的元素。
//
//示例 1:
//
//给定 nums = [3,2,2,3], val = 3,
//
// 函数应该返回新的长度 2, 并且 nums 中的前两个元素均为 2。
//
//你不需要考虑数组中超出新长度后面的元素。
class Solution {
public:
int removeElement(vector<int>& nums, int val) {
//维护两个区间[0,k)为全部不等于val的区间,[k, i)为等于val的区间,i为当前遍历的元素
int k = 0;
for (int i = 0; i < nums.size(); ++i) {
if (nums[i] != val)
{
if (i != k)
swap(nums[i], nums[k++]);
else
k++;
}
}
return k;
}
};
#endif //ALGORITHMS_Q27_REMOVE_ELEMENT_H
|
3de9927d44eaa5046c50749998dfce4c8412ee38
|
f0f30927f6e38e1431a7911726e7871dcc29a3d3
|
/ProgrammingProject2/BattlePets/BattlePets/PetTree.h
|
00a53d2f1fd2fcba0b6abe7875712edf00e4fe6e
|
[] |
no_license
|
KhingKY/BattlePets
|
4f45cf395ddef80b749c08e447c1e877dc9c244a
|
8625860be8d27f7a52309694d3e1f8587416feb8
|
refs/heads/master
| 2023-02-01T06:50:46.400127
| 2020-12-15T05:30:23
| 2020-12-15T05:30:23
| 275,523,795
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,081
|
h
|
PetTree.h
|
#pragma once
#include <stdexcept>
#include "PetVisitor.h"
using namespace std;
template<class T>
class PetTree {
private:
const T* fKey;
PetTree <T>* fLeft;
PetTree <T>* fRight;
PetTree() :fKey((T*)0)
{
fLeft = &NIL;
fRight = &NIL;
}
public:
static PetTree<T> NIL; //sentinel
PetTree(const T& aKey) : fKey(&aKey)
{
fLeft = &NIL;
fRight = &NIL;
}//(complete this)
~PetTree()
{
if (fLeft != &NIL)
delete fLeft;
if (fRight != &NIL)
delete fRight;
}//(complete this)
bool isEmpty() const
{
return this == &NIL;
}//(complete this)
const T& key() const
{
if (isEmpty())
throw domain_error("Empty PetTree");
return *fKey;
}//(complete this)
PetTree& left() const
{
if (isEmpty())
throw domain_error("Empty PetTree");
return *fLeft;
}
PetTree& right() const
{
if (isEmpty())
throw std::domain_error("Empty PetTree");
return *fRight;
}
void attachLeft(PetTree<T>* aPetTree)
{
if (isEmpty())
throw domain_error("Empty PetTree");
if (fLeft != &NIL)
throw domain_error("Non-empty sub tree");
fLeft = new PetTree<T>(*aPetTree);
}//(complete this)
void attachRight(PetTree<T>* aPetTree) {
if (isEmpty())
throw std::domain_error("Empty PetTree");
if (fRight != &NIL)
throw std::domain_error("Non-empty sub tree");
fRight = new PetTree<T>(*aPetTree);//makes allocation on heap
}
PetTree* detachLeft()
{
if (isEmpty())
throw std::domain_error("Empty PetTree");
PetTree<T>& Result = *fLeft; //changed to pointer variable
fLeft = &NIL;
return &Result;
}
PetTree* detachRight() {
if (isEmpty())
throw std::domain_error("Empty PetTree");
PetTree<T>& Result = *fRight; //changed to pointer variable
fRight = &NIL;
return &Result;
}
//calls the visit method based on the type of class parsed in and moves to the next node and does a recurssion
void accept(const PetVisitor<T>& aVisitor) const
{
if (!isEmpty())
{
aVisitor.visit(key());
left().accept(aVisitor);
right().accept(aVisitor);
}
}
};
template<class T>
PetTree<T> PetTree<T>::NIL;
|
1875ac39e9c1e022b4dcfaf6f8cba1cd48909756
|
e6e5dff698f6f05f6ce021a424322fd3d3a7ec05
|
/array_and_sorting/monk_and_sorting.cc
|
4cc0fb13bf51e6972326ba99df498cbc0bc4a6d5
|
[] |
no_license
|
pareshchouhan/codemonk
|
4fe4ce9c9f82c9a77a7262fd785d074c4bb8a846
|
f5d2b6609a8db7a6b35e1ca1c232fd7a26f5b74d
|
refs/heads/master
| 2023-01-16T07:30:05.324759
| 2020-11-25T06:14:00
| 2020-11-25T06:14:00
| 312,019,665
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,463
|
cc
|
monk_and_sorting.cc
|
// Sample code to perform I/O:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
// ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll N;
cin >> N;
vector<string> A;
for (ll i = 0; i < N; i++) {
string temp;
cin >> temp;
int len = temp.size();
int zeroesToadd = 5 - (len % 5);
A.push_back((string(zeroesToadd, '0') + temp));
// A.push_back(temp);
// B.push_back(temp);
}
// for (auto x : A) {
// cout << x << " ";
// }
bool isWeightSumZero = false;
int k = 1;
// int maxIndexToSkip = 0;
int maxSkipNum = 0;
while (!isWeightSumZero) {
ll weightSum = 0;
// vector<int> ithChunks;
int localMaxSkip = 0;
for (ll i = maxSkipNum; i < N; i++) {
// get ith chunk of all eleements
string temp = A[i];
int startIndex = temp.size() - (5 * (k));
try {
// cout << stoi(temp.substr(startIndex, 5)) << " ";
weightSum += stoi(temp.substr(startIndex, 5));
} catch (...) {
// cout << 0 << " ";
weightSum += 0;
localMaxSkip++;
}
}
if (weightSum == 0) {
isWeightSumZero = true;
return 0;
}
stable_sort(A.begin() + maxSkipNum, A.end(), [k](string a, string b) {
int startIndexA = a.size() - (5 * (k));
int startIndexB = b.size() - (5 * (k));
int weightA = 0;
int weightB = 0;
try {
// cout << stoi(temp.substr(startIndex, 5)) << " ";
weightA = stoi(a.substr(startIndexA, 5));
} catch (...) {
// cout << 0 << " ";
weightA = 0;
}
try {
// cout << stoi(temp.substr(startIndex, 5)) << " ";
weightB = stoi(b.substr(startIndexB, 5));
} catch (...) {
// cout << 0 << " ";
weightB = 0;
}
return weightA < weightB;
});
if (localMaxSkip > maxSkipNum) {
maxSkipNum = localMaxSkip;
}
for (auto x : A) {
cout << stoll(x) << " ";
}
k++;
cout << endl;
}
}
// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
// Write your code here
|
8a76b47d90ff587cc41c3b50058e5baa82a0a430
|
a3d3c947ff3a360f1bb1e2854d10b26efe772e32
|
/src/ccrt/model/ExprIn.h
|
7e76b51f0f064f2f5b21dc8595a2cfcc3b0f43f0
|
[
"Apache-2.0"
] |
permissive
|
fvutils/ccrt
|
aba5e7a7f3a80ec46a41488e2a24470f2d1e00ed
|
88d4daa8224bf59333f4dd49a0d740a28f995eb5
|
refs/heads/master
| 2020-04-28T02:14:29.715082
| 2019-04-28T01:07:17
| 2019-04-28T01:07:17
| 174,891,311
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 507
|
h
|
ExprIn.h
|
/*
* ExprIn.h
*
* Created on: Apr 12, 2019
* Author: ballance
*/
#pragma once
#include <vector>
#include "ccrt/model/ExprBase.h"
#include "ccrt/model/IExpr.h"
#include "Range.h"
namespace ccrt {
class ExprIn : public ExprBase {
public:
ExprIn(
IExpr *lhs,
const std::vector<Range> &rhs
);
virtual ~ExprIn();
virtual BoolectorNode *build_constraint(Btor *btor);
virtual Value value();
private:
IExpr *m_lhs;
std::vector<Range> m_rhs;
};
} /* namespace ccrt */
|
81c63b8f0ac810c57c982c13c0390bdf0039800f
|
8f54f3ae7c617fc73c0397cfe7c02684a5355dce
|
/UVA 579 _Clock Hands.cpp
|
8cbb90060dd9307f9280a819d7e107a43d434670
|
[] |
no_license
|
egoisticfool/Uva-Problems-Solution
|
1c49477f0ba0687c2df46a75a5619046e45538c1
|
255df811f50d3aa821904ff5c46fe1773701f7a7
|
refs/heads/master
| 2020-05-19T23:27:09.409806
| 2019-08-04T10:15:01
| 2019-08-04T10:15:01
| 185,267,251
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 459
|
cpp
|
UVA 579 _Clock Hands.cpp
|
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
using namespace std;
int main()
{
//freopen("input.txt", "r", stdin);
int h, m;
double hA, mA;
while(scanf("%d:%d", &h, &m)!=EOF)
{
if(h==0 && m==0) break;
hA = (h*30.0)+(m/2.0);
mA = m*6.0;
double ans = abs(hA - mA);
if(ans>=180) ans = 360 - ans;
printf("%.3lf\n", ans);
}
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.