blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
905 values
visit_date
timestamp[us]date
2015-08-09 11:21:18
2023-09-06 10:45:07
revision_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-17 19:19:19
committer_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-06 06:22:19
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-07 00:51:45
2023-09-14 21:58:39
gha_created_at
timestamp[us]date
2008-03-27 23:40:48
2023-08-21 23:17:38
gha_language
stringclasses
141 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
115 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
e57ac4fec3df5071952f7b438f8d5b25c8f08087
e190280fd88e4cdaa592ff4b4ec29194c494d141
/Мое_ПО_для_ОВ/HVKDesign/HVKdesign_15-09-06/HVKDesign/HVKMainView.h
8993d1a8c3bbab48505e3ff0817e04fe8bcea87f
[]
no_license
yta-br/Other
f7500c1774df66355b2961f945b985d99a794fef
33b1ab8ad04c84183c57a06e597cbefdbde1bfd8
refs/heads/master
2020-12-26T01:12:05.194851
2016-09-20T15:19:50
2016-09-20T15:19:50
68,725,758
0
1
null
null
null
null
WINDOWS-1251
C++
false
false
2,097
h
// HVKMainView.h : interface of the CMainView class // ///////////////////////////////////////////////////////////////////////////// #ifndef _HVKMAINVIEW_H__ #define _HVKMAINVIEW_H__ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "../IfcApi/IfcTabCtrl.h" #include "StdAfx.h" class CMainView : public CIfcFormView { private: public: // CIfcFormView m_IfcFrmView; //унаследоваться не удалось попробую так... protected: // create from serialization only CMainView(); DECLARE_DYNCREATE(CMainView) public: //{{AFX_DATA(CMainView) enum { IDD = IDD_HVKDESIGN_FORM }; //}}AFX_DATA // Attributes public: CMainDoc* GetDocument(); CMainFrame* m_pFrame; // Operations public: CMainFrame* GetFrame(){return m_pFrame;}; // CMainDoc* GetDocument(){return (CMainDoc*)m_pDocument;} // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMainView) public: virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual void OnInitialUpdate(); // called first time after construct virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); //}}AFX_VIRTUAL // Implementation public: virtual ~CMainView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CMainView) afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in HVKMainView.cpp inline CMainDoc* CMainView::GetDocument() { return (CMainDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined _HVKMAINVIEW_H__
[ "ytanya.br@gmail.com" ]
ytanya.br@gmail.com
4e9c682d0d53fa8cca945192b42e973ac78a1729
b1dfe4e7bd438be35c7704312001ba0c4f604a67
/tests/IK_Test.cpp
ed3f93be177c702688d16de963855cce60738367
[]
no_license
nashmit/IKProject
1d19acded52e76c6956fc9d67ed57bd6511d91db
0b8dfe48b91fa7a1c3f7a3ac8575e2ed29899a2f
refs/heads/master
2023-05-02T11:59:00.454280
2021-05-11T15:11:00
2021-05-11T15:11:00
358,607,748
0
0
null
null
null
null
UTF-8
C++
false
false
1,695
cpp
#include "../include/IK.h" int main() { KuKa_KR5_R850_D_H KuKa; Vector6d Q_state; Vector6d Q_Target_State; //init ( not needed but just in case ) Q_Target_State << 0, 0, 0, 0, 0, 0; std::ofstream outfile("animationIKTest.csv"); //KuKa.SetQforJoint(2, EIGEN_PI/3); //KuKa.SetQforJoint(4, -EIGEN_PI/7); //KuKa.SetQforJoint(6, EIGEN_PI/8); //Q_state << 0, EIGEN_PI/3, 0, -EIGEN_PI/7, 0, EIGEN_PI/8; Q_state << 0, EIGEN_PI/3, 0, EIGEN_PI/7, 0, EIGEN_PI/8; Vector6d Target; //Target << 0.845, 0, 0.425 , 2.81984, -1.5708 , 0.321751; //Target << 0.345, 0, 0 ,1, -1.5708 , -3; //Target << 0.545, 0.2, 0 , 2.81984, -1.5708 , 0.321751; //Target << 0.545, 0.2, 0.1 , 2, -1.5708 , 0.321751; //Target << 0.145, 0.5, 0.2 , 2, -1.0 , 0.321751; //Target << 0.5, -0.145, 0.2 , 2, -1.0 , 0.321751; Target << -0.5, -0.145, 0.2 , 2, -1.0 , 0.321751; bool ret = KuKa.ComputeIK( Q_state, Target, Q_Target_State ); if (!ret) { std::cout << "InverseKinematics did not find a solution" << std::endl; } // Write result to file outfile << 0 << ", " << Q_state(0) << ", " << Q_state(1) << ", " << Q_state(2) << ", " << Q_state(3) << ", " << Q_state(4) << ", " << Q_state(5) << ", " << "\n"; outfile << 1 << ", " << Q_Target_State(0) << ", " << Q_Target_State(1) << ", " << Q_Target_State(2) << ", " << Q_Target_State(3) << ", " << Q_Target_State(4) << ", " << Q_Target_State(5) << ", " << "\n"; outfile.close(); //Vector3d Target; //Target << 0.845, 0, 0.425; //KuKa.ComputeIK3D( Q_state, Target ); return 0; }
[ "horea.caramizaru@cti.pub.ro" ]
horea.caramizaru@cti.pub.ro
5b12bceff31059328cae9dc15696d3dbdbde50fb
f7c3a40c844693d081940987d3b55a2d96841b2f
/Classes/GameGlobals.h
386b19e97891ece76c2a267ac871393a6a297223
[]
no_license
karanseq/JumpyClown
4814645f4cd04d2f13644ac74e4d9e6f74c038df
70cbbeb2ed29d3e128808f2c7ab2d90ad1a110c8
refs/heads/master
2021-01-23T13:22:20.628966
2016-11-25T00:57:28
2016-11-25T00:57:28
26,369,721
1
2
null
null
null
null
UTF-8
C++
false
false
1,804
h
#ifndef GAME_GLOBALS_H_ #define GAME_GLOBALS_H_ #include "cocos2d.h" #include "Box2D\Box2D.h" #include "SimpleAudioEngine.h" USING_NS_CC; using namespace std; #define SCREEN_SIZE GameGlobals::screen_size_ #define SOUND_ENGINE CocosDenshion::SimpleAudioEngine::sharedEngine() #define PTM_RATIO 128 #define SCREEN_TO_WORLD(value) (float)(value)/PTM_RATIO #define WORLD_TO_SCREEN(value) (float)(value)*PTM_RATIO #define WALL_WIDTH 64 #define MAX_PLATFORM_WIDTH 600 #define PLATFORM_IMPULSE 20 #define PLATFORM_ANIMATION "platform_animation" #define MAX_COLLECTIBLES 25 #define ROCKET_DURATION 3 #define BALLOON_DURATION 5 // uncomment this to enable debug drawing using GLESDebugDraw //#define ENABLE_DEBUG_DRAW // enum used for proper z-ordering enum EZorder { E_LAYER_BACKGROUND = 0, E_LAYER_FOREGROUND = 2, E_LAYER_COLLECTIBLES = 4, E_LAYER_CLOWN = 6, E_LAYER_PLATFORM = 8, E_LAYER_HUD = 10, E_LAYER_POPUP = 12, }; enum EGameObjectType { E_GAME_OBJECT_NONE = 0, E_GAME_OBJECT_CLOWN, E_GAME_OBJECT_PLATFORM, E_GAME_OBJECT_COLLECTIBLE, E_GAME_OBJECT_ROCKET, E_GAME_OBJECT_BALLOON, }; enum EClownState { E_CLOWN_NONE = 0, E_CLOWN_UP, E_CLOWN_DOWN, E_CLOWN_BOUNCE, E_CLOWN_ROCKET, E_CLOWN_BALLOON, }; class GameGlobals { public: GameGlobals(void){}; ~GameGlobals(void){}; // initialise common global data here...called when application finishes launching static void Init(); // load initial/all game data here static void LoadData(); // save screen size for fast access static CCSize screen_size_; // function takes comma separated string & returns vector of values static vector<float> GetFloatListFromString(string input); // function takes comma separated string & returns CCPoint static CCPoint GetPointFromString(string input); }; #endif // GAME_GLOBALS_H_
[ "karanseq@gmail.com" ]
karanseq@gmail.com
293a81831392558475c4d874174a67bec7322981
1f20219e61a046a00a2471f6590de5acacfe9e49
/Computational Geometry/Cross Product of Two Vectors.cpp
2712e911403be7ab32bbffac3a77f8508dfe66a7
[]
no_license
konlanz/C_plus_plus_solutions
e57d03af4c0d0f88336e3d9af32b394ec9109d54
a889998d60ee95eb4d77ce9eafcd8a29934bb1e1
refs/heads/master
2023-06-05T03:52:38.506756
2021-06-30T17:30:20
2021-06-30T17:30:20
346,516,463
2
0
null
null
null
null
UTF-8
C++
false
false
1,300
cpp
/*This is a C++ Program to find the cross product of two vectors. In mathematics, the cross product or vector product is a binary operation on two vectors in three-dimensional space. It results in a vector that is perpendicular to both and therefore normal to the plane containing them.*/ #include<time.h> #include<stdlib.h> #include<iostream> #include<math.h> using namespace std; const int LOW = 0; const int HIGH = 10; int main(int argc, char **argv) { time_t seconds; time(&seconds); srand((unsigned int) seconds); int u1, u2, u3, v1, v2, v3; u1 = rand() % (HIGH - LOW + 1) + LOW; u2 = rand() % (HIGH - LOW + 1) + LOW; u3 = rand() % (HIGH - LOW + 1) + LOW; v1 = rand() % (HIGH - LOW + 1) + LOW; v2 = rand() % (HIGH - LOW + 1) + LOW; v3 = rand() % (HIGH - LOW + 1) + LOW; int uvi, uvj, uvk; uvi = u2 * v3 - v2 * u3; uvj = v1 * u3 - u1 * v3; uvk = u1 * v2 - v1 * u2; cout << "The cross product of the 2 vectors \n u = " << u1 << "i + " << u2 << "j + " << u3 << "k and \n v = " << u1 << "i + " << u2 << "j + " << u3 << "k \n "; cout << "u X v : " << uvi << "i +" << uvj << "j+ " << uvk << "k "; return 0; } /* The cross product of the 2 vectors u = 6i + 9j + 9k and v = 6i + 9j + 9k u X v : 0i +6j+ -6k */
[ "konlanmikpekoah.km@outlook.com" ]
konlanmikpekoah.km@outlook.com
a0edd8261b0116fb301f4280ef5fb72ea3ee8447
da51040b8702d7908ed31608a91daa37d6a9ed37
/CFrameDataBuffer.cpp
f385a5c6b9391212dad6fbf164006cac615b8f77
[]
no_license
TheCatNose/PurrFX
0f140a88b65f9c9db31b21d6e62c25794efa309c
a040e0490dcbfe03bf89ac58ec1bbebb015b0ec3
refs/heads/master
2022-12-23T06:39:07.244548
2020-09-21T16:35:07
2020-09-21T16:35:07
286,448,239
1
1
null
2020-08-12T12:51:13
2020-08-10T10:46:12
C++
UTF-8
C++
false
false
851
cpp
#include "CFrameDataBuffer.h" PurrFX::CFrameDataBuffer::CFrameDataBuffer(size_t i_nSize): CFrameDataConsumer(i_nSize) { assert(i_nSize > 0); m_aData.resize(i_nSize); } bool PurrFX::CFrameDataBuffer::available() const { return m_nFrameIndex < m_aData.size(); } PurrFX::CFrameData PurrFX::CFrameDataBuffer::get() const { assert(available()); return m_aData[m_nFrameIndex]; } bool PurrFX::CFrameDataBuffer::next() { if (m_nFrameIndex >= m_aData.size()-1) return false; m_nFrameIndex++; return true; } size_t PurrFX::CFrameDataBuffer::size() const { return m_aData.size(); } PurrFX::CFrameData PurrFX::CFrameDataBuffer::getAt(size_t i_nIndex) const { assert(i_nIndex < size()); return m_aData[i_nIndex]; } void PurrFX::CFrameDataBuffer::onFrameDataReady(const CFrameData& i_rFrameData) { m_aData[framesProcessed()] = i_rFrameData; }
[ "69460782+TheCatNose@users.noreply.github.com" ]
69460782+TheCatNose@users.noreply.github.com
e9c55c6d0adea62c6d1fefa362e9f4c34804820d
bfedbace8785810dddba442df5f385ea41958768
/persistents.ino
0d0d6cf9906ad4aaae6012657e6b9e973c7e8249
[]
no_license
alloutlife/woodensafe
113962d03005c832ab4d5169fe67bb04ca480f42
9a65385d66866ea821db6a7da915a9067af740a9
refs/heads/master
2020-09-20T14:36:48.449251
2020-01-12T09:00:29
2020-01-12T09:00:29
224,512,018
1
0
null
null
null
null
UTF-8
C++
false
false
837
ino
#include <EEPROM.h> void _write_digits( const char* pszString, unsigned int nLen ) { // Allow max 255 digits nLen &= 0x000000FF; // 4 bytes signature EEPROM.write( 0, 'F' ); EEPROM.write( 1, 'c' ); EEPROM.write( 2, 'u' ); EEPROM.write( 3, 'k' ); // 1 byte size EEPROM.write( 4, (unsigned char)nLen ); for( int k = 0; k < nLen; ++k ) { EEPROM.write( 5 + k, pszString[ k ] ); } } char* _read_digits( void ) { // Signature if( EEPROM[ 0 ] != 'F' || EEPROM[ 1 ] != 'c' || EEPROM[ 2 ] != 'u' || EEPROM[ 3 ] != 'k' ) { return 0; } // Length unsigned char nLen = EEPROM[ 4 ]; char* pszResult = new char[ nLen + 1 ]; // Read blocks for( int k = 0; k < (int)nLen; ++k ) { pszResult[ k ] = EEPROM[ 5 + k ]; } pszResult[ nLen ] = 0; return pszResult; }
[ "avkushnarev@yandex.ru" ]
avkushnarev@yandex.ru
e1333321bcdb2497cb063e0a2466ed519d8c0029
21fd49c0ea5a01edf6acbf9dd13f40f05facb9c7
/src/accumulatormap.cpp
92210a3c15d8db41ea84efef74d6ca2e66f5f975
[ "MIT" ]
permissive
bitzayed/BitZayed
0edb3c02ad3c415a6bf8eb2f1d363fcd2c7f51ea
f08b05705484e9a6cb6a7cae41142830fa5a0f53
refs/heads/master
2020-03-19T11:58:48.851681
2018-06-10T00:28:41
2018-06-10T00:28:41
136,488,797
0
0
null
null
null
null
UTF-8
C++
false
false
2,744
cpp
// Copyright (c) 2017 The PIVX developers // Copyright (c) 2017 The BitZayed developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "accumulatormap.h" #include "accumulators.h" #include "main.h" #include "txdb.h" #include "libzerocoin/Denominations.h" using namespace libzerocoin; using namespace std; //Construct accumulators for all denominations AccumulatorMap::AccumulatorMap() { for (auto& denom : zerocoinDenomList) { unique_ptr<Accumulator> uptr(new Accumulator(Params().Zerocoin_Params(), denom)); mapAccumulators.insert(make_pair(denom, std::move(uptr))); } } //Reset each accumulator to its default state void AccumulatorMap::Reset() { mapAccumulators.clear(); for (auto& denom : zerocoinDenomList) { unique_ptr<Accumulator> uptr(new Accumulator(Params().Zerocoin_Params(), denom)); mapAccumulators.insert(make_pair(denom, std::move(uptr))); } } //Load a checkpoint containing 8 32bit checksums of accumulator values. bool AccumulatorMap::Load(uint256 nCheckpoint) { for (auto& denom : zerocoinDenomList) { uint32_t nChecksum = ParseChecksum(nCheckpoint, denom); CBigNum bnValue; if (!zerocoinDB->ReadAccumulatorValue(nChecksum, bnValue)) { LogPrintf("%s : cannot find checksum %d", __func__, nChecksum); return false; } mapAccumulators.at(denom)->setValue(bnValue); } return true; } //Add a zerocoin to the accumulator of its denomination. bool AccumulatorMap::Accumulate(PublicCoin pubCoin, bool fSkipValidation) { CoinDenomination denom = pubCoin.getDenomination(); if (denom == CoinDenomination::ZQ_ERROR) return false; if (fSkipValidation) mapAccumulators.at(denom)->increment(pubCoin.getValue()); else mapAccumulators.at(denom)->accumulate(pubCoin); return true; } //Get the value of a specific accumulator CBigNum AccumulatorMap::GetValue(CoinDenomination denom) { if (denom == CoinDenomination::ZQ_ERROR) return CBigNum(0); return mapAccumulators.at(denom)->getValue(); } //Calculate a 32bit checksum of each accumulator value. Concatenate checksums into uint256 uint256 AccumulatorMap::GetCheckpoint() { uint256 nCheckpoint; //Prevent possible overflows from future changes to the list and forgetting to update this code assert(zerocoinDenomList.size() == 8); for (auto& denom : zerocoinDenomList) { CBigNum bnValue = mapAccumulators.at(denom)->getValue(); uint32_t nCheckSum = GetChecksum(bnValue); nCheckpoint = nCheckpoint << 32 | nCheckSum; } return nCheckpoint; }
[ "support@bitsliver.org" ]
support@bitsliver.org
538bd8a8124089525c238796cb9c16cb4e031c36
b6ffa82d277f8e2635556fa4302d7596203237f9
/jni/boost/libs/assign/test/list_of.cpp
7e1592d33041cf71ff1788ace5164951204a0760
[ "BSL-1.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
LeifAndersen/Android-Supertux
2e66ae3c6a0ffba2f82b35c27130175151bbb1e6
e188c9d365420bd21eee45da82d6f74215e27516
refs/heads/master
2020-04-11T09:57:11.000668
2010-09-20T03:34:55
2010-09-20T03:34:55
867,072
1
0
null
null
null
null
UTF-8
C++
false
false
6,460
cpp
// Boost.Assign library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/assign/ // #include <boost/detail/workaround.hpp> #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // supress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif #include <boost/assign/list_of.hpp> #include <boost/test/test_tools.hpp> #include <boost/array.hpp> #include <algorithm> #include <vector> #include <list> #include <deque> #include <set> #include <map> #include <stack> #include <string> #include <cstdlib> #include <complex> struct nothing { template< class T > void operator()( T ) { } }; template< class Range > void for_each( const Range& r ) { std::for_each( r.begin(), r.end(), nothing() ); } namespace ba = boost::assign; template< class C > void test_sequence_list_of_string() { #if BOOST_WORKAROUND(BOOST_MSVC, <=1300) const C c = ba::list_of( "foo" )( "bar" ).to_container( c ); #else const C c = ba::list_of( "foo" )( "bar" ); #endif BOOST_CHECK_EQUAL( c.size(), 2u ); } template< class C > void test_sequence_list_of_int() { using namespace std; #if BOOST_WORKAROUND(BOOST_MSVC, <=1300) const C c = ba::list_of<int>(1)(2)(3)(4).to_container( c ); const C c2 = ba::list_of(1)(2)(3)(4).to_container( c2 ); BOOST_CHECK_EQUAL( c.size(), 4u ); BOOST_CHECK_EQUAL( c2.size(), 4u ); C c3 = ba::list_of(1).repeat( 1, 2 )(3).to_container( c3 ); BOOST_CHECK_EQUAL( c3.size(), 3u ); c3 = ba::list_of(1).repeat_fun( 10, &rand )(2)(3).to_container( c3 ); BOOST_CHECK_EQUAL( c3.size(), 13u ); #else const C c = ba::list_of<int>(1)(2)(3)(4); const C c2 = ba::list_of(1)(2)(3)(4); BOOST_CHECK_EQUAL( c.size(), 4u ); BOOST_CHECK_EQUAL( c2.size(), 4u ); C c3 = ba::list_of(1).repeat( 1, 2 )(3); BOOST_CHECK_EQUAL( c3.size(), 3u ); #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // BCB fails to use operator=() directly, // it must be worked around using e.g. auxiliary variable C aux = ba::list_of(1).repeat_fun( 10, &rand )(2)(3); BOOST_CHECK_EQUAL( aux.size(), 13u ); c3 = aux; BOOST_CHECK_EQUAL( c3.size(), 13u ); #else c3 = ba::list_of(1).repeat_fun( 10, &rand )(2)(3); BOOST_CHECK_EQUAL( c3.size(), 13u ); #endif #endif } template< class C > void test_map_list_of() { const C c = ba::list_of< std::pair<std::string,int> >( "foo", 1 )( "bar", 2 )( "buh", 3 )( "bah", 4 ); BOOST_CHECK_EQUAL( c.size(), 4u ); const C c2 = ba::map_list_of( "foo", 1 )( "bar", 2 )( "buh", 3 )( "bah", 4 ); BOOST_CHECK_EQUAL( c2.size(), 4u ); } void test_vector_matrix() { using namespace boost; using namespace boost::assign; using namespace std; #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) || BOOST_WORKAROUND(BOOST_MSVC, <=1300) #else const int sz = 3; typedef array<int,sz> row3; typedef array<row3,sz> matrix3x3; matrix3x3 m = list_of( list_of(1)(2)(3) ) ( list_of(4)(5)(6) ) ( list_of(7)(8)(9) ); for( int i = 0; i != sz; ++i ) for( int j = 0; j != sz; ++j ) BOOST_CHECK_EQUAL( m[i][j], i*sz + j + 1 ); typedef vector<int> row; typedef vector<row> matrix; // // note: some libraries need a little help // with the conversion, hence the 'row' template parameter. // matrix m2 = list_of< row >( list_of(1)(2)(3) ) ( list_of(4)(5) ) ( list_of(6) ); for( int i = 0; i != sz; ++i ) for( int j = 0; j != sz - i; ++j ) BOOST_CHECK_EQUAL( m[i][j], i*sz + j + 1 ); #endif } void test_map_list_of() { /* maybe in the future... using namespace std; using namespace boost::assign; typedef vector<int> score_type; typedef map<string,score_type> team_score_map; team_score_map team_score = map_list_of ( "Team Foo", list_of(1)(1)(0) ) ( "Team Bar", list_of(0)(0)(0) ) ( "Team FooBar", list_of(0)(0)(1) ); BOOST_CHECK_EQUAL( team_score.size(), 3 ); BOOST_CHECK_EQUAL( team_score[ "Team Foo" ][1], 1 ); BOOST_CHECK_EQUAL( team_score[ "Team Bar" ][0], 0 ); */ } /* void test_complex_list_of() { typedef std::complex<float> complex_t; std::vector<complex_t> v; v = ba::list_of<complex_t>(1,2)(2,3)(4,5)(0). repeat_from_to( complex_t(0,0), complex_t(10,10), complex_t(1,1) ); } */ struct five { five( int, int, int, int, int ) { } }; void test_list_of() { ba::list_of< five >(1,2,3,4,5)(6,7,8,9,10); /* Maybe this could be usefull in a later version? // an anonymous lists, fulfills Range concept for_each( ba::list_of( T() )( T() )( T() ) ); // non-anonymous lists ba::generic_list<T> list_1 = ba::list_of( T() ); BOOST_CHECK_EQUAL( list_1.size(), 1 ); ba::generic_list<T> list_2 = list_1 + ba::list_of( T() )( T() ) + list_1; BOOST_CHECK_EQUAL( list_2.size(), 4 ); list_1 += list_2; BOOST_CHECK_EQUAL( list_1.size(), 5 ); */ } void check_list_of() { test_sequence_list_of_int< std::vector<int> >(); test_sequence_list_of_int< std::list<int> >(); test_sequence_list_of_int< std::deque<int> >(); test_sequence_list_of_int< std::set<int> >(); test_sequence_list_of_int< std::multiset<int> >(); test_sequence_list_of_int< std::vector<float> >(); test_sequence_list_of_string< std::vector<std::string> >(); test_map_list_of< std::map<std::string,int> >(); test_map_list_of< std::multimap<std::string,int> >(); std::stack<std::string> s = ba::list_of( "Foo" )( "Bar" )( "FooBar" ).to_adapter( s ); test_list_of(); test_vector_matrix(); } #include <boost/test/unit_test.hpp> using boost::unit_test::test_suite; test_suite* init_unit_test_suite( int argc, char* argv[] ) { test_suite* test = BOOST_TEST_SUITE( "List Test Suite" ); test->add( BOOST_TEST_CASE( &check_list_of ) ); return test; }
[ "onaips@gmail.com" ]
onaips@gmail.com
e3bbd65d3ef0447e1d0673f6689f0dae609a43e2
2b94817b2bbc506226c3b217478efd70f3c86fec
/UzytkownikMenadzer.h
1c186e7d04a34c8a18c839e291e6ce10cc8e15f2
[]
no_license
krzysztof-kozlowski/AddressBook
5e10c7a54d6f08e6861e538a0f40751ff77c37c1
402b2f8cf0c48e44a1aaba936adb62b4abe27fe7
refs/heads/master
2020-04-02T07:09:40.788609
2018-10-26T06:06:05
2018-10-26T06:06:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,024
h
#ifndef UZYTKOWNIKMENADZER_H #define UZYTKOWNIKMENADZER_H #include <iostream> #include <vector> #include <windows.h> #include <fstream> #include <sstream> #include "Uzytkownik.h" #include "PlikZUzytkownikami.h" using namespace std; class UzytkownikMenadzer { int idZalogowanegoUzytkownika; vector <Uzytkownik> uzytkownicy; PlikZUzytkownikami plikZUzytkownikami; Uzytkownik podajDaneNowegoUzytkownika(); int pobierzIdNowegoUzytkownika(); bool czyIstniejeLogin(string login); public: UzytkownikMenadzer(string nazwaPlikuZUzytkownikami) : plikZUzytkownikami(nazwaPlikuZUzytkownikami) { idZalogowanegoUzytkownika = 0; uzytkownicy = plikZUzytkownikami.wczytajUzytkownikowZPliku(); }; void rejestracjaUzytkownika(); void wypiszWszystkichUzytkownikow(); void wczytajUzytkownikowZPliku(); int logowanieUzytkownika(); void zmianaHaslaZalogowanegoUzytkownika(); int pobierzIdZalogowanegoUzytkownika(); int wyloguj(); }; #endif // UZYTKOWNIKMENADZER_H
[ "k.kozlowski.tychy@gmail.com" ]
k.kozlowski.tychy@gmail.com
93b9faf32cff1ba2a1ce73799560f40d007cec00
a66f107e01885f56e39051786a6a471f2b42f70b
/Programs/CodeChef - IARCS OPC Judge Problems/Number of Tilings/sol.cpp
062b6e4f51150e7fa8da07a8779ae469add44023
[]
no_license
fomalhaut-b/Competitive-Programmming
1ddd0f48ad3f846bbac8aecf0ed71dae6c3cd42e
4af21a75e73d8ebcb639bda70d2f55d494bbbe1c
refs/heads/master
2022-12-07T20:18:34.634542
2020-09-06T09:01:31
2020-09-06T09:01:31
293,248,509
1
0
null
2020-09-06T10:00:45
2020-09-06T10:00:45
null
UTF-8
C++
false
false
997
cpp
//OPTIMIZATIONS #pragma GCC optimize("O3") //(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS) //#pragma comment(linker, "/stack:200000000") //(UNCOMMENT WHEN NEEDED) //#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native") //OPTIMIZATIONS #include <bits/stdc++.h> using namespace std; #define watch(x) cerr << "\n" \ << (#x) << " is " << (x) << endl const double PI = 3.141592653589793238463; const int MOD = 1000000007; const long long MAXI = ULONG_MAX; /* $alil03 URL: url Solution Begins here */ int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; int f[n + 1] = {0}; int g[n + 1] = {0}; f[0] = 0; f[1] = 1; f[2] = 2; g[0] = 0; g[1] = 1; g[2] = 2; for (int i = 3; i <= n; i++) { f[i] = (f[i - 1] % 10000 + f[i - 2] % 10000 + (2 * g[i - 2]) % 10000) % 10000; g[i] = (f[i - 1] % 10000 + g[i - 1] % 10000) % 10000; } cout << f[n] % 10000; }
[ "salilgokhale24@gmail.com" ]
salilgokhale24@gmail.com
facd4f0f0b4b1760b8ef41a4e5adf0a5fed0edb0
6d6f52a3794c6abd59e47510a39210feb25e1795
/TD_BuildingER_CM/Source/TD_BuildingER_CM/TD_BuildingER_CM.cpp
48fe5d7a7c2554804880f69cfa3c374602d3ae62
[]
no_license
Dragnyl/TD_BuildingEscapeRoom_CM
4e125be96542af2fda8585bb3fcb0331532361b4
94b84aeadee28ab5ce6022e086f92757c8412cd7
refs/heads/master
2021-01-13T09:16:16.915775
2016-10-26T14:35:19
2016-10-26T14:35:19
72,006,869
0
0
null
null
null
null
UTF-8
C++
false
false
206
cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "TD_BuildingER_CM.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, TD_BuildingER_CM, "TD_BuildingER_CM" );
[ "c.morganx@ludus-academie.com" ]
c.morganx@ludus-academie.com
2aca7e20dcbf9dcb8aedb3226cd9b1847da99572
e878e09bea2849ba192605a57959a0ac6904a3c6
/Examenes/1er.Evaluacion.de.Control/EVALK4.cpp
77eede571e4ada620c70486adfee4fcf0b7ed9fc
[]
no_license
Lunahri17/1k4-lunahri
f61f829b92d435fb21ab5d33a5451644532dd34f
03f5fd35370d3970d994cc9530a658fc8d4d1f6d
refs/heads/master
2023-03-26T13:58:34.210050
2021-04-04T22:22:25
2021-04-04T22:22:25
271,795,247
3
1
null
2020-07-31T22:08:25
2020-06-12T12:39:46
C++
ISO-8859-1
C++
false
false
1,122
cpp
//Moreno Ivanoff Jeremias 1K4 #include<stdio.h> //Aqui en ambas librerías no estan bien declaradas, ya que les falta la extención del archivo; que sería ".h". #include<stdlib.h> main() { int N,c=0,x,digi3; //Aqui decalro la variable "digi3" que no estaba declarada. //Aqui falta inicializar en cero el contador para que pueda funcionar el while. printf("\nIngrese la cantidad de numeros: "); scanf("%d",&N); while(c<N) { printf("\nIngrese el nro: "); scanf("%d",&x); //Aqui falta el ampersand para introducir la variable. if(x>99 and x<1000) //La operacion logica debería ser "and" para indicar que debe estar entre los dos parametros. { digi3=x%10; //Aquí hay dos errores, uno es que no esta declarada la variable "digi3", y el otro es que el operando "mod", en C++ se expresa como "%". printf("\nEl ultimo digito es: %d\n",digi3); //Aqui le agrege al final un "\n" solo para que no se junto el texto en la consola. c++; } else { printf("\nEl numero ingresado no es de 3 digitos, ingrese de nuevo.\n"); system("pause"); } } printf("\n\n"); system("pause"); }
[ "jeremy17games@hotmail.com" ]
jeremy17games@hotmail.com
29f1ed739324772da80cf8c97d747c8d92f3d6e5
e13bf8bfa24b791b4b46430f492b8e70205e7bcb
/projet Graphe/sommet.h
a67116d4a8c0edb77c7c42fd3d6cf0a873852f93
[]
no_license
youssefBlm/GrapheAlgo
e5f5c988c0432e809614dec43ac858f6685a1cae
bf680bbdc4aab29b2011151297bbdb86a63006ec
refs/heads/master
2020-05-15T13:11:32.905408
2019-04-19T16:11:47
2019-04-19T16:11:47
182,291,290
0
0
null
null
null
null
UTF-8
C++
false
false
822
h
#ifndef SOMMET_H #define SOMMET_H #include <QtGui> #include "WGraphe.h" #include <QGraphicsLineItem> //sommet du graphe class sommet : public QGraphicsEllipseItem { friend class arc ; public : //creation d'un sommet sommet(QWidget *parent, int num, double x, double y) ; virtual ~sommet() ; void mousePressEvent(QGraphicsSceneMouseEvent *event) ; int getNum() const { return d_num ; } QString info() const { return d_info ; } void setInfo(QString info) { d_info = info ; setToolTip(info) ; } signals: void suppr(int) ; private: //numero du sommet int d_num ; //pointeur sur WGraphe QWidget *d_parent ; //information complexe associee au sommet QString d_info ; //taille duQGraphicsEllispseItem static const int WIDTH = 20, HEIGHT = 20 ; }; #endif
[ "youssefblm@live.fr" ]
youssefblm@live.fr
2f41715c9b6b2e740df8db9885783c2d38dce10f
9b28c3d5c199b7578e337dc0944a44db2b12afb3
/CPP/ScienceStudent.h
f6410268c4b7fe535b6177bba8651a2f3dbebe4a
[]
no_license
Dongnehye/study
f8365aab6efb2e8ee6e723f2247197b6c41f0cdb
dc5df72990fe79af38e28458eb26cd0f951d638d
refs/heads/master
2022-12-24T12:46:18.627325
2019-10-31T03:24:05
2019-10-31T03:24:05
201,963,734
2
1
null
null
null
null
UTF-8
C++
false
false
331
h
#pragma once #include "Student.h" class ScienceStudent : public Student { public: int science; ScienceStudent(); virtual ~ScienceStudent(); virtual void LoadStudent(FILE* pFile); virtual void SaveStudent(FILE* pFile); virtual float GetSum(); virtual void PrintLine(); virtual void InputLine(const int iCurStudent); };
[ "cmmn123@gmail.com" ]
cmmn123@gmail.com
3cd7e72d1c640d0156abbcd4a3006e78f0992ac7
d05383f9f471b4e0691a7735aa1ca50654704c8b
/CPP2MIssues/SampleClass192.cpp
c8ad5f01b226fc9493a34091d069c61331c4e66e
[]
no_license
KetkiT/CPP2MIssues
d2186a78beeb36312cc1a756a005d08043e27246
82664377d0f0047d84e6c47e9380d1bafa840d19
refs/heads/master
2021-08-26T07:27:00.804769
2017-11-22T07:29:45
2017-11-22T07:29:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
50,048
cpp
class SampleClass192{ public: void m1() { int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); int *ptr = new int (10); } };
[ "ketki.thosar@acellere.com" ]
ketki.thosar@acellere.com
9a01059997375a04d4e0c2c2f2d5b3c2ce573164
1af8836f8b5e9fef36ca68e0ff82a9acba3ee9b0
/cocos2dx/21.JoystickEx/JoystickEx1/Classes/AppDelegate.cpp
aebd948dc6f0ed07c9146fc3520ebc03e6674cc4
[]
no_license
kimsibaek/cocos2d-x-work
6ec42a62321fc3c1da5ba0ab9c65a588b468e205
3649396cc6447ec4e4472cf2c98699bc7f424216
refs/heads/master
2021-01-21T13:52:39.032926
2016-06-03T06:49:39
2016-06-03T06:49:39
54,363,192
0
0
null
null
null
null
UTF-8
C++
false
false
3,695
cpp
#include "AppDelegate.h" #include "HelloWorldScene.h" USING_NS_CC; static cocos2d::Size designResolutionSize = cocos2d::Size(480, 320); static cocos2d::Size smallResolutionSize = cocos2d::Size(480, 320); static cocos2d::Size mediumResolutionSize = cocos2d::Size(1024, 768); static cocos2d::Size largeResolutionSize = cocos2d::Size(2048, 1536); AppDelegate::AppDelegate() { } AppDelegate::~AppDelegate() { } //if you want a different context,just modify the value of glContextAttrs //it will takes effect on all platforms void AppDelegate::initGLContextAttrs() { //set OpenGL context attributions,now can only set six attributions: //red,green,blue,alpha,depth,stencil GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8}; GLView::setGLContextAttrs(glContextAttrs); } // If you want to use packages manager to install more packages, // don't modify or remove this function static int register_all_packages() { return 0; //flag for packages manager } bool AppDelegate::applicationDidFinishLaunching() { // initialize director auto director = Director::getInstance(); auto glview = director->getOpenGLView(); if(!glview) { #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) glview = GLViewImpl::createWithRect("JoystickEx1", Rect(0, 0, designResolutionSize.width, designResolutionSize.height)); #else glview = GLViewImpl::create("JoystickEx1"); #endif director->setOpenGLView(glview); } // turn on display FPS director->setDisplayStats(true); // set FPS. the default value is 1.0/60 if you don't call this director->setAnimationInterval(1.0 / 60); // Set the design resolution glview->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::NO_BORDER); Size frameSize = glview->getFrameSize(); #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) frameSize = Size(480, 320); #endif //CC_PLATFORM_WIN32 // if the frame's height is larger than the height of medium size. if (frameSize.height > mediumResolutionSize.height) { director->setContentScaleFactor(MIN(largeResolutionSize.height/designResolutionSize.height, largeResolutionSize.width/designResolutionSize.width)); } // if the frame's height is larger than the height of small size. else if (frameSize.height > smallResolutionSize.height) { director->setContentScaleFactor(MIN(mediumResolutionSize.height/designResolutionSize.height, mediumResolutionSize.width/designResolutionSize.width)); } // if the frame's height is smaller than the height of medium size. else { director->setContentScaleFactor(MIN(smallResolutionSize.height/designResolutionSize.height, smallResolutionSize.width/designResolutionSize.width)); } register_all_packages(); // create a scene. it's an autorelease object auto scene = HelloWorld::createScene(); // run director->runWithScene(scene); return true; } // This function will be called when the app is inactive. When comes a phone call,it's be invoked too void AppDelegate::applicationDidEnterBackground() { Director::getInstance()->stopAnimation(); // if you use SimpleAudioEngine, it must be pause // SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); } // this function will be called when the app is active again void AppDelegate::applicationWillEnterForeground() { Director::getInstance()->startAnimation(); // if you use SimpleAudioEngine, it must resume here // SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); }
[ "open1234104@gmail.com" ]
open1234104@gmail.com
fefd2db4838549c4f7695d5ea8e4abc8a33a7b56
46207a6504ca140dbebf2096213e2f560432832f
/TheSpaceMergeSort/TheSpaceMergeSort/ObserverImp.h
63962ef50f5ff8624df7a1c042a02159cb561029
[]
no_license
frank-fn10502/winForm_Project
a9bf8aae9f6caea1961319b1d1742514e58338b5
20ac632d2dad79bc4ef2d45f1ed1cb3430938ec8
refs/heads/master
2020-05-30T17:20:26.666952
2019-06-03T03:04:50
2019-06-03T03:04:50
189,870,701
0
0
null
null
null
null
BIG5
C++
false
false
4,438
h
#pragma once #include "SMSortBehavior.h" using namespace System::Drawing; using namespace System::Windows::Forms; ref class ButtonOnOff { public: static void setButtonStyle(Button^ button, bool on) { if (on) { button->Enabled = true; button->BackColor = Color::Gray; } else { button->Enabled = false; button->BackColor = Color::FromArgb(224, 224, 224); } } }; ref class NumberBar { private: static const int MaxHeight = 300; static const int MaxWidth = 10; static const int SPACE = 13; static const int PANELHEIGHT = 350; public: static Rectangle getRectangle(int pos ,int num ,int largestNum) { int width = MaxWidth; int height = MaxHeight * num / largestNum; int x = SPACE * pos; int y = PANELHEIGHT - height; return Rectangle(x ,y ,width , height); } }; ref class NumbersImp : public EntityObserver { private: Graphics^ mygraphics; SolidBrush^ myBrush; public: NumbersImp(Panel^ canvas) { mygraphics = canvas->CreateGraphics(); myBrush = gcnew SolidBrush(Color::FromArgb(0, 204, 153)); } virtual void updateData(array<int>^ numbers, int largestNum) override { mygraphics->Clear(Color::White); for(int i = 0; i < numbers->Length; i++) { mygraphics->FillRectangle(myBrush ,NumberBar::getRectangle(i ,numbers[i] , largestNum) ); } } }; ref class LargestPosImp : public ObserverLargestPos { private: Graphics^ mygraphics; SolidBrush^ myBrush; public: LargestPosImp(Panel^ canvas) { mygraphics = canvas->CreateGraphics(); myBrush = gcnew SolidBrush(Color::FromArgb(255, 212, 128)); } virtual void update(array<int>^ numbers, int largestNum ,List<int>^ allLargestPos) override { for each(int pos in allLargestPos) { mygraphics->FillRectangle(myBrush, NumberBar::getRectangle(pos, numbers[pos], largestNum)); } } virtual void add(array<int>^ numbers, int largestNum, int addPos) override { mygraphics->FillRectangle(myBrush, NumberBar::getRectangle(addPos, numbers[addPos], largestNum)); } }; ref class SelectPosImp : public ObserverSelectPos { private: Graphics^ mygraphics; SolidBrush^ myBrush; array<Color>^ colors; public: SelectPosImp(Panel^ canvas) { mygraphics = canvas->CreateGraphics(); colors = gcnew array<Color>{ Color::FromArgb(255, 112, 77) ,Color::FromArgb(102, 140, 255) , Color::FromArgb(217, 140, 179) }; myBrush= gcnew SolidBrush(colors[0]); } virtual void update(array<int>^ numbers, int largestNum, List<int>^ selectPos, int TypeN) override { for each(int pos in selectPos ) { myBrush->Color = colors[TypeN-1]; mygraphics->FillRectangle(myBrush, NumberBar::getRectangle(pos, numbers[pos], largestNum)); } } }; ref class StateDesImp : public ObserverStateInfo { private: Label^ stateDes_Label; public: StateDesImp(Label^ stateDes_Label) { this->stateDes_Label = stateDes_Label; } virtual void update(String^ desStr, int currentState, int lastState) override { stateDes_Label->Text = desStr; } }; ref class SortStateImp : public ObserverStateInfo { private: Label^ stateDes_Label; Button^ preButton; Button^ postButton; public: SortStateImp(Label^ stateDes_Label ,Button^ preButton ,Button^ postButton) { this->stateDes_Label = stateDes_Label; this->preButton = preButton; this->postButton = postButton; } virtual void update(String^ desStr, int currentState, int lastState) override { stateDes_Label->Text = desStr; if (currentState == 1) { ButtonOnOff::setButtonStyle(preButton, false); ButtonOnOff::setButtonStyle(postButton, true); } else if (currentState == lastState) { ButtonOnOff::setButtonStyle(preButton, true); ButtonOnOff::setButtonStyle(postButton, false); } else { ButtonOnOff::setButtonStyle(preButton, true); ButtonOnOff::setButtonStyle(postButton, true); } } }; ref class SortStatusImp : public ObserverSortStartEnd { private: Button^ sortButton; Button^ createButton; Panel^ createPanel; public: SortStatusImp(Button^ sortButton ,Button^ createButton , Panel^ createPanel) { this->sortButton = sortButton; this->createButton = createButton; this->createPanel = createPanel; } virtual void update(bool nowStart ,bool notEnd) override { ButtonOnOff::setButtonStyle(sortButton ,notEnd); if (nowStart) sortButton->Text = "開始"; if (!notEnd)//結束 { ButtonOnOff::setButtonStyle(createButton, !notEnd); createPanel->Enabled = !notEnd; sortButton->Text = "開始"; } } };
[ "frank08.chen@gmail.com" ]
frank08.chen@gmail.com
97485b1e6653727e6739cfd4e39ccbad6cf930e6
777a75e6ed0934c193aece9de4421f8d8db01aac
/src/Providers/UNIXProviders/tests/UNIXProviders.Tests/UNIX_CommonDatabaseCapabilitiesFixture.h
f3d29e180d2bb1aae3032c2766765c9ad68371ee
[ "MIT" ]
permissive
brunolauze/openpegasus-providers-old
20fc13958016e35dc4d87f93d1999db0eae9010a
b00f1aad575bae144b8538bf57ba5fd5582a4ec7
refs/heads/master
2021-01-01T20:05:44.559362
2014-04-30T17:50:06
2014-04-30T17:50:06
19,132,738
1
0
null
null
null
null
UTF-8
C++
false
false
1,911
h
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor licenses this file to you under the OpenPegasus Open // Source License; you may not use this file except in compliance with the // License. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ////////////////////////////////////////////////////////////////////////// // //%///////////////////////////////////////////////////////////////////////// #include "CIMFixtureBase.h" class UNIX_CommonDatabaseCapabilitiesFixture : public CIMFixtureBase { public: UNIX_CommonDatabaseCapabilitiesFixture(); ~UNIX_CommonDatabaseCapabilitiesFixture(); virtual void Run(); };
[ "brunolauze@msn.com" ]
brunolauze@msn.com
66ac3f3b5be682a6c5a6c35c1f1f5f3d5a716322
500d9a3048560023bd989dbf5d770e0b8abf224d
/BZOJ/3164 Eden的博弈树/3164.cpp
d248b99898180368360a1537b3d918354436bb78
[]
no_license
hilbertanjou/OJ
2138bd349607adebd7674861e00dad57a23724bd
641f412d904edd66e97befdabcc32b7076729a53
refs/heads/master
2020-12-30T23:33:13.961562
2013-08-23T09:44:49
2013-08-23T09:44:49
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,235
cpp
#include <cstdio> const int MAXN = 222222; int c[MAXN], d[MAXN], e[MAXN], f[MAXN], s[MAXN][2], q[MAXN], h[MAXN], nxt[MAXN]; inline void checkmin(int &x, int y) { if (y < x) x = y; } int main() { int n, r = 0; scanf("%d", &n); for (int i = 2; i <= n; ++i) { int x; scanf("%d", &x); nxt[i] = h[x]; h[x] = i; } q[0] = 1; for (int l = 0; l <= r; ++l) for (int k = h[q[l]]; k; k = nxt[k]) c[q[++r] = k] = c[q[l]] ^ 1; for (int i = r; i >= 0; --i) { int x = q[i]; if (!h[x]) s[x][0] = s[x][1] = f[d[x] = e[x] = x] = 1; else { s[x][c[x]] = e[x] = n + 1; for (int k = h[x]; k; k = nxt[k]) for (int j = 0; j < 2; ++j) if (c[x] == j) checkmin(s[x][j], s[k][j]); else s[x][j] += s[k][j]; for (int k = h[x]; k; k = nxt[k]) if (s[k][c[x]] == s[x][c[x]]) { d[x] ^= d[k]; checkmin(e[x], e[k]); f[x] += f[k]; } } } printf("%d %d %d\n", e[1], f[1], d[1]); return 0; }
[ "xy_xuyi@foxmail.com" ]
xy_xuyi@foxmail.com
7689bcd8c9e6b198660772cf4f2a9383172eeb77
d0fb46aecc3b69983e7f6244331a81dff42d9595
/cr/include/alibabacloud/cr/model/DeleteUserSourceAccountRequest.h
d461f581eb8401d2d6752be30cb7c8b962b4b026
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-cpp-sdk
3d8d051d44ad00753a429817dd03957614c0c66a
e862bd03c844bcb7ccaa90571bceaa2802c7f135
refs/heads/master
2023-08-29T11:54:00.525102
2023-08-29T03:32:48
2023-08-29T03:32:48
115,379,460
104
82
NOASSERTION
2023-09-14T06:13:33
2017-12-26T02:53:27
C++
UTF-8
C++
false
false
1,351
h
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * 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 ALIBABACLOUD_CR_MODEL_DELETEUSERSOURCEACCOUNTREQUEST_H_ #define ALIBABACLOUD_CR_MODEL_DELETEUSERSOURCEACCOUNTREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RoaServiceRequest.h> #include <alibabacloud/cr/CrExport.h> namespace AlibabaCloud { namespace Cr { namespace Model { class ALIBABACLOUD_CR_EXPORT DeleteUserSourceAccountRequest : public RoaServiceRequest { public: DeleteUserSourceAccountRequest(); ~DeleteUserSourceAccountRequest(); long getSourceAccountId()const; void setSourceAccountId(long sourceAccountId); private: long sourceAccountId_; }; } } } #endif // !ALIBABACLOUD_CR_MODEL_DELETEUSERSOURCEACCOUNTREQUEST_H_
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
26fd7a28d53cf95482c8cc4f168f829547258e0d
44f9c516192536f72f99910c6e50e892b8f3b327
/orlov/stack_double/stack_double.cpp
fe2feb07df3f9ca81b29159e2e8fee421dc94a32
[]
no_license
AzamatCherchesov/ilab-first-year-2014
ab1b6ceb44de522ceab1d5aeb8613cafc2d500a2
8b9e6eb4d0ed5baa790dd9726d84a1766cdad7d2
refs/heads/master
2021-01-01T19:34:09.241295
2015-03-27T14:28:59
2015-03-27T14:28:59
33,034,982
0
0
null
null
null
null
UTF-8
C++
false
false
2,569
cpp
#include "stack_double.h" #include <stdio.h> #include <malloc.h> #include <assert.h> stack* Stack_Ini() { stack *st; st->count = 0; st->size = START_STK_SIZE; st->buf = (type_stack *)calloc(st->size, sizeof(type_stack)); } stack Stack_Del (stack *st) { free(st->buf); st->count = -1; st->size = -1; free(st); } int Stack_Get_Size(const stack *st) { return st->count; } int Is_Stack_Bad(const stack *st) { if (!st) return BAD_STK; if (st->size<=0) return STK_UNSIZED; if (st->count >= st->size) return OVERFULL_STK; if (!st->buf) return BAD_STK_BUF; return GOOD_STK; } void Stack_Dump(const stack *st) { printf("st [%i], %s\n", st,ERR[Is_Stack_Bad(st)]); printf("{\n"); printf("count = %i\n", st->count); printf("data [%lg] max = %i\n", st->buf, st->size); printf("\n"); int i = 0; for (i = 0; i < st->count; i++) printf("[%i] = %lg <--\n", i, st->buf[i]); //value in stack for (;i < st->size;i++) printf("[%i] = %lg !\n", i, st->buf[i]); //value out of stack printf("}\n"); } void Stack_Assert (const stack *st) { if (Is_Stack_Bad(st)) { Stack_Dump(st); assert(Is_Stack_Bad(st)); } } void Stack_Realloc(stack* st) { if (Is_Stack_Bad(st) != OVERFULL_STK) Stack_Assert(st); st->size += STK_SIZE_STEP; st->buf = (type_stack *) realloc(st->buf, st->size * sizeof(type_stack)); Stack_Assert(st); } void Push(stack *st, type_stack elem) { if (!Is_Stack_Bad(st)) { st->buf[st->count++] = elem; } else if (Is_Stack_Bad(st) == OVERFULL_STK) { Stack_Realloc(st); st->buf[st->count++] = elem; } else Stack_Assert(st); } type_stack Pop(stack *st) { if (!Is_Stack_Bad(st)) { return st->buf[--st->count]; } else Stack_Assert(st); return Is_Stack_Bad(st); } type_stack Pop_Without_DEl(stack *st) { if (!Is_Stack_Bad(st)) { int i = st->count; return st->buf[--i]; } else Stack_Assert(st); return Is_Stack_Bad(st); } void mul(stack *st) { if (!Is_Stack_Bad(st)) { Push(st, pop(st) * pop(st)); } } void div(stack *st) { if (!Is_Stack_Bad(st)) { type_stack a = pop(st), b = pop(st); Push(st, b / a); } } void add(stack *st)void sub(stack *st) { if (!Is_Stack_Bad(st)) { Push(st, pop(st) + pop(st)); } } void sub(stack *st) { if (!Is_Stack_Bad(st)) { type_stack a = pop(st), b = pop(st); Push(st, b - a); } }
[ "oleg.orlov@phystech.edu" ]
oleg.orlov@phystech.edu
637d990857527a227bcde1585831dd20462a8147
e543133fe2ba1a497b120367acdc557d5896a070
/Qt/3/08_ii2c_ap3216c_sensor/arcgraph.h
efa892211ed62a2ccd5137063dd98c88357cbbc1
[ "MIT" ]
permissive
tuyentm101/Embedded-Qt-Tutorial
9434ec4d838e0eaa75a4467b1b4c4d19c703d671
3c75142235b4d39c22e1ad56a5bd92d08c1a0d42
refs/heads/master
2023-06-28T20:27:00.729197
2021-07-28T07:05:06
2021-07-28T07:05:06
null
0
0
null
null
null
null
UTF-8
C++
false
false
814
h
/****************************************************************** Copyright © Deng Zhimao Co., Ltd. 1990-2021. All rights reserved. * @projectName 08_spi_sensor * @brief arcgraph.h * @author Deng Zhimao * @email 1252699831@qq.com * @net www.openedv.com * @date 2021-05-21 *******************************************************************/ #ifndef ARCGRAPH_H #define ARCGRAPH_H #include <QWidget> #include <QPainter> #include <QPaintEvent> /* 蓝色科技感弧形视图 */ class ArcGraph : public QWidget { Q_OBJECT public: ArcGraph(QWidget *parent = nullptr); ~ArcGraph(); void setstartAngle(int); void setangleLength(int); private: void paintEvent(QPaintEvent *event); int startAngle; int angleLength; }; #endif // ARCGRAPH_H
[ "1252699831@qq.com" ]
1252699831@qq.com
5957f2952d3081586e62bfee3c5e250522b8b410
4168b54d076cde3d2a10208069811756b94c4ebf
/strings/replacePiWith3.14.cpp
75e51ee70c8448cd7b3b8c32b4e74864168c9d8d
[]
no_license
mr-robot-007/dsa-cpp
c27cdb00db2bb8dea4a9b2e7b00d70cc7d333f56
95642e26ea9c4d74f40e55f65c0a61f9dd24c81c
refs/heads/master
2023-05-31T08:13:52.433065
2021-06-16T06:06:33
2021-06-16T06:06:33
367,591,734
0
0
null
2021-06-16T06:06:34
2021-05-15T09:36:25
C++
UTF-8
C++
false
false
389
cpp
#include <bits/stdc++.h> using namespace std; void replacePi(string str) { if (str.length() == 0) return; if (str[0] == 'p' && str[1] == 'i') { cout << 3.14; replacePi(str.substr(2)); } else { cout << str[0]; replacePi(str.substr(1)); } } int main() { string s = "pippxxppiixipi"; replacePi(s); return 0; }
[ "anujgusain108@gmail.com" ]
anujgusain108@gmail.com
d32ef89d9b4771f222d10295dee777e30aa5fe9d
a0cbe9deab37a1ff1efc847c1a35bad95f40cb61
/DangQun_contribution/MedConsumeQuery.h
5f0ebc4edebb843615409762455865d74a17fc4c
[]
no_license
Aden2018/Cplusplus-Source-Code
3f7efca774d4480502c44c7214bde842f7cba332
487d502716ecda634a35e810d604a1cde4c05fa4
refs/heads/master
2021-05-31T15:04:49.276369
2016-05-12T09:02:01
2016-05-12T09:02:01
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,526
h
#if !defined(AFX_MEDCONSUMEQUERY_H__2CC71415_72BD_41D9_8782_17631ED02E6E__INCLUDED_) #define AFX_MEDCONSUMEQUERY_H__2CC71415_72BD_41D9_8782_17631ED02E6E__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // MedConsumeQuery.h : header file // ///////////////////////////////////////////////////////////////////////////// // CMedConsumeQuery dialog class CMedConsumeQuery : public CDialog { // Construction public: static UINT QueryData(LPVOID ps); CMedConsumeQuery(CWnd* pParent = NULL); // standard constructor CString strSql; CStringArray arrType; // Dialog Data //{{AFX_DATA(CMedConsumeQuery) enum { IDD = IDD_DIALOG_QUERY_CONSUME }; CComboBox m_Type; COleDateTime m_date; COleDateTime m_date2; CString m_strStart; CString m_strEnd; //}}AFX_DATA enum{ MEDQUERYID=44}; // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMedConsumeQuery) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CMedConsumeQuery) virtual void OnOK(); virtual BOOL OnInitDialog(); afx_msg void OnOk2(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: // afx_msg void OnBnClickedOk(); virtual BOOL PreTranslateMessage(MSG* pMsg); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_MEDCONSUMEQUERY_H__2CC71415_72BD_41D9_8782_17631ED02E6E__INCLUDED_)
[ "lingshaoqing@gmail.com" ]
lingshaoqing@gmail.com
c48abf8fcae5dab5d360f41d4a54e80c05a90080
45f4bde7c580a04b462986937f340e267d5d5bb5
/Programacion 2/main.cpp
e71bacd687cae6c31409b0b27072989b75af8a71
[]
no_license
cosimico/UZA
41ac16b531dfda42acf7e132e9a03b85b5534426
0bdf9db7a52f81d984006af771cd454b62ece85b
refs/heads/master
2021-06-09T13:05:03.810720
2016-11-18T18:56:40
2016-11-18T18:56:40
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,923
cpp
#include <iostream> using namespace std; /* *Numero m ´ aximo de elementos en una secuencia (un valor positivo ) ´ */ const int MAX =120; // Definir su valor segun necesidades (siempre MAX ´ > 0) /* *Un dato definido a partir del tipo generico Secuencia representa una secuencia ´ * de elementos de tipo T */ template <typename T> struct Secuencia { // El valor de numDatos define el numero K de elementos de la secuencia [d ´ 1, d 2, ..., d K] // con K >= 0 y K <= MAX int numDatos; // Los elementos de la secuencia [d 1, d 2, ..., d K] se almacenan de forma contigua // en el vector datos : // d 1 se almacena en datos[0] // d 2 se almacena en datos[1] // ... // y, finalmente , d K se almacena en datos[K−1] T datos [MAX]; }; /* * Pre: cierto * Post : S.numDatos = 1 AND S.datos[0] = elemento */ template <typename T> void unitaria (Secuencia<T>& S, const T elemento) { //1 = 1 AND elemento = elemento => cierto S.numDatos=1; //S.numDatos = 1 AND elemento = elemento S.datos[0]=elemento; //S.numDatos = 1 AND S.datos[0] = elemento } /* * Pre: S.numDatos = K AND K >= 0 AND K < MAX AND * (PT alfa EN [1,K]. S. datos[ alfa − 1] = Do[alfa]) * Post : S.numDatos = K + 1 AND S.datos[K] = ultimo AND * (PT alfa EN [1,K]. S. datos[ alfa − 1] = Do[alfa]) */ template <typename T> void insertarUltimo (Secuencia<T>& S, const T ultimo) { //S.numDatos = K AND //(PT alfa EN [1,K]. S. datos[ alfa − 1] = Do[alfa])=> //Pre: S.numDatos = K AND K >= 0 AND K < MAX AND //(PT alfa EN [1,K]. S. datos[ alfa − 1] = Do[alfa]) //S.numDatos + 1 = K + 1 AND //(PT alfa EN [1,K]. S. datos[ alfa − 1] = Do[alfa]) S.numDatos=S.numDatos+1; //S.numDatos = K + 1 AND ultimo = ultimo AND //(PT alfa EN [1,K]. S. datos[ alfa − 1] = Do[alfa]) S.datos[S.numDatos-1]=ultimo; //S.numDatos = K + 1 AND S.datos[K] = ultimo AND //(PT alfa EN [1,K]. S. datos[ alfa − 1] = Do[alfa]) } /* * Pre: S.numDatos = K AND K >=1 AND K <= MAX AND * (PT alfa EN [1,K]. S. datos[ alfa − 1] = Do[alfa]) * Post : S.numDatos = K − 1 AND * (PT alfa EN [2,K]. S. datos[ alfa − 2] = Do[alfa]) */ template <typename T> void retirarPrimero (Secuencia<T>& S) { //S.numDatos = K AND K >=1 AND K <= MAX AND //(PT alfa EN [1,K]. S.datos[ alfa − 1] = Do[alfa]) => eliminar(S,1); // S.numDatos = K − 1 AND //(PT alfa EN [1,i]. S.datos[ alfa − 1] = Do[alfa]) AND //(PT alfa EN [i+1,K]. S.datos[ alfa − 2] = Do[alfa]) //AND i=1 => // S.numDatos = K − 1 AND //(PT alfa EN [1,1]. S.datos[ alfa − 1] = Do[alfa]) AND //(PT alfa EN [2,K]. S.datos[ alfa − 2] = Do[alfa]) => //Post : S.numDatos = K − 1 AND //(PT alfa EN [2,K]. S. datos[ alfa − 2] = Do[alfa]) } /* * Pre: S.numDatos = K AND K >=1 AND K <= MAX AND * (PT alfa EN [1,K]. S.datos[ alfa − 1] = Do[alfa]) * AND i>0 AND i<=K * Post : S.numDatos = K − 1 AND * (PT alfa EN [1,i]. S.datos[ alfa − 1] = Do[alfa]) AND * (PT alfa EN [i+1,K]. S.datos[ alfa − 2] = Do[alfa]) */ template <typename T> void eliminar (Secuencia<T>& S, int i) { //Pre: S.numDatos = K AND K >=1 AND K <= MAX AND //(PT alfa EN [1,K]. S.datos[ alfa − 1] = Do[alfa]) //AND i>0 AND i<=K //Dom(i<S.numDatos)=>cierto if(i<S.numDatos){ //S.numDatos = K AND K >=1 AND K <= MAX AND //(PT alfa EN [1,K]. S.datos[ alfa − 1] = Do[alfa]) //AND i>0 AND i<K S.datos[i-1]=S.datos[i]; eliminar(S,i+1); //S.numDatos = K − 1 AND //(PT alfa EN [1,i+1]. S.datos[ alfa − 1] = Do[alfa]) AND //(PT alfa EN [i+2,K]. S.datos[ alfa − 2] = Do[alfa]) i=i-1; //S.numDatos = K − 1 AND //(PT alfa EN [1,i]. S.datos[ alfa − 1] = Do[alfa]) AND //(PT alfa EN [i+1,K]. S.datos[ alfa − 2] = Do[alfa]) } else{ //S.numDatos = K //(PT alfa EN [1,i]. S.datos[ alfa − 1] = Do[alfa]) AND //(PT alfa EN [i+1,K]. S.datos[ alfa − 2] = Do[alfa]) S.numDatos=S.numDatos-1; //S.numDatos = K − 1 AND //(PT alfa EN [1,i]. S.datos[ alfa − 1] = Do[alfa]) AND //(PT alfa EN [i+1,K]. S.datos[ alfa − 2] = Do[alfa]) } } /* * Pre: S.numDatos = K AND K >= 0 AND K <= MAX AND * (PT alfa EN [1,K]. S. datos[ alfa − 1] = Do[alfa]) * Post : S.numDatos = K AND (K > 0 −> S.datos[0] = Do[K]) AND * (PT alfa EN [1,K−1]. S.datos[ alfa ] = Do[alfa]) */ template <typename T> void rotarDerecha (Secuencia<T>& S) { //Dom(S.numDatos>0)=>cierto if (S.numDatos>0){ T aux=S.datos[S.numDatos-1]; int i=S.numDatos-1; //S.numDatos = K AND i = K-1 AND K > 0 AND aux = Do[K] //PT alfa EN [i+1,K−1]. S.datos[alfa] = Do[alfa] while (i>0){ //INV:S.numDatos = K AND i < K AND i > 0 AND aux = Do[K] // PT alfa EN [i+1,K−1]. S.datos[alfa] = Do[alfa] S.datos[i]=S.datos[i-1]; i=i-1; //S.numDatos = K AND i < K AND i >= 0 AND aux = Do[K] //PT alfa EN [i,K−1]. S.datos[alfa] = Do[alfa] } //S.numDatos = K AND K >= 0 AND i = 0 AND aux = Do[K] //PT alfa EN [1,K−1]. S.datos[alfa] = Do[alfa] S.datos[0]=aux; //S.numDatos = K AND K >= 0 AND i = 0 AND S.datos[0] = Do[K] //PT alfa EN [1,K−1]. S.datos[alfa] = Do[alfa] => //Post : S.numDatos = K AND (K > 0 −> S.datos[0] = Do[K]) AND //(PT alfa EN [1,K−1]. S.datos[ alfa ] = Do[alfa]) } } /* * Pre: S.numDatos = K AND K >= 0 AND K <= MAX * Post : longitud (S) = K */ template <typename T> int longitud (const Secuencia<T> S) { //S.numDatos = K AND K >= 0 AND K <= MAX => //S.numDatos = K return S.numDatos; //longitud (S) = K } void mostrar(const Secuencia<int> S){ int i=0; while(i!=S.numDatos){ cout<<S.datos[i]<<endl; i++; } } int main(){ Secuencia <int> prueba; unitaria(prueba,1); insertarUltimo(prueba,2); insertarUltimo(prueba,3); insertarUltimo(prueba,4); insertarUltimo(prueba,5); insertarUltimo(prueba,6); insertarUltimo(prueba,7); insertarUltimo(prueba,8); insertarUltimo(prueba,9); insertarUltimo(prueba,10); mostrar(prueba); cout<<endl<<endl; rotarDerecha(prueba); mostrar(prueba); cout<<longitud(prueba); }
[ "correoparamierdas97@gmail.com" ]
correoparamierdas97@gmail.com
dcd2c29f85127f0badc983c9321102c8a1332919
f775f8aa51e7b938b1e3ed61b4d26a70348e2ac7
/src/SelectivePageMigration/RelativeMinMax.cpp
20cdb3c970ba01509f8227699ce10160887a6054
[]
no_license
lisqu/selective-page-migration-ccnuma
29c8602a5a8146bc238dfb1e17401fbaeae8cc37
5615d6aabaeeeab4004df8385ce5577961263d44
refs/heads/master
2021-01-10T08:42:03.445497
2014-04-16T20:50:03
2014-04-16T20:50:03
51,476,921
0
0
null
null
null
null
UTF-8
C++
false
false
6,213
cpp
#include "RelativeMinMax.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" /* ************************************************************************** */ /* ************************************************************************** */ static cl::opt<bool> ClDebug("rel-minmax-debug", cl::desc("Enable debugging for the relative min/max pass"), cl::Hidden, cl::init(false)); static RegisterPass<RelativeMinMax> X("rel-minmax", "Location-relative inference of max and mins"); char RelativeMinMax::ID = 0; #define RMM_DEBUG(X) { if (ClDebug) { X; } } /* ************************************************************************** */ /* ************************************************************************** */ void RelativeMinMax::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); AU.addRequired<LoopInfoExpr>(); AU.addRequired<SymPyInterface>(); AU.setPreservesAll(); } bool RelativeMinMax::runOnFunction(Function &F) { DT_ = &getAnalysis<DominatorTree>(); LIE_ = &getAnalysis<LoopInfoExpr>(); SPI_ = &getAnalysis<SymPyInterface>(); return false; } bool RelativeMinMax::addMinMax(Expr PrevMin, Expr PrevMax, Expr OtherMin, Expr OtherMax, Expr &Min, Expr &Max) { Min = PrevMin + OtherMin; Max = PrevMax + OtherMax; } bool RelativeMinMax::mulMinMax(Expr PrevMin, Expr PrevMax, Expr OtherMin, Expr OtherMax, Expr &Min, Expr &Max) { if (OtherMin == OtherMax && OtherMin.isConstant()) { if (OtherMin.isPositive()) { Min = PrevMin * OtherMin; Max = PrevMax * OtherMax; } else { Min = PrevMax * OtherMax; Max = PrevMin * OtherMin; } } else if (PrevMin == PrevMax && PrevMin.isConstant()) { if (PrevMin.isPositive()) { Min = PrevMin * OtherMin; Max = PrevMax * OtherMax; } else { Min = PrevMax * OtherMax; Max = PrevMin * OtherMin; } } else { Min = (PrevMin * OtherMin).min(PrevMin * OtherMax) .min(OtherMin * PrevMax); Max = (PrevMax * OtherMin).max(PrevMax * OtherMax) .max(OtherMax * PrevMin); } } bool RelativeMinMax::getMinMax(Expr Ex, Expr &Min, Expr &Max) { if (Ex.isConstant()) { Min = Ex; Max = Ex; } else if (Ex.isSymbol()) { // Bounds of induction variables have special treatment. if (PHINode *Phi = dyn_cast<PHINode>(Ex.getSymbolValue())) { if (Loop *L = LIE_->getLoopForInductionVariable(Phi)) { Expr IndvarStart, IndvarEnd, IndvarStep; LIE_->getLoopInfo(L, Phi, IndvarStart, IndvarEnd, IndvarStep); BranchInst *BI = cast<BranchInst>(L->getExitingBlock()->getTerminator()); ICmpInst *ICI = cast<ICmpInst>(BI->getCondition()); Expr MinStart, MaxStart, MinEnd, MaxEnd; if (!getMinMax(IndvarStart, MinStart, MaxStart) || !getMinMax(IndvarEnd, MinEnd, MaxEnd)) { RMM_DEBUG(dbgs() << "RelativeMinMax: Could not infer min/max for " << IndvarStart << " and/or" << IndvarEnd << "\n"); return false; } // FIXME: we should wrap the loop in a conditional so that the following // min/max assumptions always hold. switch (ICI->getPredicate()) { case CmpInst::ICMP_SLT: case CmpInst::ICMP_ULT: case CmpInst::ICMP_SLE: case CmpInst::ICMP_ULE: Min = MinStart; Max = MaxEnd; break; case CmpInst::ICMP_SGT: case CmpInst::ICMP_UGT: case CmpInst::ICMP_UGE: case CmpInst::ICMP_SGE: Min = MaxStart; Max = MinEnd; break; default: llvm_unreachable("Invalid comparison predicate"); } RMM_DEBUG(dbgs() << "RelativeMinMax: min/max for induction variable " << *Phi << ": " << Min << ", " << Max << "\n"); return true; } } Min = Ex; Max = Ex; } else if (Ex.isAdd()) { for (auto SubEx : Ex) { Expr TmpMin, TmpMax; if (!getMinMax(SubEx, TmpMin, TmpMax)) { RMM_DEBUG(dbgs() << "RelativeMinMax: Could not infer min/max for " << SubEx << "\n"); return false; } addMinMax(TmpMin, TmpMax, Min, Max, Min, Max); } } else if (Ex.isMul()) { Min = Expr::InvalidExpr(); for (auto SubEx : Ex) { Expr TmpMin, TmpMax; if (!getMinMax(SubEx, TmpMin, TmpMax)) { RMM_DEBUG(dbgs() << "RelativeMinMax: Could not infer min/max for " << SubEx << "\n"); return false; } if (!Min.isValid()) { Min = TmpMin; Max = TmpMax; } else { mulMinMax(TmpMin, TmpMax, Min, Max, Min, Max); } } } else if (Ex.isPow()) { if (!Ex.getPowExp().isConstant()) { RMM_DEBUG(dbgs() << "RelativeMinMax: non-constant exponent\n"); return false; } Expr BaseMin, BaseMax; if (!getMinMax(Ex.getPowBase(), BaseMin, BaseMax)) { RMM_DEBUG(dbgs() << "RelativeMinMax: Could not infer min/max for " << Ex.getPowBase() << "\n"); return false; } if (Ex.getPowExp().isPositive()) { Min = BaseMin ^ Ex.getPowExp(); Max = BaseMax ^ Ex.getPowExp(); } else { Min = BaseMax ^ Ex.getPowExp(); Max = BaseMin ^ Ex.getPowExp(); } } else if (Ex.isMin()) { Expr MinFirst, MinSecond, Bogus; getMinMax(Ex.at(0), MinFirst, Bogus); getMinMax(Ex.at(1), MinSecond, Bogus); Min = Max = MinFirst.min(MinSecond); } else if (Ex.isMax()) { Expr MaxFirst, MaxSecond, Bogus; getMinMax(Ex.at(0), MaxFirst, Bogus); getMinMax(Ex.at(1), MaxSecond, Bogus); Min = Max = MaxFirst.max(MaxSecond); } else { RMM_DEBUG(dbgs() << "RelativeMinMax: unhandled expression: " << Ex << "\n"); return false; } return true; } bool RelativeMinMax::getMinMaxRelativeTo(Loop *L, Value *V, Expr &Min, Expr &Max) { Expr Ex = LIE_->getExprForLoop(L, V); return getMinMax(Ex, Min, Max); }
[ "hnsantos@gmx.com" ]
hnsantos@gmx.com
ab720ebddcba513475f9d7c9eba250836f09038b
493f982f8ddc8e615ac4a320b958f76150e94c8e
/cpp/Logic/vtkSlicercppLogic.h
2ccbf11ad1ef817cd499bfdf19e751ef3ac0e50f
[]
no_license
mwoehlke-kitware/SlicerTestExtension
bcbe41a6781f106adb73cebfb9450ba5c76aaaab
371229f3cc24fd1f6e07f553e23db782462b9020
refs/heads/master
2020-07-08T11:04:12.847707
2014-03-12T18:06:17
2014-03-12T18:06:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,965
h
/*============================================================================== Program: 3D Slicer Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved. See COPYRIGHT.txt or http://www.slicer.org/copyright/copyright.txt for details. 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. ==============================================================================*/ // .NAME vtkSlicercppLogic - slicer logic class for volumes manipulation // .SECTION Description // This class manages the logic associated with reading, saving, // and changing propertied of the volumes #ifndef __vtkSlicercppLogic_h #define __vtkSlicercppLogic_h // Slicer includes #include "vtkSlicerModuleLogic.h" // MRML includes // STD includes #include <cstdlib> #include "vtkSlicercppModuleLogicExport.h" /// \ingroup Slicer_QtModules_ExtensionTemplate class VTK_SLICER_CPP_MODULE_LOGIC_EXPORT vtkSlicercppLogic : public vtkSlicerModuleLogic { public: static vtkSlicercppLogic *New(); vtkTypeMacro(vtkSlicercppLogic, vtkSlicerModuleLogic); void PrintSelf(ostream& os, vtkIndent indent); protected: vtkSlicercppLogic(); virtual ~vtkSlicercppLogic(); virtual void SetMRMLSceneInternal(vtkMRMLScene* newScene); /// Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class. virtual void RegisterNodes(); virtual void UpdateFromMRMLScene(); virtual void OnMRMLSceneNodeAdded(vtkMRMLNode* node); virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode* node); private: vtkSlicercppLogic(const vtkSlicercppLogic&); // Not implemented void operator=(const vtkSlicercppLogic&); // Not implemented }; #endif
[ "matthew.woehlke@kitware.com" ]
matthew.woehlke@kitware.com
95b456b8a0d54c0a44e19a25b50d8ae2abf01e78
4696748303a72fcdeeaebb0a53438c642a3edd91
/Compiler/CM1Compiler_CPP/DataStructures/printStackTrace.hpp
25e75884fbc5434b64005e0cc398ad913514ea11
[]
no_license
Agrabski/C-equals-1
a718507bcee75acacb54a8955817755dbc648418
e3c096b597bd16bfda84ecdb810e254b45e6aa8c
refs/heads/master
2023-08-30T22:46:54.438853
2023-08-30T21:01:26
2023-08-30T21:01:26
226,588,621
1
1
null
2022-11-09T10:32:57
2019-12-07T23:20:34
C++
UTF-8
C++
false
false
188
hpp
#pragma once #include "RuntimeException.hpp" #include <ostream> namespace cMCompiler::dataStructures { void printStackTrace(std::vector<stackFrame> const& stack, std::ostream& stream); }
[ "adam.gr@outlook.com" ]
adam.gr@outlook.com
01c97d33edb2007dbdbae32f5e15ee244eca7259
12f2153cce750f245e309370f02ead5609b49d50
/day04 (SUB-TYPING POLYMORPHISM)/ex01/RadScorpion.hpp
6fb42890fa36b9cadf2cf18d36c136a5f2ca5c19
[]
no_license
hlombard/Piscine_CPP
e638d082171b0e84ead6444373e2ec57b03da1ff
90ce065d9a1714cdca0551c438c6e491742d0410
refs/heads/master
2023-02-23T16:56:24.722420
2021-01-26T18:52:08
2021-01-26T18:52:08
333,182,153
0
0
null
null
null
null
UTF-8
C++
false
false
292
hpp
#ifndef RADSCORPION_HPP # define RADSCORPION_HPP #include "Enemy.hpp" class RadScorpion : public Enemy { public: RadScorpion(void); RadScorpion(RadScorpion const & src); RadScorpion & operator=(RadScorpion const & src); virtual ~RadScorpion(void); }; #endif
[ "hlombard@student.42.fr" ]
hlombard@student.42.fr
bcd9b679e5fa5eb068faa979443c884f0cf41406
b7f3edb5b7c62174bed808079c3b21fb9ea51d52
/net/der/parser_unittest.cc
7c51b0e0f1e535055727a1828b5bcf9f452a212f
[ "BSD-3-Clause" ]
permissive
otcshare/chromium-src
26a7372773b53b236784c51677c566dc0ad839e4
64bee65c921db7e78e25d08f1e98da2668b57be5
refs/heads/webml
2023-03-21T03:20:15.377034
2020-11-16T01:40:14
2020-11-16T01:40:14
209,262,645
18
21
BSD-3-Clause
2023-03-23T06:20:07
2019-09-18T08:52:07
null
UTF-8
C++
false
false
11,204
cc
// Copyright 2015 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. #include "net/der/parser.h" #include "net/der/input.h" #include "net/der/parse_values.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { namespace der { namespace test { TEST(ParserTest, ConsumesAllBytesOfTLV) { const uint8_t der[] = {0x04 /* OCTET STRING */, 0x00}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); ASSERT_EQ(kOctetString, tag); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, CanReadRawTLV) { const uint8_t der[] = {0x02, 0x01, 0x01}; Parser parser((Input(der))); Input tlv; ASSERT_TRUE(parser.ReadRawTLV(&tlv)); ByteReader tlv_reader(tlv); size_t tlv_len = tlv_reader.BytesLeft(); ASSERT_EQ(3u, tlv_len); Input tlv_data; ASSERT_TRUE(tlv_reader.ReadBytes(tlv_len, &tlv_data)); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, IgnoresContentsOfInnerValues) { // This is a SEQUENCE which has one member. The member is another SEQUENCE // with an invalid encoding - its length is too long. const uint8_t der[] = {0x30, 0x02, 0x30, 0x7e}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); } TEST(ParserTest, FailsIfLengthOverlapsAnotherTLV) { // This DER encoding has 2 top-level TLV tuples. The first is a SEQUENCE; // the second is an INTEGER. The SEQUENCE contains an INTEGER, but its length // is longer than what it has contents for. const uint8_t der[] = {0x30, 0x02, 0x02, 0x01, 0x02, 0x01, 0x01}; Parser parser((Input(der))); Parser inner_sequence; ASSERT_TRUE(parser.ReadSequence(&inner_sequence)); uint64_t int_value; ASSERT_TRUE(parser.ReadUint64(&int_value)); ASSERT_EQ(1u, int_value); ASSERT_FALSE(parser.HasMore()); // Try to read the INTEGER from the SEQUENCE, which should fail. Tag tag; Input value; ASSERT_FALSE(inner_sequence.ReadTagAndValue(&tag, &value)); } TEST(ParserTest, ReadOptionalTagPresent) { // DER encoding of 2 top-level TLV values: // INTEGER { 1 } // OCTET_STRING { `02` } const uint8_t der[] = {0x02, 0x01, 0x01, 0x04, 0x01, 0x02}; Parser parser((Input(der))); Input value; bool present; ASSERT_TRUE(parser.ReadOptionalTag(kInteger, &value, &present)); ASSERT_TRUE(present); const uint8_t expected_int_value[] = {0x01}; ASSERT_EQ(Input(expected_int_value), value); Tag tag; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); ASSERT_EQ(kOctetString, tag); const uint8_t expected_octet_string_value[] = {0x02}; ASSERT_EQ(Input(expected_octet_string_value), value); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, ReadOptionalTag2Present) { // DER encoding of 2 top-level TLV values: // INTEGER { 1 } // OCTET_STRING { `02` } const uint8_t der[] = {0x02, 0x01, 0x01, 0x04, 0x01, 0x02}; Parser parser((Input(der))); base::Optional<Input> optional_value; ASSERT_TRUE(parser.ReadOptionalTag(kInteger, &optional_value)); ASSERT_TRUE(optional_value.has_value()); const uint8_t expected_int_value[] = {0x01}; ASSERT_EQ(Input(expected_int_value), *optional_value); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); ASSERT_EQ(kOctetString, tag); const uint8_t expected_octet_string_value[] = {0x02}; ASSERT_EQ(Input(expected_octet_string_value), value); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, ReadOptionalTagNotPresent) { // DER encoding of 1 top-level TLV value: // OCTET_STRING { `02` } const uint8_t der[] = {0x04, 0x01, 0x02}; Parser parser((Input(der))); Input value; bool present; ASSERT_TRUE(parser.ReadOptionalTag(kInteger, &value, &present)); ASSERT_FALSE(present); Tag tag; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); ASSERT_EQ(kOctetString, tag); const uint8_t expected_octet_string_value[] = {0x02}; ASSERT_EQ(Input(expected_octet_string_value), value); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, ReadOptionalTag2NotPresent) { // DER encoding of 1 top-level TLV value: // OCTET_STRING { `02` } const uint8_t der[] = {0x04, 0x01, 0x02}; Parser parser((Input(der))); base::Optional<Input> optional_value; ASSERT_TRUE(parser.ReadOptionalTag(kInteger, &optional_value)); ASSERT_FALSE(optional_value.has_value()); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); ASSERT_EQ(kOctetString, tag); const uint8_t expected_octet_string_value[] = {0x02}; ASSERT_EQ(Input(expected_octet_string_value), value); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, CanSkipOptionalTagAtEndOfInput) { const uint8_t der[] = {0x02 /* INTEGER */, 0x01, 0x01}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); bool present; ASSERT_TRUE(parser.ReadOptionalTag(kInteger, &value, &present)); ASSERT_FALSE(present); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, SkipOptionalTagDoesntConsumePresentNonMatchingTLVs) { const uint8_t der[] = {0x02 /* INTEGER */, 0x01, 0x01}; Parser parser((Input(der))); bool present; ASSERT_TRUE(parser.SkipOptionalTag(kOctetString, &present)); ASSERT_FALSE(present); ASSERT_TRUE(parser.SkipOptionalTag(kInteger, &present)); ASSERT_TRUE(present); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, TagNumbersAboveThirtySupported) { // Context-specific class, tag number 31, length 0. const uint8_t der[] = {0x9f, 0x1f, 0x00}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); EXPECT_EQ(kTagContextSpecific | 31u, tag); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, ParseTags) { { // Universal primitive tag, tag number 4. const uint8_t der[] = {0x04, 0x00}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); EXPECT_EQ(kOctetString, tag); } { // Universal constructed tag, tag number 16. const uint8_t der[] = {0x30, 0x00}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); EXPECT_EQ(kSequence, tag); } { // Application primitive tag, tag number 1. const uint8_t der[] = {0x41, 0x00}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); EXPECT_EQ(kTagApplication | 1, tag); } { // Context-specific constructed tag, tag number 30. const uint8_t der[] = {0xbe, 0x00}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); EXPECT_EQ(kTagContextSpecific | kTagConstructed | 30, tag); } { // Private primitive tag, tag number 15. const uint8_t der[] = {0xcf, 0x00}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_TRUE(parser.ReadTagAndValue(&tag, &value)); EXPECT_EQ(kTagPrivate | 15, tag); } } TEST(ParserTest, IncompleteEncodingTagOnly) { const uint8_t der[] = {0x01}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_FALSE(parser.ReadTagAndValue(&tag, &value)); ASSERT_TRUE(parser.HasMore()); } TEST(ParserTest, IncompleteEncodingLengthTruncated) { // Tag: octet string; length: long form, should have 2 total octets, but // the last one is missing. (There's also no value.) const uint8_t der[] = {0x04, 0x81}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_FALSE(parser.ReadTagAndValue(&tag, &value)); ASSERT_TRUE(parser.HasMore()); } TEST(ParserTest, IncompleteEncodingValueShorterThanLength) { // Tag: octet string; length: 2; value: first octet 'T', second octet missing. const uint8_t der[] = {0x04, 0x02, 0x84}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_FALSE(parser.ReadTagAndValue(&tag, &value)); ASSERT_TRUE(parser.HasMore()); } TEST(ParserTest, LengthMustBeEncodedWithMinimumNumberOfOctets) { const uint8_t der[] = {0x01, 0x81, 0x01, 0x00}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_FALSE(parser.ReadTagAndValue(&tag, &value)); ASSERT_TRUE(parser.HasMore()); } TEST(ParserTest, LengthMustNotHaveLeadingZeroes) { // Tag: octet string; length: 3 bytes of length encoding a value of 128 // (it should be encoded in only 2 bytes). Value: 128 bytes of 0. const uint8_t der[] = { 0x04, 0x83, 0x80, 0x81, 0x80, // group the 0s separately 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; Parser parser((Input(der))); Tag tag; Input value; ASSERT_FALSE(parser.ReadTagAndValue(&tag, &value)); ASSERT_TRUE(parser.HasMore()); } TEST(ParserTest, ReadConstructedFailsForNonConstructedTags) { // Tag number is for SEQUENCE, but the constructed bit isn't set. const uint8_t der[] = {0x10, 0x00}; Parser parser((Input(der))); Tag expected_tag = 0x10; Parser sequence_parser; ASSERT_FALSE(parser.ReadConstructed(expected_tag, &sequence_parser)); // Check that we didn't fail above because of a tag mismatch or an improperly // encoded TLV. Input value; ASSERT_TRUE(parser.ReadTag(expected_tag, &value)); ASSERT_FALSE(parser.HasMore()); } TEST(ParserTest, CannotAdvanceAfterReadOptionalTag) { const uint8_t der[] = {0x02, 0x01, 0x01}; Parser parser((Input(der))); Input value; bool present; ASSERT_TRUE(parser.ReadOptionalTag(0x04, &value, &present)); ASSERT_FALSE(present); ASSERT_FALSE(parser.Advance()); } // Reads a valid BIT STRING with 1 unused bit. TEST(ParserTest, ReadBitString) { const uint8_t der[] = {0x03, 0x03, 0x01, 0xAA, 0xBE}; Parser parser((Input(der))); BitString bit_string; ASSERT_TRUE(parser.ReadBitString(&bit_string)); EXPECT_FALSE(parser.HasMore()); EXPECT_EQ(1u, bit_string.unused_bits()); ASSERT_EQ(2u, bit_string.bytes().Length()); EXPECT_EQ(0xAA, bit_string.bytes().UnsafeData()[0]); EXPECT_EQ(0xBE, bit_string.bytes().UnsafeData()[1]); } // Tries reading a BIT STRING. This should fail because the tag is not for a // BIT STRING. TEST(ParserTest, ReadBitStringBadTag) { const uint8_t der[] = {0x05, 0x03, 0x01, 0xAA, 0xBE}; Parser parser((Input(der))); BitString bit_string; EXPECT_FALSE(parser.ReadBitString(&bit_string)); } } // namespace test } // namespace der } // namespace net
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
c937f57732006acc9bc404b34464066813b2ee0f
5c1c4eb2cb56b97381cca63cb90c167c45844a83
/ReverseArray/ReverseArray/main.cpp
d64dfb30831cd86dbf535953a75e7011360bec2c
[]
no_license
againbike1/AlgorithmsStudy
5c5fc1c077490b8d36c9b76f3812c39d8b770c20
fe9bc6684958df425e8b3b24d69f7e727734a03f
refs/heads/master
2021-01-15T20:34:20.892514
2015-04-30T07:28:57
2015-04-30T07:28:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,212
cpp
// // main.cpp // ReverseArray // // Created by yutao on 15-4-29. // Copyright (c) 2015年 yutao. All rights reserved. // /** * 问题:编写一个能够支持数组快速移位的算法,时间复杂度在O(N)以内。 */ /** * 答:要实现在线性的时间内实现数组的快速移动,就要考虑如何使用逆序算法来达到移动的目的。例如,我要移动的数组元素称为A,剩余的部分称为B,那么原来次序为AB,如何变成BA呢?其实根据倒置的算法是可以实现移位操作的,我们先取A'为A的逆序序列,B'为B的逆序序列,进行(A'B')'操作即可得到BA序列。实现算法如下: */ #include <iostream> using namespace std; void PintArray(int dataArray[],int n){ for(int i=0;i<n;++i){ cout<<dataArray[i]<<" "; } cout<<endl; } void ReverseArray(int dataArray[],int start,int end){ int low=start,high=end; if(start>end){ cout<<"Index Error!"<<endl; cout<<"start:"<<start<<" end:"<<end; } while(low<high){//对数据进行逆序 第一个 和 最后一个数据交换位置 int tempDate = dataArray[low];//取第一个数据 存起来 dataArray[low] = dataArray[high];//取最后一个数据放到第一个数据的位置 dataArray[high] = tempDate;//将第一个位置的数据存到最后一个位置上 ++low;//底位递增 --high;//高位递减 } } void QuickShift(int dataArray[],int shift,int n){ int len =n; PintArray(dataArray,n);//原始数据 1 2 3 4 5 6 7 8 9 10 ReverseArray(dataArray, 0, shift-1);//A`逆序 PintArray(dataArray,n);//数据顺序为 4 3 2 1 5 6 7 8 9 10 ReverseArray(dataArray, shift, len-1);//B`逆序 PintArray(dataArray,n);//数据顺序为 A`B` A`:[4 3 2 1] B` :[10 9 8 7 6 5] ReverseArray(dataArray, 0, len-1);//对 A`B` 逆序 的到BA PintArray(dataArray,n);//得到的结果 5 6 7 8 9 10 1 2 3 4 } int main (int argc, const char * argv[]) { int dataArray[10]={1,2,3,4,5,6,7,8,9,10}; int n = sizeof(dataArray)/sizeof(int); QuickShift(dataArray, 4,n); return 0; }
[ "tao6yu@163.com" ]
tao6yu@163.com
2ae1ac3f2c2e4439e661963884e963e7990657b9
e404420e764455b0cb4b44df75cd2c6aa8ef9814
/playscene2.cpp
ddefaa58b955f96d97ca8e3ccb65bb198b1bb21e
[]
no_license
Jiayi-Hui/TowerDefense1
1466b9a6013c80ca3e04226e124623060329e7d9
6aee70027676ca8e026a5362896af1377aab9747
refs/heads/master
2022-11-10T08:12:04.438269
2020-06-28T16:33:33
2020-06-28T16:33:33
270,338,569
0
0
null
null
null
null
UTF-8
C++
false
false
16,083
cpp
#include "mypushbutton.h" #include "playscene2.h" #include <QDebug> #include <QPainter> #include <QPixmap> #include <QSound> playscene2::playscene2(QWidget *parent) : QMainWindow(parent) { this->setFixedSize(900,700); this->setWindowTitle("Play Scene 2"); initialLocBtnAndTower(); setButtons(); setLabels(); BuildTower(); QSound* BGM=new QSound("qrc:/res/BackgroundMusic/BGM02.wav"); //返回按钮 MyPushButton *BackBtn = new MyPushButton(":/res/Button/Back.png"); BackBtn->setParent(this); BackBtn->move(0.9*(this->width()-BackBtn->width()), 50); //点击返回 connect(BackBtn, &MyPushButton::clicked,[=](){ qDebug() << "BackBtn clicked"; BackBtn->BounceDown(); BackBtn->BounceUp(); BGM->stop(); QTimer::singleShot(200, this, [=](){ emit this->S2Back(); }); }); QTimer* timer = new QTimer(this); //用于插入怪物定时器 timer->start(1000); connect(timer,&QTimer::timeout,[=]() { //设置路径点 CoorStr* Waypointarr[] = { new CoorStr(0,this->height()*0.6), new CoorStr(50,this->height()*0.6), new CoorStr(120,this->height()*0.6),new CoorStr(120,this->height()*0.6-50), new CoorStr(120,this->height()*0.6-150), new CoorStr(120,this->height()*0.6-250), new CoorStr(120,this->height()*0.6-350), new CoorStr(170,this->height()*0.6-350),new CoorStr(260,this->height()*0.6-350),new CoorStr(260,this->height()*0.6-250),new CoorStr(260,this->height()*0.6-150),new CoorStr(360,this->height()*0.6-150),new CoorStr(480,this->height()*0.6-150),new CoorStr(480,this->height()*0.6-250), new CoorStr(480,this->height()*0.6-350),new CoorStr(630,this->height()*0.6-350),new CoorStr(630,this->height()*0.6-250),new CoorStr(630,this->height()*0.6-130),new CoorStr(630,this->height()*0.6-20),new CoorStr(520,this->height()*0.6-20),new CoorStr(420,this->height()*0.6-20), new CoorStr(420,this->height()*0.6+80),new CoorStr(420,this->height()*0.6+150),new CoorStr(520,this->height()*0.6+150),new CoorStr(640,this->height()*0.6+150)}; //每条路径的结点个数 int PathLength = sizeof(Waypointarr)/sizeof(CoorStr*); ProdEnemy( Waypointarr,PathLength); for (auto Moni = EnemyVec.begin(); Moni != EnemyVec.end(); Moni++) (*Moni)->updatePosition(); }); QTimer* timer2 = new QTimer(this); MyPushButton *startBtn = new MyPushButton(":/res/Button/stt2.png"); startBtn->setParent(this); startBtn->move(10, this->height()*0.61); connect(startBtn, &MyPushButton::clicked, [=](){ timer2->start(100); BGM->play(); connect(timer2,&QTimer::timeout,[=]() { //怪物移动 for (auto Moni = EnemyVec.begin(); Moni != EnemyVec.end(); Moni++) if((*Moni)->Move()) //怪物走到终点 { delete *Moni; EnemyVec.erase(Moni); //删除这个怪物 if((*Moni)->GetId()==1) health-=2; //生命数量-1 else if((*Moni)->GetId()==2) health-=4; else if((*Moni)->GetId()==3) health-=6; else health-=0; if(health<=2&&health>=0) { BGM->stop(); QSound* Lose=new QSound("qrc:/res/Sound/Lose2.wav"); Lose->play(); QMessageBox message(QMessageBox::NoIcon, "Lose", "Game over!"); message.setIconPixmap(QPixmap(":/res/Button/GameOver.png")); message.exec(); } hthlabel->setText(QString("%1").arg(health)); break; } update(); //绘图 }); }); QTimer* timer3 = new QTimer(this); timer3->start(100); connect(timer3,&QTimer::timeout,[=]() { for(int j = 0; j < Level2TowerNumber; j ++) { can[j]->temInterval += 5; if(can[j]->temInterval >= can[j]->attackSpeed) { for (auto Moni = EnemyVec.begin(); Moni != EnemyVec.end(); Moni++) { if(can[j]->judgeRect.intersects((*Moni)->m_Rect) && (*Moni)->isAlive&&(*Moni)->GetId()!=4) { can[j]->shoot((*Moni)->GetX(), (*Moni)->GetY()); qDebug() << "Attack1!"; (*Moni)->health -= 3; if((*Moni)->health <= 0) { this->diamond += (*Moni)->orihealth; (*Moni)->isAlive = false; leftEnemy--; delete *Moni; EnemyVec.erase(Moni); if(counter==74&&leftEnemy==0) { QSound* Win=new QSound("qrc:/res/Sound/Win.wav"); Win->play(); QMessageBox message(QMessageBox::NoIcon, "Win", "Congratulations!"); message.setIconPixmap(QPixmap(":/res/Button/Victory.png")); message.exec(); } }can[j]->temInterval = 0; break; } } } } for(int j = 0; j < Level2TowerNumber; j ++) { magic[j]->temInterval += 5; if(magic[j]->temInterval >= magic[j]->attackSpeed) { for (auto Moni = EnemyVec.begin(); Moni != EnemyVec.end(); Moni++) { if(magic[j]->judgeRect.intersects((*Moni)->m_Rect) && (*Moni)->isAlive&&(*Moni)->GetId()!=4) { magic[j]->shoot((*Moni)->GetX(), (*Moni)->GetY()); (*Moni)->health -= 4; qDebug() << "Attack2!"; if((*Moni)->health <= 0) { this->diamond += (*Moni)->orihealth; (*Moni)->isAlive = false; delete *Moni; EnemyVec.erase(Moni); leftEnemy--; if(counter==74&&leftEnemy==0) { QSound* Win=new QSound("qrc:/res/Sound/Win.wav"); Win->play(); QMessageBox message(QMessageBox::NoIcon, "Win", "Congratulations!"); message.setIconPixmap(QPixmap(":/res/Button/Victory.png")); message.exec(); } qDebug() << "Deleted"; } break; magic[j]->temInterval = 0; } } } } dialabel->setText(QString("%1").arg(diamond)); }); } void playscene2::ProdEnemy(CoorStr** Waypointarr, int PathLength){ if(counter==1) { EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,4)); leftwave=6; setWave();} else if(counter<= 3) EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,1)); else if( counter <= 10) EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,2)); else if( counter <= 14) EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,1)); else if( counter <= 19) { EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,4)); leftwave=5; setWave();} else if( counter <= 24) EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,3)); else if( counter <= 30) {EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,4)); leftwave=4; setWave();} else if( counter <= 38) EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,1)); else if( counter <= 45) { EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,4)); leftwave=3; setWave();} else if( counter <= 50) EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,2)); else if( counter <= 57) { EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,4)); leftwave=2; setWave();} else if( counter <= 63) EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,3)); else if( counter <= 70) { EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,4)); leftwave=1; setWave();} else if( counter <= 73) { EnemyVec.push_back(new Enemy(Waypointarr,PathLength,Waypointarr[0]->x,Waypointarr[0]->y,3)); leftwave=0; setWave();} counter++; //计数器+1 update(); } void playscene2::setWave(){ wavlabel->setText(QString("%1/6").arg(leftwave)); } void playscene2::initialLocBtnAndTower() { for(int i = 0; i < Level2TowerNumber; i ++) { magic[i] = new magicTower(Level2Loc_X[i], Level2Loc_Y[i]); can[i] = new Cannon(Level2Loc_X[i], Level2Loc_Y[i]); locBtn[i] = new BuildButton(); locBtn[i]->setParent(this); locBtn[i]->move(Level2Loc_X[i], Level2Loc_Y[i]); locBtn[i]->setLoc(Level2Loc_X[i], Level2Loc_Y[i]); btb[i] = new buildTowerBtn; btb[i]->setParent(this); btb[i]->move(-200, -200); } } void playscene2::setButtons(){ MyPushButton *HthBtn = new MyPushButton(":/res/Button/Hth.png"); HthBtn->setParent(this); HthBtn->move(155, 30); MyPushButton *DiaBtn = new MyPushButton(":/res/Button/Coin1.png"); DiaBtn->setParent(this); DiaBtn->move(20, 30); DiaBtn->setFixedSize(HthBtn->width(),HthBtn->height()); MyPushButton *WavBtn = new MyPushButton(":/res/Button/stt1.png"); WavBtn->setParent(this); WavBtn->move(20, this->height()-100); } //设置标签 void playscene2::setLabels(){ dialabel->move(90, 45); //位置 setStyleSheet("color:white"); //设置颜色 dialabel->setFont(QFont("Arial Unicode MS", 24)); //设置金钱标签属性 dialabel->setText(QString("%1").arg(diamond)); //显示金钱信息 hthlabel->move(230,45); //设置控件位置和大小 hthlabel->setFont(QFont("Arial Unicode MS", 24)); hthlabel->setText(QString("%1").arg(health)); wavlabel->move(80,this->height()-90); wavlabel->setFont(QFont("Arial Unicode MS", 24)); //设置金钱标签属性 wavlabel->setText(QString("%1/6").arg(leftwave)); } //塔的建造并升级 void playscene2::BuildTower(){ for(int i = 0; i < Level2TowerNumber; i ++) { connect(locBtn[i], &BuildButton::clicked, [=](){ if(locBtn[i]->GetLevelStatus() == 0) { btb[i]->move(Level2Loc_X[i]-20, Level2Loc_Y[i]-20); connect(btb[i], &buildTowerBtn::clicked, [=](){ if(btb[i]->getTowerType() == 1 && this->diamond >= can[i]->buildCost) { locBtn[i]->getTowerCannon(can[i], btb[i]->getTowerType()); btb[i]->move(-200, -200); diamond-= can[i]->buildCost; } else if(btb[i]->getTowerType() == 2 && this->diamond>= magic[i]->buildCost) { locBtn[i]->getTowerMagic(magic[i], btb[i]->getTowerType()); btb[i]->move(-200, -200); diamond-= magic[i]->buildCost; } else QMessageBox::warning(NULL, "warning", "No Money!"); dialabel->setText(QString("%1").arg(diamond)); }); } dialabel->setText(QString("%1").arg(diamond)); }); } } void playscene2::paintEvent(QPaintEvent *) { QPainter painter(this); QPixmap pix; pix.load(":/res/BGScene/S03.jpg"); painter.drawPixmap(0,0,this->width(),this->height(),pix); for (auto moni : EnemyVec)//画出怪物 painter.drawPixmap(moni->GetX(), moni->GetY(), moni->GetWidth(), moni->GetHeight(), QPixmap(moni->GetImgPath())); for(int i = 0; i < Level2TowerNumber; i ++) { if(can[i]->onAttackStatus) { can[i]->paintBullet(painter,can[i]->_level); can[i]->onAttackStatus = false; } if(magic[i]->onAttackStatus) { magic[i]->paintBullet(painter,magic[i]->_level); magic[i]->onAttackStatus = false; } } }
[ "jiayihui02@163.com" ]
jiayihui02@163.com
a6fbbbfc9eedd1ebd90ef471e0a706f2a30722c8
edeb0f79f5746175830c417de8e7bd70c6909ff7
/src/common/ResultFiltersThroughput.cc
988e63a27a8cbaafce5c6886e255448aa9ac640e
[]
no_license
Avian688/ndpIpv4
ba52f1628063c90d70fb134aa7a7f89e338f8058
82f4d81ad59cf30f6671e191dd4d5c79501201c9
refs/heads/master
2023-08-25T00:15:42.002150
2021-10-17T23:11:53
2021-10-17T23:11:53
418,857,534
0
0
null
null
null
null
UTF-8
C++
false
false
4,206
cc
// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see http://www.gnu.org/licenses/. // #include "inet/applications/base/ApplicationPacket_m.h" #include "inet/common/geometry/common/Coord.h" #include "inet/common/packet/Packet.h" #include "ResultFiltersThroughput.h" #include "inet/common/ResultRecorders.h" #include "inet/common/Simsignals_m.h" #include "inet/common/TimeTag_m.h" #include "inet/mobility/contract/IMobility.h" #include "inet/networklayer/common/L3AddressTag_m.h" #include "inet/physicallayer/base/packetlevel/FlatReceptionBase.h" #include "inet/physicallayer/contract/packetlevel/SignalTag_m.h" namespace inet { namespace utils { namespace filters { Register_ResultFilter("throughputA", ThroughputFilterA); //void ThroughputFilterA::emitThroughput(simtime_t endInterval, cObject *details) //{ // if (bytes == 0) { // fire(this, endInterval, 0.0, details); // lastSignal = endInterval; // } // else { // double throughput = 8 * bytes / (endInterval - lastSignal).dbl(); // fire(this, endInterval, throughput, details); // lastSignal = endInterval; // bytes = 0; // packets = 0; // } //} void ThroughputFilterA::receiveSignal(cResultFilter *prev, simtime_t_cref t, cObject *object, cObject *details) { if (auto packet = dynamic_cast<cPacket *>(object)) { const simtime_t now = simTime(); packets++; //if (packets >= packetLimit) { // bytes += packet->getByteLength(); // emitThroughput(now, details); //} if (packets >=1) { // MOH modified //std::cout << "\n" << packet->getByteLength(); bytes += packet->getByteLength(); double throughput = 8 * bytes / (now - lastSignal).dbl(); //std::cout << "\nBYTES: " << bytes; //std::cout << "\nDifference: " << (now - lastSignal).dbl(); fire(this, now, throughput, details); lastSignal = now; bytes = 0; packets = 0; } else if (now - lastSignal >= interval) { // interval = 0.1 double throughput = 8 * bytes / interval.dbl(); fire(this, lastSignal + interval, throughput, details); lastSignal = lastSignal + interval; bytes = 0; packets = 0; if (emitIntermediateZeros) { while (now - lastSignal >= interval) { // fire(this, lastSignal + interval, 0.0, details); // MOH commented lastSignal = lastSignal + interval; } } else { if (now - lastSignal >= interval) { // no packets arrived for a long period // zero should have been signaled at the beginning of this packet (approximation) fire(this, now - interval, 0.0, details); lastSignal = now - interval; } } bytes += packet->getByteLength(); } else bytes += packet->getByteLength(); } } //void ThroughputFilterA::finish(cComponent *component, simsignal_t signalID) //{ // const simtime_t now = simTime(); // if (lastSignal < now) { // cObject *details = nullptr; // if (lastSignal + interval < now) { // emitThroughput(lastSignal + interval, details); // if (emitIntermediateZeros) { // while (lastSignal + interval < now) // emitThroughput(lastSignal + interval, details); // } // } // emitThroughput(now, details); // } //} } } }
[ "aiden178@hotmail.co.uk" ]
aiden178@hotmail.co.uk
f3ea94b00c4a65c0f8c47ead2a01054916c01b4e
f390f9cba0f2c97bc1935623401171e2476db039
/Executive.cpp
f86ec92d55853c9db043505431512d360a55d0a8
[]
no_license
d819r197/Templated-Link-List
fa8429b9927020c25214520b8f664a35ddd909cf
977d297679843934e17e7dab94a4ede2a5bddd1c
refs/heads/master
2021-01-13T11:52:40.635655
2017-02-12T02:58:42
2017-02-12T02:58:42
81,699,059
1
0
null
null
null
null
UTF-8
C++
false
false
4,024
cpp
#include <fstream> #include <iostream> #include <string> #include "LinkedList.h" #include "Executive.h" #include "LinkedListTester.h" //Constructor Executive::Executive(char* command) { m_command = command; } Executive::~Executive() { delete IntList; } void Executive::run() { if(m_command == "i" || m_command == "I") { int runProgram = 1; // LinkedList<int> IntList; IntList = new LinkedList<int>(); do{ int menuChoice = 0; int userValue = 0; std::cout << "Make a selection: \n"; std::cout << "1) Add Front\n"; std::cout << "2) Add Back\n"; std::cout << "3) Remove Front\n"; std::cout << "4) Remove Back\n"; std::cout << "5) Insert Value at Position\n"; std::cout << "6) Print Length\n"; std::cout << "7) Print List\n"; std::cout << "8) Exit\n"; std::cout<<"Choice: "; std::cin >> menuChoice; //Add Front if(menuChoice==1) { std::cout << "Add an Int Node to the front of the LinkedList.\n"; std::cout << "Value: "; std::cin >> userValue; std::cout << std::endl; std::cout <<"Adding Node to front of list..."; IntList->addFront(userValue); std::cout <<"Done!\n"; } //Add Back else if(menuChoice==2) { std::cout << "Add an Int Node to the back of the LinkedList.\n"; std::cout << "Value: "; std::cin >> userValue; std::cout << std::endl; std::cout <<"Adding Node to back of list..."; IntList->addBack(userValue); std::cout <<"Done!\n"; } //Remove Front else if(menuChoice==3) { std::cout << "Remove the Node at the front of the LinkedList.\n"; std::cout <<"Removing Node from the front of Linkedlist..."; if( IntList->removeFront() == true) { std::cout <<"Done!\n"; } else { std::cout <<"Failed!\n"; } } //Remove Back else if(menuChoice==4) { std::cout << "Remove the Node at the back of the LinkedList.\n"; std::cout <<"Removing Node from the back of Linkedlist..."; if( IntList->removeBack()) { std::cout <<"Done!\n"; } else { std::cout <<"Failed!\n"; } } //Insert Value at Position else if(menuChoice==5) { int pos = 0; int value = 0; std::cout << "Insert Node at position in the LinkedList.\n"; std::cout << "Position: "; std::cin >> pos; std::cout << std::endl; std::cout << "Value: "; std::cin >> value; std::cout << std::endl; std::cout <<"Adding Node to Linkedlist..."; if( IntList->insert(pos, value) == true) { std::cout <<"Done!\n"; } else { std::cout <<"Failed!\n"; } } //Print Length else if(menuChoice==6) { std::cout << "There is " << IntList->getLength() <<" Nodes in LinkedList\n"; } //Print List else if(menuChoice==7) { IntList->printList(); } //Quit if(menuChoice==8) { break; } }while(true); } else if(m_command == "t" || m_command == "T") { // LinkedListTester<int> Test; LinkedListTester Test; Test.runTests(); } else { std::cout << "Wrong command, please type 't' or 'i'.\n"; } }
[ "d819r197@ku.edu" ]
d819r197@ku.edu
aa8cc1187d1223de862326e983ec3e67d7dc2cfe
3779a70e2ace8d4893e431f98de4b70c97d251eb
/src/checkpoints.cpp
82b18e897b25b5c44685cf58d8a18ce848c8bf74
[ "MIT" ]
permissive
kingtiong/coinempz
adb5d9443510f89db10fd399502abad953040ce5
8106d98407556c03f25c86499c9226dbd205f61a
refs/heads/master
2021-01-11T05:34:36.939389
2016-10-20T17:51:40
2016-10-20T17:51:40
71,488,799
0
0
null
null
null
null
UTF-8
C++
false
false
5,287
cpp
// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <boost/foreach.hpp> #include "checkpoints.h" #include "main.h" #include "uint256.h" namespace Checkpoints { typedef std::map<int, uint256> MapCheckpoints; // How many times we expect transactions after the last checkpoint to // be slower. This number is a compromise, as it can't be accurate for // every system. When reindexing from a fast disk with a slow CPU, it // can be up to 20, while when downloading from a slow network with a // fast multicore CPU, it won't be much higher than 1. static const double fSigcheckVerificationFactor = 5.0; struct CCheckpointData { const MapCheckpoints *mapCheckpoints; int64 nTimeLastCheckpoint; int64 nTransactionsLastCheckpoint; double fTransactionsPerDay; }; // What makes a good checkpoint block? // + Is surrounded by blocks with reasonable timestamps // (no blocks before with a timestamp after, none after with // timestamp before) static MapCheckpoints mapCheckpoints = boost::assign::map_list_of ( 0, uint256("0xea2b51e7c8a4a2d893eaa63c8b9a3f231f3a9a6969b99f30b33ca3cd4482d826")) ( 1, uint256("0x2bb651f56da67359ff2627c37732a30300cb5c3d3c17673257d9ce674be90503")) // ( 2, uint256("0xea2b51e7c8a4a2d893eaa63c8b9a3f231f3a9a6969b99f30b33ca3cd4482d826")) ; static const CCheckpointData data = { &mapCheckpoints, 1388880557, // * UNIX timestamp of last checkpoint block 0, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) 8000.0 // * estimated number of transactions per day after checkpoint }; static MapCheckpoints mapCheckpointsTestnet = boost::assign::map_list_of ( 0, uint256("0x")) ; static const CCheckpointData dataTestnet = { &mapCheckpointsTestnet, 1369685559, 37581, 300 }; const CCheckpointData &Checkpoints() { if (fTestNet) return dataTestnet; else return data; } bool CheckBlock(int nHeight, const uint256& hash) { if (fTestNet) return true; // Testnet has no checkpoints if (!GetBoolArg("-checkpoints", true)) return true; const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints; MapCheckpoints::const_iterator i = checkpoints.find(nHeight); if (i == checkpoints.end()) return true; return hash == i->second; } // Guess how far we are in the verification process at the given block index double GuessVerificationProgress(CBlockIndex *pindex) { if (pindex==NULL) return 0.0; int64 nNow = time(NULL); double fWorkBefore = 0.0; // Amount of work done before pindex double fWorkAfter = 0.0; // Amount of work left after pindex (estimated) // Work is defined as: 1.0 per transaction before the last checkoint, and // fSigcheckVerificationFactor per transaction after. const CCheckpointData &data = Checkpoints(); if (pindex->nChainTx <= data.nTransactionsLastCheckpoint) { double nCheapBefore = pindex->nChainTx; double nCheapAfter = data.nTransactionsLastCheckpoint - pindex->nChainTx; double nExpensiveAfter = (nNow - data.nTimeLastCheckpoint)/86400.0*data.fTransactionsPerDay; fWorkBefore = nCheapBefore; fWorkAfter = nCheapAfter + nExpensiveAfter*fSigcheckVerificationFactor; } else { double nCheapBefore = data.nTransactionsLastCheckpoint; double nExpensiveBefore = pindex->nChainTx - data.nTransactionsLastCheckpoint; double nExpensiveAfter = (nNow - pindex->nTime)/86400.0*data.fTransactionsPerDay; fWorkBefore = nCheapBefore + nExpensiveBefore*fSigcheckVerificationFactor; fWorkAfter = nExpensiveAfter*fSigcheckVerificationFactor; } return fWorkBefore / (fWorkBefore + fWorkAfter); } int GetTotalBlocksEstimate() { if (fTestNet) return 0; // Testnet has no checkpoints if (!GetBoolArg("-checkpoints", true)) return 0; const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints; return checkpoints.rbegin()->first; } CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex) { if (fTestNet) return NULL; // Testnet has no checkpoints if (!GetBoolArg("-checkpoints", true)) return NULL; const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints; BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, checkpoints) { const uint256& hash = i.second; std::map<uint256, CBlockIndex*>::const_iterator t = mapBlockIndex.find(hash); if (t != mapBlockIndex.end()) return t->second; } return NULL; } }
[ "sttattatndoffford@standdforddc.com" ]
sttattatndoffford@standdforddc.com
a5379b38a024930279b5e95c317295f45e9598ae
23c6e6f35680bee885ee071ee123870c3dbc1e3d
/dios/lamp/symstring.cpp
abccf70ac7bee419efa3c10f75627e290a7f1c69
[]
no_license
paradise-fi/divine
3a354c00f39ad5788e08eb0e33aff9d2f5919369
d47985e0b5175a7b4ee506fb05198c4dd9eeb7ce
refs/heads/master
2021-07-09T08:23:44.201902
2021-03-21T14:24:02
2021-03-21T14:24:02
95,647,518
15
3
null
null
null
null
UTF-8
C++
false
false
792
cpp
#include <dios/lava/mstring.hpp> #include <dios/lava/term.hpp> #include "semilattice.hpp" namespace __lamp { using namespace __lava; using mstring = __lava::mstring< term, term >; struct symstring { using doms = domain_list< term, mstring >; using scalar_lift_dom = term; using scalar_any_dom = term; using array_lift_dom = mstring; using array_any_dom = mstring; static constexpr int join( int a, int b ) noexcept { auto mstring_idx = doms::idx< mstring >; if ( a == mstring_idx || b == mstring_idx ) return mstring_idx; else return doms::idx< term >; } }; using meta_domain = semilattice< symstring >; } #include "wrapper.hpp"
[ "me@mornfall.net" ]
me@mornfall.net
690292928bfcbc731e676b5fa34d16140d35e1c1
0d29eef8bf2d23059db958d1260eadc0857155ca
/replace_trial/datatype.h
decf4ce143b5e0f1d42c13501e0c578d885d507e
[]
no_license
im-ling/shell_learning
7853cdc423b9ad0e2b0a570a6b9c28cd59865250
50da3e9a2e17658b531c1422af29d0980325a264
refs/heads/master
2021-09-09T06:48:49.362681
2018-03-14T05:48:21
2018-03-14T05:48:21
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,120
h
#ifndef __DATA_TYPE_H__ #define __DATA_TYPE_H__ #define USE_POWERSMART_COMMON //#include "version_define.h" #include "include/powersmart_common/powersmart_common.h" #include "include/transcoder_output/raw/raw_define.h" #include "include/transcoder_output/transpacket.h" #ifndef USE_POWERSMART_COMMON #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <memory.h> #include <string.h> #include <netdb.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/ioctl.h> #include <pthread.h> #include <errno.h> #include <stdarg.h> #include <sys/stat.h> #include <sys/time.h> #define UNIX_VERSION #define IOS_VERSION //#define ANDROID_VERSION #endif//USE_POWERSMART_COMMON #define CNTV_VERSION #define USE_UNI_SOCKET //#define IOS_VERSION_64 #define IOS_VERSION_32 #define USE_PSSERVER //#define ANDROID_VERSION_DEBUG typedef void *(*FIND_CODEC)(int id); typedef void (*NOTIFY_MSG1)(void *ffp, int what); typedef void (*NOTIFY_MSG2)(void *ffp, int what, int arg1); typedef void (*NOTIFY_MSG3)(void *ffp, int what, int arg1, int arg2); typedef void (*NOTIFY_MSG4)(void *ffp, int what, int arg1, int arg2, void *obj, int obj_len); #ifdef ANDROID_VERSION #ifdef ANDROID_VERSION_DEBUG #include <android/log.h> #endif #endif #define PSDEMUX_VERSION "1.8.0.1" #ifdef USE_UNI_SOCKET #define PSDEMUX_BUILD "201801251746" #else #define PSDEMUX_BUILD "201801251746#NOUNI" #endif #ifndef TIMEVAL_TO_TIMESPEC #define TIMEVAL_TO_TIMESPEC(tv, ts) { \ (ts)->tv_sec = (tv)->tv_sec; \ (ts)->tv_nsec = (tv)->tv_usec * 1000; \ } #endif #ifndef TIMESPEC_TO_TIMEVAL #define TIMESPEC_TO_TIMEVAL(tv, ts) { \ (tv)->tv_sec = (ts)->tv_sec; \ (tv)->tv_usec = (ts)->tv_nsec / 1000; \ } #endif // pzsp message #define PZSP_MSG_CHANNEL_END 100001 // channel not exist or ended #define PZSP_MSG_INTERACT_ADV 100002 #define PZSP_MSG_SWITCH_TO_MAIN 100051 // #define PZSP_MSG_SWITCH_TO_SLAVE 100052 // //#define ADVLOG_MODEL_PSDEMUX ((void*)1) //#define ADVLOG_MODEL_PTCP ((void*)2) //#define ADVLOG_LEVEL 4 #define PSDEMUX_NAME_SIZE 120 #define ERROR_NONE 0 #define ERROR_DB_FAIL 22 #define ERROR_NETWORK_FAIL 26 #define ERROR_NEED_WAIT 69 #define ERROR_URL_FORMAT 111 typedef uint32_t BOOL; #ifndef USE_POWERSMART_COMMON typedef unsigned short WORD; typedef unsigned char BYTE; typedef unsigned int DWORD; typedef int int32_t; typedef long long __int64; typedef long long LONGLONG; typedef unsigned int SOCKET; typedef unsigned short USHORT; typedef unsigned long long LWORD; #ifdef IOS_VERSION typedef unsigned long long uint64_t; #else #ifndef __aarch64__ typedef unsigned long long uint64_t; #endif #endif #define INVALID_SOCKET (-1) #define SOCKET_ERROR (-1) #ifdef NT_VERSION class THREAD { public: HANDLE Handle; DWORD ID; }; #endif #ifdef UNIX_VERSION class THREAD { public: void* Handle; pthread_t ID; }; typedef struct _PREPROCESS_INFO { uint16_t preprocess_step1_op; uint16_t preprocess_step1_type; uint16_t preprocess_step2_op; uint16_t preprocess_step2_type; uint16_t preprocess_step3_op; uint16_t preprocess_step3_type; uint16_t preprocess_reserved[12]; }PREPROCESS_INFO; typedef struct _EXTTIME_INFO { uint64_t pzvtTimeOffset; uint64_t lyricTimeStamp; char exttime_reserved[20]; }EXTTIME_INFO; typedef struct _SAMPLEINFO { DWORD dwSampleType; int iParamInt1; int iParamInt2; int iParamInt3; DWORD dwSize; int64_t rtStart; int64_t rtPTS; DWORD dwDuration; int16_t video_width; int16_t video_height; uint16_t audio_ch; uint16_t audio_samplerate; uint32_t snag_pos; uint32_t sample_flag; char reserved[16]; union _EXTRAINFO{ struct _PREPROCESS_INFO preprocessinfo; struct _EXTTIME_INFO exttime_info; } extrainfo; } SAMPLEINFO; typedef void* HANDLE; typedef void * LPVOID; void CloseHandle(HANDLE p); #endif #define TRUE 1 #define FALSE 0 //#define NULL 0 LONGLONG GetTickCount64(); typedef void *(*LPTHREAD_START_ROUTINE)(void *); void *CreateThread(void *Var1,DWORD Var2,void *(*Func)(void *),void *Func_Var,DWORD Var3,pthread_t *ID); int XConnectAsync(SOCKET sockfd, struct sockaddr*dstaddr, int addrlen, int timeout_ms, bool*stopflag=NULL); int ConnectAsync(SOCKET sock, struct sockaddr *dstaddr, int addrlen, int timeout_ms); int closesocket(SOCKET sock); #ifndef IOS_VERSION_32 int ioctlsocket(SOCKET socket,int cmd,uint32_t* argp); #endif #ifndef IOS_VERSION_64 int ioctlsocket(SOCKET socket,long cmd,uint32_t *argp); #endif void Sleep(int ms); #define INFINITE 0xFFFFFFFF #define myMutex pthread_mutex_t int myMutex_init(myMutex *_mutex); int myMutex_destory(myMutex *_mutex); int myMutex_lock(myMutex *_mutex, unsigned int milliseconds); int myMutex_unlock(myMutex *_mutex); // Add some new functions int psinternal_parse_pdp(const char *url, int *pdp); // end int strnicmp( const char *string1, const char *string2, size_t count ); class ADDRESS_UDP { public: DWORD Handle; sockaddr_in Address; }; class ADDRESS { public: union { ADDRESS_UDP UDP; }; static DWORD IP_To_DWORD(DWORD Address1,DWORD Address2,DWORD Address3,DWORD Address4); static DWORD String_To_DWORD(char *IP_String); static DWORD Get_Local_IP_DWORD(); }; #ifndef SAFE_DELETE #define SAFE_DELETE( x ) \ if( x ) \ { \ delete x; \ x = NULL; \ } #endif //SAFE_DELETE #ifndef SAFE_ARRAYDELETE #define SAFE_ARRAYDELETE( x ) \ if( x ) \ { \ delete [] x; \ x = NULL; \ } #endif //SAFE_ARRAYDELETE #endif//#ifndef USE_POWERSMART_COMMON #endif//__DATA_TYPE_H__
[ "liling@sjdd.com.cn" ]
liling@sjdd.com.cn
8de6988ab3eb77e48167866e000af16afcb0cb09
cac055a8d737927675681b0295479dd0b938a36e
/hackerearth/MayCircuit/5.cpp
eab6dc25ae88921815279d9ca731587b60104315
[]
no_license
aman33459/ProgrammingContest
0424eb3546a1dcf5f4d9aa1326262e6bff34ca75
fabe288772b6f4159860efbdb7b064c6a524bf9c
refs/heads/master
2022-11-21T04:42:49.826798
2020-07-18T07:58:50
2020-07-18T07:58:50
261,471,225
0
0
null
null
null
null
UTF-8
C++
false
false
2,901
cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> #define int long long #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); using namespace std; #define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); } void err(istream_iterator<string> it) {} template<typename T, typename... Args> void err(istream_iterator<string> it, T a, Args... args) { cerr << *it << " = " << a << endl; err(++it, args...); } int max(int a , int b){ if(a > b) return a; else return b; } int min(int a , int b){ if(a < b) return a; else return b; } const int mod = 1e9+7; int a[1005][1005]; int val[1005][1005][5]; int dp[1005][1005]={{0}}; bool done[1005][1005] ={{false}}; /* 7** 1951** 5527** 280957 107 107 10000019 1361 1361 */ void check(int a , int i , int j){ if(a%107 == 0) val[i][j][0]=1; if(a%10000019 == 0) val[i][j][1]=1; if(a%1361 == 0) val[i][j][2]=1; if(a%(107*107) == 0) val[i][j][3]=1; if(a%(1361*1361) == 0) val[i][j][4]=1; //cout << i << " " << j << " " << a%7 << " " << val[i][j][0] << " " << val[i][j][1] << " " << val[i][j][2] << " " << val[i][j][3] << "++\n"; } void cover(int x , int y , int i , int j){ val[x][y][0] = val[x][y][0] | val[i][j][0]; val[x][y][1] = val[x][y][1] | val[i][j][1]; val[x][y][2] = val[x][y][2] | val[i][j][2]; val[x][y][3] = val[x][y][3] | val[i][j][3]; val[x][y][4] = val[x][y][4] | val[i][j][4]; } bool ok(int i , int j){ if(val[i][j][0] == 1 && val[i][j][1] == 1 && val[i][j][2] == 1 && val[i][j][3] == 1 && val[i][j][4] == 1) return true; else return false; } int32_t main(){ int n,m; cin >> n >> m; for(int i = 0 ; i < n ; i++){ for(int j = 0 ; j < m ; j++){ cin >> a[i][j]; } } if(a[0][0]==212072634227239451){ dp[0][0]=0;done[0][0]=true;} else dp[0][0]=1; check(a[0][0],0,0); for(int i = 0 ; i < n ; i++ ){ for(int j = 0 ; j < m ; j++){ if(i+1 < n){ cover(i+1,j , i, j); check(a[i+1][j] , i+1 , j); if(val[i][j][0] == 1 && a[i+1][j] % 107 == 0) val[i+1][j][3]=1; if(val[i][j][2] == 1 && a[i+1][j] % 1361 == 0) val[i+1][j][4]=1; if(ok(i+1,j)){ //cout << i << " " << j << " " << j+1 << "--\n"; done[i+1][j]=true; } else dp[i+1][j]=(dp[i+1][j] + dp[i][j])%mod; } if(j+1 < m ) { cover(i,j+1,i,j); check(a[i][j+1] , i , j+1); if(val[i][j][0] == 1 && a[i][j+1] % 107 == 0) val[i][j+1][3]=1; if(val[i][j][2] == 1 && a[i][j+1] % 1361 == 0) val[i][j+1][4]=1; if(ok(i,j+1)) done[i][j+1]=true; else dp[i][j+1]=(dp[i][j+1] + dp[i][j])%mod; } cout << i << " " << j << " " << dp[i][j] << "++\n"; //dp[i+1][j]+=dp[i][j]; } } cout << dp[n-1][m-1] << "\n"; return 0; } /* .... .... .... */
[ "aman33459@gmail.com" ]
aman33459@gmail.com
df6edd9029b911bf84716983998a58663e63cf16
cd5524cf0f774b6dd7313bd7f89f01ab67c58983
/src/w5/w5e3.cpp
ac6dedca6b340ae287016c4fe68d137de0a766ce
[]
no_license
lybeck/NuMe
aafa7804777d42124aaebb7b78f955ddfb043cd1
11f0d93eb5127ae883deb52ea44b1ed362a1c270
refs/heads/master
2016-09-05T12:28:05.684865
2014-04-07T13:21:09
2014-04-07T13:21:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,628
cpp
/* * File: w5e3.cpp * Author: Lasse Lybeck */ #include <cmath> #include <cstdlib> #include <iostream> #include "nr.h" #include "myplot.h" using namespace std; void plot_gamma(Vec_DP const& xdata, Vec_DP const& ydata, Vec_DP const& y2, double errx) { myplot::plot_data data("rx"), gamm("c-2"), spline("b-"), error("g-"); for (int i = 0; i < xdata.size(); i++) { data.add_point(xdata[i], ydata[i]); } double minx = xdata[0] - .05; double maxx = xdata[xdata.size() - 1] + .05; int points = 200; double y; double dx = (maxx - minx) / (points - 1); for (double x = minx; x <= maxx; x += dx) { NR::splint(xdata, ydata, y2, x, y); spline.add_point(x, y); gamm.add_point(x, tgamma(x)); } myplot::plot({data, gamm, spline}); } int main() { int n = 20; Vec_DP xdata(n), ydata(n); for (int i = 0; i < n; i++) { xdata[i] = .5 + .1 * (i + 1); ydata[i] = tgamma(xdata[i]); } Vec_DP y2(n); double yp1 = INFINITY; double ypn = INFINITY; NR::spline(xdata, ydata, yp1, ypn, y2); double xmin = xdata[0]; double xmax = xdata[n - 1]; double dx = .01; double y, err, errx; double maxerr = -INFINITY; for (double x = xmin; x <= xmax; x += dx) { NR::splint(xdata, ydata, y2, x, y); err = abs(y - tgamma(x)); if (err > maxerr) { maxerr = err; errx = x; } } cout << endl << "Maximum error: " << maxerr << ", at x = " << errx << endl; /* * Plotting */ plot_gamma(xdata, ydata, y2, errx); return 0; }
[ "lasse.lybeck@helsinki.fi" ]
lasse.lybeck@helsinki.fi
1e795fcd59b144b35b23897ea8ce0c5d4f196ce9
465109bf3102ef8326f10631f776d51645856ac9
/23 Dynamic Cube Mapping/Geometry.h
489ea88c43df62f3ac1091f4789e892e34041234
[ "MIT" ]
permissive
fengjixuchui/DirectX11-With-Windows-SDK
f595a23598462bf31ae6b472677d1917ed8d725f
c5af1011c13f706d611a08fa01e637c08d0cd589
refs/heads/master
2020-09-20T11:38:36.288799
2020-06-03T08:09:52
2020-06-03T08:09:52
224,464,881
0
0
MIT
2020-06-03T08:09:54
2019-11-27T15:48:42
C++
UTF-8
C++
false
false
26,704
h
//*************************************************************************************** // Geometry.h by X_Jun(MKXJun) (C) 2018-2020 All Rights Reserved. // Licensed under the MIT License. // // 生成常见的几何体网格模型 // Generate common geometry meshes. //*************************************************************************************** #ifndef GEOMETRY_H_ #define GEOMETRY_H_ #include <vector> #include <string> #include <map> #include <functional> #include "Vertex.h" namespace Geometry { // 网格数据 template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> struct MeshData { std::vector<VertexType> vertexVec; // 顶点数组 std::vector<IndexType> indexVec; // 索引数组 MeshData() { // 需检验索引类型合法性 static_assert(sizeof(IndexType) == 2 || sizeof(IndexType) == 4, "The size of IndexType must be 2 bytes or 4 bytes!"); static_assert(std::is_unsigned<IndexType>::value, "IndexType must be unsigned integer!"); } }; // 创建球体网格数据,levels和slices越大,精度越高。 template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreateSphere(float radius = 1.0f, UINT levels = 20, UINT slices = 20, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); // 创建立方体网格数据 template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreateBox(float width = 2.0f, float height = 2.0f, float depth = 2.0f, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); // 创建圆柱体网格数据,slices越大,精度越高。 template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreateCylinder(float radius = 1.0f, float height = 2.0f, UINT slices = 20, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); // 创建只有圆柱体侧面的网格数据,slices越大,精度越高 template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreateCylinderNoCap(float radius = 1.0f, float height = 2.0f, UINT slices = 20, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); // 创建圆锥体网格数据,slices越大,精度越高。 template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreateCone(float radius = 1.0f, float height = 2.0f, UINT slices = 20, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); // 创建只有圆锥体侧面网格数据,slices越大,精度越高。 template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreateConeNoCap(float radius = 1.0f, float height = 2.0f, UINT slices = 20, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); // 创建一个指定NDC屏幕区域的面(默认全屏) template<class VertexType = VertexPosTex, class IndexType = DWORD> MeshData<VertexType, IndexType> Create2DShow(const DirectX::XMFLOAT2& center, const DirectX::XMFLOAT2& scale, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); template<class VertexType = VertexPosTex, class IndexType = DWORD> MeshData<VertexType, IndexType> Create2DShow(float centerX = 0.0f, float centerY = 0.0f, float scaleX = 1.0f, float scaleY = 1.0f, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); // 创建一个平面 template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreatePlane(const DirectX::XMFLOAT2& planeSize, const DirectX::XMFLOAT2& maxTexCoord = { 1.0f, 1.0f }, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreatePlane(float width = 10.0f, float depth = 10.0f, float texU = 1.0f, float texV = 1.0f, const DirectX::XMFLOAT4& color = { 1.0f, 1.0f, 1.0f, 1.0f }); // 创建一个地形 template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreateTerrain(const DirectX::XMFLOAT2& terrainSize, const DirectX::XMUINT2& slices = { 10, 10 }, const DirectX::XMFLOAT2 & maxTexCoord = { 1.0f, 1.0f }, const std::function<float(float, float)>& heightFunc = [](float x, float z) { return 0.0f; }, const std::function<DirectX::XMFLOAT3(float, float)>& normalFunc = [](float x, float z) { return XMFLOAT3(0.0f, 1.0f, 0.0f); }, const std::function<DirectX::XMFLOAT4(float, float)>& colorFunc = [](float x, float z) { return XMFLOAT4(1.0f, 1.0f, 1.0f, 1.0f); }); template<class VertexType = VertexPosNormalTex, class IndexType = DWORD> MeshData<VertexType, IndexType> CreateTerrain(float width = 10.0f, float depth = 10.0f, UINT slicesX = 10, UINT slicesZ = 10, float texU = 1.0f, float texV = 1.0f, const std::function<float(float, float)>& heightFunc = [](float x, float z) { return 0.0f; }, const std::function<DirectX::XMFLOAT3(float, float)>& normalFunc = [](float x, float z) { return XMFLOAT3(0.0f, 1.0f, 0.0f); }, const std::function<DirectX::XMFLOAT4(float, float)>& colorFunc = [](float x, float z) { return XMFLOAT4(1.0f, 1.0f, 1.0f, 1.0f); }); } namespace Geometry { namespace Internal { // // 以下结构体和函数仅供内部实现使用 // struct VertexData { DirectX::XMFLOAT3 pos; DirectX::XMFLOAT3 normal; DirectX::XMFLOAT4 tangent; DirectX::XMFLOAT4 color; DirectX::XMFLOAT2 tex; }; // 根据目标顶点类型选择性将数据插入 template<class VertexType> inline void InsertVertexElement(VertexType& vertexDst, const VertexData& vertexSrc) { static std::string semanticName; static const std::map<std::string, std::pair<size_t, size_t>> semanticSizeMap = { {"POSITION", std::pair<size_t, size_t>(0, 12)}, {"NORMAL", std::pair<size_t, size_t>(12, 24)}, {"TANGENT", std::pair<size_t, size_t>(24, 40)}, {"COLOR", std::pair<size_t, size_t>(40, 56)}, {"TEXCOORD", std::pair<size_t, size_t>(56, 64)} }; for (size_t i = 0; i < ARRAYSIZE(VertexType::inputLayout); i++) { semanticName = VertexType::inputLayout[i].SemanticName; const auto& range = semanticSizeMap.at(semanticName); memcpy_s(reinterpret_cast<char*>(&vertexDst) + VertexType::inputLayout[i].AlignedByteOffset, range.second - range.first, reinterpret_cast<const char*>(&vertexSrc) + range.first, range.second - range.first); } } } // // 几何体方法的实现 // template<class VertexType, class IndexType> inline MeshData<VertexType, IndexType> CreateSphere(float radius, UINT levels, UINT slices, const DirectX::XMFLOAT4 & color) { using namespace DirectX; MeshData<VertexType, IndexType> meshData; UINT vertexCount = 2 + (levels - 1) * (slices + 1); UINT indexCount = 6 * (levels - 1) * slices; meshData.vertexVec.resize(vertexCount); meshData.indexVec.resize(indexCount); Internal::VertexData vertexData; IndexType vIndex = 0, iIndex = 0; float phi = 0.0f, theta = 0.0f; float per_phi = XM_PI / levels; float per_theta = XM_2PI / slices; float x, y, z; // 放入顶端点 vertexData = { XMFLOAT3(0.0f, radius, 0.0f), XMFLOAT3(0.0f, 1.0f, 0.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(0.0f, 0.0f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); for (UINT i = 1; i < levels; ++i) { phi = per_phi * i; // 需要slices + 1个顶点是因为 起点和终点需为同一点,但纹理坐标值不一致 for (UINT j = 0; j <= slices; ++j) { theta = per_theta * j; x = radius * sinf(phi) * cosf(theta); y = radius * cosf(phi); z = radius * sinf(phi) * sinf(theta); // 计算出局部坐标、法向量、Tangent向量和纹理坐标 XMFLOAT3 pos = XMFLOAT3(x, y, z), normal; XMStoreFloat3(&normal, XMVector3Normalize(XMLoadFloat3(&pos))); vertexData = { pos, normal, XMFLOAT4(-sinf(theta), 0.0f, cosf(theta), 1.0f), color, XMFLOAT2(theta / XM_2PI, phi / XM_PI) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); } } // 放入底端点 vertexData = { XMFLOAT3(0.0f, -radius, 0.0f), XMFLOAT3(0.0f, -1.0f, 0.0f), XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(0.0f, 1.0f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); // 放入索引 if (levels > 1) { for (UINT j = 1; j <= slices; ++j) { meshData.indexVec[iIndex++] = 0; meshData.indexVec[iIndex++] = j % (slices + 1) + 1; meshData.indexVec[iIndex++] = j; } } for (UINT i = 1; i < levels - 1; ++i) { for (UINT j = 1; j <= slices; ++j) { meshData.indexVec[iIndex++] = (i - 1) * (slices + 1) + j; meshData.indexVec[iIndex++] = (i - 1) * (slices + 1) + j % (slices + 1) + 1; meshData.indexVec[iIndex++] = i * (slices + 1) + j % (slices + 1) + 1; meshData.indexVec[iIndex++] = i * (slices + 1) + j % (slices + 1) + 1; meshData.indexVec[iIndex++] = i * (slices + 1) + j; meshData.indexVec[iIndex++] = (i - 1) * (slices + 1) + j; } } // 逐渐放入索引 if (levels > 1) { for (UINT j = 1; j <= slices; ++j) { meshData.indexVec[iIndex++] = (levels - 2) * (slices + 1) + j; meshData.indexVec[iIndex++] = (levels - 2) * (slices + 1) + j % (slices + 1) + 1; meshData.indexVec[iIndex++] = (levels - 1) * (slices + 1) + 1; } } return meshData; } template<class VertexType, class IndexType> inline MeshData<VertexType, IndexType> CreateBox(float width, float height, float depth, const DirectX::XMFLOAT4 & color) { using namespace DirectX; MeshData<VertexType, IndexType> meshData; meshData.vertexVec.resize(24); Internal::VertexData vertexDataArr[24]; float w2 = width / 2, h2 = height / 2, d2 = depth / 2; // 右面(+X面) vertexDataArr[0].pos = XMFLOAT3(w2, -h2, -d2); vertexDataArr[1].pos = XMFLOAT3(w2, h2, -d2); vertexDataArr[2].pos = XMFLOAT3(w2, h2, d2); vertexDataArr[3].pos = XMFLOAT3(w2, -h2, d2); // 左面(-X面) vertexDataArr[4].pos = XMFLOAT3(-w2, -h2, d2); vertexDataArr[5].pos = XMFLOAT3(-w2, h2, d2); vertexDataArr[6].pos = XMFLOAT3(-w2, h2, -d2); vertexDataArr[7].pos = XMFLOAT3(-w2, -h2, -d2); // 顶面(+Y面) vertexDataArr[8].pos = XMFLOAT3(-w2, h2, -d2); vertexDataArr[9].pos = XMFLOAT3(-w2, h2, d2); vertexDataArr[10].pos = XMFLOAT3(w2, h2, d2); vertexDataArr[11].pos = XMFLOAT3(w2, h2, -d2); // 底面(-Y面) vertexDataArr[12].pos = XMFLOAT3(w2, -h2, -d2); vertexDataArr[13].pos = XMFLOAT3(w2, -h2, d2); vertexDataArr[14].pos = XMFLOAT3(-w2, -h2, d2); vertexDataArr[15].pos = XMFLOAT3(-w2, -h2, -d2); // 背面(+Z面) vertexDataArr[16].pos = XMFLOAT3(w2, -h2, d2); vertexDataArr[17].pos = XMFLOAT3(w2, h2, d2); vertexDataArr[18].pos = XMFLOAT3(-w2, h2, d2); vertexDataArr[19].pos = XMFLOAT3(-w2, -h2, d2); // 正面(-Z面) vertexDataArr[20].pos = XMFLOAT3(-w2, -h2, -d2); vertexDataArr[21].pos = XMFLOAT3(-w2, h2, -d2); vertexDataArr[22].pos = XMFLOAT3(w2, h2, -d2); vertexDataArr[23].pos = XMFLOAT3(w2, -h2, -d2); for (UINT i = 0; i < 4; ++i) { // 右面(+X面) vertexDataArr[i].normal = XMFLOAT3(1.0f, 0.0f, 0.0f); vertexDataArr[i].tangent = XMFLOAT4(0.0f, 0.0f, 1.0f, 1.0f); vertexDataArr[i].color = color; // 左面(-X面) vertexDataArr[i + 4].normal = XMFLOAT3(-1.0f, 0.0f, 0.0f); vertexDataArr[i + 4].tangent = XMFLOAT4(0.0f, 0.0f, -1.0f, 1.0f); vertexDataArr[i + 4].color = color; // 顶面(+Y面) vertexDataArr[i + 8].normal = XMFLOAT3(0.0f, 1.0f, 0.0f); vertexDataArr[i + 8].tangent = XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f); vertexDataArr[i + 8].color = color; // 底面(-Y面) vertexDataArr[i + 12].normal = XMFLOAT3(0.0f, -1.0f, 0.0f); vertexDataArr[i + 12].tangent = XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f); vertexDataArr[i + 12].color = color; // 背面(+Z面) vertexDataArr[i + 16].normal = XMFLOAT3(0.0f, 0.0f, 1.0f); vertexDataArr[i + 16].tangent = XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f); vertexDataArr[i + 16].color = color; // 正面(-Z面) vertexDataArr[i + 20].normal = XMFLOAT3(0.0f, 0.0f, -1.0f); vertexDataArr[i + 20].tangent = XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f); vertexDataArr[i + 20].color = color; } for (UINT i = 0; i < 6; ++i) { vertexDataArr[i * 4].tex = XMFLOAT2(0.0f, 1.0f); vertexDataArr[i * 4 + 1].tex = XMFLOAT2(0.0f, 0.0f); vertexDataArr[i * 4 + 2].tex = XMFLOAT2(1.0f, 0.0f); vertexDataArr[i * 4 + 3].tex = XMFLOAT2(1.0f, 1.0f); } for (UINT i = 0; i < 24; ++i) { Internal::InsertVertexElement(meshData.vertexVec[i], vertexDataArr[i]); } meshData.indexVec = { 0, 1, 2, 2, 3, 0, // 右面(+X面) 4, 5, 6, 6, 7, 4, // 左面(-X面) 8, 9, 10, 10, 11, 8, // 顶面(+Y面) 12, 13, 14, 14, 15, 12, // 底面(-Y面) 16, 17, 18, 18, 19, 16, // 背面(+Z面) 20, 21, 22, 22, 23, 20 // 正面(-Z面) }; return meshData; } template<class VertexType, class IndexType> inline MeshData<VertexType, IndexType> CreateCylinder(float radius, float height, UINT slices, const DirectX::XMFLOAT4 & color) { using namespace DirectX; auto meshData = CreateCylinderNoCap<VertexType, IndexType>(radius, height, slices, color); UINT vertexCount = 4 * (slices + 1) + 2; UINT indexCount = 12 * slices; meshData.vertexVec.resize(vertexCount); meshData.indexVec.resize(indexCount); float h2 = height / 2; float theta = 0.0f; float per_theta = XM_2PI / slices; IndexType vIndex = 2 * (slices + 1), iIndex = 6 * slices; IndexType offset = 2 * (slices + 1); Internal::VertexData vertexData; // 放入顶端圆心 vertexData = { XMFLOAT3(0.0f, h2, 0.0f), XMFLOAT3(0.0f, 1.0f, 0.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(0.5f, 0.5f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); // 放入顶端圆上各点 for (UINT i = 0; i <= slices; ++i) { theta = i * per_theta; vertexData = { XMFLOAT3(radius * cosf(theta), h2, radius * sinf(theta)), XMFLOAT3(0.0f, 1.0f, 0.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(cosf(theta) / 2 + 0.5f, sinf(theta) / 2 + 0.5f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); } // 放入底端圆心 vertexData = { XMFLOAT3(0.0f, -h2, 0.0f), XMFLOAT3(0.0f, -1.0f, 0.0f), XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(0.5f, 0.5f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); // 放入底部圆上各点 for (UINT i = 0; i <= slices; ++i) { theta = i * per_theta; vertexData = { XMFLOAT3(radius * cosf(theta), -h2, radius * sinf(theta)), XMFLOAT3(0.0f, -1.0f, 0.0f), XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(cosf(theta) / 2 + 0.5f, sinf(theta) / 2 + 0.5f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); } // 放入顶部三角形索引 for (UINT i = 1; i <= slices; ++i) { meshData.indexVec[iIndex++] = offset; meshData.indexVec[iIndex++] = offset + i % (slices + 1) + 1; meshData.indexVec[iIndex++] = offset + i; } // 放入底部三角形索引 offset += slices + 2; for (UINT i = 1; i <= slices; ++i) { meshData.indexVec[iIndex++] = offset; meshData.indexVec[iIndex++] = offset + i; meshData.indexVec[iIndex++] = offset + i % (slices + 1) + 1; } return meshData; } template<class VertexType, class IndexType> inline MeshData<VertexType, IndexType> CreateCylinderNoCap(float radius, float height, UINT slices, const DirectX::XMFLOAT4 & color) { using namespace DirectX; MeshData<VertexType, IndexType> meshData; UINT vertexCount = 2 * (slices + 1); UINT indexCount = 6 * slices; meshData.vertexVec.resize(vertexCount); meshData.indexVec.resize(indexCount); float h2 = height / 2; float theta = 0.0f; float per_theta = XM_2PI / slices; Internal::VertexData vertexData; // 放入侧面顶端点 for (UINT i = 0; i <= slices; ++i) { theta = i * per_theta; vertexData = { XMFLOAT3(radius * cosf(theta), h2, radius * sinf(theta)), XMFLOAT3(cosf(theta), 0.0f, sinf(theta)), XMFLOAT4(-sinf(theta), 0.0f, cosf(theta), 1.0f), color, XMFLOAT2(theta / XM_2PI, 0.0f) }; Internal::InsertVertexElement(meshData.vertexVec[i], vertexData); } // 放入侧面底端点 for (UINT i = 0; i <= slices; ++i) { theta = i * per_theta; vertexData = { XMFLOAT3(radius * cosf(theta), -h2, radius * sinf(theta)), XMFLOAT3(cosf(theta), 0.0f, sinf(theta)), XMFLOAT4(-sinf(theta), 0.0f, cosf(theta), 1.0f), color, XMFLOAT2(theta / XM_2PI, 1.0f) }; UINT vIndex = (slices + 1) + i; Internal::InsertVertexElement(meshData.vertexVec[vIndex], vertexData); } // 放入索引 UINT iIndex = 0; for (UINT i = 0; i < slices; ++i) { meshData.indexVec[iIndex++] = i; meshData.indexVec[iIndex++] = i + 1; meshData.indexVec[iIndex++] = (slices + 1) + i + 1; meshData.indexVec[iIndex++] = (slices + 1) + i + 1; meshData.indexVec[iIndex++] = (slices + 1) + i; meshData.indexVec[iIndex++] = i; } return meshData; } template<class VertexType, class IndexType> MeshData<VertexType, IndexType> CreateCone(float radius, float height, UINT slices, const DirectX::XMFLOAT4& color) { using namespace DirectX; auto meshData = CreateConeNoCap<VertexType, IndexType>(radius, height, slices, color); UINT vertexCount = 3 * slices + 1; UINT indexCount = 6 * slices; meshData.vertexVec.resize(vertexCount); meshData.indexVec.resize(indexCount); float h2 = height / 2; float theta = 0.0f; float per_theta = XM_2PI / slices; UINT iIndex = 3 * slices; UINT vIndex = 2 * slices; Internal::VertexData vertexData; // 放入圆锥底面顶点 for (UINT i = 0; i < slices; ++i) { theta = i * per_theta; vertexData = { XMFLOAT3(radius * cosf(theta), -h2, radius * sinf(theta)), XMFLOAT3(0.0f, -1.0f, 0.0f), XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(cosf(theta) / 2 + 0.5f, sinf(theta) / 2 + 0.5f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); } // 放入圆锥底面圆心 vertexData = { XMFLOAT3(0.0f, -h2, 0.0f), XMFLOAT3(0.0f, -1.0f, 0.0f), XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(0.5f, 0.5f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); // 放入索引 UINT offset = 2 * slices; for (UINT i = 0; i < slices; ++i) { meshData.indexVec[iIndex++] = offset + slices; meshData.indexVec[iIndex++] = offset + i % slices; meshData.indexVec[iIndex++] = offset + (i + 1) % slices; } return meshData; } template<class VertexType, class IndexType> MeshData<VertexType, IndexType> CreateConeNoCap(float radius, float height, UINT slices, const DirectX::XMFLOAT4& color) { using namespace DirectX; MeshData<VertexType, IndexType> meshData; UINT vertexCount = 2 * slices; UINT indexCount = 3 * slices; meshData.vertexVec.resize(vertexCount); meshData.indexVec.resize(indexCount); float h2 = height / 2; float theta = 0.0f; float per_theta = XM_2PI / slices; float len = sqrtf(height * height + radius * radius); UINT iIndex = 0; UINT vIndex = 0; Internal::VertexData vertexData; // 放入圆锥尖端顶点(每个顶点位置相同,但包含不同的法向量和切线向量) for (UINT i = 0; i < slices; ++i) { theta = i * per_theta + per_theta / 2; vertexData = { XMFLOAT3(0.0f, h2, 0.0f), XMFLOAT3(radius * cosf(theta) / len, height / len, radius * sinf(theta) / len), XMFLOAT4(-sinf(theta), 0.0f, cosf(theta), 1.0f), color, XMFLOAT2(0.5f, 0.5f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); } // 放入圆锥侧面底部顶点 for (UINT i = 0; i < slices; ++i) { theta = i * per_theta; vertexData = { XMFLOAT3(radius * cosf(theta), -h2, radius * sinf(theta)), XMFLOAT3(radius * cosf(theta) / len, height / len, radius * sinf(theta) / len), XMFLOAT4(-sinf(theta), 0.0f, cosf(theta), 1.0f), color, XMFLOAT2(cosf(theta) / 2 + 0.5f, sinf(theta) / 2 + 0.5f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); } // 放入索引 for (UINT i = 0; i < slices; ++i) { meshData.indexVec[iIndex++] = i; meshData.indexVec[iIndex++] = slices + (i + 1) % slices; meshData.indexVec[iIndex++] = slices + i % slices; } return meshData; } template<class VertexType, class IndexType> inline MeshData<VertexType, IndexType> Create2DShow(const DirectX::XMFLOAT2& center, const DirectX::XMFLOAT2 & scale, const DirectX::XMFLOAT4 & color) { return Create2DShow<VertexType, IndexType>(center.x, center.y, scale.x, scale.y, color); } template<class VertexType, class IndexType> inline MeshData<VertexType, IndexType> Create2DShow(float centerX, float centerY, float scaleX, float scaleY, const DirectX::XMFLOAT4 & color) { using namespace DirectX; MeshData<VertexType, IndexType> meshData; meshData.vertexVec.resize(4); Internal::VertexData vertexData; UINT vIndex = 0; vertexData = { XMFLOAT3(centerX - scaleX, centerY - scaleY, 0.0f), XMFLOAT3(0.0f, 0.0f, -1.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(0.0f, 1.0f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); vertexData = { XMFLOAT3(centerX - scaleX, centerY + scaleY, 0.0f), XMFLOAT3(0.0f, 0.0f, -1.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(0.0f, 0.0f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); vertexData = { XMFLOAT3(centerX + scaleX, centerY + scaleY, 0.0f), XMFLOAT3(0.0f, 0.0f, -1.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(1.0f, 0.0f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); vertexData = { XMFLOAT3(centerX + scaleX, centerY - scaleY, 0.0f), XMFLOAT3(0.0f, 0.0f, -1.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(1.0f, 1.0f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); meshData.indexVec = { 0, 1, 2, 2, 3, 0 }; return meshData; } template<class VertexType, class IndexType> inline MeshData<VertexType, IndexType> CreatePlane(const DirectX::XMFLOAT2 & planeSize, const DirectX::XMFLOAT2 & maxTexCoord, const DirectX::XMFLOAT4 & color) { return CreatePlane<VertexType, IndexType>(planeSize.x, planeSize.y, maxTexCoord.x, maxTexCoord.y, color); } template<class VertexType, class IndexType> inline MeshData<VertexType, IndexType> CreatePlane(float width, float depth, float texU, float texV, const DirectX::XMFLOAT4 & color) { using namespace DirectX; MeshData<VertexType, IndexType> meshData; meshData.vertexVec.resize(4); Internal::VertexData vertexData; UINT vIndex = 0; vertexData = { XMFLOAT3(-width / 2, 0.0f, -depth / 2), XMFLOAT3(0.0f, 1.0f, 0.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(0.0f, texV) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); vertexData = { XMFLOAT3(-width / 2, 0.0f, depth / 2), XMFLOAT3(0.0f, 1.0f, 0.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(0.0f, 0.0f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); vertexData = { XMFLOAT3(width / 2, 0.0f, depth / 2), XMFLOAT3(0.0f, 1.0f, 0.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(texU, 0.0f) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); vertexData = { XMFLOAT3(width / 2, 0.0f, -depth / 2), XMFLOAT3(0.0f, 1.0f, 0.0f), XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f), color, XMFLOAT2(texU, texV) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); meshData.indexVec = { 0, 1, 2, 2, 3, 0 }; return meshData; } template<class VertexType, class IndexType> MeshData<VertexType, IndexType> CreateTerrain(const DirectX::XMFLOAT2& terrainSize, const DirectX::XMUINT2& slices, const DirectX::XMFLOAT2& maxTexCoord, const std::function<float(float, float)>& heightFunc, const std::function<DirectX::XMFLOAT3(float, float)>& normalFunc, const std::function<DirectX::XMFLOAT4(float, float)>& colorFunc) { return CreateTerrain<VertexType, IndexType>(terrainSize.x, terrainSize.y, slices.x, slices.y, maxTexCoord.x, maxTexCoord.y, heightFunc, normalFunc, colorFunc); } template<class VertexType, class IndexType> MeshData<VertexType, IndexType> CreateTerrain(float width, float depth, UINT slicesX, UINT slicesZ, float texU, float texV, const std::function<float(float, float)>& heightFunc, const std::function<DirectX::XMFLOAT3(float, float)>& normalFunc, const std::function<DirectX::XMFLOAT4(float, float)>& colorFunc) { using namespace DirectX; MeshData<VertexType, IndexType> meshData; UINT vertexCount = (slicesX + 1) * (slicesZ + 1); UINT indexCount = 6 * slicesX * slicesZ; meshData.vertexVec.resize(vertexCount); meshData.indexVec.resize(indexCount); Internal::VertexData vertexData; UINT vIndex = 0; UINT iIndex = 0; float sliceWidth = width / slicesX; float sliceDepth = depth / slicesZ; float leftBottomX = -width / 2; float leftBottomZ = -depth / 2; float posX, posZ; float sliceTexWidth = texU / slicesX; float sliceTexDepth = texV / slicesZ; XMFLOAT3 normal; XMFLOAT4 tangent; // 创建网格顶点 // __ __ // | /| /| // |/_|/_| // | /| /| // |/_|/_| for (UINT z = 0; z <= slicesZ; ++z) { posZ = leftBottomZ + z * sliceDepth; for (UINT x = 0; x <= slicesX; ++x) { posX = leftBottomX + x * sliceWidth; // 计算法向量并归一化 normal = normalFunc(posX, posZ); XMStoreFloat3(&normal, XMVector3Normalize(XMLoadFloat3(&normal))); // 计算法平面与z=posZ平面构成的直线单位切向量,维持w分量为1.0f XMStoreFloat4(&tangent, XMVector3Normalize(XMVectorSet(normal.y, -normal.x, 0.0f, 0.0f)) + g_XMIdentityR3); vertexData = { XMFLOAT3(posX, heightFunc(posX, posZ), posZ), normal, tangent, colorFunc(posX, posZ), XMFLOAT2(x * sliceTexWidth, texV - z * sliceTexDepth) }; Internal::InsertVertexElement(meshData.vertexVec[vIndex++], vertexData); } } // 放入索引 for (UINT i = 0; i < slicesZ; ++i) { for (UINT j = 0; j < slicesX; ++j) { meshData.indexVec[iIndex++] = i * (slicesX + 1) + j; meshData.indexVec[iIndex++] = (i + 1) * (slicesX + 1) + j; meshData.indexVec[iIndex++] = (i + 1) * (slicesX + 1) + j + 1; meshData.indexVec[iIndex++] = (i + 1) * (slicesX + 1) + j + 1; meshData.indexVec[iIndex++] = i * (slicesX + 1) + j + 1; meshData.indexVec[iIndex++] = i * (slicesX + 1) + j; } } return meshData; } } #endif
[ "757919340@qq.com" ]
757919340@qq.com
274280497e01c705acd342e4da40ee056ba88fc9
1942a0d16bd48962e72aa21fad8d034fa9521a6c
/aws-cpp-sdk-iam/include/aws/iam/model/GetContextKeysForCustomPolicyRequest.h
2ba91625d12ed0dbb9f64f0c303a1b0fef072fb3
[ "Apache-2.0", "JSON", "MIT" ]
permissive
yecol/aws-sdk-cpp
1aff09a21cfe618e272c2c06d358cfa0fb07cecf
0b1ea31e593d23b5db49ee39d0a11e5b98ab991e
refs/heads/master
2021-01-20T02:53:53.557861
2018-02-11T11:14:58
2018-02-11T11:14:58
83,822,910
0
1
null
2017-03-03T17:17:00
2017-03-03T17:17:00
null
UTF-8
C++
false
false
8,363
h
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ #pragma once #include <aws/iam/IAM_EXPORTS.h> #include <aws/iam/IAMRequest.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace IAM { namespace Model { /** */ class AWS_IAM_API GetContextKeysForCustomPolicyRequest : public IAMRequest { public: GetContextKeysForCustomPolicyRequest(); Aws::String SerializePayload() const override; /** * <p>A list of policies for which you want the list of context keys referenced in * those policies. Each document is specified as a string containing the complete, * valid JSON text of an IAM policy.</p> <p>The <a * href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this * parameter is a string of characters consisting of any printable ASCII character * ranging from the space character (\u0020) through end of the ASCII character * range as well as the printable characters in the Basic Latin and Latin-1 * Supplement character set (through \u00FF). It also includes the special * characters tab (\u0009), line feed (\u000A), and carriage return (\u000D).</p> */ inline const Aws::Vector<Aws::String>& GetPolicyInputList() const{ return m_policyInputList; } /** * <p>A list of policies for which you want the list of context keys referenced in * those policies. Each document is specified as a string containing the complete, * valid JSON text of an IAM policy.</p> <p>The <a * href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this * parameter is a string of characters consisting of any printable ASCII character * ranging from the space character (\u0020) through end of the ASCII character * range as well as the printable characters in the Basic Latin and Latin-1 * Supplement character set (through \u00FF). It also includes the special * characters tab (\u0009), line feed (\u000A), and carriage return (\u000D).</p> */ inline void SetPolicyInputList(const Aws::Vector<Aws::String>& value) { m_policyInputListHasBeenSet = true; m_policyInputList = value; } /** * <p>A list of policies for which you want the list of context keys referenced in * those policies. Each document is specified as a string containing the complete, * valid JSON text of an IAM policy.</p> <p>The <a * href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this * parameter is a string of characters consisting of any printable ASCII character * ranging from the space character (\u0020) through end of the ASCII character * range as well as the printable characters in the Basic Latin and Latin-1 * Supplement character set (through \u00FF). It also includes the special * characters tab (\u0009), line feed (\u000A), and carriage return (\u000D).</p> */ inline void SetPolicyInputList(Aws::Vector<Aws::String>&& value) { m_policyInputListHasBeenSet = true; m_policyInputList = value; } /** * <p>A list of policies for which you want the list of context keys referenced in * those policies. Each document is specified as a string containing the complete, * valid JSON text of an IAM policy.</p> <p>The <a * href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this * parameter is a string of characters consisting of any printable ASCII character * ranging from the space character (\u0020) through end of the ASCII character * range as well as the printable characters in the Basic Latin and Latin-1 * Supplement character set (through \u00FF). It also includes the special * characters tab (\u0009), line feed (\u000A), and carriage return (\u000D).</p> */ inline GetContextKeysForCustomPolicyRequest& WithPolicyInputList(const Aws::Vector<Aws::String>& value) { SetPolicyInputList(value); return *this;} /** * <p>A list of policies for which you want the list of context keys referenced in * those policies. Each document is specified as a string containing the complete, * valid JSON text of an IAM policy.</p> <p>The <a * href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this * parameter is a string of characters consisting of any printable ASCII character * ranging from the space character (\u0020) through end of the ASCII character * range as well as the printable characters in the Basic Latin and Latin-1 * Supplement character set (through \u00FF). It also includes the special * characters tab (\u0009), line feed (\u000A), and carriage return (\u000D).</p> */ inline GetContextKeysForCustomPolicyRequest& WithPolicyInputList(Aws::Vector<Aws::String>&& value) { SetPolicyInputList(value); return *this;} /** * <p>A list of policies for which you want the list of context keys referenced in * those policies. Each document is specified as a string containing the complete, * valid JSON text of an IAM policy.</p> <p>The <a * href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this * parameter is a string of characters consisting of any printable ASCII character * ranging from the space character (\u0020) through end of the ASCII character * range as well as the printable characters in the Basic Latin and Latin-1 * Supplement character set (through \u00FF). It also includes the special * characters tab (\u0009), line feed (\u000A), and carriage return (\u000D).</p> */ inline GetContextKeysForCustomPolicyRequest& AddPolicyInputList(const Aws::String& value) { m_policyInputListHasBeenSet = true; m_policyInputList.push_back(value); return *this; } /** * <p>A list of policies for which you want the list of context keys referenced in * those policies. Each document is specified as a string containing the complete, * valid JSON text of an IAM policy.</p> <p>The <a * href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this * parameter is a string of characters consisting of any printable ASCII character * ranging from the space character (\u0020) through end of the ASCII character * range as well as the printable characters in the Basic Latin and Latin-1 * Supplement character set (through \u00FF). It also includes the special * characters tab (\u0009), line feed (\u000A), and carriage return (\u000D).</p> */ inline GetContextKeysForCustomPolicyRequest& AddPolicyInputList(Aws::String&& value) { m_policyInputListHasBeenSet = true; m_policyInputList.push_back(value); return *this; } /** * <p>A list of policies for which you want the list of context keys referenced in * those policies. Each document is specified as a string containing the complete, * valid JSON text of an IAM policy.</p> <p>The <a * href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this * parameter is a string of characters consisting of any printable ASCII character * ranging from the space character (\u0020) through end of the ASCII character * range as well as the printable characters in the Basic Latin and Latin-1 * Supplement character set (through \u00FF). It also includes the special * characters tab (\u0009), line feed (\u000A), and carriage return (\u000D).</p> */ inline GetContextKeysForCustomPolicyRequest& AddPolicyInputList(const char* value) { m_policyInputListHasBeenSet = true; m_policyInputList.push_back(value); return *this; } private: Aws::Vector<Aws::String> m_policyInputList; bool m_policyInputListHasBeenSet; }; } // namespace Model } // namespace IAM } // namespace Aws
[ "henso@amazon.com" ]
henso@amazon.com
bab2622fdb0d52d78ca3076a39d18be3d246d3bc
4c440d07eb2adac3cf9059f67b2616898365f12d
/69/B.cpp
92ce6881c7ba4fd1c3727772a295be6637f52069
[]
no_license
icecocoa6/abc
e1ee38a1c456b19d67d3bb091823fecdcb31244f
996ba55718a61fce21e467d82da0c489d89d5698
refs/heads/master
2020-03-09T08:56:52.900871
2018-05-24T07:47:59
2018-05-24T07:48:22
128,700,643
0
0
null
null
null
null
UTF-8
C++
false
false
187
cpp
#include <string> #include <iostream> using namespace std; int main(int argc, char *argv[]) { string S; cin >> S; cout << S.front() << S.size() - 2 << S.back() << endl; return 0; }
[ "mys.itachi@gmail.com" ]
mys.itachi@gmail.com
fab82c0cc71b036aec5bfcaf35189392239d4e79
8675d70386ed2ac899de52c3b13db31a64b0498f
/frmroutepump.h
e3812a3a1f73f7810a1eae5e26b32919184ce98b
[]
no_license
eploentham/TimerWater
dd2bf57b088e91227fc967286aea0875cd63c591
1838401e338dbe28ec0f34367241f41246d12d38
refs/heads/master
2021-01-21T14:01:57.573737
2015-12-08T09:26:34
2015-12-08T09:26:34
41,421,045
0
0
null
null
null
null
UTF-8
C++
false
false
346
h
#ifndef FRMROUTEPUMP_H #define FRMROUTEPUMP_H #include <QDialog> namespace Ui { class frmroutepump; } class frmroutepump : public QDialog { Q_OBJECT public: explicit frmroutepump(QWidget *parent = 0); ~frmroutepump(); private slots: void on_btnSave_clicked(); private: Ui::frmroutepump *ui; }; #endif // FRMROUTEPUMP_H
[ "eploentham@gmail.com" ]
eploentham@gmail.com
1fa010bbb124da5b1849dcd780dbee4d4ea5d20d
0c644d9604f248080bf49073ae61c4ff02a0feab
/C02/p71-8/소스.cpp
cf618e9d24ef1ec350af43e012c33625bde28025
[]
no_license
0083tony/Core-C-Programming
12bbcc3b5b6dbdda692678cd95590e28f8bfe64f
d846e1544e170c4d010d88a09cf2fd5f91adaf6d
refs/heads/master
2020-08-10T00:19:16.341746
2019-11-08T10:57:04
2019-11-08T10:57:04
214,206,173
2
1
null
null
null
null
UHC
C++
false
false
245
cpp
#include<stdio.h> int main(void) { float x, y; // %f로 실수 입력 printf("실수 2개? "); scanf_s("%f %f", &x, &y); // %f로 실수 출력 printf("%f + %f = %f\n", x, y, x + y); printf("%f - %f = %f\n", x, y, x - y); return 0; }
[ "0083tony@gmail.com" ]
0083tony@gmail.com
e0e875bf80ed84cb02fbf15bbab0a3440767baee
dd80a584130ef1a0333429ba76c1cee0eb40df73
/device/asus/flo/camera/QCamera2/HAL3/QCamera3PostProc.h
efb383f63527a298c0de85c4dfc1efd55ab562f6
[ "MIT" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
C++
false
false
6,487
h
/* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of The Linux Foundation 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 "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef __QCamera3_POSTPROC_H__ #define __QCamera3_POSTPROC_H__ extern "C" { #include <mm_camera_interface.h> #include <mm_jpeg_interface.h> } //#include "QCamera3HWI.h" #include "QCameraQueue.h" #include "QCameraCmdThread.h" namespace qcamera { class QCamera3Exif; class QCamera3Channel; class QCamera3PicChannel; class QCamera3ReprocessChannel; class QCamera3Stream; class QCamera3Memory; typedef struct { uint32_t jobId; // job ID uint32_t client_hdl; // handle of jpeg client (obtained when open jpeg) mm_camera_super_buf_t *src_frame;// source frame (need to be returned back to kernel after done) mm_camera_super_buf_t *src_reproc_frame; // original source frame for reproc if not NULL mm_camera_super_buf_t *aux_frame;// source frame but from different stream QCamera3Channel *aux_channel; } qcamera_jpeg_data_t; typedef struct { uint32_t jobId; // job ID mm_camera_super_buf_t *src_frame;// source frame (need to be returned back to kernel after done) } qcamera_pp_data_t; typedef struct { mm_camera_super_buf_t *frame; // source frame that needs post process } qcamera_pp_request_t; typedef struct { uint32_t jobId; // job ID (obtained when start_jpeg_job) jpeg_job_status_t status; // jpeg encoding status mm_jpeg_output_t out_data; // ptr to jpeg output buf } qcamera_jpeg_evt_payload_t; #define MAX_EXIF_TABLE_ENTRIES 17 class QCamera3Exif { public: QCamera3Exif(); virtual ~QCamera3Exif(); int32_t addEntry(exif_tag_id_t tagid, exif_tag_type_t type, uint32_t count, void *data); uint32_t getNumOfEntries() {return m_nNumEntries;}; QEXIF_INFO_DATA *getEntries() {return m_Entries;}; private: QEXIF_INFO_DATA m_Entries[MAX_EXIF_TABLE_ENTRIES]; // exif tags for JPEG encoder uint32_t m_nNumEntries; // number of valid entries }; class QCamera3PostProcessor { public: QCamera3PostProcessor(QCamera3PicChannel *ch_ctrl); virtual ~QCamera3PostProcessor(); int32_t init(jpeg_encode_callback_t jpeg_cb, void *user_data); int32_t deinit(); int32_t start(QCamera3Memory *mMemory, int index, QCamera3PicChannel *pSrcChannel); int32_t stop(); int32_t processData(mm_camera_super_buf_t *frame); int32_t processRawData(mm_camera_super_buf_t *frame); int32_t processPPData(mm_camera_super_buf_t *frame); int32_t processAuxiliaryData(mm_camera_buf_def_t *frame, QCamera3Channel* pAuxiliaryChannel); int32_t processPPMetadata(mm_camera_super_buf_t *frame); int32_t processJpegEvt(qcamera_jpeg_evt_payload_t *evt); qcamera_jpeg_data_t *findJpegJobByJobId(uint32_t jobId); void releaseJpegJobData(qcamera_jpeg_data_t *job); private: int32_t sendEvtNotify(int32_t msg_type, int32_t ext1, int32_t ext2); mm_jpeg_color_format getColorfmtFromImgFmt(cam_format_t img_fmt); mm_jpeg_format_t getJpegImgTypeFromImgFmt(cam_format_t img_fmt); int32_t getJpegEncodingConfig(mm_jpeg_encode_params_t& encode_parm, QCamera3Stream *main_stream, QCamera3Stream *thumb_stream); int32_t encodeData(qcamera_jpeg_data_t *jpeg_job_data, uint8_t &needNewSess); void releaseSuperBuf(mm_camera_super_buf_t *super_buf); static void releaseNotifyData(void *user_data, void *cookie); int32_t processRawImageImpl(mm_camera_super_buf_t *recvd_frame); static void releaseJpegData(void *data, void *user_data); static void releasePPInputData(void *data, void *user_data); static void releaseOngoingPPData(void *data, void *user_data); static void *dataProcessRoutine(void *data); private: QCamera3PicChannel *m_parent; jpeg_encode_callback_t mJpegCB; void * mJpegUserData; mm_jpeg_ops_t mJpegHandle; uint32_t mJpegClientHandle; uint32_t mJpegSessionId; QCamera3Exif * m_pJpegExifObj; int8_t m_bThumbnailNeeded; QCamera3Memory *mJpegMem; int mJpegMemIndex; QCamera3ReprocessChannel * m_pReprocChannel; QCameraQueue m_inputPPQ; // input queue for postproc QCameraQueue m_ongoingPPQ; // ongoing postproc queue QCameraQueue m_inputJpegQ; // input jpeg job queue QCameraQueue m_ongoingJpegQ; // ongoing jpeg job queue QCameraQueue m_inputRawQ; // input raw job queue QCameraQueue m_inputMetaQ; //input meta queue QCameraCmdThread m_dataProcTh; // thread for data processing pthread_mutex_t mReprocJobLock; }; }; // namespace qcamera #endif /* __QCamera3_POSTPROC_H__ */
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
4cce9df986af87cdf1749a7fe6198df94d514050
98dc6f0f7c85dbfae6d40df288dde6f392311f43
/src/ai/la/PatternNGramFunction.cpp
fa110dc08bfb3a1d8935471ddbc5eef027e4d65a
[]
no_license
Atom9j/GrammarEngine
056cba6652a78e961cee6e9420f8b606563a3d77
7966a36b10d35cf6ba1c801701fa49d3c2c6add2
refs/heads/master
2021-04-27T00:10:28.165368
2018-03-03T12:19:37
2018-03-03T12:19:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,316
cpp
#include <lem/macro_parser.h> #include <lem/solarix/PM_FunctionLoader.h> #include <lem/solarix/tokens.h> #include <lem/solarix/dictionary.h> #include <lem/solarix/SynPatternCompilation.h> #include <lem/solarix/la_autom.h> #include <lem/solarix/SynPatternResult.h> #include <lem/solarix/KnowledgeBase.h> #include <lem/solarix/TreeMatchingExperience.h> #include <lem/solarix/LexerTextPos.h> #include <lem/solarix/TreeScorerMatcher.h> #include <lem/solarix/TreeScorers.h> #include <lem/solarix/PatternNGrams.h> using namespace Solarix; PatternNGramFunction::PatternNGramFunction() { } PatternNGramFunction::PatternNGramFunction( const PatternNGramFunction & x ) : function_name( x.function_name ), function_args( x.function_args ), fun( x.fun->clone() ) { } void PatternNGramFunction::operator=(const PatternNGramFunction & x) { function_name = x.function_name; function_args = x.function_args; fun = x.fun->clone(); } bool PatternNGramFunction::operator!=(const PatternNGramFunction & x) const { return function_name != x.function_name || function_args != x.function_args; } #if defined SOL_LOADTXT && defined SOL_COMPILER void PatternNGramFunction::LoadTxt( Dictionary &dict, lem::Iridium::Macro_Parser & txtfile, VariableChecker & compilation_context ) { lem::Iridium::BSourceState beg = txtfile.tellp(); lem::Iridium::BethToken tfun = txtfile.read(); function_name = tfun.string(); TrFunctions & fx = dict.GetLexAuto().GetFunctions().Get(); const TrFunction * fun_info = fx.Find( function_name ); // это вызов функции дл¤ проверки дерева, начинающегос¤ с заданного именем маркировки узла TrKnownVars known_vars( &fx.global_known_vars ); txtfile.read_it( B_OROUNDPAREN ); // ћожет быть перечень нескольких маркировок while(true) { if(txtfile.probe( B_CROUNDPAREN )) break; if(!function_args.empty()) txtfile.read_it( B_COMMA ); lem::UCString arg_name = txtfile.read().string(); arg_name.to_upper(); if(compilation_context.Find( arg_name ) == UNKNOWN) { dict.GetIO().merr().printf( "Variable [%us] is not declared", arg_name.c_str() ); lem::Iridium::Print_Error( beg, txtfile ); throw lem::E_BaseException(); } TrType arg_type = fun_info->GetArgType( CastSizeToInt( function_args.size() ) ); known_vars.RegisterVar( TrTreeType(), arg_name ); // провер¤мый узел и все его дети как дерево function_args.push_back( arg_name ); arg_types.push_back( arg_type ); } txtfile.seekp( tfun ); fun = dict.GetLexAuto().GetFunctions().Get().CompileCall( dict.GetLexAuto(), txtfile, known_vars ); return; } #endif void PatternNGramFunction::SaveBin( lem::Stream &bin ) const { bin.write( &function_name, sizeof( function_name ) ); function_args.SaveBin( bin ); arg_types.SaveBin( bin ); fun->SaveBin( bin ); return; } void PatternNGramFunction::LoadBin( lem::Stream &bin ) { bin.read( &function_name, sizeof( function_name ) ); function_args.LoadBin( bin ); arg_types.LoadBin( bin ); fun = TrFunCall::load_bin( bin ); return; } void PatternNGramFunction::Link( const TrFunctions &funs ) { fun->Link( funs ); return; } #if defined SOL_CAA void PatternNGramFunction::AttachEdges( const Solarix::Word_Form * root_wf, Solarix::Tree_Node * root, Dictionary & dict, const lem::MCollect<int> & PatternSequenceNumber, const SynPatternResult * cur_result ) const { for(lem::Container::size_type k = 0; k < cur_result->linkage_edges.size(); ++k) { const PatternLinkEdge & edge = cur_result->linkage_edges[k]; if(edge.from == root_wf) { Solarix::Word_Form * wf_to = GetWordform4Tree( edge.to, dict, cur_result ); Solarix::Tree_Node * child_node = new Solarix::Tree_Node( wf_to, true ); child_node->SetLink( Solarix::Tree_Link( edge.link_type ) ); root->Add( child_node ); AttachEdges( edge.to, child_node, dict, PatternSequenceNumber, cur_result ); } } return; } #endif #if defined SOL_CAA Solarix::Word_Form* PatternNGramFunction::GetWordform4Tree( const Solarix::Word_Form * src_wf, Dictionary & dict, const SynPatternResult * cur_result ) const { // ќставим только подтвержденные версии словоформ Solarix::Word_Form * wf = NULL; std::pair<MATCHING_ALTS::const_iterator, MATCHING_ALTS::const_iterator> p = cur_result->matched_alts.equal_range( src_wf ); for(MATCHING_ALTS::const_iterator it = p.first; it != p.second; ++it) { int iversion = it->second; if(wf == NULL) { wf = new Solarix::Word_Form( *src_wf->GetVersion( iversion ), false ); } else { wf->AddAlt( new Solarix::Word_Form( *src_wf->GetVersion( iversion ), false ) ); } } if(wf == NULL) wf = new Solarix::Word_Form( *src_wf ); return wf; } #endif #if defined SOL_CAA Solarix::Tree_Node* PatternNGramFunction::GetTreeByRootName( const lem::UCString & root_name, Dictionary & dict, const lem::MCollect<int> & PatternSequenceNumber, const SynPatternResult * cur_result, bool attach_children ) const { const Solarix::Word_Form * root_wf = NULL; if(!cur_result->trace.Contains( PatternSequenceNumber, root_name )) { lem::MemFormatter mem; mem.printf( "Can not find root node marker [%us]", root_name.c_str() ); throw lem::E_BaseException( mem.string() ); return NULL; } const BackTraceItem & mark_data = *cur_result->trace.Get( PatternSequenceNumber, root_name ); if(mark_data.IsSingleWord()) { root_wf = mark_data.GetSingleRootNode(); } else { // сначала пробуем найти токен с пометкой root_node. const Word_Form * root_node0 = mark_data.FindNode( *dict.GetLexAuto().GetRootNodeName() ); if(root_node0 != NULL) { root_wf = root_node0; } else { // ¬ качестве центрального берем первый токен. const LexerTextPos * token = mark_data.GetBeginToken(); root_wf = token->GetWordform(); } } Solarix::Word_Form * wf = GetWordform4Tree( root_wf, dict, cur_result ); Solarix::Tree_Node * node = new Solarix::Tree_Node( wf, true ); if(attach_children) { // “еперь найдем ребра и присоединим из к корню, а затем продолжим процесс вниз рекурсивно AttachEdges( root_wf, node, dict, PatternSequenceNumber, cur_result ); } return node; } #endif #if defined SOL_CAA int PatternNGramFunction::Match( Dictionary & dict, const lem::MCollect<int> & PatternSequenceNumber, const SynPatternResultBackTrace * x_result, SynPatternResult * cur_result, KnowledgeBase & kbase, TreeMatchingExperience &experience, const ElapsedTimeConstraint & constraints, TrTrace *trace_log ) const { /* #if LEM_DEBUGGING==1 lem::mout->eol(); cur_result->PrintLinks( *lem::mout, dict.GetSynGram() ); lem::mout->eol(); const SynPatternResultBackTrace * p = x_result; while( p!=NULL ) { if( p->result!=NULL ) { if( !p->result->linkage_edges.empty() ) { lem::mout->eol(); p->result->PrintLinks( *lem::mout, dict.GetSynGram() ); lem::mout->eol(); } } p = p->parent; } #endif */ int scoring = 0; TrFunContext ctx0( (TrFunContext*)NULL ); TrContextInvokation ctx2( &ctx0 ); for(int iarg = 0; iarg < function_args.size(); ++iarg) { Tree_Node * var_root = GetTreeByRootName( function_args[iarg], dict, PatternSequenceNumber, cur_result, true ); lem::Ptr<TrValue> arg( new TrValue( var_root, true ) ); ctx2.AddVar( function_args[iarg], arg ); } lem::Ptr<TrValue> fun_res = fun->Run( constraints, dict.GetLexAuto(), ctx2, trace_log ); if(fun_res->GetType().IsInt()) { scoring = fun_res->GetInt(); #if defined SOL_DEBUGGING /* if( trace_log!=NULL ) { trace_log->Leave( new SynPatternPointCall( dbg_mark, id_src, this, current_token, parent_trace ) ); }*/ #endif } else { #if LEM_DEBUGGING==1 if(trace_log != NULL) trace_log->PrintStack( *lem::mout ); #endif lem::UFString msg( lem::format_str( L"Pattern ngram function must return int, not %s", fun_res->GetType().GetName().c_str() ) ); throw E_BaseException( msg.c_str() ); } return scoring; } #endif
[ "mentalcomputing@gmail.com" ]
mentalcomputing@gmail.com
54f12ceb6b29af137cfb7248800dc05ff24c5ad1
775d485029b2250947cbf0b314467e3c9c70ba86
/src/ui/scenic/lib/flatland/renderer/vk_renderer.cc
b0425e4a5bcc95e5891d2f7db6b33ca22f4dbf31
[ "BSD-2-Clause" ]
permissive
yueyedeai/fuchsia
c8c2ad54dcf91842832ddd6bdfe19d6bfe587be2
cbb6c89423ba2f8ac76300834796d15b13a98f40
refs/heads/master
2023-06-19T18:39:46.045730
2021-07-15T22:45:50
2021-07-15T22:45:50
null
0
0
null
null
null
null
UTF-8
C++
false
false
23,326
cc
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/ui/scenic/lib/flatland/renderer/vk_renderer.h" #include "src/ui/lib/escher/escher.h" #include "src/ui/lib/escher/impl/naive_image.h" #include "src/ui/lib/escher/impl/vulkan_utils.h" #include "src/ui/lib/escher/renderer/render_funcs.h" #include "src/ui/lib/escher/renderer/sampler_cache.h" #include "src/ui/lib/escher/resources/resource_recycler.h" #include "src/ui/lib/escher/util/image_utils.h" #include "src/ui/lib/escher/util/trace_macros.h" namespace { // Highest priority format first. const std::vector<vk::Format> kPreferredImageFormats = { vk::Format::eR8G8B8A8Srgb, vk::Format::eB8G8R8A8Srgb, vk::Format::eG8B8R83Plane420Unorm, vk::Format::eG8B8R82Plane420Unorm}; const vk::Filter kDefaultFilter = vk::Filter::eNearest; // Returns the corresponding Vulkan image format to use given the provided // Zircon image format. // TODO(fxbug.dev/71410): Remove all references to zx_pixel_format_t. static vk::Format ConvertToVkFormat(zx_pixel_format_t pixel_format) { switch (pixel_format) { // These two Zircon formats correspond to the Sysmem BGRA32 format. case ZX_PIXEL_FORMAT_RGB_x888: case ZX_PIXEL_FORMAT_ARGB_8888: return vk::Format::eB8G8R8A8Srgb; // These two Zircon formats correspond to the Sysmem R8G8B8A8 format. case ZX_PIXEL_FORMAT_BGR_888x: case ZX_PIXEL_FORMAT_ABGR_8888: return vk::Format::eR8G8B8A8Srgb; case ZX_PIXEL_FORMAT_NV12: return vk::Format::eG8B8R82Plane420Unorm; } FX_CHECK(false) << "Unsupported Zircon pixel format: " << pixel_format; return vk::Format::eUndefined; } static escher::TexturePtr CreateDepthTexture(escher::Escher* escher, const escher::ImagePtr& output_image) { escher::TexturePtr depth_buffer; escher::RenderFuncs::ObtainDepthTexture( escher, output_image->use_protected_memory(), output_image->info(), escher->device()->caps().GetMatchingDepthStencilFormat().value, depth_buffer); return depth_buffer; } } // anonymous namespace namespace flatland { VkRenderer::VkRenderer(escher::EscherWeakPtr escher) : escher_(std::move(escher)), compositor_(escher::RectangleCompositor(escher_.get())) {} VkRenderer::~VkRenderer() { auto vk_device = escher_->vk_device(); auto vk_loader = escher_->device()->dispatch_loader(); for (auto& [_, collection] : collections_) { vk_device.destroyBufferCollectionFUCHSIA(collection.vk_collection, nullptr, vk_loader); } collections_.clear(); } bool VkRenderer::ImportBufferCollection( GlobalBufferCollectionId collection_id, fuchsia::sysmem::Allocator_Sync* sysmem_allocator, fidl::InterfaceHandle<fuchsia::sysmem::BufferCollectionToken> token) { return RegisterCollection(collection_id, sysmem_allocator, std::move(token), escher::RectangleCompositor::kTextureUsageFlags); } void VkRenderer::ReleaseBufferCollection(GlobalBufferCollectionId collection_id) { // Multiple threads may be attempting to read/write from the various maps, // lock this function here. // TODO(fxbug.dev/44335): Convert this to a lock-free structure. std::unique_lock<std::mutex> lock(lock_); auto collection_itr = collections_.find(collection_id); // If the collection is not in the map, then there's nothing to do. if (collection_itr == collections_.end()) { FX_LOGS(WARNING) << "Attempting to release a non-existent buffer collection."; return; } auto vk_device = escher_->vk_device(); auto vk_loader = escher_->device()->dispatch_loader(); vk_device.destroyBufferCollectionFUCHSIA(collection_itr->second.vk_collection, nullptr, vk_loader); collections_.erase(collection_id); } bool VkRenderer::RegisterCollection( GlobalBufferCollectionId collection_id, fuchsia::sysmem::Allocator_Sync* sysmem_allocator, fidl::InterfaceHandle<fuchsia::sysmem::BufferCollectionToken> token, vk::ImageUsageFlags usage) { TRACE_DURATION("gfx", "VkRenderer::RegisterCollection"); auto vk_device = escher_->vk_device(); auto vk_loader = escher_->device()->dispatch_loader(); FX_DCHECK(vk_device); FX_DCHECK(collection_id != allocation::kInvalidId); // Check for a null token here before we try to duplicate it to get the // vulkan token. if (!token.is_valid()) { FX_LOGS(WARNING) << "Token is invalid."; return false; } // Bind the buffer collection token to get the local token. Valid tokens can always be bound. fuchsia::sysmem::BufferCollectionTokenSyncPtr local_token = token.BindSync(); fuchsia::sysmem::BufferCollectionTokenSyncPtr vulkan_token; // TODO(fxbug.dev/51213): See if this can become asynchronous. zx_status_t status = local_token->Duplicate(std::numeric_limits<uint32_t>::max(), vulkan_token.NewRequest()); FX_DCHECK(status == ZX_OK); // Create the sysmem collection. fuchsia::sysmem::BufferCollectionSyncPtr buffer_collection; { // Use local token to create a BufferCollection and then sync. We can trust // |buffer_collection->Sync()| to tell us if we have a bad or malicious channel. So if this call // passes, then we know we have a valid BufferCollection. sysmem_allocator->BindSharedCollection(std::move(local_token), buffer_collection.NewRequest()); zx_status_t status = buffer_collection->Sync(); if (status != ZX_OK) { FX_LOGS(ERROR) << "Could not bind buffer collection. Status: " << status; return false; } // Use a name with a priority that's greater than the vulkan implementation, but less than // what any client would use. buffer_collection->SetName(10u, "FlatlandImageMemory"); status = buffer_collection->SetConstraints(false /* has_constraints */, fuchsia::sysmem::BufferCollectionConstraints()); FX_DCHECK(status == ZX_OK); } // Create the vk collection. vk::BufferCollectionFUCHSIA collection; { std::vector<vk::ImageCreateInfo> create_infos; for (const auto& format : kPreferredImageFormats) { create_infos.push_back( escher::RectangleCompositor::GetDefaultImageConstraints(format, usage)); } vk::ImageConstraintsInfoFUCHSIA image_constraints_info; image_constraints_info.createInfoCount = create_infos.size(); image_constraints_info.pCreateInfos = create_infos.data(); image_constraints_info.pFormatConstraints = nullptr; image_constraints_info.pNext = nullptr; image_constraints_info.minBufferCount = 1; image_constraints_info.minBufferCountForDedicatedSlack = 0; image_constraints_info.minBufferCountForSharedSlack = 0; if (escher_->allow_protected_memory()) image_constraints_info.flags = vk::ImageConstraintsInfoFlagBitsFUCHSIA::eProtectedOptional; // Create the collection and set its constraints. vk::BufferCollectionCreateInfoFUCHSIA buffer_collection_create_info; buffer_collection_create_info.collectionToken = vulkan_token.Unbind().TakeChannel().release(); collection = escher::ESCHER_CHECKED_VK_RESULT( vk_device.createBufferCollectionFUCHSIA(buffer_collection_create_info, nullptr, vk_loader)); auto vk_result = vk_device.setBufferCollectionImageConstraintsFUCHSIA( collection, image_constraints_info, vk_loader); FX_DCHECK(vk_result == vk::Result::eSuccess); } // Multiple threads may be attempting to read/write from |collections_| // so we lock this function here. // TODO(fxbug.dev/44335): Convert this to a lock-free structure. std::unique_lock<std::mutex> lock(lock_); collections_[collection_id] = { .collection = std::move(buffer_collection), .vk_collection = std::move(collection), .is_render_target = (usage == escher::RectangleCompositor::kRenderTargetUsageFlags)}; return true; } bool VkRenderer::ImportBufferImage(const allocation::ImageMetadata& metadata) { std::unique_lock<std::mutex> lock(lock_); // The metadata can't have an invalid collection id. if (metadata.collection_id == allocation::kInvalidId) { FX_LOGS(WARNING) << "Image has invalid collection id."; return false; } // The metadata can't have an invalid identifier. if (metadata.identifier == allocation::kInvalidImageId) { FX_LOGS(WARNING) << "Image has invalid identifier."; return false; } // Check we have valid dimensions. if (metadata.width == 0 || metadata.height == 0) { FX_LOGS(WARNING) << "Image has invalid dimensions: " << "(" << metadata.width << ", " << metadata.height << ")."; return false; } // Make sure that the collection that will back this image's memory // is actually registered with the renderer. auto collection_itr = collections_.find(metadata.collection_id); if (collection_itr == collections_.end()) { FX_LOGS(WARNING) << "Collection with id " << metadata.collection_id << " does not exist."; return false; } // Check to see if the buffers are allocated and return false if not. zx_status_t allocation_status = ZX_OK; zx_status_t status = collection_itr->second.collection->CheckBuffersAllocated(&allocation_status); if (status != ZX_OK || allocation_status != ZX_OK) { FX_LOGS(WARNING) << "Collection was not allocated."; return false; } // Make sure we're not reusing the same image identifier. if (texture_map_.find(metadata.identifier) != texture_map_.end() || render_target_map_.find(metadata.identifier) != render_target_map_.end()) { FX_LOGS(WARNING) << "An image with this identifier already exists."; return false; } if (collection_itr->second.is_render_target) { auto image = ExtractImage(metadata, collection_itr->second.vk_collection, escher::RectangleCompositor::kRenderTargetUsageFlags); if (!image) { FX_LOGS(ERROR) << "Could not extract render target."; return false; } image->set_swapchain_layout(vk::ImageLayout::eColorAttachmentOptimal); render_target_map_[metadata.identifier] = image; depth_target_map_[metadata.identifier] = CreateDepthTexture(escher_.get(), image); pending_render_targets_.insert(metadata.identifier); } else { auto texture = ExtractTexture(metadata, collection_itr->second.vk_collection); if (!texture) { FX_LOGS(ERROR) << "Could not extract client texture image."; return false; } texture_map_[metadata.identifier] = texture; pending_textures_.insert(metadata.identifier); } return true; } void VkRenderer::ReleaseBufferImage(allocation::GlobalImageId image_id) { std::unique_lock<std::mutex> lock(lock_); if (texture_map_.find(image_id) != texture_map_.end()) { texture_map_.erase(image_id); } else if (render_target_map_.find(image_id) != render_target_map_.end()) { render_target_map_.erase(image_id); depth_target_map_.erase(image_id); } } escher::ImagePtr VkRenderer::ExtractImage(const allocation::ImageMetadata& metadata, vk::BufferCollectionFUCHSIA collection, vk::ImageUsageFlags usage) { TRACE_DURATION("gfx", "VkRenderer::ExtractImage"); auto vk_device = escher_->vk_device(); auto vk_loader = escher_->device()->dispatch_loader(); // Grab the collection Properties from Vulkan. auto properties = escher::ESCHER_CHECKED_VK_RESULT( vk_device.getBufferCollectionProperties2FUCHSIA(collection, vk_loader)); // Check the provided index against actually allocated number of buffers. if (properties.bufferCount <= metadata.vmo_index) { FX_LOGS(ERROR) << "Specified vmo index is out of bounds: " << metadata.vmo_index; return nullptr; } // Check if allocated buffers are backed by protected memory. bool is_protected = (escher_->vk_physical_device() .getMemoryProperties() .memoryTypes[escher::CountTrailingZeros(properties.memoryTypeBits)] .propertyFlags & vk::MemoryPropertyFlagBits::eProtected) == vk::MemoryPropertyFlagBits::eProtected; // Setup the create info Fuchsia extension. vk::BufferCollectionImageCreateInfoFUCHSIA collection_image_info; collection_image_info.collection = collection; collection_image_info.index = metadata.vmo_index; // Setup the create info. FX_DCHECK(properties.createInfoIndex < std::size(kPreferredImageFormats)); auto pixel_format = kPreferredImageFormats[properties.createInfoIndex]; vk::ImageCreateInfo create_info = escher::RectangleCompositor::GetDefaultImageConstraints(pixel_format, usage); create_info.extent = vk::Extent3D{metadata.width, metadata.height, 1}; create_info.setPNext(&collection_image_info); if (is_protected) { create_info.flags = vk::ImageCreateFlagBits::eProtected; } // Create the VK Image, return nullptr if this fails. auto image_result = vk_device.createImage(create_info); if (image_result.result != vk::Result::eSuccess) { FX_LOGS(ERROR) << "VkCreateImage failed: " << vk::to_string(image_result.result); return nullptr; } // Now we have to allocate VK memory for the image. This memory is going to come from // the imported buffer collection's vmo. auto memory_requirements = vk_device.getImageMemoryRequirements(image_result.value); uint32_t memory_type_index = escher::CountTrailingZeros(memory_requirements.memoryTypeBits & properties.memoryTypeBits); vk::StructureChain<vk::MemoryAllocateInfo, vk::ImportMemoryBufferCollectionFUCHSIA, vk::MemoryDedicatedAllocateInfoKHR> alloc_info(vk::MemoryAllocateInfo() .setAllocationSize(memory_requirements.size) .setMemoryTypeIndex(memory_type_index), vk::ImportMemoryBufferCollectionFUCHSIA() .setCollection(collection) .setIndex(metadata.vmo_index), vk::MemoryDedicatedAllocateInfoKHR().setImage(image_result.value)); vk::DeviceMemory memory = nullptr; vk::Result err = vk_device.allocateMemory(&alloc_info.get<vk::MemoryAllocateInfo>(), nullptr, &memory); if (err != vk::Result::eSuccess) { FX_LOGS(ERROR) << "Could not successfully allocate memory."; return nullptr; } // Have escher manager the memory since this is the required format for creating // an Escher image. Also we can now check if the total memory size is great enough // for the image memory requirements. If it's not big enough, the client likely // requested an image size that is larger than the maximum image size allowed by // the sysmem collection constraints. auto gpu_mem = escher::GpuMem::AdoptVkMemory(vk_device, vk::DeviceMemory(memory), memory_requirements.size, /*needs_mapped_ptr*/ false); if (memory_requirements.size > gpu_mem->size()) { FX_LOGS(ERROR) << "Memory requirements for image exceed available memory: " << memory_requirements.size << " " << gpu_mem->size(); return nullptr; } // Create and return an escher image. escher::ImageInfo escher_image_info; escher_image_info.format = create_info.format; escher_image_info.width = create_info.extent.width; escher_image_info.height = create_info.extent.height; escher_image_info.usage = create_info.usage; escher_image_info.memory_flags = vk::MemoryPropertyFlagBits::eDeviceLocal; if (create_info.flags & vk::ImageCreateFlagBits::eProtected) { escher_image_info.memory_flags = vk::MemoryPropertyFlagBits::eProtected; } escher_image_info.is_external = true; return escher::impl::NaiveImage::AdoptVkImage(escher_->resource_recycler(), escher_image_info, image_result.value, std::move(gpu_mem), create_info.initialLayout); } bool VkRenderer::RegisterRenderTargetCollection( GlobalBufferCollectionId collection_id, fuchsia::sysmem::Allocator_Sync* sysmem_allocator, fidl::InterfaceHandle<fuchsia::sysmem::BufferCollectionToken> token) { return RegisterCollection(collection_id, sysmem_allocator, std::move(token), escher::RectangleCompositor::kRenderTargetUsageFlags); } void VkRenderer::DeregisterRenderTargetCollection(GlobalBufferCollectionId collection_id) { ReleaseBufferCollection(collection_id); } escher::TexturePtr VkRenderer::ExtractTexture(const allocation::ImageMetadata& metadata, vk::BufferCollectionFUCHSIA collection) { auto image = ExtractImage(metadata, collection, escher::RectangleCompositor::kTextureUsageFlags); if (!image) { FX_LOGS(ERROR) << "Image for texture was nullptr."; return nullptr; } escher::SamplerPtr sampler = escher::image_utils::IsYuvFormat(image->format()) ? escher_->sampler_cache()->ObtainYuvSampler(image->format(), kDefaultFilter) : escher_->sampler_cache()->ObtainSampler(kDefaultFilter); FX_DCHECK(escher::image_utils::IsYuvFormat(image->format()) ? sampler->is_immutable() : !sampler->is_immutable()); auto texture = fxl::MakeRefCounted<escher::Texture>(escher_->resource_recycler(), sampler, image); return texture; } void VkRenderer::Render(const ImageMetadata& render_target, const std::vector<Rectangle2D>& rectangles, const std::vector<ImageMetadata>& images, const std::vector<zx::event>& release_fences) { TRACE_DURATION("gfx", "VkRenderer::Render"); FX_DCHECK(rectangles.size() == images.size()); // Copy over the texture and render target data to local containers that do not need // to be accessed via a lock. We're just doing a shallow copy via the copy assignment // operator since the texture and render target data is just referenced through pointers. // We manually unlock the lock after copying over the data. std::unique_lock<std::mutex> lock(lock_); const auto local_texture_map = texture_map_; const auto local_render_target_map = render_target_map_; const auto local_depth_target_map = depth_target_map_; // After moving, the original containers are emptied. const auto local_pending_textures = std::move(pending_textures_); const auto local_pending_render_targets = std::move(pending_render_targets_); lock.unlock(); // If we have any |images| protected, we should switch to a protected escher::Frame and // |render_target| should also be protected. bool has_protected_images = false; for (const auto& image : images) { FX_DCHECK(local_texture_map.find(image.identifier) != local_texture_map.end()); if (local_texture_map.at(image.identifier)->image()->use_protected_memory()) { has_protected_images = true; break; } } FX_DCHECK(local_render_target_map.find(render_target.identifier) != local_render_target_map.end()); FX_DCHECK(!has_protected_images || local_render_target_map.at(render_target.identifier)->use_protected_memory()); // Escher's frame class acts as a command buffer manager that we use to create a // command buffer and submit it to the device queue once we are done. auto frame = escher_->NewFrame( "flatland::VkRenderer", ++frame_number_, /*enable_gpu_logging=*/false, /*requested_type=*/escher::CommandBuffer::Type::kGraphics, has_protected_images); auto command_buffer = frame->cmds(); // Transition pending images to their correct layout // TODO(fxbug.dev/52196): The way we are transitioning image layouts here and in the rest of // scenic is incorrect for "external" images. It just happens to be working by luck on our current // hardware. for (auto texture_id : local_pending_textures) { FX_DCHECK(local_texture_map.find(texture_id) != local_texture_map.end()); const auto texture = local_texture_map.at(texture_id); command_buffer->impl()->TransitionImageLayout(texture->image(), vk::ImageLayout::eUndefined, vk::ImageLayout::eShaderReadOnlyOptimal); } for (auto target_id : local_pending_render_targets) { FX_DCHECK(local_render_target_map.find(target_id) != local_render_target_map.end()); const auto target = local_render_target_map.at(target_id); command_buffer->impl()->TransitionImageLayout(target, vk::ImageLayout::eUndefined, vk::ImageLayout::eColorAttachmentOptimal); } std::vector<const escher::TexturePtr> textures; std::vector<escher::RectangleCompositor::ColorData> color_data; for (const auto& image : images) { // Pass the texture into the above vector to keep it alive outside of this loop. textures.emplace_back(local_texture_map.at(image.identifier)); glm::vec4 multiply(image.multiply_color[0], image.multiply_color[1], image.multiply_color[2], image.multiply_color[3]); color_data.emplace_back(escher::RectangleCompositor::ColorData(multiply, image.is_opaque)); } // Grab the output image and use it to generate a depth texture. The depth texture needs to // be the same width and height as the output image. const auto output_image = local_render_target_map.at(render_target.identifier); const auto depth_texture = local_depth_target_map.at(render_target.identifier); // Now the compositor can finally draw. compositor_.DrawBatch(command_buffer, rectangles, textures, color_data, output_image, depth_texture); // Create vk::semaphores from the zx::events. std::vector<escher::SemaphorePtr> semaphores; for (auto& fence_original : release_fences) { // Since the original fences are passed in by const reference, we // duplicate them here so that the duped fences can be moved into // the create info struct of the semaphore. zx::event fence_copy; auto status = fence_original.duplicate(ZX_RIGHT_SAME_RIGHTS, &fence_copy); FX_DCHECK(status == ZX_OK); auto sema = escher::Semaphore::New(escher_->vk_device()); vk::ImportSemaphoreZirconHandleInfoFUCHSIA info; info.semaphore = sema->vk_semaphore(); info.zirconHandle = fence_copy.release(); info.handleType = vk::ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA; auto result = escher_->vk_device().importSemaphoreZirconHandleFUCHSIA( info, escher_->device()->dispatch_loader()); FX_DCHECK(result == vk::Result::eSuccess); semaphores.emplace_back(sema); } // Submit the commands and wait for them to finish. frame->EndFrame(semaphores, nullptr); } zx_pixel_format_t VkRenderer::ChoosePreferredPixelFormat( const std::vector<zx_pixel_format_t>& available_formats) const { for (auto preferred_format : kPreferredImageFormats) { for (zx_pixel_format_t format : available_formats) { vk::Format vk_format = ConvertToVkFormat(format); if (vk_format == preferred_format) { return format; } } } FX_DCHECK(false) << "Preferred format is not available."; return ZX_PIXEL_FORMAT_NONE; } void VkRenderer::WaitIdle() { escher_->vk_device().waitIdle(); } } // namespace flatland
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
8c265988e18c5d547f64047b2321e4b98e776aaf
8eb63410d10cac89d443593ab2db3d3e614bc8e8
/CS251/Program05/TESTS/topo.cpp
0f1046582dd9880e1fcc141f71896a4d0551cadd
[]
no_license
tsodapop/UIC_Courses
5198c6c9b6dd2dd12433979a8e10bf4a3ef63973
37de906302080c40eadbefbbce68c4b632e19331
refs/heads/master
2023-08-05T02:55:22.252610
2020-02-21T05:11:27
2020-02-21T05:11:27
150,374,870
3
1
null
2023-07-06T21:36:20
2018-09-26T05:51:05
Jupyter Notebook
UTF-8
C++
false
false
654
cpp
#include <iostream> #include "Graph.h" #include "_util.h" int main(int argc, char *argv[]){ graph g; std::vector<int> id_order; std::vector<string> name_order; header(argc, argv); if(argc != 2) std::cout << "usage: topo <dag-filename>\n"; else { if(!g.read_file(argv[1])) std::cout << "could not open file '" << argv[1] << "'\n"; } show_graph(g); if(g.topo_sort(id_order)) std::cout << "topo sort succeeded!\n"; else std::cout << "topo sort failed (cycle?)!\n"; g.ids2names(id_order, name_order); std::cout << "here is the topological order produced:\n\n"; pvec(name_order); return 0; }
[ "jonathantso93@gmail.com" ]
jonathantso93@gmail.com
48cfd07befa6324a5a8531bcd010ca220ea1cb62
78c6cc1f95d71f58007e1e69b8b9805aca935564
/src/test/miner_tests.cpp
d2a11d0ab7f3022f9ec5e9582c488a89a0ae7f9f
[ "MIT" ]
permissive
Netavo/NetavoCore
74dc81536060d549003a60d9d00988511194e9e8
1ffe59c628504fa2db3701eb188a8970a57367ab
refs/heads/master
2020-03-26T16:47:34.704856
2018-08-17T20:23:29
2018-08-17T20:23:29
145,045,139
0
0
null
null
null
null
UTF-8
C++
false
false
17,655
cpp
// Copyright (c) 2011-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "chainparams.h" #include "coins.h" #include "consensus/consensus.h" #include "consensus/merkle.h" #include "consensus/validation.h" #include "validation.h" #include "masternode-payments.h" #include "miner.h" #include "pubkey.h" #include "script/standard.h" #include "txmempool.h" #include "uint256.h" #include "util.h" #include "utilstrencodings.h" #include "test/test_netavo.h" #include <boost/test/unit_test.hpp> BOOST_FIXTURE_TEST_SUITE(miner_tests, TestingSetup) static struct { unsigned char extranonce; unsigned int nonce; } blockinfo[] = { {0, 0x009c5477}, {0, 0x00a94582}, {0, 0x00af3d7f}, {0, 0x00d0b721}, {0, 0x00d53e10}, {0, 0x00f52f0f}, {0, 0x00fb5876}, {0, 0x0117fb12}, {0, 0x011f930b}, {0, 0x013365d2}, {0, 0x0151737e}, {0, 0x0152cdd0}, {0, 0x01758d20}, {0, 0x0178d509}, {0, 0x0192103c}, {0, 0x01a3f1b8}, {0, 0x01abc9c7}, {0, 0x01d2f50c}, {0, 0x01eebad1}, {0, 0x01ef3419}, {0, 0x01f3f154}, {0, 0x01fa6245}, {0, 0x0224e780}, {0, 0x02281625}, {0, 0x023a4d10}, {0, 0x0251d3cf}, {0, 0x02555277}, {0, 0x02648a41}, {0, 0x0280795e}, {0, 0x02a3a585}, {0, 0x02ade34a}, {0, 0x02b02b02}, {0, 0x02c9dc32}, {0, 0x02da9867}, {0, 0x02e4126e}, {0, 0x02e738c7}, {0, 0x02f5c6a9}, {0, 0x0307bb0f}, {0, 0x0328ea58}, {0, 0x034fe819}, {0, 0x036c6fcb}, {0, 0x039b8e11}, {0, 0x039fec90}, {0, 0x03a268ff}, {0, 0x03d37583}, {0, 0x03d6a9a7}, {0, 0x03e7a013}, {0, 0x03f01ebe}, {0, 0x0437104d}, {0, 0x043d0af7}, {0, 0x043d824d}, {0, 0x043f50fc}, {0, 0x044def8c}, {0, 0x0452309a}, {0, 0x04538bd3}, {0, 0x0459286b}, {0, 0x045bc734}, {0, 0x045c878a}, {0, 0x0485d3ba}, {0, 0x048a64e5}, {0, 0x048d6ae1}, {0, 0x048dcfec}, {0, 0x049d2c79}, {0, 0x04ade791}, {0, 0x04b75856}, {0, 0x04c1f89e}, {0, 0x04c2f731}, {0, 0x04ca0376}, {0, 0x04ca102a}, {0, 0x04cbdfe5}, {0, 0x04cbe35a}, {0, 0x04ccfa95}, {0, 0x04dcd6e4}, {0, 0x05066d8b}, {0, 0x05150274}, {0, 0x051dcfa0}, {0, 0x052a4c40}, {0, 0x05310c4e}, {0, 0x05452f69}, {0, 0x05517592}, {0, 0x05543eb8}, {0, 0x05549dc7}, {0, 0x05732695}, {0, 0x057b00d3}, {0, 0x0584760d}, {0, 0x059ca419}, {0, 0x05b23b58}, {0, 0x05c69745}, {0, 0x05e31a12}, {0, 0x05e932d5}, {0, 0x05ef8400}, {0, 0x05f0bdf6}, {0, 0x05f93997}, {0, 0x05ff2978}, {0, 0x06030233}, {0, 0x0627d615}, {0, 0x0644a441}, {0, 0x06518661}, {0, 0x06805ef2}, {0, 0x068c43dd}, {0, 0x069cca16}, {0, 0x06acbf10}, {0, 0x06c2d607}, {0, 0x06d9ea08}, {0, 0x0700d639}, {0, 0x07083d86}, {0, 0x071cc39d}, {0, 0x072c3cb8}, {0, 0x07665a0f}, {0, 0x07741214}, }; CBlockIndex CreateBlockIndex(int nHeight) { CBlockIndex index; index.nHeight = nHeight; index.pprev = chainActive.Tip(); return index; } bool TestSequenceLocks(const CTransaction &tx, int flags) { LOCK(mempool.cs); return CheckSequenceLocks(tx, flags); } // NOTE: These tests rely on CreateNewBlock doing its own self-validation! BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) { const CChainParams& chainparams = Params(CBaseChainParams::MAIN); CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG; CBlockTemplate *pblocktemplate; CMutableTransaction tx,tx2; CScript script; uint256 hash; TestMemPoolEntryHelper entry; entry.nFee = 11; entry.dPriority = 111.0; entry.nHeight = 11; LOCK(cs_main); fCheckpointsEnabled = false; // force UpdatedBlockTip to initialize nCachedBlockHeight mnpayments.UpdatedBlockTip(chainActive.Tip(), *connman); // Simple block creation, nothing special yet: BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); // We can't make transactions until we have inputs // Therefore, load 100 blocks :) int baseheight = 0; std::vector<CTransaction*>txFirst; for (unsigned int i = 0; i < sizeof(blockinfo)/sizeof(*blockinfo); ++i) { CBlock *pblock = &pblocktemplate->block; // pointer for convenience pblock->nVersion = 1; pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1; CMutableTransaction txCoinbase(pblock->vtx[0]); txCoinbase.nVersion = 1; txCoinbase.vin[0].scriptSig = CScript(); txCoinbase.vin[0].scriptSig.push_back(blockinfo[i].extranonce); txCoinbase.vin[0].scriptSig.push_back(chainActive.Height()); txCoinbase.vout[0].scriptPubKey = CScript(); pblock->vtx[0] = CTransaction(txCoinbase); if (txFirst.size() == 0) baseheight = chainActive.Height(); if (txFirst.size() < 4) txFirst.push_back(new CTransaction(pblock->vtx[0])); pblock->hashMerkleRoot = BlockMerkleRoot(*pblock); pblock->nNonce = blockinfo[i].nonce; BOOST_CHECK(ProcessNewBlock(chainparams, pblock, true, NULL, NULL)); pblock->hashPrevBlock = pblock->GetHash(); } delete pblocktemplate; // Just to make sure we can still make simple blocks BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); delete pblocktemplate; // block sigops > limit: 1000 CHECKMULTISIG + 1 tx.vin.resize(1); // NOTE: OP_NOP is used to force 20 SigOps for the CHECKMULTISIG tx.vin[0].scriptSig = CScript() << OP_0 << OP_0 << OP_0 << OP_NOP << OP_CHECKMULTISIG << OP_1; tx.vin[0].prevout.hash = txFirst[0]->GetHash(); tx.vin[0].prevout.n = 0; tx.vout.resize(1); tx.vout[0].nValue = 50000000000LL; for (unsigned int i = 0; i < 1001; ++i) { tx.vout[0].nValue -= 1000000; hash = tx.GetHash(); bool spendsCoinbase = (i == 0) ? true : false; // only first tx spends coinbase // If we don't set the # of sig ops in the CTxMemPoolEntry, template creation fails mempool.addUnchecked(hash, entry.Fee(1000000).Time(GetTime()).SpendsCoinbase(spendsCoinbase).FromTx(tx)); tx.vin[0].prevout.hash = hash; } BOOST_CHECK_THROW(CreateNewBlock(chainparams, scriptPubKey), std::runtime_error); mempool.clear(); tx.vin[0].prevout.hash = txFirst[0]->GetHash(); tx.vout[0].nValue = 50000000000LL; for (unsigned int i = 0; i < 1001; ++i) { tx.vout[0].nValue -= 1000000; hash = tx.GetHash(); bool spendsCoinbase = (i == 0) ? true : false; // only first tx spends coinbase // If we do set the # of sig ops in the CTxMemPoolEntry, template creation passes mempool.addUnchecked(hash, entry.Fee(1000000).Time(GetTime()).SpendsCoinbase(spendsCoinbase).SigOps(20).FromTx(tx)); tx.vin[0].prevout.hash = hash; } BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); delete pblocktemplate; mempool.clear(); // block size > limit tx.vin[0].scriptSig = CScript(); // 18 * (520char + DROP) + OP_1 = 9433 bytes std::vector<unsigned char> vchData(520); for (unsigned int i = 0; i < 18; ++i) tx.vin[0].scriptSig << vchData << OP_DROP; tx.vin[0].scriptSig << OP_1; tx.vin[0].prevout.hash = txFirst[0]->GetHash(); tx.vout[0].nValue = 50000000000LL; for (unsigned int i = 0; i < 128; ++i) { tx.vout[0].nValue -= 10000000; hash = tx.GetHash(); bool spendsCoinbase = (i == 0) ? true : false; // only first tx spends coinbase mempool.addUnchecked(hash, entry.Fee(1000000).Time(GetTime()).SpendsCoinbase(spendsCoinbase).FromTx(tx)); tx.vin[0].prevout.hash = hash; } BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); delete pblocktemplate; mempool.clear(); // orphan in mempool, template creation fails hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Fee(1000000).Time(GetTime()).FromTx(tx)); BOOST_CHECK_THROW(CreateNewBlock(chainparams, scriptPubKey), std::runtime_error); mempool.clear(); // child with higher priority than parent tx.vin[0].scriptSig = CScript() << OP_1; tx.vin[0].prevout.hash = txFirst[1]->GetHash(); tx.vout[0].nValue = 49000000000LL; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Fee(1000000000LL).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); tx.vin[0].prevout.hash = hash; tx.vin.resize(2); tx.vin[1].scriptSig = CScript() << OP_1; tx.vin[1].prevout.hash = txFirst[0]->GetHash(); tx.vin[1].prevout.n = 0; tx.vout[0].nValue = 59000000000LL; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Fee(4000000000LL).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); delete pblocktemplate; mempool.clear(); // coinbase in mempool, template creation fails tx.vin.resize(1); tx.vin[0].prevout.SetNull(); tx.vin[0].scriptSig = CScript() << OP_0 << OP_1; tx.vout[0].nValue = 0; hash = tx.GetHash(); // give it a fee so it'll get mined mempool.addUnchecked(hash, entry.Fee(100000).Time(GetTime()).SpendsCoinbase(false).FromTx(tx)); BOOST_CHECK_THROW(CreateNewBlock(chainparams, scriptPubKey), std::runtime_error); mempool.clear(); // invalid (pre-p2sh) txn in mempool, template creation fails tx.vin[0].prevout.hash = txFirst[0]->GetHash(); tx.vin[0].prevout.n = 0; tx.vin[0].scriptSig = CScript() << OP_1; tx.vout[0].nValue = 49000000000LL; script = CScript() << OP_0; tx.vout[0].scriptPubKey = GetScriptForDestination(CScriptID(script)); hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Fee(100000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); tx.vin[0].prevout.hash = hash; tx.vin[0].scriptSig = CScript() << std::vector<unsigned char>(script.begin(), script.end()); tx.vout[0].nValue -= 1000000; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Fee(1000000).Time(GetTime()).SpendsCoinbase(false).FromTx(tx)); BOOST_CHECK_THROW(CreateNewBlock(chainparams, scriptPubKey), std::runtime_error); mempool.clear(); // double spend txn pair in mempool, template creation fails tx.vin[0].prevout.hash = txFirst[0]->GetHash(); tx.vin[0].scriptSig = CScript() << OP_1; tx.vout[0].nValue = 49000000000LL; tx.vout[0].scriptPubKey = CScript() << OP_1; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Fee(1000000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); tx.vout[0].scriptPubKey = CScript() << OP_2; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Fee(1000000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); BOOST_CHECK_THROW(CreateNewBlock(chainparams, scriptPubKey), std::runtime_error); mempool.clear(); // subsidy changing // int nHeight = chainActive.Height(); // // Create an actual 209999-long block chain (without valid blocks). // while (chainActive.Tip()->nHeight < 209999) { // CBlockIndex* prev = chainActive.Tip(); // CBlockIndex* next = new CBlockIndex(); // next->phashBlock = new uint256(GetRandHash()); // pcoinsTip->SetBestBlock(next->GetBlockHash()); // next->pprev = prev; // next->nHeight = prev->nHeight + 1; // next->BuildSkip(); // chainActive.SetTip(next); // } // BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); // delete pblocktemplate; // // Extend to a 210000-long block chain. // while (chainActive.Tip()->nHeight < 210000) { // CBlockIndex* prev = chainActive.Tip(); // CBlockIndex* next = new CBlockIndex(); // next->phashBlock = new uint256(GetRandHash()); // pcoinsTip->SetBestBlock(next->GetBlockHash()); // next->pprev = prev; // next->nHeight = prev->nHeight + 1; // next->BuildSkip(); // chainActive.SetTip(next); // } // BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); // delete pblocktemplate; // // Delete the dummy blocks again. // while (chainActive.Tip()->nHeight > nHeight) { // CBlockIndex* del = chainActive.Tip(); // chainActive.SetTip(del->pprev); // pcoinsTip->SetBestBlock(del->pprev->GetBlockHash()); // delete del->phashBlock; // delete del; // } // non-final txs in mempool SetMockTime(chainActive.Tip()->GetMedianTimePast()+1); int flags = LOCKTIME_VERIFY_SEQUENCE|LOCKTIME_MEDIAN_TIME_PAST; // height map std::vector<int> prevheights; // relative height locked tx.nVersion = 2; tx.vin.resize(1); prevheights.resize(1); tx.vin[0].prevout.hash = txFirst[0]->GetHash(); // only 1 transaction tx.vin[0].prevout.n = 0; tx.vin[0].scriptSig = CScript() << OP_1; tx.vin[0].nSequence = chainActive.Tip()->nHeight + 1; // txFirst[0] is the 2nd block prevheights[0] = baseheight + 1; tx.vout.resize(1); tx.vout[0].nValue = 49000000000LL; tx.vout[0].scriptPubKey = CScript() << OP_1; tx.nLockTime = 0; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Fee(1000000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); BOOST_CHECK(CheckFinalTx(tx, flags)); // Locktime passes BOOST_CHECK(!TestSequenceLocks(tx, flags)); // Sequence locks fail BOOST_CHECK(SequenceLocks(tx, flags, &prevheights, CreateBlockIndex(chainActive.Tip()->nHeight + 2))); // Sequence locks pass on 2nd block // relative time locked tx.vin[0].prevout.hash = txFirst[1]->GetHash(); tx.vin[0].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | (((chainActive.Tip()->GetMedianTimePast()+1-chainActive[1]->GetMedianTimePast()) >> CTxIn::SEQUENCE_LOCKTIME_GRANULARITY) + 1); // txFirst[1] is the 3rd block prevheights[0] = baseheight + 2; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx)); BOOST_CHECK(CheckFinalTx(tx, flags)); // Locktime passes BOOST_CHECK(!TestSequenceLocks(tx, flags)); // Sequence locks fail for (int i = 0; i < CBlockIndex::nMedianTimeSpan; i++) chainActive.Tip()->GetAncestor(chainActive.Tip()->nHeight - i)->nTime += 512; //Trick the MedianTimePast BOOST_CHECK(SequenceLocks(tx, flags, &prevheights, CreateBlockIndex(chainActive.Tip()->nHeight + 1))); // Sequence locks pass 512 seconds later for (int i = 0; i < CBlockIndex::nMedianTimeSpan; i++) chainActive.Tip()->GetAncestor(chainActive.Tip()->nHeight - i)->nTime -= 512; //undo tricked MTP // absolute height locked tx.vin[0].prevout.hash = txFirst[2]->GetHash(); tx.vin[0].nSequence = CTxIn::SEQUENCE_FINAL - 1; prevheights[0] = baseheight + 3; tx.nLockTime = chainActive.Tip()->nHeight + 1; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx)); BOOST_CHECK(!CheckFinalTx(tx, flags)); // Locktime fails BOOST_CHECK(TestSequenceLocks(tx, flags)); // Sequence locks pass BOOST_CHECK(IsFinalTx(tx, chainActive.Tip()->nHeight + 2, chainActive.Tip()->GetMedianTimePast())); // Locktime passes on 2nd block // absolute time locked tx.vin[0].prevout.hash = txFirst[3]->GetHash(); tx.nLockTime = chainActive.Tip()->GetMedianTimePast(); prevheights.resize(1); prevheights[0] = baseheight + 4; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx)); BOOST_CHECK(!CheckFinalTx(tx, flags)); // Locktime fails BOOST_CHECK(TestSequenceLocks(tx, flags)); // Sequence locks pass BOOST_CHECK(IsFinalTx(tx, chainActive.Tip()->nHeight + 2, chainActive.Tip()->GetMedianTimePast() + 1)); // Locktime passes 1 second later // mempool-dependent transactions (not added) tx.vin[0].prevout.hash = hash; prevheights[0] = chainActive.Tip()->nHeight + 1; tx.nLockTime = 0; tx.vin[0].nSequence = 0; BOOST_CHECK(CheckFinalTx(tx, flags)); // Locktime passes BOOST_CHECK(TestSequenceLocks(tx, flags)); // Sequence locks pass tx.vin[0].nSequence = 1; BOOST_CHECK(!TestSequenceLocks(tx, flags)); // Sequence locks fail tx.vin[0].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG; BOOST_CHECK(TestSequenceLocks(tx, flags)); // Sequence locks pass tx.vin[0].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | 1; BOOST_CHECK(!TestSequenceLocks(tx, flags)); // Sequence locks fail BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); // None of the of the absolute height/time locked tx should have made // it into the template because we still check IsFinalTx in CreateNewBlock, // but relative locked txs will if inconsistently added to mempool. // For now these will still generate a valid template until BIP68 soft fork BOOST_CHECK_EQUAL(pblocktemplate->block.vtx.size(), 3); delete pblocktemplate; // However if we advance height by 1 and time by 512, all of them should be mined for (int i = 0; i < CBlockIndex::nMedianTimeSpan; i++) chainActive.Tip()->GetAncestor(chainActive.Tip()->nHeight - i)->nTime += 512; //Trick the MedianTimePast chainActive.Tip()->nHeight++; SetMockTime(chainActive.Tip()->GetMedianTimePast() + 1); BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); BOOST_CHECK_EQUAL(pblocktemplate->block.vtx.size(), 5); delete pblocktemplate; chainActive.Tip()->nHeight--; SetMockTime(0); mempool.clear(); BOOST_FOREACH(CTransaction *tx, txFirst) delete tx; fCheckpointsEnabled = true; } BOOST_AUTO_TEST_SUITE_END()
[ "creed@netavo.pro" ]
creed@netavo.pro
b49df8203d0b6cda330cadd9895925512aaef6c8
43ce649e5dac8e6ad1c9c8ac6ce048df9817a484
/src/TcpServer.h
5e6f4aa174876da3e86ca20eef40290a50940f48
[]
no_license
TresRus/linux-net
54151be9055df267192956221a7b10c1d8a816d1
dc9223a192e394792baac486da97755225085bd5
refs/heads/master
2020-12-29T01:11:38.316272
2016-08-30T22:45:16
2016-08-30T22:45:16
29,545,050
0
0
null
2016-08-30T22:45:17
2015-01-20T18:33:16
C++
UTF-8
C++
false
false
444
h
#ifndef TCP_SERVER_H_ #define TCP_SERVER_H_ #include "TcpActive.h" namespace linuxnet { namespace tcp { //////////////////////////////////////////////////////////// // class Server class Server { public: typedef void (function_type)(socket::tcp::ActiveSP); Server(function_type *function_); int run(int port_); private: function_type *m_function; }; } // namespace tcp } // namespace linuxnet #endif // TCP_SERVER_H_
[ "tresrus92@gmail.com" ]
tresrus92@gmail.com
b0b3a478514ee8dcbdd25bf256c8e0326e870d18
879681c994f1ca9c8d2c905a4e5064997ad25a27
/root-2.3.0/run/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/1.91/uniform/fieldAveragingProperties
de83cc83e37a83e18b0d7581cd198afbf9bbc8ba
[]
no_license
MizuhaWatanabe/OpenFOAM-2.3.0-with-Ubuntu
3828272d989d45fb020e83f8426b849e75560c62
daeb870be81275e8a81f5cbac4ca1906a9bc69c0
refs/heads/master
2020-05-17T16:36:41.848261
2015-04-18T09:29:48
2015-04-18T09:29:48
34,159,882
1
0
null
null
null
null
UTF-8
C++
false
false
1,153
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "1.91/uniform"; object fieldAveragingProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // U.particles { totalIter 9551; totalTime 1.9102; } U.air { totalIter 9551; totalTime 1.9102; } alpha.particles { totalIter 9551; totalTime 1.9102; } p { totalIter 9551; totalTime 1.9102; } // ************************************************************************* //
[ "mizuha.watanabe@gmail.com" ]
mizuha.watanabe@gmail.com
a39e36dec61786e60b8e6f3df27e5deab1813245
52e2c9bcd7adacc11367f9ea713cc2725cc01825
/thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/includes_types.h
2f09a548133a4c8596c7418a8c4948397df9f12e
[ "Apache-2.0" ]
permissive
NoelToby/fbthrift
5fa4f41abaa340ad8c8f0ec484f66e6a363950f2
f9d6ac696078649f6eb17ee4cc6d587ddde17459
refs/heads/master
2020-05-01T16:43:24.266344
2019-03-25T01:46:28
2019-03-25T01:49:27
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,511
h
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <thrift/lib/cpp2/GeneratedHeaderHelper.h> #include <thrift/lib/cpp2/Thrift.h> #include <thrift/lib/cpp2/gen/module_types_h.h> #include <thrift/lib/cpp2/protocol/Protocol.h> #include "folly/sorted_vector_types.h" // BEGIN declare_enums namespace a { namespace different { namespace ns { enum class AnEnum { FIELDA = 2, FIELDB = 4 }; using _AnEnum_EnumMapFactory = apache::thrift::detail::TEnumMapFactory<AnEnum>; extern const _AnEnum_EnumMapFactory::ValuesToNamesMapType _AnEnum_VALUES_TO_NAMES; extern const _AnEnum_EnumMapFactory::NamesToValuesMapType _AnEnum_NAMES_TO_VALUES; }}} // a::different::ns namespace std { template<> struct hash<typename ::a::different::ns::AnEnum> : public apache::thrift::detail::enum_hash<typename ::a::different::ns::AnEnum> {}; template<> struct equal_to<typename ::a::different::ns::AnEnum> : public apache::thrift::detail::enum_equal_to<typename ::a::different::ns::AnEnum> {}; } // std namespace apache { namespace thrift { template <> struct TEnumDataStorage< ::a::different::ns::AnEnum>; template <> struct TEnumTraits< ::a::different::ns::AnEnum> { using type = ::a::different::ns::AnEnum; static constexpr std::size_t const size = 2; static folly::Range<type const*> const values; static folly::Range<folly::StringPiece const*> const names; static char const* findName(type value); static bool findValue(char const* name, type* out); static constexpr type min() { return type::FIELDA; } static constexpr type max() { return type::FIELDB; } }; }} // apache::thrift // END declare_enums // BEGIN struct_indirection // END struct_indirection // BEGIN forward_declare namespace a { namespace different { namespace ns { class AStruct; class AStructB; }}} // a::different::ns // END forward_declare // BEGIN typedefs namespace a { namespace different { namespace ns { typedef int64_t IncludedInt64; }}} // a::different::ns // END typedefs // BEGIN hash_and_equal_to // END hash_and_equal_to namespace a { namespace different { namespace ns { class AStruct final : private apache::thrift::detail::st::ComparisonOperators<AStruct> { public: AStruct() : FieldA(0) {} // FragileConstructor for use in initialization lists only. AStruct(apache::thrift::FragileConstructor, int32_t FieldA__arg); template <typename _T> void __set_field(::apache::thrift::detail::argument_wrapper<1, _T> arg) { FieldA = arg.extract(); __isset.FieldA = true; } AStruct(AStruct&&) = default; AStruct(const AStruct&) = default; AStruct& operator=(AStruct&&) = default; AStruct& operator=(const AStruct&) = default; void __clear(); int32_t FieldA; struct __isset { bool FieldA; } __isset = {}; bool operator==(const AStruct& rhs) const; bool operator<(const AStruct& rhs) const; int32_t get_FieldA() const { return FieldA; } int32_t& set_FieldA(int32_t FieldA_) { FieldA = FieldA_; __isset.FieldA = true; return FieldA; } template <class Protocol_> uint32_t read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops< AStruct >; }; void swap(AStruct& a, AStruct& b); template <class Protocol_> uint32_t AStruct::read(Protocol_* iprot) { auto _xferStart = iprot->getCurrentPosition().getCurrentPosition(); readNoXfer(iprot); return iprot->getCurrentPosition().getCurrentPosition() - _xferStart; } }}} // a::different::ns namespace a { namespace different { namespace ns { class AStructB final : private apache::thrift::detail::st::ComparisonOperators<AStructB> { public: AStructB() : FieldA(std::make_shared< ::a::different::ns::AStruct>()) {} // FragileConstructor for use in initialization lists only. AStructB(apache::thrift::FragileConstructor, std::shared_ptr<const ::a::different::ns::AStruct> FieldA__arg); template <typename _T> void __set_field(::apache::thrift::detail::argument_wrapper<1, _T> arg) { FieldA = std::make_shared<std::decay_t<_T>>(arg.extract()); } AStructB(AStructB&&) = default; AStructB(const AStructB&) = default; AStructB& operator=(AStructB&&) = default; AStructB& operator=(const AStructB&) = default; void __clear(); std::shared_ptr<const ::a::different::ns::AStruct> FieldA; bool operator==(const AStructB& rhs) const; bool operator<(const AStructB& rhs) const; template <class Protocol_> uint32_t read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops< AStructB >; }; void swap(AStructB& a, AStructB& b); template <class Protocol_> uint32_t AStructB::read(Protocol_* iprot) { auto _xferStart = iprot->getCurrentPosition().getCurrentPosition(); readNoXfer(iprot); return iprot->getCurrentPosition().getCurrentPosition() - _xferStart; } }}} // a::different::ns
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
b867f33a9bfd90530af751974a3c46d4d59cd9f0
4afc6b5a6887ca0a4fadedcf5f99aa89cdc90f21
/916/C.cpp
09c6fb76927b0540fcc824608e91e6ec4445b6a6
[]
no_license
mahdialikhasi/codeforces
0fb1c3ac32993001a41cbf7ddf2d1bb17b322558
758a7ede4d67df9b567c53d82bc6da696ee3a03e
refs/heads/master
2020-07-10T11:26:48.421345
2019-11-07T06:52:44
2019-11-07T06:52:44
204,252,441
1
0
null
null
null
null
UTF-8
C++
false
false
1,238
cpp
#include <iostream> using namespace std; #include <algorithm> #include <stdio.h> #include <vector> #include <math.h> long long int findNextPrime(long long int no){ for (int i = 1; true; ++i) { int j = 2; for (; j < int(sqrt(no + i)) + 1; ++j) { if((no + i) % j == 0){ break; } } if(j == int(sqrt(no + i)) + 1){ return no + i; } } } void print(vector<vector<pair<int, int> > > &graph){ for (int i = 0; i < graph.size(); ++i) { for (int j = 0; j < graph[i].size(); ++j) { cout << i + 1 << " " << graph[i][j].first + 1 << " " << graph[i][j].second << endl; } } } int main(){ int n, m; cin >> n >> m; vector<vector<pair<int, int> > > graph(n); graph[0].push_back(make_pair(n - 1, 2)); long long int sum = 2; for (int i = 0; i < n - 3; ++i) { graph[0].push_back(make_pair(i + 1, 2)); sum += 2; } if(m > 1){ int next = findNextPrime(sum) - sum; graph[0].push_back(make_pair(n - 2, next)); int f = 1; int l = 2; for (int i = 0; i < m - n + 1; ++i) { if(l == n){ f++; l = f + 1; } graph[f].push_back(make_pair(l, max(2, next) + 1)); l++; } cout << 2 << " " << sum + next << endl; }else{ cout << 2 << " " << 2 << endl; } print(graph); return 0; }
[ "mahdialikhasi1389@gmail.com" ]
mahdialikhasi1389@gmail.com
d16a1f5ccdf936b943084a7059135f6bd1f8ce61
df17c84e7651675f04f5b9544b9b1ac30dc92913
/ejercicio6.cpp
46c2e14f582e48930a2d2efdfd7f8c8f54282ba4
[]
no_license
cs1102-lab1-09-2019-2/estructuras-de-control-vectores-DavidCaleb
9d05fd20809b509eae11ffc13e4c56eeabc93f35
b57389d67d1cccfe687fb3f28ed5c9b40a0791b8
refs/heads/master
2020-07-10T08:56:57.581234
2019-08-31T04:46:51
2019-08-31T04:46:51
204,224,579
0
0
null
null
null
null
UTF-8
C++
false
false
103
cpp
/* Leer tres numeros del usuario separados por espacio: 10 15 20 Y encuentra el mayor valor: 30 */
[ "mabisrror@utec.edu.pe" ]
mabisrror@utec.edu.pe
c4d36cb3d9d84d7cf6e971d9bc1742daa384beba
6b18f94688327d12c840b6433ca0d8c32a22d1db
/src/deck.cpp
cbb0474ba3cc316f66191182390a075b1c9f7e22
[]
no_license
thomas1242/Tiger-Zone
d7e58e350be6e9b9a8950ff1e77398b30ce92202
02fc7ff42a267d616684d1776a1767eb71d9d168
refs/heads/master
2021-01-12T11:14:58.024349
2017-05-05T18:30:44
2017-05-05T18:30:44
72,883,270
1
2
null
2016-12-01T20:37:42
2016-11-04T20:32:48
C++
UTF-8
C++
false
false
2,387
cpp
#include <stdlib.h> /* srand, rand */ #include <string> #include <stack> #include <iostream> #include <sstream> #include "deck.h" using namespace std; // Deck constructor Deck::Deck() { numCardsInDeck = 0; for(int i = 0; i < UNIQUECARDS; i++) { // initally 0 cards in the deck counts[i] = 0; } int maxCounts[] = { 10, 4, 2, 1, 8, 9, 4, 1, 4, 5, 3, 3, 5, 20, 1, 2, 1, 2, 2, 2, 3, 1, 2, 3, 2, 1, 2, 1, 2}; // indices 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 12,13, 14,15,16,17,18,19,20,21,22,23,24,25,26,27, 28 srand (time(NULL)); int id; for(int i = 0; i < MAXCARDS; i++) { // put 76 playable cards in deck do{ id = rand() % 28; // generate random card } while ( counts[id] >= maxCounts[id] ); // only use cards we need deck.push( new Card(id) ); // put the card in the deck counts[id]++; numCardsInDeck++; } deck.push( new Card(18) ); // push center card on top of the deck numCardsInDeck++; } // pop old top card off the deck, return new top card's id to the player who drew the card Card* Deck::drawCard() { numCardsInDeck--; if(isEmpty()) { cout << "empty" << endl; return NULL; } Card * top = deck.top(); // id of new top card (the card to be placed) deck.pop(); // cout << "card " << top->getCardID() << " with id = " << top->getId() << " drawn, " << numCardsInDeck <<" cards left." << endl; return top; // return id of top card } // convert int to string to create score string string Deck::getDeckString() { ostringstream oss; oss << numCardsInDeck; string s = "cards left: " + oss.str(); return s; } // print number of each type of card currently in the deck void Deck::printDeck() { int sum = 0; for(int i = 0; i < UNIQUECARDS; i++) { cout << "# of " << i << "'s = " << counts[i] << '.' << endl; sum += counts[i]; } cout << "total number of cards in the deck = " << sum << endl; cout << "total number of cards in the deck = " << numCardsInDeck << endl; } bool Deck::isEmpty() { return (deck.size() == 0); } int Deck::getSize() { return numCardsInDeck; }
[ "Thomas@Thomass-MacBook-Pro.local" ]
Thomas@Thomass-MacBook-Pro.local
98aaa1e55fef177e079e5df3078e34df254262f4
d27fb7f94a67fc3e974a861a3934f5f00a404e8f
/c++/Code_jam/2021 (1r)/Round 1/Matrygons.cpp
712e2719cf9526e99c5e8f353099e3e49535b333
[]
no_license
Victoriano012/Competitive-Progamming
8e112561a0677b12b4e311ecb9ccd18e81b8ea73
d8a7c1bb07ef8f1436027a053bb1b0f3deafffa1
refs/heads/main
2023-08-21T22:39:23.299746
2021-10-19T17:56:27
2021-10-19T17:56:27
null
0
0
null
null
null
null
UTF-8
C++
false
false
928
cpp
#include <bits/stdc++.h> using namespace std; vector<int> divisors(int n){ vector<int> ans(0); for(int i = 2; i*i <= n; ++i){ if(n%i == 0){ if(n/i != 2) ans.push_back(i); if(i != 2 && n != i*i) ans.push_back(n/i); } } return ans; } int main(){ vector<int> ans_with2(1e6+1, 1); vector<int> ans_no2(1e6+1, 1); ans_with2[0] = -1; ans_with2[1] = -1; ans_no2[0] = -1; ans_no2[1] = -1; ans_no2[2] = -1; for(int i = 3; i <= 1e6+1; ++i){ vector<int> div = divisors(i); for(int k: div){ ans_no2[i] = max(ans_no2[i], 1+ans_with2[k-1]); } if(i%2 == 0) ans_with2[i] = max(ans_no2[i], 1+ans_with2[i/2 -1]); else ans_with2[i] = ans_no2[i]; } int T; cin >> T; for(int t = 1; t <= T; ++t){ int n; cin >> n; cout << "Case #" << t << ": " << ans_no2[n] << endl; } }
[ "victorconchello@gmail.com" ]
victorconchello@gmail.com
106186df752eb89abbc9ba88396120a8e912958f
7f4230cae41e0712d5942960674bfafe4cccd1f1
/code/IFCReaderGen.h
d2f979e46a0a12741ebaac7cf589dfadf0dc665b
[ "BSD-3-Clause" ]
permissive
tonttu/assimp
c6941538b3b3c3d66652423415dea098be21f37a
320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce
refs/heads/master
2021-01-16T19:56:09.309754
2011-06-07T20:00:41
2011-06-07T20:00:41
1,295,427
1
0
null
null
null
null
UTF-8
C++
false
false
196,247
h
/* Open Asset Import Library (ASSIMP) ---------------------------------------------------------------------- Copyright (c) 2006-2010, ASSIMP Development Team All rights reserved. Redistribution and use of this software 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 ASSIMP team, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of the ASSIMP Development Team. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------- */ /** MACHINE-GENERATED by scripts/ICFImporter/CppGenerator.py */ #ifndef INCLUDED_IFC_READER_GEN_H #define INCLUDED_IFC_READER_GEN_H #include "STEPFile.h" namespace Assimp { namespace IFC { using namespace STEP; using namespace STEP::EXPRESS; struct NotImplemented : public ObjectHelper<NotImplemented,0> { }; // ****************************************************************************** // IFC Custom data types // ****************************************************************************** // C++ wrapper type for IfcSoundPowerMeasure typedef REAL IfcSoundPowerMeasure; // C++ wrapper type for IfcDoorStyleOperationEnum typedef ENUMERATION IfcDoorStyleOperationEnum; // C++ wrapper type for IfcRotationalFrequencyMeasure typedef REAL IfcRotationalFrequencyMeasure; // C++ wrapper type for IfcCharacterStyleSelect typedef SELECT IfcCharacterStyleSelect; // C++ wrapper type for IfcElectricTimeControlTypeEnum typedef ENUMERATION IfcElectricTimeControlTypeEnum; // C++ wrapper type for IfcAirTerminalTypeEnum typedef ENUMERATION IfcAirTerminalTypeEnum; // C++ wrapper type for IfcProjectOrderTypeEnum typedef ENUMERATION IfcProjectOrderTypeEnum; // C++ wrapper type for IfcSequenceEnum typedef ENUMERATION IfcSequenceEnum; // C++ wrapper type for IfcSpecificHeatCapacityMeasure typedef REAL IfcSpecificHeatCapacityMeasure; // C++ wrapper type for IfcHeatingValueMeasure typedef REAL IfcHeatingValueMeasure; // C++ wrapper type for IfcRibPlateDirectionEnum typedef ENUMERATION IfcRibPlateDirectionEnum; // C++ wrapper type for IfcSensorTypeEnum typedef ENUMERATION IfcSensorTypeEnum; // C++ wrapper type for IfcElectricHeaterTypeEnum typedef ENUMERATION IfcElectricHeaterTypeEnum; // C++ wrapper type for IfcObjectiveEnum typedef ENUMERATION IfcObjectiveEnum; // C++ wrapper type for IfcTextStyleSelect typedef SELECT IfcTextStyleSelect; // C++ wrapper type for IfcColumnTypeEnum typedef ENUMERATION IfcColumnTypeEnum; // C++ wrapper type for IfcGasTerminalTypeEnum typedef ENUMERATION IfcGasTerminalTypeEnum; // C++ wrapper type for IfcMassDensityMeasure typedef REAL IfcMassDensityMeasure; // C++ wrapper type for IfcSimpleValue typedef SELECT IfcSimpleValue; // C++ wrapper type for IfcElectricConductanceMeasure typedef REAL IfcElectricConductanceMeasure; // C++ wrapper type for IfcBuildingElementProxyTypeEnum typedef ENUMERATION IfcBuildingElementProxyTypeEnum; // C++ wrapper type for IfcJunctionBoxTypeEnum typedef ENUMERATION IfcJunctionBoxTypeEnum; // C++ wrapper type for IfcModulusOfElasticityMeasure typedef REAL IfcModulusOfElasticityMeasure; // C++ wrapper type for IfcActionSourceTypeEnum typedef ENUMERATION IfcActionSourceTypeEnum; // C++ wrapper type for IfcSIUnitName typedef ENUMERATION IfcSIUnitName; // C++ wrapper type for IfcRotationalMassMeasure typedef REAL IfcRotationalMassMeasure; // C++ wrapper type for IfcMemberTypeEnum typedef ENUMERATION IfcMemberTypeEnum; // C++ wrapper type for IfcTextDecoration typedef STRING IfcTextDecoration; // C++ wrapper type for IfcPositiveLengthMeasure typedef REAL IfcPositiveLengthMeasure; // C++ wrapper type for IfcAmountOfSubstanceMeasure typedef REAL IfcAmountOfSubstanceMeasure; // C++ wrapper type for IfcDoorStyleConstructionEnum typedef ENUMERATION IfcDoorStyleConstructionEnum; // C++ wrapper type for IfcAngularVelocityMeasure typedef REAL IfcAngularVelocityMeasure; // C++ wrapper type for IfcDirectionSenseEnum typedef ENUMERATION IfcDirectionSenseEnum; // C++ wrapper type for IfcNullStyle typedef ENUMERATION IfcNullStyle; // C++ wrapper type for IfcMonthInYearNumber typedef INTEGER IfcMonthInYearNumber; // C++ wrapper type for IfcRampFlightTypeEnum typedef ENUMERATION IfcRampFlightTypeEnum; // C++ wrapper type for IfcWindowStyleOperationEnum typedef ENUMERATION IfcWindowStyleOperationEnum; // C++ wrapper type for IfcCurvatureMeasure typedef REAL IfcCurvatureMeasure; // C++ wrapper type for IfcBooleanOperator typedef ENUMERATION IfcBooleanOperator; // C++ wrapper type for IfcDuctFittingTypeEnum typedef ENUMERATION IfcDuctFittingTypeEnum; // C++ wrapper type for IfcCurrencyEnum typedef ENUMERATION IfcCurrencyEnum; // C++ wrapper type for IfcObjectTypeEnum typedef ENUMERATION IfcObjectTypeEnum; // C++ wrapper type for IfcThermalLoadTypeEnum typedef ENUMERATION IfcThermalLoadTypeEnum; // C++ wrapper type for IfcIonConcentrationMeasure typedef REAL IfcIonConcentrationMeasure; // C++ wrapper type for IfcObjectReferenceSelect typedef SELECT IfcObjectReferenceSelect; // C++ wrapper type for IfcClassificationNotationSelect typedef SELECT IfcClassificationNotationSelect; // C++ wrapper type for IfcBSplineCurveForm typedef ENUMERATION IfcBSplineCurveForm; // C++ wrapper type for IfcElementCompositionEnum typedef ENUMERATION IfcElementCompositionEnum; // C++ wrapper type for IfcDraughtingCalloutElement typedef SELECT IfcDraughtingCalloutElement; // C++ wrapper type for IfcFillStyleSelect typedef SELECT IfcFillStyleSelect; // C++ wrapper type for IfcHeatFluxDensityMeasure typedef REAL IfcHeatFluxDensityMeasure; // C++ wrapper type for IfcGeometricProjectionEnum typedef ENUMERATION IfcGeometricProjectionEnum; // C++ wrapper type for IfcFontVariant typedef STRING IfcFontVariant; // C++ wrapper type for IfcThermalResistanceMeasure typedef REAL IfcThermalResistanceMeasure; // C++ wrapper type for IfcReflectanceMethodEnum typedef ENUMERATION IfcReflectanceMethodEnum; // C++ wrapper type for IfcSlabTypeEnum typedef ENUMERATION IfcSlabTypeEnum; // C++ wrapper type for IfcPositiveRatioMeasure typedef REAL IfcPositiveRatioMeasure; // C++ wrapper type for IfcInternalOrExternalEnum typedef ENUMERATION IfcInternalOrExternalEnum; // C++ wrapper type for IfcDimensionExtentUsage typedef ENUMERATION IfcDimensionExtentUsage; // C++ wrapper type for IfcPipeFittingTypeEnum typedef ENUMERATION IfcPipeFittingTypeEnum; // C++ wrapper type for IfcSanitaryTerminalTypeEnum typedef ENUMERATION IfcSanitaryTerminalTypeEnum; // C++ wrapper type for IfcMinuteInHour typedef INTEGER IfcMinuteInHour; // C++ wrapper type for IfcWallTypeEnum typedef ENUMERATION IfcWallTypeEnum; // C++ wrapper type for IfcMolecularWeightMeasure typedef REAL IfcMolecularWeightMeasure; // C++ wrapper type for IfcUnitaryEquipmentTypeEnum typedef ENUMERATION IfcUnitaryEquipmentTypeEnum; // C++ wrapper type for IfcProcedureTypeEnum typedef ENUMERATION IfcProcedureTypeEnum; // C++ wrapper type for IfcDistributionChamberElementTypeEnum typedef ENUMERATION IfcDistributionChamberElementTypeEnum; // C++ wrapper type for IfcTextPath typedef ENUMERATION IfcTextPath; // C++ wrapper type for IfcCostScheduleTypeEnum typedef ENUMERATION IfcCostScheduleTypeEnum; // C++ wrapper type for IfcShell typedef SELECT IfcShell; // C++ wrapper type for IfcLinearMomentMeasure typedef REAL IfcLinearMomentMeasure; // C++ wrapper type for IfcElectricCurrentMeasure typedef REAL IfcElectricCurrentMeasure; // C++ wrapper type for IfcDaylightSavingHour typedef INTEGER IfcDaylightSavingHour; // C++ wrapper type for IfcNormalisedRatioMeasure typedef REAL IfcNormalisedRatioMeasure; // C++ wrapper type for IfcFanTypeEnum typedef ENUMERATION IfcFanTypeEnum; // C++ wrapper type for IfcContextDependentMeasure typedef REAL IfcContextDependentMeasure; // C++ wrapper type for IfcAheadOrBehind typedef ENUMERATION IfcAheadOrBehind; // C++ wrapper type for IfcFontStyle typedef STRING IfcFontStyle; // C++ wrapper type for IfcCooledBeamTypeEnum typedef ENUMERATION IfcCooledBeamTypeEnum; // C++ wrapper type for IfcSurfaceStyleElementSelect typedef SELECT IfcSurfaceStyleElementSelect; // C++ wrapper type for IfcYearNumber typedef INTEGER IfcYearNumber; // C++ wrapper type for IfcLabel typedef STRING IfcLabel; // C++ wrapper type for IfcTimeStamp typedef INTEGER IfcTimeStamp; // C++ wrapper type for IfcFireSuppressionTerminalTypeEnum typedef ENUMERATION IfcFireSuppressionTerminalTypeEnum; // C++ wrapper type for IfcDocumentConfidentialityEnum typedef ENUMERATION IfcDocumentConfidentialityEnum; // C++ wrapper type for IfcColourOrFactor typedef SELECT IfcColourOrFactor; // C++ wrapper type for IfcAirTerminalBoxTypeEnum typedef ENUMERATION IfcAirTerminalBoxTypeEnum; // C++ wrapper type for IfcNumericMeasure typedef NUMBER IfcNumericMeasure; // C++ wrapper type for IfcDerivedUnitEnum typedef ENUMERATION IfcDerivedUnitEnum; // C++ wrapper type for IfcCurveOrEdgeCurve typedef SELECT IfcCurveOrEdgeCurve; // C++ wrapper type for IfcLightEmissionSourceEnum typedef ENUMERATION IfcLightEmissionSourceEnum; // C++ wrapper type for IfcKinematicViscosityMeasure typedef REAL IfcKinematicViscosityMeasure; // C++ wrapper type for IfcBoxAlignment typedef STRING IfcBoxAlignment; // C++ wrapper type for IfcDocumentSelect typedef SELECT IfcDocumentSelect; // C++ wrapper type for IfcCableCarrierFittingTypeEnum typedef ENUMERATION IfcCableCarrierFittingTypeEnum; // C++ wrapper type for IfcPumpTypeEnum typedef ENUMERATION IfcPumpTypeEnum; // C++ wrapper type for IfcHourInDay typedef INTEGER IfcHourInDay; // C++ wrapper type for IfcProjectOrderRecordTypeEnum typedef ENUMERATION IfcProjectOrderRecordTypeEnum; // C++ wrapper type for IfcWindowStyleConstructionEnum typedef ENUMERATION IfcWindowStyleConstructionEnum; // C++ wrapper type for IfcPresentationStyleSelect typedef SELECT IfcPresentationStyleSelect; // C++ wrapper type for IfcCableSegmentTypeEnum typedef ENUMERATION IfcCableSegmentTypeEnum; // C++ wrapper type for IfcWasteTerminalTypeEnum typedef ENUMERATION IfcWasteTerminalTypeEnum; // C++ wrapper type for IfcIsothermalMoistureCapacityMeasure typedef REAL IfcIsothermalMoistureCapacityMeasure; // C++ wrapper type for IfcIdentifier typedef STRING IfcIdentifier; // C++ wrapper type for IfcRadioActivityMeasure typedef REAL IfcRadioActivityMeasure; // C++ wrapper type for IfcSymbolStyleSelect typedef SELECT IfcSymbolStyleSelect; // C++ wrapper type for IfcRoofTypeEnum typedef ENUMERATION IfcRoofTypeEnum; // C++ wrapper type for IfcReal typedef REAL IfcReal; // C++ wrapper type for IfcRoleEnum typedef ENUMERATION IfcRoleEnum; // C++ wrapper type for IfcMeasureValue typedef SELECT IfcMeasureValue; // C++ wrapper type for IfcPileTypeEnum typedef ENUMERATION IfcPileTypeEnum; // C++ wrapper type for IfcElectricCurrentEnum typedef ENUMERATION IfcElectricCurrentEnum; // C++ wrapper type for IfcTextTransformation typedef STRING IfcTextTransformation; // C++ wrapper type for IfcFilterTypeEnum typedef ENUMERATION IfcFilterTypeEnum; // C++ wrapper type for IfcTransformerTypeEnum typedef ENUMERATION IfcTransformerTypeEnum; // C++ wrapper type for IfcSurfaceSide typedef ENUMERATION IfcSurfaceSide; // C++ wrapper type for IfcThermalTransmittanceMeasure typedef REAL IfcThermalTransmittanceMeasure; // C++ wrapper type for IfcTubeBundleTypeEnum typedef ENUMERATION IfcTubeBundleTypeEnum; // C++ wrapper type for IfcLightFixtureTypeEnum typedef ENUMERATION IfcLightFixtureTypeEnum; // C++ wrapper type for IfcInductanceMeasure typedef REAL IfcInductanceMeasure; // C++ wrapper type for IfcGlobalOrLocalEnum typedef ENUMERATION IfcGlobalOrLocalEnum; // C++ wrapper type for IfcOutletTypeEnum typedef ENUMERATION IfcOutletTypeEnum; // C++ wrapper type for IfcWorkControlTypeEnum typedef ENUMERATION IfcWorkControlTypeEnum; // C++ wrapper type for IfcWarpingMomentMeasure typedef REAL IfcWarpingMomentMeasure; // C++ wrapper type for IfcDynamicViscosityMeasure typedef REAL IfcDynamicViscosityMeasure; // C++ wrapper type for IfcEnergySequenceEnum typedef ENUMERATION IfcEnergySequenceEnum; // C++ wrapper type for IfcFillAreaStyleTileShapeSelect typedef SELECT IfcFillAreaStyleTileShapeSelect; // C++ wrapper type for IfcPointOrVertexPoint typedef SELECT IfcPointOrVertexPoint; // C++ wrapper type for IfcVibrationIsolatorTypeEnum typedef ENUMERATION IfcVibrationIsolatorTypeEnum; // C++ wrapper type for IfcTankTypeEnum typedef ENUMERATION IfcTankTypeEnum; // C++ wrapper type for IfcTimeSeriesDataTypeEnum typedef ENUMERATION IfcTimeSeriesDataTypeEnum; // C++ wrapper type for IfcSurfaceTextureEnum typedef ENUMERATION IfcSurfaceTextureEnum; // C++ wrapper type for IfcAddressTypeEnum typedef ENUMERATION IfcAddressTypeEnum; // C++ wrapper type for IfcChillerTypeEnum typedef ENUMERATION IfcChillerTypeEnum; // C++ wrapper type for IfcLightDistributionCurveEnum typedef ENUMERATION IfcLightDistributionCurveEnum; // C++ wrapper type for IfcReinforcingBarRoleEnum typedef ENUMERATION IfcReinforcingBarRoleEnum; // C++ wrapper type for IfcResourceConsumptionEnum typedef ENUMERATION IfcResourceConsumptionEnum; // C++ wrapper type for IfcCsgSelect typedef SELECT IfcCsgSelect; // C++ wrapper type for IfcModulusOfLinearSubgradeReactionMeasure typedef REAL IfcModulusOfLinearSubgradeReactionMeasure; // C++ wrapper type for IfcEvaporatorTypeEnum typedef ENUMERATION IfcEvaporatorTypeEnum; // C++ wrapper type for IfcTimeSeriesScheduleTypeEnum typedef ENUMERATION IfcTimeSeriesScheduleTypeEnum; // C++ wrapper type for IfcDayInMonthNumber typedef INTEGER IfcDayInMonthNumber; // C++ wrapper type for IfcElectricMotorTypeEnum typedef ENUMERATION IfcElectricMotorTypeEnum; // C++ wrapper type for IfcThermalConductivityMeasure typedef REAL IfcThermalConductivityMeasure; // C++ wrapper type for IfcEnergyMeasure typedef REAL IfcEnergyMeasure; // C++ wrapper type for IfcRotationalStiffnessMeasure typedef REAL IfcRotationalStiffnessMeasure; // C++ wrapper type for IfcDerivedMeasureValue typedef SELECT IfcDerivedMeasureValue; // C++ wrapper type for IfcDoorPanelOperationEnum typedef ENUMERATION IfcDoorPanelOperationEnum; // C++ wrapper type for IfcCurveStyleFontSelect typedef SELECT IfcCurveStyleFontSelect; // C++ wrapper type for IfcWindowPanelOperationEnum typedef ENUMERATION IfcWindowPanelOperationEnum; // C++ wrapper type for IfcDataOriginEnum typedef ENUMERATION IfcDataOriginEnum; // C++ wrapper type for IfcStairTypeEnum typedef ENUMERATION IfcStairTypeEnum; // C++ wrapper type for IfcRailingTypeEnum typedef ENUMERATION IfcRailingTypeEnum; // C++ wrapper type for IfcPowerMeasure typedef REAL IfcPowerMeasure; // C++ wrapper type for IfcStackTerminalTypeEnum typedef ENUMERATION IfcStackTerminalTypeEnum; // C++ wrapper type for IfcHatchLineDistanceSelect typedef SELECT IfcHatchLineDistanceSelect; // C++ wrapper type for IfcTrimmingSelect typedef SELECT IfcTrimmingSelect; // C++ wrapper type for IfcThermalExpansionCoefficientMeasure typedef REAL IfcThermalExpansionCoefficientMeasure; // C++ wrapper type for IfcLightDistributionDataSourceSelect typedef SELECT IfcLightDistributionDataSourceSelect; // C++ wrapper type for IfcTorqueMeasure typedef REAL IfcTorqueMeasure; // C++ wrapper type for IfcMassPerLengthMeasure typedef REAL IfcMassPerLengthMeasure; // C++ wrapper type for IfcValveTypeEnum typedef ENUMERATION IfcValveTypeEnum; // C++ wrapper type for IfcWindowPanelPositionEnum typedef ENUMERATION IfcWindowPanelPositionEnum; // C++ wrapper type for IfcSurfaceOrFaceSurface typedef SELECT IfcSurfaceOrFaceSurface; // C++ wrapper type for IfcPropertySourceEnum typedef ENUMERATION IfcPropertySourceEnum; // C++ wrapper type for IfcCableCarrierSegmentTypeEnum typedef ENUMERATION IfcCableCarrierSegmentTypeEnum; // C++ wrapper type for IfcCountMeasure typedef NUMBER IfcCountMeasure; // C++ wrapper type for IfcFontWeight typedef STRING IfcFontWeight; // C++ wrapper type for IfcPhysicalOrVirtualEnum typedef ENUMERATION IfcPhysicalOrVirtualEnum; // C++ wrapper type for IfcSpaceTypeEnum typedef ENUMERATION IfcSpaceTypeEnum; // C++ wrapper type for IfcVolumetricFlowRateMeasure typedef REAL IfcVolumetricFlowRateMeasure; // C++ wrapper type for IfcLuminousFluxMeasure typedef REAL IfcLuminousFluxMeasure; // C++ wrapper type for IfcEvaporativeCoolerTypeEnum typedef ENUMERATION IfcEvaporativeCoolerTypeEnum; // C++ wrapper type for IfcLayeredItem typedef SELECT IfcLayeredItem; // C++ wrapper type for IfcModulusOfSubgradeReactionMeasure typedef REAL IfcModulusOfSubgradeReactionMeasure; // C++ wrapper type for IfcHeatExchangerTypeEnum typedef ENUMERATION IfcHeatExchangerTypeEnum; // C++ wrapper type for IfcProtectiveDeviceTypeEnum typedef ENUMERATION IfcProtectiveDeviceTypeEnum; // C++ wrapper type for IfcDamperTypeEnum typedef ENUMERATION IfcDamperTypeEnum; // C++ wrapper type for IfcControllerTypeEnum typedef ENUMERATION IfcControllerTypeEnum; // C++ wrapper type for IfcMassFlowRateMeasure typedef REAL IfcMassFlowRateMeasure; // C++ wrapper type for IfcAssemblyPlaceEnum typedef ENUMERATION IfcAssemblyPlaceEnum; // C++ wrapper type for IfcAreaMeasure typedef REAL IfcAreaMeasure; // C++ wrapper type for IfcServiceLifeFactorTypeEnum typedef ENUMERATION IfcServiceLifeFactorTypeEnum; // C++ wrapper type for IfcVolumeMeasure typedef REAL IfcVolumeMeasure; // C++ wrapper type for IfcBeamTypeEnum typedef ENUMERATION IfcBeamTypeEnum; // C++ wrapper type for IfcStateEnum typedef ENUMERATION IfcStateEnum; // C++ wrapper type for IfcSpaceHeaterTypeEnum typedef ENUMERATION IfcSpaceHeaterTypeEnum; // C++ wrapper type for IfcSectionTypeEnum typedef ENUMERATION IfcSectionTypeEnum; // C++ wrapper type for IfcFootingTypeEnum typedef ENUMERATION IfcFootingTypeEnum; // C++ wrapper type for IfcMonetaryMeasure typedef REAL IfcMonetaryMeasure; // C++ wrapper type for IfcLoadGroupTypeEnum typedef ENUMERATION IfcLoadGroupTypeEnum; // C++ wrapper type for IfcElectricGeneratorTypeEnum typedef ENUMERATION IfcElectricGeneratorTypeEnum; // C++ wrapper type for IfcFlowMeterTypeEnum typedef ENUMERATION IfcFlowMeterTypeEnum; // C++ wrapper type for IfcMaterialSelect typedef SELECT IfcMaterialSelect; // C++ wrapper type for IfcAnalysisModelTypeEnum typedef ENUMERATION IfcAnalysisModelTypeEnum; // C++ wrapper type for IfcTemperatureGradientMeasure typedef REAL IfcTemperatureGradientMeasure; // C++ wrapper type for IfcModulusOfRotationalSubgradeReactionMeasure typedef REAL IfcModulusOfRotationalSubgradeReactionMeasure; // C++ wrapper type for IfcColour typedef SELECT IfcColour; // C++ wrapper type for IfcCurtainWallTypeEnum typedef ENUMERATION IfcCurtainWallTypeEnum; // C++ wrapper type for IfcMetricValueSelect typedef SELECT IfcMetricValueSelect; // C++ wrapper type for IfcTextAlignment typedef STRING IfcTextAlignment; // C++ wrapper type for IfcDoorPanelPositionEnum typedef ENUMERATION IfcDoorPanelPositionEnum; // C++ wrapper type for IfcPlateTypeEnum typedef ENUMERATION IfcPlateTypeEnum; // C++ wrapper type for IfcSectionalAreaIntegralMeasure typedef REAL IfcSectionalAreaIntegralMeasure; // C++ wrapper type for IfcPresentableText typedef STRING IfcPresentableText; // C++ wrapper type for IfcVaporPermeabilityMeasure typedef REAL IfcVaporPermeabilityMeasure; // C++ wrapper type for IfcStructuralSurfaceTypeEnum typedef ENUMERATION IfcStructuralSurfaceTypeEnum; // C++ wrapper type for IfcLinearVelocityMeasure typedef REAL IfcLinearVelocityMeasure; // C++ wrapper type for IfcIntegerCountRateMeasure typedef INTEGER IfcIntegerCountRateMeasure; // C++ wrapper type for IfcAirToAirHeatRecoveryTypeEnum typedef ENUMERATION IfcAirToAirHeatRecoveryTypeEnum; // C++ wrapper type for IfcDocumentStatusEnum typedef ENUMERATION IfcDocumentStatusEnum; // C++ wrapper type for IfcLengthMeasure typedef REAL IfcLengthMeasure; // C++ wrapper type for IfcPlanarForceMeasure typedef REAL IfcPlanarForceMeasure; // C++ wrapper type for IfcBooleanOperand typedef SELECT IfcBooleanOperand; // C++ wrapper type for IfcInteger typedef INTEGER IfcInteger; // C++ wrapper type for IfcRampTypeEnum typedef ENUMERATION IfcRampTypeEnum; // C++ wrapper type for IfcActorSelect typedef SELECT IfcActorSelect; // C++ wrapper type for IfcElectricChargeMeasure typedef REAL IfcElectricChargeMeasure; // C++ wrapper type for IfcGeometricSetSelect typedef SELECT IfcGeometricSetSelect; // C++ wrapper type for IfcConnectionTypeEnum typedef ENUMERATION IfcConnectionTypeEnum; // C++ wrapper type for IfcValue typedef SELECT IfcValue; // C++ wrapper type for IfcCoolingTowerTypeEnum typedef ENUMERATION IfcCoolingTowerTypeEnum; // C++ wrapper type for IfcPlaneAngleMeasure typedef REAL IfcPlaneAngleMeasure; // C++ wrapper type for IfcSwitchingDeviceTypeEnum typedef ENUMERATION IfcSwitchingDeviceTypeEnum; // C++ wrapper type for IfcFlowDirectionEnum typedef ENUMERATION IfcFlowDirectionEnum; // C++ wrapper type for IfcThermalLoadSourceEnum typedef ENUMERATION IfcThermalLoadSourceEnum; // C++ wrapper type for IfcTextFontSelect typedef SELECT IfcTextFontSelect; // C++ wrapper type for IfcSpecularHighlightSelect typedef SELECT IfcSpecularHighlightSelect; // C++ wrapper type for IfcAnalysisTheoryTypeEnum typedef ENUMERATION IfcAnalysisTheoryTypeEnum; // C++ wrapper type for IfcTextFontName typedef STRING IfcTextFontName; // C++ wrapper type for IfcElectricVoltageMeasure typedef REAL IfcElectricVoltageMeasure; // C++ wrapper type for IfcTendonTypeEnum typedef ENUMERATION IfcTendonTypeEnum; // C++ wrapper type for IfcSoundPressureMeasure typedef REAL IfcSoundPressureMeasure; // C++ wrapper type for IfcElectricDistributionPointFunctionEnum typedef ENUMERATION IfcElectricDistributionPointFunctionEnum; // C++ wrapper type for IfcSpecularRoughness typedef REAL IfcSpecularRoughness; // C++ wrapper type for IfcActionTypeEnum typedef ENUMERATION IfcActionTypeEnum; // C++ wrapper type for IfcReinforcingBarSurfaceEnum typedef ENUMERATION IfcReinforcingBarSurfaceEnum; // C++ wrapper type for IfcHumidifierTypeEnum typedef ENUMERATION IfcHumidifierTypeEnum; // C++ wrapper type for IfcIlluminanceMeasure typedef REAL IfcIlluminanceMeasure; // C++ wrapper type for IfcLibrarySelect typedef SELECT IfcLibrarySelect; // C++ wrapper type for IfcText typedef STRING IfcText; // C++ wrapper type for IfcLayerSetDirectionEnum typedef ENUMERATION IfcLayerSetDirectionEnum; // C++ wrapper type for IfcBoilerTypeEnum typedef ENUMERATION IfcBoilerTypeEnum; // C++ wrapper type for IfcTimeMeasure typedef REAL IfcTimeMeasure; // C++ wrapper type for IfcAccelerationMeasure typedef REAL IfcAccelerationMeasure; // C++ wrapper type for IfcElectricFlowStorageDeviceTypeEnum typedef ENUMERATION IfcElectricFlowStorageDeviceTypeEnum; // C++ wrapper type for IfcLuminousIntensityMeasure typedef REAL IfcLuminousIntensityMeasure; // C++ wrapper type for IfcDefinedSymbolSelect typedef SELECT IfcDefinedSymbolSelect; // C++ wrapper type for IfcUnitEnum typedef ENUMERATION IfcUnitEnum; // C++ wrapper type for IfcInventoryTypeEnum typedef ENUMERATION IfcInventoryTypeEnum; // C++ wrapper type for IfcStructuralActivityAssignmentSelect typedef SELECT IfcStructuralActivityAssignmentSelect; // C++ wrapper type for IfcElementAssemblyTypeEnum typedef ENUMERATION IfcElementAssemblyTypeEnum; // C++ wrapper type for IfcServiceLifeTypeEnum typedef ENUMERATION IfcServiceLifeTypeEnum; // C++ wrapper type for IfcCoveringTypeEnum typedef ENUMERATION IfcCoveringTypeEnum; // C++ wrapper type for IfcStairFlightTypeEnum typedef ENUMERATION IfcStairFlightTypeEnum; // C++ wrapper type for IfcSIPrefix typedef ENUMERATION IfcSIPrefix; // C++ wrapper type for IfcElectricCapacitanceMeasure typedef REAL IfcElectricCapacitanceMeasure; // C++ wrapper type for IfcFlowInstrumentTypeEnum typedef ENUMERATION IfcFlowInstrumentTypeEnum; // C++ wrapper type for IfcThermodynamicTemperatureMeasure typedef REAL IfcThermodynamicTemperatureMeasure; // C++ wrapper type for IfcGloballyUniqueId typedef STRING IfcGloballyUniqueId; // C++ wrapper type for IfcLampTypeEnum typedef ENUMERATION IfcLampTypeEnum; // C++ wrapper type for IfcMagneticFluxMeasure typedef REAL IfcMagneticFluxMeasure; // C++ wrapper type for IfcSolidAngleMeasure typedef REAL IfcSolidAngleMeasure; // C++ wrapper type for IfcFrequencyMeasure typedef REAL IfcFrequencyMeasure; // C++ wrapper type for IfcTransportElementTypeEnum typedef ENUMERATION IfcTransportElementTypeEnum; // C++ wrapper type for IfcSoundScaleEnum typedef ENUMERATION IfcSoundScaleEnum; // C++ wrapper type for IfcPHMeasure typedef REAL IfcPHMeasure; // C++ wrapper type for IfcActuatorTypeEnum typedef ENUMERATION IfcActuatorTypeEnum; // C++ wrapper type for IfcPositivePlaneAngleMeasure typedef REAL IfcPositivePlaneAngleMeasure; // C++ wrapper type for IfcAppliedValueSelect typedef SELECT IfcAppliedValueSelect; // C++ wrapper type for IfcSecondInMinute typedef REAL IfcSecondInMinute; // C++ wrapper type for IfcDuctSegmentTypeEnum typedef ENUMERATION IfcDuctSegmentTypeEnum; // C++ wrapper type for IfcThermalAdmittanceMeasure typedef REAL IfcThermalAdmittanceMeasure; // C++ wrapper type for IfcSpecularExponent typedef REAL IfcSpecularExponent; // C++ wrapper type for IfcDateTimeSelect typedef SELECT IfcDateTimeSelect; // C++ wrapper type for IfcTransitionCode typedef ENUMERATION IfcTransitionCode; // C++ wrapper type for IfcDimensionCount typedef INTEGER IfcDimensionCount; // C++ wrapper type for IfcLinearStiffnessMeasure typedef REAL IfcLinearStiffnessMeasure; // C++ wrapper type for IfcCompoundPlaneAngleMeasure typedef ListOf< INTEGER, 3, 3 > IfcCompoundPlaneAngleMeasure; // C++ wrapper type for IfcElectricApplianceTypeEnum typedef ENUMERATION IfcElectricApplianceTypeEnum; // C++ wrapper type for IfcProfileTypeEnum typedef ENUMERATION IfcProfileTypeEnum; // C++ wrapper type for IfcCurveFontOrScaledCurveFontSelect typedef SELECT IfcCurveFontOrScaledCurveFontSelect; // C++ wrapper type for IfcProjectedOrTrueLengthEnum typedef ENUMERATION IfcProjectedOrTrueLengthEnum; // C++ wrapper type for IfcAbsorbedDoseMeasure typedef REAL IfcAbsorbedDoseMeasure; // C++ wrapper type for IfcParameterValue typedef REAL IfcParameterValue; // C++ wrapper type for IfcPileConstructionEnum typedef ENUMERATION IfcPileConstructionEnum; // C++ wrapper type for IfcMotorConnectionTypeEnum typedef ENUMERATION IfcMotorConnectionTypeEnum; // C++ wrapper type for IfcOccupantTypeEnum typedef ENUMERATION IfcOccupantTypeEnum; // C++ wrapper type for IfcUnit typedef SELECT IfcUnit; // C++ wrapper type for IfcLinearForceMeasure typedef REAL IfcLinearForceMeasure; // C++ wrapper type for IfcCondenserTypeEnum typedef ENUMERATION IfcCondenserTypeEnum; // C++ wrapper type for IfcDescriptiveMeasure typedef STRING IfcDescriptiveMeasure; // C++ wrapper type for IfcMomentOfInertiaMeasure typedef REAL IfcMomentOfInertiaMeasure; // C++ wrapper type for IfcDoseEquivalentMeasure typedef REAL IfcDoseEquivalentMeasure; // C++ wrapper type for IfcOrientationSelect typedef SELECT IfcOrientationSelect; // C++ wrapper type for IfcLogical typedef LOGICAL IfcLogical; // C++ wrapper type for IfcSizeSelect typedef SELECT IfcSizeSelect; // C++ wrapper type for IfcEnvironmentalImpactCategoryEnum typedef ENUMERATION IfcEnvironmentalImpactCategoryEnum; // C++ wrapper type for IfcLogicalOperatorEnum typedef ENUMERATION IfcLogicalOperatorEnum; // C++ wrapper type for IfcCompressorTypeEnum typedef ENUMERATION IfcCompressorTypeEnum; // C++ wrapper type for IfcBenchmarkEnum typedef ENUMERATION IfcBenchmarkEnum; // C++ wrapper type for IfcRatioMeasure typedef REAL IfcRatioMeasure; // C++ wrapper type for IfcVectorOrDirection typedef SELECT IfcVectorOrDirection; // C++ wrapper type for IfcConstraintEnum typedef ENUMERATION IfcConstraintEnum; // C++ wrapper type for IfcAlarmTypeEnum typedef ENUMERATION IfcAlarmTypeEnum; // C++ wrapper type for IfcLuminousIntensityDistributionMeasure typedef REAL IfcLuminousIntensityDistributionMeasure; // C++ wrapper type for IfcArithmeticOperatorEnum typedef ENUMERATION IfcArithmeticOperatorEnum; // C++ wrapper type for IfcAxis2Placement typedef SELECT IfcAxis2Placement; // C++ wrapper type for IfcForceMeasure typedef REAL IfcForceMeasure; // C++ wrapper type for IfcTrimmingPreference typedef ENUMERATION IfcTrimmingPreference; // C++ wrapper type for IfcElectricResistanceMeasure typedef REAL IfcElectricResistanceMeasure; // C++ wrapper type for IfcWarpingConstantMeasure typedef REAL IfcWarpingConstantMeasure; // C++ wrapper type for IfcPipeSegmentTypeEnum typedef ENUMERATION IfcPipeSegmentTypeEnum; // C++ wrapper type for IfcConditionCriterionSelect typedef SELECT IfcConditionCriterionSelect; // C++ wrapper type for IfcShearModulusMeasure typedef REAL IfcShearModulusMeasure; // C++ wrapper type for IfcPressureMeasure typedef REAL IfcPressureMeasure; // C++ wrapper type for IfcDuctSilencerTypeEnum typedef ENUMERATION IfcDuctSilencerTypeEnum; // C++ wrapper type for IfcBoolean typedef BOOLEAN IfcBoolean; // C++ wrapper type for IfcSectionModulusMeasure typedef REAL IfcSectionModulusMeasure; // C++ wrapper type for IfcChangeActionEnum typedef ENUMERATION IfcChangeActionEnum; // C++ wrapper type for IfcCoilTypeEnum typedef ENUMERATION IfcCoilTypeEnum; // C++ wrapper type for IfcMassMeasure typedef REAL IfcMassMeasure; // C++ wrapper type for IfcStructuralCurveTypeEnum typedef ENUMERATION IfcStructuralCurveTypeEnum; // C++ wrapper type for IfcPermeableCoveringOperationEnum typedef ENUMERATION IfcPermeableCoveringOperationEnum; // C++ wrapper type for IfcMagneticFluxDensityMeasure typedef REAL IfcMagneticFluxDensityMeasure; // C++ wrapper type for IfcMoistureDiffusivityMeasure typedef REAL IfcMoistureDiffusivityMeasure; // ****************************************************************************** // IFC Entities // ****************************************************************************** struct IfcRoot; struct IfcObjectDefinition; struct IfcTypeObject; struct IfcTypeProduct; struct IfcElementType; struct IfcFurnishingElementType; struct IfcFurnitureType; struct IfcObject; struct IfcProduct; struct IfcGrid; struct IfcRepresentationItem; struct IfcGeometricRepresentationItem; struct IfcOneDirectionRepeatFactor; struct IfcTwoDirectionRepeatFactor; struct IfcElement; struct IfcElementComponent; typedef NotImplemented IfcLocalTime; // (not currently used by Assimp) struct IfcSpatialStructureElementType; struct IfcControl; struct IfcActionRequest; typedef NotImplemented IfcTextureVertex; // (not currently used by Assimp) typedef NotImplemented IfcPropertyDefinition; // (not currently used by Assimp) typedef NotImplemented IfcPropertySetDefinition; // (not currently used by Assimp) typedef NotImplemented IfcFluidFlowProperties; // (not currently used by Assimp) typedef NotImplemented IfcDocumentInformation; // (not currently used by Assimp) typedef NotImplemented IfcCalendarDate; // (not currently used by Assimp) struct IfcDistributionElementType; struct IfcDistributionFlowElementType; struct IfcEnergyConversionDeviceType; struct IfcCooledBeamType; struct IfcCsgPrimitive3D; struct IfcRectangularPyramid; typedef NotImplemented IfcStructuralLoad; // (not currently used by Assimp) typedef NotImplemented IfcStructuralLoadStatic; // (not currently used by Assimp) typedef NotImplemented IfcStructuralLoadLinearForce; // (not currently used by Assimp) struct IfcSurface; struct IfcBoundedSurface; struct IfcRectangularTrimmedSurface; typedef NotImplemented IfcPhysicalQuantity; // (not currently used by Assimp) typedef NotImplemented IfcPhysicalSimpleQuantity; // (not currently used by Assimp) typedef NotImplemented IfcQuantityVolume; // (not currently used by Assimp) typedef NotImplemented IfcQuantityArea; // (not currently used by Assimp) struct IfcGroup; struct IfcRelationship; typedef NotImplemented IfcRelAssigns; // (not currently used by Assimp) typedef NotImplemented IfcRelAssignsToActor; // (not currently used by Assimp) struct IfcHalfSpaceSolid; struct IfcPolygonalBoundedHalfSpace; typedef NotImplemented IfcEnergyProperties; // (not currently used by Assimp) struct IfcAirToAirHeatRecoveryType; struct IfcFlowFittingType; struct IfcPipeFittingType; struct IfcRepresentation; struct IfcStyleModel; struct IfcStyledRepresentation; typedef NotImplemented IfcRelAssignsToControl; // (not currently used by Assimp) typedef NotImplemented IfcRelAssignsToProjectOrder; // (not currently used by Assimp) typedef NotImplemented IfcDimensionalExponents; // (not currently used by Assimp) struct IfcBooleanResult; typedef NotImplemented IfcSoundProperties; // (not currently used by Assimp) struct IfcFeatureElement; struct IfcFeatureElementSubtraction; struct IfcOpeningElement; struct IfcConditionCriterion; struct IfcFlowTerminalType; struct IfcFlowControllerType; struct IfcSwitchingDeviceType; struct IfcSystem; struct IfcElectricalCircuit; typedef NotImplemented IfcActorRole; // (not currently used by Assimp) typedef NotImplemented IfcDateAndTime; // (not currently used by Assimp) typedef NotImplemented IfcDraughtingCalloutRelationship; // (not currently used by Assimp) typedef NotImplemented IfcDimensionCalloutRelationship; // (not currently used by Assimp) typedef NotImplemented IfcDerivedUnitElement; // (not currently used by Assimp) typedef NotImplemented IfcExternalReference; // (not currently used by Assimp) typedef NotImplemented IfcClassificationReference; // (not currently used by Assimp) struct IfcUnitaryEquipmentType; typedef NotImplemented IfcProperty; // (not currently used by Assimp) struct IfcPort; typedef NotImplemented IfcAddress; // (not currently used by Assimp) struct IfcPlacement; typedef NotImplemented IfcPreDefinedItem; // (not currently used by Assimp) typedef NotImplemented IfcPreDefinedColour; // (not currently used by Assimp) typedef NotImplemented IfcDraughtingPreDefinedColour; // (not currently used by Assimp) struct IfcProfileDef; struct IfcArbitraryClosedProfileDef; struct IfcCurve; struct IfcConic; struct IfcCircle; typedef NotImplemented IfcAppliedValue; // (not currently used by Assimp) typedef NotImplemented IfcEnvironmentalImpactValue; // (not currently used by Assimp) typedef NotImplemented IfcSimpleProperty; // (not currently used by Assimp) typedef NotImplemented IfcPropertySingleValue; // (not currently used by Assimp) struct IfcElementarySurface; struct IfcPlane; typedef NotImplemented IfcPropertyBoundedValue; // (not currently used by Assimp) struct IfcCostSchedule; typedef NotImplemented IfcMonetaryUnit; // (not currently used by Assimp) typedef NotImplemented IfcConnectionGeometry; // (not currently used by Assimp) typedef NotImplemented IfcConnectionCurveGeometry; // (not currently used by Assimp) struct IfcRightCircularCone; struct IfcElementAssembly; struct IfcBuildingElement; struct IfcMember; typedef NotImplemented IfcPropertyDependencyRelationship; // (not currently used by Assimp) struct IfcBuildingElementProxy; struct IfcStructuralActivity; struct IfcStructuralAction; struct IfcStructuralPlanarAction; struct IfcTopologicalRepresentationItem; struct IfcConnectedFaceSet; struct IfcSweptSurface; struct IfcSurfaceOfLinearExtrusion; struct IfcArbitraryProfileDefWithVoids; struct IfcProcess; struct IfcProcedure; typedef NotImplemented IfcCurveStyleFontPattern; // (not currently used by Assimp) struct IfcVector; struct IfcFaceBound; struct IfcFaceOuterBound; struct IfcFeatureElementAddition; struct IfcNamedUnit; struct IfcConversionBasedUnit; typedef NotImplemented IfcStructuralLoadSingleForce; // (not currently used by Assimp) struct IfcHeatExchangerType; struct IfcPresentationStyleAssignment; struct IfcFlowTreatmentDeviceType; struct IfcFilterType; struct IfcResource; struct IfcEvaporativeCoolerType; typedef NotImplemented IfcTextureCoordinate; // (not currently used by Assimp) typedef NotImplemented IfcTextureCoordinateGenerator; // (not currently used by Assimp) struct IfcOffsetCurve2D; struct IfcEdge; struct IfcSubedge; struct IfcProxy; struct IfcLine; struct IfcColumn; typedef NotImplemented IfcClassificationNotationFacet; // (not currently used by Assimp) struct IfcObjectPlacement; struct IfcGridPlacement; struct IfcDistributionControlElementType; typedef NotImplemented IfcStructuralLoadSingleForceWarping; // (not currently used by Assimp) typedef NotImplemented IfcExternallyDefinedTextFont; // (not currently used by Assimp) struct IfcRelConnects; typedef NotImplemented IfcRelConnectsElements; // (not currently used by Assimp) typedef NotImplemented IfcRelConnectsWithRealizingElements; // (not currently used by Assimp) typedef NotImplemented IfcConstraintClassificationRelationship; // (not currently used by Assimp) struct IfcAnnotation; struct IfcPlate; struct IfcSolidModel; struct IfcManifoldSolidBrep; typedef NotImplemented IfcPreDefinedCurveFont; // (not currently used by Assimp) typedef NotImplemented IfcBoundaryCondition; // (not currently used by Assimp) typedef NotImplemented IfcBoundaryFaceCondition; // (not currently used by Assimp) struct IfcFlowStorageDeviceType; struct IfcStructuralItem; struct IfcStructuralMember; struct IfcStructuralCurveMember; struct IfcStructuralConnection; struct IfcStructuralSurfaceConnection; struct IfcCoilType; struct IfcDuctFittingType; struct IfcStyledItem; struct IfcAnnotationOccurrence; struct IfcAnnotationCurveOccurrence; struct IfcDimensionCurve; struct IfcBoundedCurve; struct IfcAxis1Placement; typedef NotImplemented IfcLightIntensityDistribution; // (not currently used by Assimp) typedef NotImplemented IfcPreDefinedSymbol; // (not currently used by Assimp) struct IfcStructuralPointAction; struct IfcSpatialStructureElement; struct IfcSpace; typedef NotImplemented IfcContextDependentUnit; // (not currently used by Assimp) typedef NotImplemented IfcVirtualGridIntersection; // (not currently used by Assimp) typedef NotImplemented IfcRelAssociates; // (not currently used by Assimp) typedef NotImplemented IfcRelAssociatesClassification; // (not currently used by Assimp) struct IfcCoolingTowerType; typedef NotImplemented IfcMaterialProperties; // (not currently used by Assimp) typedef NotImplemented IfcGeneralMaterialProperties; // (not currently used by Assimp) struct IfcFacetedBrepWithVoids; typedef NotImplemented IfcProfileProperties; // (not currently used by Assimp) typedef NotImplemented IfcGeneralProfileProperties; // (not currently used by Assimp) typedef NotImplemented IfcStructuralProfileProperties; // (not currently used by Assimp) struct IfcValveType; struct IfcSystemFurnitureElementType; struct IfcDiscreteAccessory; typedef NotImplemented IfcPerson; // (not currently used by Assimp) struct IfcBuildingElementType; struct IfcRailingType; struct IfcGasTerminalType; typedef NotImplemented IfcTimeSeries; // (not currently used by Assimp) typedef NotImplemented IfcIrregularTimeSeries; // (not currently used by Assimp) struct IfcSpaceProgram; struct IfcCovering; typedef NotImplemented IfcShapeAspect; // (not currently used by Assimp) struct IfcPresentationStyle; typedef NotImplemented IfcClassificationItemRelationship; // (not currently used by Assimp) struct IfcElectricHeaterType; struct IfcBuildingStorey; struct IfcVertex; struct IfcVertexPoint; struct IfcFlowInstrumentType; struct IfcParameterizedProfileDef; struct IfcUShapeProfileDef; struct IfcRamp; typedef NotImplemented IfcFillAreaStyle; // (not currently used by Assimp) struct IfcCompositeCurve; typedef NotImplemented IfcRelServicesBuildings; // (not currently used by Assimp) struct IfcStructuralCurveMemberVarying; typedef NotImplemented IfcRelReferencedInSpatialStructure; // (not currently used by Assimp) struct IfcRampFlightType; struct IfcDraughtingCallout; struct IfcDimensionCurveDirectedCallout; struct IfcRadiusDimension; struct IfcEdgeFeature; struct IfcSweptAreaSolid; struct IfcExtrudedAreaSolid; typedef NotImplemented IfcQuantityCount; // (not currently used by Assimp) struct IfcAnnotationTextOccurrence; typedef NotImplemented IfcReferencesValueDocument; // (not currently used by Assimp) struct IfcStair; typedef NotImplemented IfcSymbolStyle; // (not currently used by Assimp) struct IfcFillAreaStyleTileSymbolWithStyle; struct IfcAnnotationSymbolOccurrence; struct IfcTerminatorSymbol; struct IfcDimensionCurveTerminator; struct IfcRectangleProfileDef; struct IfcRectangleHollowProfileDef; typedef NotImplemented IfcRelAssociatesLibrary; // (not currently used by Assimp) struct IfcLocalPlacement; typedef NotImplemented IfcOpticalMaterialProperties; // (not currently used by Assimp) typedef NotImplemented IfcServiceLifeFactor; // (not currently used by Assimp) typedef NotImplemented IfcRelAssignsTasks; // (not currently used by Assimp) struct IfcTask; struct IfcAnnotationFillAreaOccurrence; struct IfcFace; struct IfcFlowSegmentType; struct IfcDuctSegmentType; typedef NotImplemented IfcPropertyEnumeration; // (not currently used by Assimp) struct IfcConstructionResource; struct IfcConstructionEquipmentResource; struct IfcSanitaryTerminalType; typedef NotImplemented IfcPreDefinedDimensionSymbol; // (not currently used by Assimp) typedef NotImplemented IfcOrganization; // (not currently used by Assimp) struct IfcCircleProfileDef; struct IfcStructuralReaction; struct IfcStructuralPointReaction; struct IfcRailing; struct IfcTextLiteral; struct IfcCartesianTransformationOperator; typedef NotImplemented IfcCostValue; // (not currently used by Assimp) typedef NotImplemented IfcTextStyle; // (not currently used by Assimp) struct IfcLinearDimension; struct IfcDamperType; struct IfcSIUnit; typedef NotImplemented IfcSurfaceStyleLighting; // (not currently used by Assimp) struct IfcMeasureWithUnit; typedef NotImplemented IfcMaterialLayerSet; // (not currently used by Assimp) struct IfcDistributionElement; struct IfcDistributionControlElement; struct IfcTransformerType; struct IfcLaborResource; typedef NotImplemented IfcDerivedProfileDef; // (not currently used by Assimp) typedef NotImplemented IfcRelConnectsStructuralMember; // (not currently used by Assimp) typedef NotImplemented IfcRelConnectsWithEccentricity; // (not currently used by Assimp) struct IfcFurnitureStandard; struct IfcStairFlightType; struct IfcWorkControl; struct IfcWorkPlan; typedef NotImplemented IfcRelDefines; // (not currently used by Assimp) typedef NotImplemented IfcRelDefinesByProperties; // (not currently used by Assimp) struct IfcCondition; typedef NotImplemented IfcGridAxis; // (not currently used by Assimp) struct IfcRelVoidsElement; struct IfcWindow; typedef NotImplemented IfcRelFlowControlElements; // (not currently used by Assimp) typedef NotImplemented IfcRelConnectsPortToElement; // (not currently used by Assimp) struct IfcProtectiveDeviceType; struct IfcJunctionBoxType; struct IfcStructuralAnalysisModel; struct IfcAxis2Placement2D; struct IfcSpaceType; struct IfcEllipseProfileDef; struct IfcDistributionFlowElement; struct IfcFlowMovingDevice; struct IfcSurfaceStyleWithTextures; struct IfcGeometricSet; typedef NotImplemented IfcMechanicalMaterialProperties; // (not currently used by Assimp) typedef NotImplemented IfcMechanicalConcreteMaterialProperties; // (not currently used by Assimp) typedef NotImplemented IfcRibPlateProfileProperties; // (not currently used by Assimp) typedef NotImplemented IfcDocumentInformationRelationship; // (not currently used by Assimp) struct IfcProjectOrder; struct IfcBSplineCurve; struct IfcBezierCurve; struct IfcStructuralPointConnection; struct IfcFlowController; struct IfcElectricDistributionPoint; struct IfcSite; struct IfcOffsetCurve3D; typedef NotImplemented IfcPropertySet; // (not currently used by Assimp) typedef NotImplemented IfcConnectionSurfaceGeometry; // (not currently used by Assimp) struct IfcVirtualElement; struct IfcConstructionProductResource; typedef NotImplemented IfcWaterProperties; // (not currently used by Assimp) struct IfcSurfaceCurveSweptAreaSolid; typedef NotImplemented IfcPermeableCoveringProperties; // (not currently used by Assimp) struct IfcCartesianTransformationOperator3D; struct IfcCartesianTransformationOperator3DnonUniform; struct IfcCrewResource; struct IfcStructuralSurfaceMember; struct Ifc2DCompositeCurve; struct IfcRepresentationContext; struct IfcGeometricRepresentationContext; struct IfcFlowTreatmentDevice; typedef NotImplemented IfcTextStyleForDefinedFont; // (not currently used by Assimp) struct IfcRightCircularCylinder; struct IfcWasteTerminalType; typedef NotImplemented IfcSpaceThermalLoadProperties; // (not currently used by Assimp) typedef NotImplemented IfcConstraintRelationship; // (not currently used by Assimp) struct IfcBuildingElementComponent; struct IfcBuildingElementPart; struct IfcWall; struct IfcWallStandardCase; typedef NotImplemented IfcApprovalActorRelationship; // (not currently used by Assimp) struct IfcPath; struct IfcDefinedSymbol; struct IfcStructuralSurfaceMemberVarying; struct IfcPoint; struct IfcSurfaceOfRevolution; struct IfcFlowTerminal; struct IfcFurnishingElement; typedef NotImplemented IfcCurveStyleFont; // (not currently used by Assimp) struct IfcSurfaceStyleShading; struct IfcSurfaceStyleRendering; typedef NotImplemented IfcCoordinatedUniversalTimeOffset; // (not currently used by Assimp) typedef NotImplemented IfcStructuralLoadSingleDisplacement; // (not currently used by Assimp) struct IfcCircleHollowProfileDef; struct IfcFlowMovingDeviceType; struct IfcFanType; struct IfcStructuralPlanarActionVarying; struct IfcProductRepresentation; typedef NotImplemented IfcRelDefinesByType; // (not currently used by Assimp) typedef NotImplemented IfcPreDefinedTextFont; // (not currently used by Assimp) typedef NotImplemented IfcTextStyleFontModel; // (not currently used by Assimp) struct IfcStackTerminalType; typedef NotImplemented IfcApprovalPropertyRelationship; // (not currently used by Assimp) typedef NotImplemented IfcExternallyDefinedSymbol; // (not currently used by Assimp) struct IfcReinforcingElement; struct IfcReinforcingMesh; struct IfcOrderAction; typedef NotImplemented IfcRelCoversBldgElements; // (not currently used by Assimp) struct IfcLightSource; struct IfcLightSourceDirectional; struct IfcLoop; struct IfcVertexLoop; struct IfcChamferEdgeFeature; typedef NotImplemented IfcWindowPanelProperties; // (not currently used by Assimp) typedef NotImplemented IfcClassification; // (not currently used by Assimp) struct IfcElementComponentType; struct IfcFastenerType; struct IfcMechanicalFastenerType; struct IfcScheduleTimeControl; struct IfcSurfaceStyle; typedef NotImplemented IfcReinforcementBarProperties; // (not currently used by Assimp) struct IfcOpenShell; typedef NotImplemented IfcLibraryReference; // (not currently used by Assimp) struct IfcSubContractResource; typedef NotImplemented IfcTimeSeriesReferenceRelationship; // (not currently used by Assimp) struct IfcSweptDiskSolid; typedef NotImplemented IfcCompositeProfileDef; // (not currently used by Assimp) typedef NotImplemented IfcElectricalBaseProperties; // (not currently used by Assimp) typedef NotImplemented IfcPreDefinedPointMarkerSymbol; // (not currently used by Assimp) struct IfcTankType; typedef NotImplemented IfcBoundaryNodeCondition; // (not currently used by Assimp) typedef NotImplemented IfcBoundaryNodeConditionWarping; // (not currently used by Assimp) typedef NotImplemented IfcRelAssignsToGroup; // (not currently used by Assimp) typedef NotImplemented IfcPresentationLayerAssignment; // (not currently used by Assimp) struct IfcSphere; struct IfcPolyLoop; struct IfcCableCarrierFittingType; struct IfcHumidifierType; typedef NotImplemented IfcPropertyListValue; // (not currently used by Assimp) typedef NotImplemented IfcPropertyConstraintRelationship; // (not currently used by Assimp) struct IfcPerformanceHistory; struct IfcShapeModel; struct IfcTopologyRepresentation; struct IfcBuilding; struct IfcRoundedRectangleProfileDef; struct IfcStairFlight; typedef NotImplemented IfcSurfaceStyleRefraction; // (not currently used by Assimp) typedef NotImplemented IfcRelInteractionRequirements; // (not currently used by Assimp) typedef NotImplemented IfcConstraint; // (not currently used by Assimp) typedef NotImplemented IfcObjective; // (not currently used by Assimp) typedef NotImplemented IfcConnectionPortGeometry; // (not currently used by Assimp) struct IfcDistributionChamberElement; typedef NotImplemented IfcPersonAndOrganization; // (not currently used by Assimp) struct IfcShapeRepresentation; struct IfcRampFlight; struct IfcBeamType; struct IfcRelDecomposes; struct IfcRoof; struct IfcFooting; typedef NotImplemented IfcRelCoversSpaces; // (not currently used by Assimp) struct IfcLightSourceAmbient; typedef NotImplemented IfcTimeSeriesValue; // (not currently used by Assimp) struct IfcWindowStyle; typedef NotImplemented IfcPropertyReferenceValue; // (not currently used by Assimp) typedef NotImplemented IfcApproval; // (not currently used by Assimp) typedef NotImplemented IfcRelConnectsStructuralElement; // (not currently used by Assimp) struct IfcBuildingElementProxyType; typedef NotImplemented IfcRelAssociatesProfileProperties; // (not currently used by Assimp) struct IfcAxis2Placement3D; typedef NotImplemented IfcRelConnectsPorts; // (not currently used by Assimp) struct IfcEdgeCurve; struct IfcClosedShell; struct IfcTendonAnchor; struct IfcCondenserType; typedef NotImplemented IfcQuantityTime; // (not currently used by Assimp) typedef NotImplemented IfcSurfaceTexture; // (not currently used by Assimp) typedef NotImplemented IfcPixelTexture; // (not currently used by Assimp) typedef NotImplemented IfcStructuralConnectionCondition; // (not currently used by Assimp) typedef NotImplemented IfcFailureConnectionCondition; // (not currently used by Assimp) typedef NotImplemented IfcDocumentReference; // (not currently used by Assimp) typedef NotImplemented IfcMechanicalSteelMaterialProperties; // (not currently used by Assimp) struct IfcPipeSegmentType; struct IfcPointOnSurface; typedef NotImplemented IfcTable; // (not currently used by Assimp) typedef NotImplemented IfcLightDistributionData; // (not currently used by Assimp) typedef NotImplemented IfcPropertyTableValue; // (not currently used by Assimp) typedef NotImplemented IfcPresentationLayerWithStyle; // (not currently used by Assimp) struct IfcAsset; struct IfcLightSourcePositional; typedef NotImplemented IfcLibraryInformation; // (not currently used by Assimp) typedef NotImplemented IfcTextStyleTextModel; // (not currently used by Assimp) struct IfcProjectionCurve; struct IfcFillAreaStyleTiles; typedef NotImplemented IfcRelFillsElement; // (not currently used by Assimp) struct IfcElectricMotorType; struct IfcTendon; struct IfcDistributionChamberElementType; struct IfcMemberType; struct IfcStructuralLinearAction; struct IfcStructuralLinearActionVarying; struct IfcProductDefinitionShape; struct IfcFastener; struct IfcMechanicalFastener; typedef NotImplemented IfcFuelProperties; // (not currently used by Assimp) struct IfcEvaporatorType; typedef NotImplemented IfcMaterialLayerSetUsage; // (not currently used by Assimp) struct IfcDiscreteAccessoryType; struct IfcStructuralCurveConnection; struct IfcProjectionElement; typedef NotImplemented IfcImageTexture; // (not currently used by Assimp) struct IfcCoveringType; typedef NotImplemented IfcRelAssociatesAppliedValue; // (not currently used by Assimp) struct IfcPumpType; struct IfcPile; struct IfcUnitAssignment; struct IfcBoundingBox; struct IfcShellBasedSurfaceModel; struct IfcFacetedBrep; struct IfcTextLiteralWithExtent; typedef NotImplemented IfcApplication; // (not currently used by Assimp) typedef NotImplemented IfcExtendedMaterialProperties; // (not currently used by Assimp) struct IfcElectricApplianceType; typedef NotImplemented IfcRelOccupiesSpaces; // (not currently used by Assimp) struct IfcTrapeziumProfileDef; typedef NotImplemented IfcQuantityWeight; // (not currently used by Assimp) struct IfcRelContainedInSpatialStructure; struct IfcEdgeLoop; struct IfcProject; struct IfcCartesianPoint; typedef NotImplemented IfcMaterial; // (not currently used by Assimp) struct IfcCurveBoundedPlane; struct IfcWallType; struct IfcFillAreaStyleHatching; struct IfcEquipmentStandard; typedef NotImplemented IfcHygroscopicMaterialProperties; // (not currently used by Assimp) typedef NotImplemented IfcDoorPanelProperties; // (not currently used by Assimp) struct IfcDiameterDimension; struct IfcStructuralLoadGroup; typedef NotImplemented IfcTelecomAddress; // (not currently used by Assimp) struct IfcConstructionMaterialResource; typedef NotImplemented IfcBlobTexture; // (not currently used by Assimp) typedef NotImplemented IfcIrregularTimeSeriesValue; // (not currently used by Assimp) struct IfcRelAggregates; struct IfcBoilerType; typedef NotImplemented IfcRelProjectsElement; // (not currently used by Assimp) struct IfcColourSpecification; struct IfcColourRgb; typedef NotImplemented IfcRelConnectsStructuralActivity; // (not currently used by Assimp) struct IfcDoorStyle; typedef NotImplemented IfcStructuralLoadSingleDisplacementDistortion; // (not currently used by Assimp) typedef NotImplemented IfcRelAssignsToProcess; // (not currently used by Assimp) struct IfcDuctSilencerType; struct IfcLightSourceGoniometric; struct IfcActuatorType; struct IfcSensorType; struct IfcAirTerminalBoxType; struct IfcAnnotationSurfaceOccurrence; struct IfcZShapeProfileDef; typedef NotImplemented IfcClassificationNotation; // (not currently used by Assimp) struct IfcRationalBezierCurve; struct IfcCartesianTransformationOperator2D; struct IfcCartesianTransformationOperator2DnonUniform; struct IfcMove; typedef NotImplemented IfcBoundaryEdgeCondition; // (not currently used by Assimp) typedef NotImplemented IfcDoorLiningProperties; // (not currently used by Assimp) struct IfcCableCarrierSegmentType; typedef NotImplemented IfcPostalAddress; // (not currently used by Assimp) typedef NotImplemented IfcRelConnectsPathElements; // (not currently used by Assimp) struct IfcElectricalElement; typedef NotImplemented IfcOwnerHistory; // (not currently used by Assimp) typedef NotImplemented IfcStructuralLoadTemperature; // (not currently used by Assimp) typedef NotImplemented IfcTextStyleWithBoxCharacteristics; // (not currently used by Assimp) struct IfcChillerType; typedef NotImplemented IfcRelSchedulesCostItems; // (not currently used by Assimp) struct IfcReinforcingBar; typedef NotImplemented IfcCurrencyRelationship; // (not currently used by Assimp) typedef NotImplemented IfcSoundValue; // (not currently used by Assimp) struct IfcCShapeProfileDef; struct IfcPermit; struct IfcSlabType; typedef NotImplemented IfcSlippageConnectionCondition; // (not currently used by Assimp) struct IfcLampType; struct IfcPlanarExtent; struct IfcAlarmType; typedef NotImplemented IfcDocumentElectronicFormat; // (not currently used by Assimp) struct IfcElectricFlowStorageDeviceType; struct IfcEquipmentElement; struct IfcLightFixtureType; typedef NotImplemented IfcMetric; // (not currently used by Assimp) typedef NotImplemented IfcRelNests; // (not currently used by Assimp) struct IfcCurtainWall; typedef NotImplemented IfcRelAssociatesDocument; // (not currently used by Assimp) typedef NotImplemented IfcComplexProperty; // (not currently used by Assimp) typedef NotImplemented IfcVertexBasedTextureMap; // (not currently used by Assimp) struct IfcSlab; struct IfcCurtainWallType; struct IfcOutletType; struct IfcCompressorType; struct IfcCraneRailAShapeProfileDef; struct IfcFlowSegment; struct IfcSectionedSpine; typedef NotImplemented IfcTableRow; // (not currently used by Assimp) typedef NotImplemented IfcDraughtingPreDefinedTextFont; // (not currently used by Assimp) struct IfcElectricTimeControlType; struct IfcFaceSurface; typedef NotImplemented IfcMaterialList; // (not currently used by Assimp) struct IfcMotorConnectionType; struct IfcFlowFitting; struct IfcPointOnCurve; struct IfcTransportElementType; typedef NotImplemented IfcRegularTimeSeries; // (not currently used by Assimp) typedef NotImplemented IfcRelAssociatesConstraint; // (not currently used by Assimp) typedef NotImplemented IfcPropertyEnumeratedValue; // (not currently used by Assimp) typedef NotImplemented IfcStructuralSteelProfileProperties; // (not currently used by Assimp) struct IfcCableSegmentType; typedef NotImplemented IfcExternallyDefinedHatchStyle; // (not currently used by Assimp) struct IfcAnnotationSurface; struct IfcCompositeCurveSegment; struct IfcServiceLife; struct IfcPlateType; typedef NotImplemented IfcCurveStyle; // (not currently used by Assimp) typedef NotImplemented IfcSectionProperties; // (not currently used by Assimp) struct IfcVibrationIsolatorType; typedef NotImplemented IfcTextureMap; // (not currently used by Assimp) struct IfcTrimmedCurve; struct IfcMappedItem; typedef NotImplemented IfcMaterialLayer; // (not currently used by Assimp) struct IfcDirection; struct IfcBlock; struct IfcProjectOrderRecord; struct IfcFlowMeterType; struct IfcControllerType; struct IfcBeam; struct IfcArbitraryOpenProfileDef; struct IfcCenterLineProfileDef; typedef NotImplemented IfcStructuralLoadPlanarForce; // (not currently used by Assimp) struct IfcTimeSeriesSchedule; struct IfcRoundedEdgeFeature; typedef NotImplemented IfcWindowLiningProperties; // (not currently used by Assimp) typedef NotImplemented IfcRelOverridesProperties; // (not currently used by Assimp) typedef NotImplemented IfcApprovalRelationship; // (not currently used by Assimp) struct IfcIShapeProfileDef; struct IfcSpaceHeaterType; typedef NotImplemented IfcExternallyDefinedSurfaceStyle; // (not currently used by Assimp) typedef NotImplemented IfcDerivedUnit; // (not currently used by Assimp) struct IfcFlowStorageDevice; typedef NotImplemented IfcMaterialClassificationRelationship; // (not currently used by Assimp) typedef NotImplemented IfcClassificationItem; // (not currently used by Assimp) struct IfcRevolvedAreaSolid; typedef NotImplemented IfcConnectionPointGeometry; // (not currently used by Assimp) struct IfcDoor; struct IfcEllipse; struct IfcTubeBundleType; struct IfcAngularDimension; typedef NotImplemented IfcThermalMaterialProperties; // (not currently used by Assimp) struct IfcFaceBasedSurfaceModel; struct IfcCraneRailFShapeProfileDef; struct IfcColumnType; struct IfcTShapeProfileDef; struct IfcEnergyConversionDevice; typedef NotImplemented IfcConnectionPointEccentricity; // (not currently used by Assimp) typedef NotImplemented IfcReinforcementDefinitionProperties; // (not currently used by Assimp) typedef NotImplemented IfcCurveStyleFontAndScaling; // (not currently used by Assimp) struct IfcWorkSchedule; typedef NotImplemented IfcOrganizationRelationship; // (not currently used by Assimp) struct IfcZone; struct IfcTransportElement; typedef NotImplemented IfcDraughtingPreDefinedCurveFont; // (not currently used by Assimp) struct IfcGeometricRepresentationSubContext; struct IfcLShapeProfileDef; struct IfcGeometricCurveSet; struct IfcActor; struct IfcOccupant; typedef NotImplemented IfcPhysicalComplexQuantity; // (not currently used by Assimp) struct IfcBooleanClippingResult; typedef NotImplemented IfcPreDefinedTerminatorSymbol; // (not currently used by Assimp) struct IfcAnnotationFillArea; typedef NotImplemented IfcConstraintAggregationRelationship; // (not currently used by Assimp) typedef NotImplemented IfcRelAssociatesApproval; // (not currently used by Assimp) typedef NotImplemented IfcRelAssociatesMaterial; // (not currently used by Assimp) typedef NotImplemented IfcRelAssignsToProduct; // (not currently used by Assimp) typedef NotImplemented IfcAppliedValueRelationship; // (not currently used by Assimp) struct IfcLightSourceSpot; struct IfcFireSuppressionTerminalType; typedef NotImplemented IfcElementQuantity; // (not currently used by Assimp) typedef NotImplemented IfcDimensionPair; // (not currently used by Assimp) struct IfcElectricGeneratorType; typedef NotImplemented IfcRelSequence; // (not currently used by Assimp) struct IfcInventory; struct IfcPolyline; struct IfcBoxedHalfSpace; struct IfcAirTerminalType; typedef NotImplemented IfcSectionReinforcementProperties; // (not currently used by Assimp) struct IfcDistributionPort; struct IfcCostItem; struct IfcStructuredDimensionCallout; struct IfcStructuralResultGroup; typedef NotImplemented IfcRelSpaceBoundary; // (not currently used by Assimp) struct IfcOrientedEdge; typedef NotImplemented IfcRelAssignsToResource; // (not currently used by Assimp) struct IfcCsgSolid; typedef NotImplemented IfcProductsOfCombustionProperties; // (not currently used by Assimp) typedef NotImplemented IfcRelaxation; // (not currently used by Assimp) struct IfcPlanarBox; typedef NotImplemented IfcQuantityLength; // (not currently used by Assimp) struct IfcMaterialDefinitionRepresentation; struct IfcAsymmetricIShapeProfileDef; struct IfcRepresentationMap; // C++ wrapper for IfcRoot struct IfcRoot : ObjectHelper<IfcRoot,4> { IfcRoot() : Object("IfcRoot") {} IfcGloballyUniqueId::Out GlobalId; Lazy< NotImplemented > OwnerHistory; Maybe< IfcLabel::Out > Name; Maybe< IfcText::Out > Description; }; // C++ wrapper for IfcObjectDefinition struct IfcObjectDefinition : IfcRoot, ObjectHelper<IfcObjectDefinition,0> { IfcObjectDefinition() : Object("IfcObjectDefinition") {} }; // C++ wrapper for IfcTypeObject struct IfcTypeObject : IfcObjectDefinition, ObjectHelper<IfcTypeObject,2> { IfcTypeObject() : Object("IfcTypeObject") {} Maybe< IfcLabel::Out > ApplicableOccurrence; Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > HasPropertySets; }; // C++ wrapper for IfcTypeProduct struct IfcTypeProduct : IfcTypeObject, ObjectHelper<IfcTypeProduct,2> { IfcTypeProduct() : Object("IfcTypeProduct") {} Maybe< ListOf< Lazy< IfcRepresentationMap >, 1, 0 > > RepresentationMaps; Maybe< IfcLabel::Out > Tag; }; // C++ wrapper for IfcElementType struct IfcElementType : IfcTypeProduct, ObjectHelper<IfcElementType,1> { IfcElementType() : Object("IfcElementType") {} Maybe< IfcLabel::Out > ElementType; }; // C++ wrapper for IfcFurnishingElementType struct IfcFurnishingElementType : IfcElementType, ObjectHelper<IfcFurnishingElementType,0> { IfcFurnishingElementType() : Object("IfcFurnishingElementType") {} }; // C++ wrapper for IfcFurnitureType struct IfcFurnitureType : IfcFurnishingElementType, ObjectHelper<IfcFurnitureType,1> { IfcFurnitureType() : Object("IfcFurnitureType") {} IfcAssemblyPlaceEnum::Out AssemblyPlace; }; // C++ wrapper for IfcObject struct IfcObject : IfcObjectDefinition, ObjectHelper<IfcObject,1> { IfcObject() : Object("IfcObject") {} Maybe< IfcLabel::Out > ObjectType; }; // C++ wrapper for IfcProduct struct IfcProduct : IfcObject, ObjectHelper<IfcProduct,2> { IfcProduct() : Object("IfcProduct") {} Maybe< Lazy< IfcObjectPlacement > > ObjectPlacement; Maybe< Lazy< IfcProductRepresentation > > Representation; }; // C++ wrapper for IfcGrid struct IfcGrid : IfcProduct, ObjectHelper<IfcGrid,3> { IfcGrid() : Object("IfcGrid") {} ListOf< Lazy< NotImplemented >, 1, 0 > UAxes; ListOf< Lazy< NotImplemented >, 1, 0 > VAxes; Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > WAxes; }; // C++ wrapper for IfcRepresentationItem struct IfcRepresentationItem : ObjectHelper<IfcRepresentationItem,0> { IfcRepresentationItem() : Object("IfcRepresentationItem") {} }; // C++ wrapper for IfcGeometricRepresentationItem struct IfcGeometricRepresentationItem : IfcRepresentationItem, ObjectHelper<IfcGeometricRepresentationItem,0> { IfcGeometricRepresentationItem() : Object("IfcGeometricRepresentationItem") {} }; // C++ wrapper for IfcOneDirectionRepeatFactor struct IfcOneDirectionRepeatFactor : IfcGeometricRepresentationItem, ObjectHelper<IfcOneDirectionRepeatFactor,1> { IfcOneDirectionRepeatFactor() : Object("IfcOneDirectionRepeatFactor") {} Lazy< IfcVector > RepeatFactor; }; // C++ wrapper for IfcTwoDirectionRepeatFactor struct IfcTwoDirectionRepeatFactor : IfcOneDirectionRepeatFactor, ObjectHelper<IfcTwoDirectionRepeatFactor,1> { IfcTwoDirectionRepeatFactor() : Object("IfcTwoDirectionRepeatFactor") {} Lazy< IfcVector > SecondRepeatFactor; }; // C++ wrapper for IfcElement struct IfcElement : IfcProduct, ObjectHelper<IfcElement,1> { IfcElement() : Object("IfcElement") {} Maybe< IfcIdentifier::Out > Tag; }; // C++ wrapper for IfcElementComponent struct IfcElementComponent : IfcElement, ObjectHelper<IfcElementComponent,0> { IfcElementComponent() : Object("IfcElementComponent") {} }; // C++ wrapper for IfcSpatialStructureElementType struct IfcSpatialStructureElementType : IfcElementType, ObjectHelper<IfcSpatialStructureElementType,0> { IfcSpatialStructureElementType() : Object("IfcSpatialStructureElementType") {} }; // C++ wrapper for IfcControl struct IfcControl : IfcObject, ObjectHelper<IfcControl,0> { IfcControl() : Object("IfcControl") {} }; // C++ wrapper for IfcActionRequest struct IfcActionRequest : IfcControl, ObjectHelper<IfcActionRequest,1> { IfcActionRequest() : Object("IfcActionRequest") {} IfcIdentifier::Out RequestID; }; // C++ wrapper for IfcDistributionElementType struct IfcDistributionElementType : IfcElementType, ObjectHelper<IfcDistributionElementType,0> { IfcDistributionElementType() : Object("IfcDistributionElementType") {} }; // C++ wrapper for IfcDistributionFlowElementType struct IfcDistributionFlowElementType : IfcDistributionElementType, ObjectHelper<IfcDistributionFlowElementType,0> { IfcDistributionFlowElementType() : Object("IfcDistributionFlowElementType") {} }; // C++ wrapper for IfcEnergyConversionDeviceType struct IfcEnergyConversionDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcEnergyConversionDeviceType,0> { IfcEnergyConversionDeviceType() : Object("IfcEnergyConversionDeviceType") {} }; // C++ wrapper for IfcCooledBeamType struct IfcCooledBeamType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCooledBeamType,1> { IfcCooledBeamType() : Object("IfcCooledBeamType") {} IfcCooledBeamTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcCsgPrimitive3D struct IfcCsgPrimitive3D : IfcGeometricRepresentationItem, ObjectHelper<IfcCsgPrimitive3D,1> { IfcCsgPrimitive3D() : Object("IfcCsgPrimitive3D") {} Lazy< IfcAxis2Placement3D > Position; }; // C++ wrapper for IfcRectangularPyramid struct IfcRectangularPyramid : IfcCsgPrimitive3D, ObjectHelper<IfcRectangularPyramid,3> { IfcRectangularPyramid() : Object("IfcRectangularPyramid") {} IfcPositiveLengthMeasure::Out XLength; IfcPositiveLengthMeasure::Out YLength; IfcPositiveLengthMeasure::Out Height; }; // C++ wrapper for IfcSurface struct IfcSurface : IfcGeometricRepresentationItem, ObjectHelper<IfcSurface,0> { IfcSurface() : Object("IfcSurface") {} }; // C++ wrapper for IfcBoundedSurface struct IfcBoundedSurface : IfcSurface, ObjectHelper<IfcBoundedSurface,0> { IfcBoundedSurface() : Object("IfcBoundedSurface") {} }; // C++ wrapper for IfcRectangularTrimmedSurface struct IfcRectangularTrimmedSurface : IfcBoundedSurface, ObjectHelper<IfcRectangularTrimmedSurface,7> { IfcRectangularTrimmedSurface() : Object("IfcRectangularTrimmedSurface") {} Lazy< IfcSurface > BasisSurface; IfcParameterValue::Out U1; IfcParameterValue::Out V1; IfcParameterValue::Out U2; IfcParameterValue::Out V2; BOOLEAN::Out Usense; BOOLEAN::Out Vsense; }; // C++ wrapper for IfcGroup struct IfcGroup : IfcObject, ObjectHelper<IfcGroup,0> { IfcGroup() : Object("IfcGroup") {} }; // C++ wrapper for IfcRelationship struct IfcRelationship : IfcRoot, ObjectHelper<IfcRelationship,0> { IfcRelationship() : Object("IfcRelationship") {} }; // C++ wrapper for IfcHalfSpaceSolid struct IfcHalfSpaceSolid : IfcGeometricRepresentationItem, ObjectHelper<IfcHalfSpaceSolid,2> { IfcHalfSpaceSolid() : Object("IfcHalfSpaceSolid") {} Lazy< IfcSurface > BaseSurface; BOOLEAN::Out AgreementFlag; }; // C++ wrapper for IfcPolygonalBoundedHalfSpace struct IfcPolygonalBoundedHalfSpace : IfcHalfSpaceSolid, ObjectHelper<IfcPolygonalBoundedHalfSpace,2> { IfcPolygonalBoundedHalfSpace() : Object("IfcPolygonalBoundedHalfSpace") {} Lazy< IfcAxis2Placement3D > Position; Lazy< IfcBoundedCurve > PolygonalBoundary; }; // C++ wrapper for IfcAirToAirHeatRecoveryType struct IfcAirToAirHeatRecoveryType : IfcEnergyConversionDeviceType, ObjectHelper<IfcAirToAirHeatRecoveryType,1> { IfcAirToAirHeatRecoveryType() : Object("IfcAirToAirHeatRecoveryType") {} IfcAirToAirHeatRecoveryTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcFlowFittingType struct IfcFlowFittingType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowFittingType,0> { IfcFlowFittingType() : Object("IfcFlowFittingType") {} }; // C++ wrapper for IfcPipeFittingType struct IfcPipeFittingType : IfcFlowFittingType, ObjectHelper<IfcPipeFittingType,1> { IfcPipeFittingType() : Object("IfcPipeFittingType") {} IfcPipeFittingTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcRepresentation struct IfcRepresentation : ObjectHelper<IfcRepresentation,4> { IfcRepresentation() : Object("IfcRepresentation") {} Lazy< IfcRepresentationContext > ContextOfItems; Maybe< IfcLabel::Out > RepresentationIdentifier; Maybe< IfcLabel::Out > RepresentationType; ListOf< Lazy< IfcRepresentationItem >, 1, 0 > Items; }; // C++ wrapper for IfcStyleModel struct IfcStyleModel : IfcRepresentation, ObjectHelper<IfcStyleModel,0> { IfcStyleModel() : Object("IfcStyleModel") {} }; // C++ wrapper for IfcStyledRepresentation struct IfcStyledRepresentation : IfcStyleModel, ObjectHelper<IfcStyledRepresentation,0> { IfcStyledRepresentation() : Object("IfcStyledRepresentation") {} }; // C++ wrapper for IfcBooleanResult struct IfcBooleanResult : IfcGeometricRepresentationItem, ObjectHelper<IfcBooleanResult,3> { IfcBooleanResult() : Object("IfcBooleanResult") {} IfcBooleanOperator::Out Operator; IfcBooleanOperand::Out FirstOperand; IfcBooleanOperand::Out SecondOperand; }; // C++ wrapper for IfcFeatureElement struct IfcFeatureElement : IfcElement, ObjectHelper<IfcFeatureElement,0> { IfcFeatureElement() : Object("IfcFeatureElement") {} }; // C++ wrapper for IfcFeatureElementSubtraction struct IfcFeatureElementSubtraction : IfcFeatureElement, ObjectHelper<IfcFeatureElementSubtraction,0> { IfcFeatureElementSubtraction() : Object("IfcFeatureElementSubtraction") {} }; // C++ wrapper for IfcOpeningElement struct IfcOpeningElement : IfcFeatureElementSubtraction, ObjectHelper<IfcOpeningElement,0> { IfcOpeningElement() : Object("IfcOpeningElement") {} }; // C++ wrapper for IfcConditionCriterion struct IfcConditionCriterion : IfcControl, ObjectHelper<IfcConditionCriterion,2> { IfcConditionCriterion() : Object("IfcConditionCriterion") {} IfcConditionCriterionSelect::Out Criterion; IfcDateTimeSelect::Out CriterionDateTime; }; // C++ wrapper for IfcFlowTerminalType struct IfcFlowTerminalType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowTerminalType,0> { IfcFlowTerminalType() : Object("IfcFlowTerminalType") {} }; // C++ wrapper for IfcFlowControllerType struct IfcFlowControllerType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowControllerType,0> { IfcFlowControllerType() : Object("IfcFlowControllerType") {} }; // C++ wrapper for IfcSwitchingDeviceType struct IfcSwitchingDeviceType : IfcFlowControllerType, ObjectHelper<IfcSwitchingDeviceType,1> { IfcSwitchingDeviceType() : Object("IfcSwitchingDeviceType") {} IfcSwitchingDeviceTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcSystem struct IfcSystem : IfcGroup, ObjectHelper<IfcSystem,0> { IfcSystem() : Object("IfcSystem") {} }; // C++ wrapper for IfcElectricalCircuit struct IfcElectricalCircuit : IfcSystem, ObjectHelper<IfcElectricalCircuit,0> { IfcElectricalCircuit() : Object("IfcElectricalCircuit") {} }; // C++ wrapper for IfcUnitaryEquipmentType struct IfcUnitaryEquipmentType : IfcEnergyConversionDeviceType, ObjectHelper<IfcUnitaryEquipmentType,1> { IfcUnitaryEquipmentType() : Object("IfcUnitaryEquipmentType") {} IfcUnitaryEquipmentTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcPort struct IfcPort : IfcProduct, ObjectHelper<IfcPort,0> { IfcPort() : Object("IfcPort") {} }; // C++ wrapper for IfcPlacement struct IfcPlacement : IfcGeometricRepresentationItem, ObjectHelper<IfcPlacement,1> { IfcPlacement() : Object("IfcPlacement") {} Lazy< IfcCartesianPoint > Location; }; // C++ wrapper for IfcProfileDef struct IfcProfileDef : ObjectHelper<IfcProfileDef,2> { IfcProfileDef() : Object("IfcProfileDef") {} IfcProfileTypeEnum::Out ProfileType; Maybe< IfcLabel::Out > ProfileName; }; // C++ wrapper for IfcArbitraryClosedProfileDef struct IfcArbitraryClosedProfileDef : IfcProfileDef, ObjectHelper<IfcArbitraryClosedProfileDef,1> { IfcArbitraryClosedProfileDef() : Object("IfcArbitraryClosedProfileDef") {} Lazy< IfcCurve > OuterCurve; }; // C++ wrapper for IfcCurve struct IfcCurve : IfcGeometricRepresentationItem, ObjectHelper<IfcCurve,0> { IfcCurve() : Object("IfcCurve") {} }; // C++ wrapper for IfcConic struct IfcConic : IfcCurve, ObjectHelper<IfcConic,1> { IfcConic() : Object("IfcConic") {} IfcAxis2Placement::Out Position; }; // C++ wrapper for IfcCircle struct IfcCircle : IfcConic, ObjectHelper<IfcCircle,1> { IfcCircle() : Object("IfcCircle") {} IfcPositiveLengthMeasure::Out Radius; }; // C++ wrapper for IfcElementarySurface struct IfcElementarySurface : IfcSurface, ObjectHelper<IfcElementarySurface,1> { IfcElementarySurface() : Object("IfcElementarySurface") {} Lazy< IfcAxis2Placement3D > Position; }; // C++ wrapper for IfcPlane struct IfcPlane : IfcElementarySurface, ObjectHelper<IfcPlane,0> { IfcPlane() : Object("IfcPlane") {} }; // C++ wrapper for IfcCostSchedule struct IfcCostSchedule : IfcControl, ObjectHelper<IfcCostSchedule,8> { IfcCostSchedule() : Object("IfcCostSchedule") {} Maybe< IfcActorSelect::Out > SubmittedBy; Maybe< IfcActorSelect::Out > PreparedBy; Maybe< IfcDateTimeSelect::Out > SubmittedOn; Maybe< IfcLabel::Out > Status; Maybe< ListOf< IfcActorSelect, 1, 0 >::Out > TargetUsers; Maybe< IfcDateTimeSelect::Out > UpdateDate; IfcIdentifier::Out ID; IfcCostScheduleTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcRightCircularCone struct IfcRightCircularCone : IfcCsgPrimitive3D, ObjectHelper<IfcRightCircularCone,2> { IfcRightCircularCone() : Object("IfcRightCircularCone") {} IfcPositiveLengthMeasure::Out Height; IfcPositiveLengthMeasure::Out BottomRadius; }; // C++ wrapper for IfcElementAssembly struct IfcElementAssembly : IfcElement, ObjectHelper<IfcElementAssembly,2> { IfcElementAssembly() : Object("IfcElementAssembly") {} Maybe< IfcAssemblyPlaceEnum::Out > AssemblyPlace; IfcElementAssemblyTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcBuildingElement struct IfcBuildingElement : IfcElement, ObjectHelper<IfcBuildingElement,0> { IfcBuildingElement() : Object("IfcBuildingElement") {} }; // C++ wrapper for IfcMember struct IfcMember : IfcBuildingElement, ObjectHelper<IfcMember,0> { IfcMember() : Object("IfcMember") {} }; // C++ wrapper for IfcBuildingElementProxy struct IfcBuildingElementProxy : IfcBuildingElement, ObjectHelper<IfcBuildingElementProxy,1> { IfcBuildingElementProxy() : Object("IfcBuildingElementProxy") {} Maybe< IfcElementCompositionEnum::Out > CompositionType; }; // C++ wrapper for IfcStructuralActivity struct IfcStructuralActivity : IfcProduct, ObjectHelper<IfcStructuralActivity,2> { IfcStructuralActivity() : Object("IfcStructuralActivity") {} Lazy< NotImplemented > AppliedLoad; IfcGlobalOrLocalEnum::Out GlobalOrLocal; }; // C++ wrapper for IfcStructuralAction struct IfcStructuralAction : IfcStructuralActivity, ObjectHelper<IfcStructuralAction,2> { IfcStructuralAction() : Object("IfcStructuralAction") {} BOOLEAN::Out DestabilizingLoad; Maybe< Lazy< IfcStructuralReaction > > CausedBy; }; // C++ wrapper for IfcStructuralPlanarAction struct IfcStructuralPlanarAction : IfcStructuralAction, ObjectHelper<IfcStructuralPlanarAction,1> { IfcStructuralPlanarAction() : Object("IfcStructuralPlanarAction") {} IfcProjectedOrTrueLengthEnum::Out ProjectedOrTrue; }; // C++ wrapper for IfcTopologicalRepresentationItem struct IfcTopologicalRepresentationItem : IfcRepresentationItem, ObjectHelper<IfcTopologicalRepresentationItem,0> { IfcTopologicalRepresentationItem() : Object("IfcTopologicalRepresentationItem") {} }; // C++ wrapper for IfcConnectedFaceSet struct IfcConnectedFaceSet : IfcTopologicalRepresentationItem, ObjectHelper<IfcConnectedFaceSet,1> { IfcConnectedFaceSet() : Object("IfcConnectedFaceSet") {} ListOf< Lazy< IfcFace >, 1, 0 > CfsFaces; }; // C++ wrapper for IfcSweptSurface struct IfcSweptSurface : IfcSurface, ObjectHelper<IfcSweptSurface,2> { IfcSweptSurface() : Object("IfcSweptSurface") {} Lazy< IfcProfileDef > SweptCurve; Lazy< IfcAxis2Placement3D > Position; }; // C++ wrapper for IfcSurfaceOfLinearExtrusion struct IfcSurfaceOfLinearExtrusion : IfcSweptSurface, ObjectHelper<IfcSurfaceOfLinearExtrusion,2> { IfcSurfaceOfLinearExtrusion() : Object("IfcSurfaceOfLinearExtrusion") {} Lazy< IfcDirection > ExtrudedDirection; IfcLengthMeasure::Out Depth; }; // C++ wrapper for IfcArbitraryProfileDefWithVoids struct IfcArbitraryProfileDefWithVoids : IfcArbitraryClosedProfileDef, ObjectHelper<IfcArbitraryProfileDefWithVoids,1> { IfcArbitraryProfileDefWithVoids() : Object("IfcArbitraryProfileDefWithVoids") {} ListOf< Lazy< IfcCurve >, 1, 0 > InnerCurves; }; // C++ wrapper for IfcProcess struct IfcProcess : IfcObject, ObjectHelper<IfcProcess,0> { IfcProcess() : Object("IfcProcess") {} }; // C++ wrapper for IfcProcedure struct IfcProcedure : IfcProcess, ObjectHelper<IfcProcedure,3> { IfcProcedure() : Object("IfcProcedure") {} IfcIdentifier::Out ProcedureID; IfcProcedureTypeEnum::Out ProcedureType; Maybe< IfcLabel::Out > UserDefinedProcedureType; }; // C++ wrapper for IfcVector struct IfcVector : IfcGeometricRepresentationItem, ObjectHelper<IfcVector,2> { IfcVector() : Object("IfcVector") {} Lazy< IfcDirection > Orientation; IfcLengthMeasure::Out Magnitude; }; // C++ wrapper for IfcFaceBound struct IfcFaceBound : IfcTopologicalRepresentationItem, ObjectHelper<IfcFaceBound,2> { IfcFaceBound() : Object("IfcFaceBound") {} Lazy< IfcLoop > Bound; BOOLEAN::Out Orientation; }; // C++ wrapper for IfcFaceOuterBound struct IfcFaceOuterBound : IfcFaceBound, ObjectHelper<IfcFaceOuterBound,0> { IfcFaceOuterBound() : Object("IfcFaceOuterBound") {} }; // C++ wrapper for IfcFeatureElementAddition struct IfcFeatureElementAddition : IfcFeatureElement, ObjectHelper<IfcFeatureElementAddition,0> { IfcFeatureElementAddition() : Object("IfcFeatureElementAddition") {} }; // C++ wrapper for IfcNamedUnit struct IfcNamedUnit : ObjectHelper<IfcNamedUnit,2> { IfcNamedUnit() : Object("IfcNamedUnit") {} Lazy< NotImplemented > Dimensions; IfcUnitEnum::Out UnitType; }; // C++ wrapper for IfcConversionBasedUnit struct IfcConversionBasedUnit : IfcNamedUnit, ObjectHelper<IfcConversionBasedUnit,2> { IfcConversionBasedUnit() : Object("IfcConversionBasedUnit") {} IfcLabel::Out Name; Lazy< IfcMeasureWithUnit > ConversionFactor; }; // C++ wrapper for IfcHeatExchangerType struct IfcHeatExchangerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcHeatExchangerType,1> { IfcHeatExchangerType() : Object("IfcHeatExchangerType") {} IfcHeatExchangerTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcPresentationStyleAssignment struct IfcPresentationStyleAssignment : ObjectHelper<IfcPresentationStyleAssignment,1> { IfcPresentationStyleAssignment() : Object("IfcPresentationStyleAssignment") {} ListOf< IfcPresentationStyleSelect, 1, 0 >::Out Styles; }; // C++ wrapper for IfcFlowTreatmentDeviceType struct IfcFlowTreatmentDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowTreatmentDeviceType,0> { IfcFlowTreatmentDeviceType() : Object("IfcFlowTreatmentDeviceType") {} }; // C++ wrapper for IfcFilterType struct IfcFilterType : IfcFlowTreatmentDeviceType, ObjectHelper<IfcFilterType,1> { IfcFilterType() : Object("IfcFilterType") {} IfcFilterTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcResource struct IfcResource : IfcObject, ObjectHelper<IfcResource,0> { IfcResource() : Object("IfcResource") {} }; // C++ wrapper for IfcEvaporativeCoolerType struct IfcEvaporativeCoolerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcEvaporativeCoolerType,1> { IfcEvaporativeCoolerType() : Object("IfcEvaporativeCoolerType") {} IfcEvaporativeCoolerTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcOffsetCurve2D struct IfcOffsetCurve2D : IfcCurve, ObjectHelper<IfcOffsetCurve2D,3> { IfcOffsetCurve2D() : Object("IfcOffsetCurve2D") {} Lazy< IfcCurve > BasisCurve; IfcLengthMeasure::Out Distance; LOGICAL::Out SelfIntersect; }; // C++ wrapper for IfcEdge struct IfcEdge : IfcTopologicalRepresentationItem, ObjectHelper<IfcEdge,2> { IfcEdge() : Object("IfcEdge") {} Lazy< IfcVertex > EdgeStart; Lazy< IfcVertex > EdgeEnd; }; // C++ wrapper for IfcSubedge struct IfcSubedge : IfcEdge, ObjectHelper<IfcSubedge,1> { IfcSubedge() : Object("IfcSubedge") {} Lazy< IfcEdge > ParentEdge; }; // C++ wrapper for IfcProxy struct IfcProxy : IfcProduct, ObjectHelper<IfcProxy,2> { IfcProxy() : Object("IfcProxy") {} IfcObjectTypeEnum::Out ProxyType; Maybe< IfcLabel::Out > Tag; }; // C++ wrapper for IfcLine struct IfcLine : IfcCurve, ObjectHelper<IfcLine,2> { IfcLine() : Object("IfcLine") {} Lazy< IfcCartesianPoint > Pnt; Lazy< IfcVector > Dir; }; // C++ wrapper for IfcColumn struct IfcColumn : IfcBuildingElement, ObjectHelper<IfcColumn,0> { IfcColumn() : Object("IfcColumn") {} }; // C++ wrapper for IfcObjectPlacement struct IfcObjectPlacement : ObjectHelper<IfcObjectPlacement,0> { IfcObjectPlacement() : Object("IfcObjectPlacement") {} }; // C++ wrapper for IfcGridPlacement struct IfcGridPlacement : IfcObjectPlacement, ObjectHelper<IfcGridPlacement,2> { IfcGridPlacement() : Object("IfcGridPlacement") {} Lazy< NotImplemented > PlacementLocation; Maybe< Lazy< NotImplemented > > PlacementRefDirection; }; // C++ wrapper for IfcDistributionControlElementType struct IfcDistributionControlElementType : IfcDistributionElementType, ObjectHelper<IfcDistributionControlElementType,0> { IfcDistributionControlElementType() : Object("IfcDistributionControlElementType") {} }; // C++ wrapper for IfcRelConnects struct IfcRelConnects : IfcRelationship, ObjectHelper<IfcRelConnects,0> { IfcRelConnects() : Object("IfcRelConnects") {} }; // C++ wrapper for IfcAnnotation struct IfcAnnotation : IfcProduct, ObjectHelper<IfcAnnotation,0> { IfcAnnotation() : Object("IfcAnnotation") {} }; // C++ wrapper for IfcPlate struct IfcPlate : IfcBuildingElement, ObjectHelper<IfcPlate,0> { IfcPlate() : Object("IfcPlate") {} }; // C++ wrapper for IfcSolidModel struct IfcSolidModel : IfcGeometricRepresentationItem, ObjectHelper<IfcSolidModel,0> { IfcSolidModel() : Object("IfcSolidModel") {} }; // C++ wrapper for IfcManifoldSolidBrep struct IfcManifoldSolidBrep : IfcSolidModel, ObjectHelper<IfcManifoldSolidBrep,1> { IfcManifoldSolidBrep() : Object("IfcManifoldSolidBrep") {} Lazy< IfcClosedShell > Outer; }; // C++ wrapper for IfcFlowStorageDeviceType struct IfcFlowStorageDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowStorageDeviceType,0> { IfcFlowStorageDeviceType() : Object("IfcFlowStorageDeviceType") {} }; // C++ wrapper for IfcStructuralItem struct IfcStructuralItem : IfcProduct, ObjectHelper<IfcStructuralItem,0> { IfcStructuralItem() : Object("IfcStructuralItem") {} }; // C++ wrapper for IfcStructuralMember struct IfcStructuralMember : IfcStructuralItem, ObjectHelper<IfcStructuralMember,0> { IfcStructuralMember() : Object("IfcStructuralMember") {} }; // C++ wrapper for IfcStructuralCurveMember struct IfcStructuralCurveMember : IfcStructuralMember, ObjectHelper<IfcStructuralCurveMember,1> { IfcStructuralCurveMember() : Object("IfcStructuralCurveMember") {} IfcStructuralCurveTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcStructuralConnection struct IfcStructuralConnection : IfcStructuralItem, ObjectHelper<IfcStructuralConnection,1> { IfcStructuralConnection() : Object("IfcStructuralConnection") {} Maybe< Lazy< NotImplemented > > AppliedCondition; }; // C++ wrapper for IfcStructuralSurfaceConnection struct IfcStructuralSurfaceConnection : IfcStructuralConnection, ObjectHelper<IfcStructuralSurfaceConnection,0> { IfcStructuralSurfaceConnection() : Object("IfcStructuralSurfaceConnection") {} }; // C++ wrapper for IfcCoilType struct IfcCoilType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCoilType,1> { IfcCoilType() : Object("IfcCoilType") {} IfcCoilTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcDuctFittingType struct IfcDuctFittingType : IfcFlowFittingType, ObjectHelper<IfcDuctFittingType,1> { IfcDuctFittingType() : Object("IfcDuctFittingType") {} IfcDuctFittingTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcStyledItem struct IfcStyledItem : IfcRepresentationItem, ObjectHelper<IfcStyledItem,3> { IfcStyledItem() : Object("IfcStyledItem") {} Maybe< Lazy< IfcRepresentationItem > > Item; ListOf< Lazy< IfcPresentationStyleAssignment >, 1, 0 > Styles; Maybe< IfcLabel::Out > Name; }; // C++ wrapper for IfcAnnotationOccurrence struct IfcAnnotationOccurrence : IfcStyledItem, ObjectHelper<IfcAnnotationOccurrence,0> { IfcAnnotationOccurrence() : Object("IfcAnnotationOccurrence") {} }; // C++ wrapper for IfcAnnotationCurveOccurrence struct IfcAnnotationCurveOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationCurveOccurrence,0> { IfcAnnotationCurveOccurrence() : Object("IfcAnnotationCurveOccurrence") {} }; // C++ wrapper for IfcDimensionCurve struct IfcDimensionCurve : IfcAnnotationCurveOccurrence, ObjectHelper<IfcDimensionCurve,0> { IfcDimensionCurve() : Object("IfcDimensionCurve") {} }; // C++ wrapper for IfcBoundedCurve struct IfcBoundedCurve : IfcCurve, ObjectHelper<IfcBoundedCurve,0> { IfcBoundedCurve() : Object("IfcBoundedCurve") {} }; // C++ wrapper for IfcAxis1Placement struct IfcAxis1Placement : IfcPlacement, ObjectHelper<IfcAxis1Placement,1> { IfcAxis1Placement() : Object("IfcAxis1Placement") {} Maybe< Lazy< IfcDirection > > Axis; }; // C++ wrapper for IfcStructuralPointAction struct IfcStructuralPointAction : IfcStructuralAction, ObjectHelper<IfcStructuralPointAction,0> { IfcStructuralPointAction() : Object("IfcStructuralPointAction") {} }; // C++ wrapper for IfcSpatialStructureElement struct IfcSpatialStructureElement : IfcProduct, ObjectHelper<IfcSpatialStructureElement,2> { IfcSpatialStructureElement() : Object("IfcSpatialStructureElement") {} Maybe< IfcLabel::Out > LongName; IfcElementCompositionEnum::Out CompositionType; }; // C++ wrapper for IfcSpace struct IfcSpace : IfcSpatialStructureElement, ObjectHelper<IfcSpace,2> { IfcSpace() : Object("IfcSpace") {} IfcInternalOrExternalEnum::Out InteriorOrExteriorSpace; Maybe< IfcLengthMeasure::Out > ElevationWithFlooring; }; // C++ wrapper for IfcCoolingTowerType struct IfcCoolingTowerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCoolingTowerType,1> { IfcCoolingTowerType() : Object("IfcCoolingTowerType") {} IfcCoolingTowerTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcFacetedBrepWithVoids struct IfcFacetedBrepWithVoids : IfcManifoldSolidBrep, ObjectHelper<IfcFacetedBrepWithVoids,1> { IfcFacetedBrepWithVoids() : Object("IfcFacetedBrepWithVoids") {} ListOf< Lazy< IfcClosedShell >, 1, 0 > Voids; }; // C++ wrapper for IfcValveType struct IfcValveType : IfcFlowControllerType, ObjectHelper<IfcValveType,1> { IfcValveType() : Object("IfcValveType") {} IfcValveTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcSystemFurnitureElementType struct IfcSystemFurnitureElementType : IfcFurnishingElementType, ObjectHelper<IfcSystemFurnitureElementType,0> { IfcSystemFurnitureElementType() : Object("IfcSystemFurnitureElementType") {} }; // C++ wrapper for IfcDiscreteAccessory struct IfcDiscreteAccessory : IfcElementComponent, ObjectHelper<IfcDiscreteAccessory,0> { IfcDiscreteAccessory() : Object("IfcDiscreteAccessory") {} }; // C++ wrapper for IfcBuildingElementType struct IfcBuildingElementType : IfcElementType, ObjectHelper<IfcBuildingElementType,0> { IfcBuildingElementType() : Object("IfcBuildingElementType") {} }; // C++ wrapper for IfcRailingType struct IfcRailingType : IfcBuildingElementType, ObjectHelper<IfcRailingType,1> { IfcRailingType() : Object("IfcRailingType") {} IfcRailingTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcGasTerminalType struct IfcGasTerminalType : IfcFlowTerminalType, ObjectHelper<IfcGasTerminalType,1> { IfcGasTerminalType() : Object("IfcGasTerminalType") {} IfcGasTerminalTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcSpaceProgram struct IfcSpaceProgram : IfcControl, ObjectHelper<IfcSpaceProgram,5> { IfcSpaceProgram() : Object("IfcSpaceProgram") {} IfcIdentifier::Out SpaceProgramIdentifier; Maybe< IfcAreaMeasure::Out > MaxRequiredArea; Maybe< IfcAreaMeasure::Out > MinRequiredArea; Maybe< Lazy< IfcSpatialStructureElement > > RequestedLocation; IfcAreaMeasure::Out StandardRequiredArea; }; // C++ wrapper for IfcCovering struct IfcCovering : IfcBuildingElement, ObjectHelper<IfcCovering,1> { IfcCovering() : Object("IfcCovering") {} Maybe< IfcCoveringTypeEnum::Out > PredefinedType; }; // C++ wrapper for IfcPresentationStyle struct IfcPresentationStyle : ObjectHelper<IfcPresentationStyle,1> { IfcPresentationStyle() : Object("IfcPresentationStyle") {} Maybe< IfcLabel::Out > Name; }; // C++ wrapper for IfcElectricHeaterType struct IfcElectricHeaterType : IfcFlowTerminalType, ObjectHelper<IfcElectricHeaterType,1> { IfcElectricHeaterType() : Object("IfcElectricHeaterType") {} IfcElectricHeaterTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcBuildingStorey struct IfcBuildingStorey : IfcSpatialStructureElement, ObjectHelper<IfcBuildingStorey,1> { IfcBuildingStorey() : Object("IfcBuildingStorey") {} Maybe< IfcLengthMeasure::Out > Elevation; }; // C++ wrapper for IfcVertex struct IfcVertex : IfcTopologicalRepresentationItem, ObjectHelper<IfcVertex,0> { IfcVertex() : Object("IfcVertex") {} }; // C++ wrapper for IfcVertexPoint struct IfcVertexPoint : IfcVertex, ObjectHelper<IfcVertexPoint,1> { IfcVertexPoint() : Object("IfcVertexPoint") {} Lazy< IfcPoint > VertexGeometry; }; // C++ wrapper for IfcFlowInstrumentType struct IfcFlowInstrumentType : IfcDistributionControlElementType, ObjectHelper<IfcFlowInstrumentType,1> { IfcFlowInstrumentType() : Object("IfcFlowInstrumentType") {} IfcFlowInstrumentTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcParameterizedProfileDef struct IfcParameterizedProfileDef : IfcProfileDef, ObjectHelper<IfcParameterizedProfileDef,1> { IfcParameterizedProfileDef() : Object("IfcParameterizedProfileDef") {} Lazy< IfcAxis2Placement2D > Position; }; // C++ wrapper for IfcUShapeProfileDef struct IfcUShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcUShapeProfileDef,8> { IfcUShapeProfileDef() : Object("IfcUShapeProfileDef") {} IfcPositiveLengthMeasure::Out Depth; IfcPositiveLengthMeasure::Out FlangeWidth; IfcPositiveLengthMeasure::Out WebThickness; IfcPositiveLengthMeasure::Out FlangeThickness; Maybe< IfcPositiveLengthMeasure::Out > FilletRadius; Maybe< IfcPositiveLengthMeasure::Out > EdgeRadius; Maybe< IfcPlaneAngleMeasure::Out > FlangeSlope; Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInX; }; // C++ wrapper for IfcRamp struct IfcRamp : IfcBuildingElement, ObjectHelper<IfcRamp,1> { IfcRamp() : Object("IfcRamp") {} IfcRampTypeEnum::Out ShapeType; }; // C++ wrapper for IfcCompositeCurve struct IfcCompositeCurve : IfcBoundedCurve, ObjectHelper<IfcCompositeCurve,2> { IfcCompositeCurve() : Object("IfcCompositeCurve") {} ListOf< Lazy< IfcCompositeCurveSegment >, 1, 0 > Segments; LOGICAL::Out SelfIntersect; }; // C++ wrapper for IfcStructuralCurveMemberVarying struct IfcStructuralCurveMemberVarying : IfcStructuralCurveMember, ObjectHelper<IfcStructuralCurveMemberVarying,0> { IfcStructuralCurveMemberVarying() : Object("IfcStructuralCurveMemberVarying") {} }; // C++ wrapper for IfcRampFlightType struct IfcRampFlightType : IfcBuildingElementType, ObjectHelper<IfcRampFlightType,1> { IfcRampFlightType() : Object("IfcRampFlightType") {} IfcRampFlightTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcDraughtingCallout struct IfcDraughtingCallout : IfcGeometricRepresentationItem, ObjectHelper<IfcDraughtingCallout,1> { IfcDraughtingCallout() : Object("IfcDraughtingCallout") {} ListOf< IfcDraughtingCalloutElement, 1, 0 >::Out Contents; }; // C++ wrapper for IfcDimensionCurveDirectedCallout struct IfcDimensionCurveDirectedCallout : IfcDraughtingCallout, ObjectHelper<IfcDimensionCurveDirectedCallout,0> { IfcDimensionCurveDirectedCallout() : Object("IfcDimensionCurveDirectedCallout") {} }; // C++ wrapper for IfcRadiusDimension struct IfcRadiusDimension : IfcDimensionCurveDirectedCallout, ObjectHelper<IfcRadiusDimension,0> { IfcRadiusDimension() : Object("IfcRadiusDimension") {} }; // C++ wrapper for IfcEdgeFeature struct IfcEdgeFeature : IfcFeatureElementSubtraction, ObjectHelper<IfcEdgeFeature,1> { IfcEdgeFeature() : Object("IfcEdgeFeature") {} Maybe< IfcPositiveLengthMeasure::Out > FeatureLength; }; // C++ wrapper for IfcSweptAreaSolid struct IfcSweptAreaSolid : IfcSolidModel, ObjectHelper<IfcSweptAreaSolid,2> { IfcSweptAreaSolid() : Object("IfcSweptAreaSolid") {} Lazy< IfcProfileDef > SweptArea; Lazy< IfcAxis2Placement3D > Position; }; // C++ wrapper for IfcExtrudedAreaSolid struct IfcExtrudedAreaSolid : IfcSweptAreaSolid, ObjectHelper<IfcExtrudedAreaSolid,2> { IfcExtrudedAreaSolid() : Object("IfcExtrudedAreaSolid") {} Lazy< IfcDirection > ExtrudedDirection; IfcPositiveLengthMeasure::Out Depth; }; // C++ wrapper for IfcAnnotationTextOccurrence struct IfcAnnotationTextOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationTextOccurrence,0> { IfcAnnotationTextOccurrence() : Object("IfcAnnotationTextOccurrence") {} }; // C++ wrapper for IfcStair struct IfcStair : IfcBuildingElement, ObjectHelper<IfcStair,1> { IfcStair() : Object("IfcStair") {} IfcStairTypeEnum::Out ShapeType; }; // C++ wrapper for IfcFillAreaStyleTileSymbolWithStyle struct IfcFillAreaStyleTileSymbolWithStyle : IfcGeometricRepresentationItem, ObjectHelper<IfcFillAreaStyleTileSymbolWithStyle,1> { IfcFillAreaStyleTileSymbolWithStyle() : Object("IfcFillAreaStyleTileSymbolWithStyle") {} Lazy< IfcAnnotationSymbolOccurrence > Symbol; }; // C++ wrapper for IfcAnnotationSymbolOccurrence struct IfcAnnotationSymbolOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationSymbolOccurrence,0> { IfcAnnotationSymbolOccurrence() : Object("IfcAnnotationSymbolOccurrence") {} }; // C++ wrapper for IfcTerminatorSymbol struct IfcTerminatorSymbol : IfcAnnotationSymbolOccurrence, ObjectHelper<IfcTerminatorSymbol,1> { IfcTerminatorSymbol() : Object("IfcTerminatorSymbol") {} Lazy< IfcAnnotationCurveOccurrence > AnnotatedCurve; }; // C++ wrapper for IfcDimensionCurveTerminator struct IfcDimensionCurveTerminator : IfcTerminatorSymbol, ObjectHelper<IfcDimensionCurveTerminator,1> { IfcDimensionCurveTerminator() : Object("IfcDimensionCurveTerminator") {} IfcDimensionExtentUsage::Out Role; }; // C++ wrapper for IfcRectangleProfileDef struct IfcRectangleProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcRectangleProfileDef,2> { IfcRectangleProfileDef() : Object("IfcRectangleProfileDef") {} IfcPositiveLengthMeasure::Out XDim; IfcPositiveLengthMeasure::Out YDim; }; // C++ wrapper for IfcRectangleHollowProfileDef struct IfcRectangleHollowProfileDef : IfcRectangleProfileDef, ObjectHelper<IfcRectangleHollowProfileDef,3> { IfcRectangleHollowProfileDef() : Object("IfcRectangleHollowProfileDef") {} IfcPositiveLengthMeasure::Out WallThickness; Maybe< IfcPositiveLengthMeasure::Out > InnerFilletRadius; Maybe< IfcPositiveLengthMeasure::Out > OuterFilletRadius; }; // C++ wrapper for IfcLocalPlacement struct IfcLocalPlacement : IfcObjectPlacement, ObjectHelper<IfcLocalPlacement,2> { IfcLocalPlacement() : Object("IfcLocalPlacement") {} Maybe< Lazy< IfcObjectPlacement > > PlacementRelTo; IfcAxis2Placement::Out RelativePlacement; }; // C++ wrapper for IfcTask struct IfcTask : IfcProcess, ObjectHelper<IfcTask,5> { IfcTask() : Object("IfcTask") {} IfcIdentifier::Out TaskId; Maybe< IfcLabel::Out > Status; Maybe< IfcLabel::Out > WorkMethod; BOOLEAN::Out IsMilestone; Maybe< INTEGER::Out > Priority; }; // C++ wrapper for IfcAnnotationFillAreaOccurrence struct IfcAnnotationFillAreaOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationFillAreaOccurrence,2> { IfcAnnotationFillAreaOccurrence() : Object("IfcAnnotationFillAreaOccurrence") {} Maybe< Lazy< IfcPoint > > FillStyleTarget; Maybe< IfcGlobalOrLocalEnum::Out > GlobalOrLocal; }; // C++ wrapper for IfcFace struct IfcFace : IfcTopologicalRepresentationItem, ObjectHelper<IfcFace,1> { IfcFace() : Object("IfcFace") {} ListOf< Lazy< IfcFaceBound >, 1, 0 > Bounds; }; // C++ wrapper for IfcFlowSegmentType struct IfcFlowSegmentType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowSegmentType,0> { IfcFlowSegmentType() : Object("IfcFlowSegmentType") {} }; // C++ wrapper for IfcDuctSegmentType struct IfcDuctSegmentType : IfcFlowSegmentType, ObjectHelper<IfcDuctSegmentType,1> { IfcDuctSegmentType() : Object("IfcDuctSegmentType") {} IfcDuctSegmentTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcConstructionResource struct IfcConstructionResource : IfcResource, ObjectHelper<IfcConstructionResource,4> { IfcConstructionResource() : Object("IfcConstructionResource") {} Maybe< IfcIdentifier::Out > ResourceIdentifier; Maybe< IfcLabel::Out > ResourceGroup; Maybe< IfcResourceConsumptionEnum::Out > ResourceConsumption; Maybe< Lazy< IfcMeasureWithUnit > > BaseQuantity; }; // C++ wrapper for IfcConstructionEquipmentResource struct IfcConstructionEquipmentResource : IfcConstructionResource, ObjectHelper<IfcConstructionEquipmentResource,0> { IfcConstructionEquipmentResource() : Object("IfcConstructionEquipmentResource") {} }; // C++ wrapper for IfcSanitaryTerminalType struct IfcSanitaryTerminalType : IfcFlowTerminalType, ObjectHelper<IfcSanitaryTerminalType,1> { IfcSanitaryTerminalType() : Object("IfcSanitaryTerminalType") {} IfcSanitaryTerminalTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcCircleProfileDef struct IfcCircleProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCircleProfileDef,1> { IfcCircleProfileDef() : Object("IfcCircleProfileDef") {} IfcPositiveLengthMeasure::Out Radius; }; // C++ wrapper for IfcStructuralReaction struct IfcStructuralReaction : IfcStructuralActivity, ObjectHelper<IfcStructuralReaction,0> { IfcStructuralReaction() : Object("IfcStructuralReaction") {} }; // C++ wrapper for IfcStructuralPointReaction struct IfcStructuralPointReaction : IfcStructuralReaction, ObjectHelper<IfcStructuralPointReaction,0> { IfcStructuralPointReaction() : Object("IfcStructuralPointReaction") {} }; // C++ wrapper for IfcRailing struct IfcRailing : IfcBuildingElement, ObjectHelper<IfcRailing,1> { IfcRailing() : Object("IfcRailing") {} Maybe< IfcRailingTypeEnum::Out > PredefinedType; }; // C++ wrapper for IfcTextLiteral struct IfcTextLiteral : IfcGeometricRepresentationItem, ObjectHelper<IfcTextLiteral,3> { IfcTextLiteral() : Object("IfcTextLiteral") {} IfcPresentableText::Out Literal; IfcAxis2Placement::Out Placement; IfcTextPath::Out Path; }; // C++ wrapper for IfcCartesianTransformationOperator struct IfcCartesianTransformationOperator : IfcGeometricRepresentationItem, ObjectHelper<IfcCartesianTransformationOperator,4> { IfcCartesianTransformationOperator() : Object("IfcCartesianTransformationOperator") {} Maybe< Lazy< IfcDirection > > Axis1; Maybe< Lazy< IfcDirection > > Axis2; Lazy< IfcCartesianPoint > LocalOrigin; Maybe< REAL::Out > Scale; }; // C++ wrapper for IfcLinearDimension struct IfcLinearDimension : IfcDimensionCurveDirectedCallout, ObjectHelper<IfcLinearDimension,0> { IfcLinearDimension() : Object("IfcLinearDimension") {} }; // C++ wrapper for IfcDamperType struct IfcDamperType : IfcFlowControllerType, ObjectHelper<IfcDamperType,1> { IfcDamperType() : Object("IfcDamperType") {} IfcDamperTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcSIUnit struct IfcSIUnit : IfcNamedUnit, ObjectHelper<IfcSIUnit,2> { IfcSIUnit() : Object("IfcSIUnit") {} Maybe< IfcSIPrefix::Out > Prefix; IfcSIUnitName::Out Name; }; // C++ wrapper for IfcMeasureWithUnit struct IfcMeasureWithUnit : ObjectHelper<IfcMeasureWithUnit,2> { IfcMeasureWithUnit() : Object("IfcMeasureWithUnit") {} IfcValue::Out ValueComponent; IfcUnit::Out UnitComponent; }; // C++ wrapper for IfcDistributionElement struct IfcDistributionElement : IfcElement, ObjectHelper<IfcDistributionElement,0> { IfcDistributionElement() : Object("IfcDistributionElement") {} }; // C++ wrapper for IfcDistributionControlElement struct IfcDistributionControlElement : IfcDistributionElement, ObjectHelper<IfcDistributionControlElement,1> { IfcDistributionControlElement() : Object("IfcDistributionControlElement") {} Maybe< IfcIdentifier::Out > ControlElementId; }; // C++ wrapper for IfcTransformerType struct IfcTransformerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcTransformerType,1> { IfcTransformerType() : Object("IfcTransformerType") {} IfcTransformerTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcLaborResource struct IfcLaborResource : IfcConstructionResource, ObjectHelper<IfcLaborResource,1> { IfcLaborResource() : Object("IfcLaborResource") {} Maybe< IfcText::Out > SkillSet; }; // C++ wrapper for IfcFurnitureStandard struct IfcFurnitureStandard : IfcControl, ObjectHelper<IfcFurnitureStandard,0> { IfcFurnitureStandard() : Object("IfcFurnitureStandard") {} }; // C++ wrapper for IfcStairFlightType struct IfcStairFlightType : IfcBuildingElementType, ObjectHelper<IfcStairFlightType,1> { IfcStairFlightType() : Object("IfcStairFlightType") {} IfcStairFlightTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcWorkControl struct IfcWorkControl : IfcControl, ObjectHelper<IfcWorkControl,10> { IfcWorkControl() : Object("IfcWorkControl") {} IfcIdentifier::Out Identifier; IfcDateTimeSelect::Out CreationDate; Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > Creators; Maybe< IfcLabel::Out > Purpose; Maybe< IfcTimeMeasure::Out > Duration; Maybe< IfcTimeMeasure::Out > TotalFloat; IfcDateTimeSelect::Out StartTime; Maybe< IfcDateTimeSelect::Out > FinishTime; Maybe< IfcWorkControlTypeEnum::Out > WorkControlType; Maybe< IfcLabel::Out > UserDefinedControlType; }; // C++ wrapper for IfcWorkPlan struct IfcWorkPlan : IfcWorkControl, ObjectHelper<IfcWorkPlan,0> { IfcWorkPlan() : Object("IfcWorkPlan") {} }; // C++ wrapper for IfcCondition struct IfcCondition : IfcGroup, ObjectHelper<IfcCondition,0> { IfcCondition() : Object("IfcCondition") {} }; // C++ wrapper for IfcRelVoidsElement struct IfcRelVoidsElement : IfcRelConnects, ObjectHelper<IfcRelVoidsElement,2> { IfcRelVoidsElement() : Object("IfcRelVoidsElement") {} Lazy< IfcElement > RelatingBuildingElement; Lazy< IfcFeatureElementSubtraction > RelatedOpeningElement; }; // C++ wrapper for IfcWindow struct IfcWindow : IfcBuildingElement, ObjectHelper<IfcWindow,2> { IfcWindow() : Object("IfcWindow") {} Maybe< IfcPositiveLengthMeasure::Out > OverallHeight; Maybe< IfcPositiveLengthMeasure::Out > OverallWidth; }; // C++ wrapper for IfcProtectiveDeviceType struct IfcProtectiveDeviceType : IfcFlowControllerType, ObjectHelper<IfcProtectiveDeviceType,1> { IfcProtectiveDeviceType() : Object("IfcProtectiveDeviceType") {} IfcProtectiveDeviceTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcJunctionBoxType struct IfcJunctionBoxType : IfcFlowFittingType, ObjectHelper<IfcJunctionBoxType,1> { IfcJunctionBoxType() : Object("IfcJunctionBoxType") {} IfcJunctionBoxTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcStructuralAnalysisModel struct IfcStructuralAnalysisModel : IfcSystem, ObjectHelper<IfcStructuralAnalysisModel,4> { IfcStructuralAnalysisModel() : Object("IfcStructuralAnalysisModel") {} IfcAnalysisModelTypeEnum::Out PredefinedType; Maybe< Lazy< IfcAxis2Placement3D > > OrientationOf2DPlane; Maybe< ListOf< Lazy< IfcStructuralLoadGroup >, 1, 0 > > LoadedBy; Maybe< ListOf< Lazy< IfcStructuralResultGroup >, 1, 0 > > HasResults; }; // C++ wrapper for IfcAxis2Placement2D struct IfcAxis2Placement2D : IfcPlacement, ObjectHelper<IfcAxis2Placement2D,1> { IfcAxis2Placement2D() : Object("IfcAxis2Placement2D") {} Maybe< Lazy< IfcDirection > > RefDirection; }; // C++ wrapper for IfcSpaceType struct IfcSpaceType : IfcSpatialStructureElementType, ObjectHelper<IfcSpaceType,1> { IfcSpaceType() : Object("IfcSpaceType") {} IfcSpaceTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcEllipseProfileDef struct IfcEllipseProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcEllipseProfileDef,2> { IfcEllipseProfileDef() : Object("IfcEllipseProfileDef") {} IfcPositiveLengthMeasure::Out SemiAxis1; IfcPositiveLengthMeasure::Out SemiAxis2; }; // C++ wrapper for IfcDistributionFlowElement struct IfcDistributionFlowElement : IfcDistributionElement, ObjectHelper<IfcDistributionFlowElement,0> { IfcDistributionFlowElement() : Object("IfcDistributionFlowElement") {} }; // C++ wrapper for IfcFlowMovingDevice struct IfcFlowMovingDevice : IfcDistributionFlowElement, ObjectHelper<IfcFlowMovingDevice,0> { IfcFlowMovingDevice() : Object("IfcFlowMovingDevice") {} }; // C++ wrapper for IfcSurfaceStyleWithTextures struct IfcSurfaceStyleWithTextures : ObjectHelper<IfcSurfaceStyleWithTextures,1> { IfcSurfaceStyleWithTextures() : Object("IfcSurfaceStyleWithTextures") {} ListOf< Lazy< NotImplemented >, 1, 0 > Textures; }; // C++ wrapper for IfcGeometricSet struct IfcGeometricSet : IfcGeometricRepresentationItem, ObjectHelper<IfcGeometricSet,1> { IfcGeometricSet() : Object("IfcGeometricSet") {} ListOf< IfcGeometricSetSelect, 1, 0 >::Out Elements; }; // C++ wrapper for IfcProjectOrder struct IfcProjectOrder : IfcControl, ObjectHelper<IfcProjectOrder,3> { IfcProjectOrder() : Object("IfcProjectOrder") {} IfcIdentifier::Out ID; IfcProjectOrderTypeEnum::Out PredefinedType; Maybe< IfcLabel::Out > Status; }; // C++ wrapper for IfcBSplineCurve struct IfcBSplineCurve : IfcBoundedCurve, ObjectHelper<IfcBSplineCurve,5> { IfcBSplineCurve() : Object("IfcBSplineCurve") {} INTEGER::Out Degree; ListOf< Lazy< IfcCartesianPoint >, 2, 0 > ControlPointsList; IfcBSplineCurveForm::Out CurveForm; LOGICAL::Out ClosedCurve; LOGICAL::Out SelfIntersect; }; // C++ wrapper for IfcBezierCurve struct IfcBezierCurve : IfcBSplineCurve, ObjectHelper<IfcBezierCurve,0> { IfcBezierCurve() : Object("IfcBezierCurve") {} }; // C++ wrapper for IfcStructuralPointConnection struct IfcStructuralPointConnection : IfcStructuralConnection, ObjectHelper<IfcStructuralPointConnection,0> { IfcStructuralPointConnection() : Object("IfcStructuralPointConnection") {} }; // C++ wrapper for IfcFlowController struct IfcFlowController : IfcDistributionFlowElement, ObjectHelper<IfcFlowController,0> { IfcFlowController() : Object("IfcFlowController") {} }; // C++ wrapper for IfcElectricDistributionPoint struct IfcElectricDistributionPoint : IfcFlowController, ObjectHelper<IfcElectricDistributionPoint,2> { IfcElectricDistributionPoint() : Object("IfcElectricDistributionPoint") {} IfcElectricDistributionPointFunctionEnum::Out DistributionPointFunction; Maybe< IfcLabel::Out > UserDefinedFunction; }; // C++ wrapper for IfcSite struct IfcSite : IfcSpatialStructureElement, ObjectHelper<IfcSite,5> { IfcSite() : Object("IfcSite") {} Maybe< IfcCompoundPlaneAngleMeasure::Out > RefLatitude; Maybe< IfcCompoundPlaneAngleMeasure::Out > RefLongitude; Maybe< IfcLengthMeasure::Out > RefElevation; Maybe< IfcLabel::Out > LandTitleNumber; Maybe< Lazy< NotImplemented > > SiteAddress; }; // C++ wrapper for IfcOffsetCurve3D struct IfcOffsetCurve3D : IfcCurve, ObjectHelper<IfcOffsetCurve3D,4> { IfcOffsetCurve3D() : Object("IfcOffsetCurve3D") {} Lazy< IfcCurve > BasisCurve; IfcLengthMeasure::Out Distance; LOGICAL::Out SelfIntersect; Lazy< IfcDirection > RefDirection; }; // C++ wrapper for IfcVirtualElement struct IfcVirtualElement : IfcElement, ObjectHelper<IfcVirtualElement,0> { IfcVirtualElement() : Object("IfcVirtualElement") {} }; // C++ wrapper for IfcConstructionProductResource struct IfcConstructionProductResource : IfcConstructionResource, ObjectHelper<IfcConstructionProductResource,0> { IfcConstructionProductResource() : Object("IfcConstructionProductResource") {} }; // C++ wrapper for IfcSurfaceCurveSweptAreaSolid struct IfcSurfaceCurveSweptAreaSolid : IfcSweptAreaSolid, ObjectHelper<IfcSurfaceCurveSweptAreaSolid,4> { IfcSurfaceCurveSweptAreaSolid() : Object("IfcSurfaceCurveSweptAreaSolid") {} Lazy< IfcCurve > Directrix; IfcParameterValue::Out StartParam; IfcParameterValue::Out EndParam; Lazy< IfcSurface > ReferenceSurface; }; // C++ wrapper for IfcCartesianTransformationOperator3D struct IfcCartesianTransformationOperator3D : IfcCartesianTransformationOperator, ObjectHelper<IfcCartesianTransformationOperator3D,1> { IfcCartesianTransformationOperator3D() : Object("IfcCartesianTransformationOperator3D") {} Maybe< Lazy< IfcDirection > > Axis3; }; // C++ wrapper for IfcCartesianTransformationOperator3DnonUniform struct IfcCartesianTransformationOperator3DnonUniform : IfcCartesianTransformationOperator3D, ObjectHelper<IfcCartesianTransformationOperator3DnonUniform,2> { IfcCartesianTransformationOperator3DnonUniform() : Object("IfcCartesianTransformationOperator3DnonUniform") {} Maybe< REAL::Out > Scale2; Maybe< REAL::Out > Scale3; }; // C++ wrapper for IfcCrewResource struct IfcCrewResource : IfcConstructionResource, ObjectHelper<IfcCrewResource,0> { IfcCrewResource() : Object("IfcCrewResource") {} }; // C++ wrapper for IfcStructuralSurfaceMember struct IfcStructuralSurfaceMember : IfcStructuralMember, ObjectHelper<IfcStructuralSurfaceMember,2> { IfcStructuralSurfaceMember() : Object("IfcStructuralSurfaceMember") {} IfcStructuralSurfaceTypeEnum::Out PredefinedType; Maybe< IfcPositiveLengthMeasure::Out > Thickness; }; // C++ wrapper for Ifc2DCompositeCurve struct Ifc2DCompositeCurve : IfcCompositeCurve, ObjectHelper<Ifc2DCompositeCurve,0> { Ifc2DCompositeCurve() : Object("Ifc2DCompositeCurve") {} }; // C++ wrapper for IfcRepresentationContext struct IfcRepresentationContext : ObjectHelper<IfcRepresentationContext,2> { IfcRepresentationContext() : Object("IfcRepresentationContext") {} Maybe< IfcLabel::Out > ContextIdentifier; Maybe< IfcLabel::Out > ContextType; }; // C++ wrapper for IfcGeometricRepresentationContext struct IfcGeometricRepresentationContext : IfcRepresentationContext, ObjectHelper<IfcGeometricRepresentationContext,4> { IfcGeometricRepresentationContext() : Object("IfcGeometricRepresentationContext") {} IfcDimensionCount::Out CoordinateSpaceDimension; Maybe< REAL::Out > Precision; IfcAxis2Placement::Out WorldCoordinateSystem; Maybe< Lazy< IfcDirection > > TrueNorth; }; // C++ wrapper for IfcFlowTreatmentDevice struct IfcFlowTreatmentDevice : IfcDistributionFlowElement, ObjectHelper<IfcFlowTreatmentDevice,0> { IfcFlowTreatmentDevice() : Object("IfcFlowTreatmentDevice") {} }; // C++ wrapper for IfcRightCircularCylinder struct IfcRightCircularCylinder : IfcCsgPrimitive3D, ObjectHelper<IfcRightCircularCylinder,2> { IfcRightCircularCylinder() : Object("IfcRightCircularCylinder") {} IfcPositiveLengthMeasure::Out Height; IfcPositiveLengthMeasure::Out Radius; }; // C++ wrapper for IfcWasteTerminalType struct IfcWasteTerminalType : IfcFlowTerminalType, ObjectHelper<IfcWasteTerminalType,1> { IfcWasteTerminalType() : Object("IfcWasteTerminalType") {} IfcWasteTerminalTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcBuildingElementComponent struct IfcBuildingElementComponent : IfcBuildingElement, ObjectHelper<IfcBuildingElementComponent,0> { IfcBuildingElementComponent() : Object("IfcBuildingElementComponent") {} }; // C++ wrapper for IfcBuildingElementPart struct IfcBuildingElementPart : IfcBuildingElementComponent, ObjectHelper<IfcBuildingElementPart,0> { IfcBuildingElementPart() : Object("IfcBuildingElementPart") {} }; // C++ wrapper for IfcWall struct IfcWall : IfcBuildingElement, ObjectHelper<IfcWall,0> { IfcWall() : Object("IfcWall") {} }; // C++ wrapper for IfcWallStandardCase struct IfcWallStandardCase : IfcWall, ObjectHelper<IfcWallStandardCase,0> { IfcWallStandardCase() : Object("IfcWallStandardCase") {} }; // C++ wrapper for IfcPath struct IfcPath : IfcTopologicalRepresentationItem, ObjectHelper<IfcPath,1> { IfcPath() : Object("IfcPath") {} ListOf< Lazy< IfcOrientedEdge >, 1, 0 > EdgeList; }; // C++ wrapper for IfcDefinedSymbol struct IfcDefinedSymbol : IfcGeometricRepresentationItem, ObjectHelper<IfcDefinedSymbol,2> { IfcDefinedSymbol() : Object("IfcDefinedSymbol") {} IfcDefinedSymbolSelect::Out Definition; Lazy< IfcCartesianTransformationOperator2D > Target; }; // C++ wrapper for IfcStructuralSurfaceMemberVarying struct IfcStructuralSurfaceMemberVarying : IfcStructuralSurfaceMember, ObjectHelper<IfcStructuralSurfaceMemberVarying,2> { IfcStructuralSurfaceMemberVarying() : Object("IfcStructuralSurfaceMemberVarying") {} ListOf< IfcPositiveLengthMeasure, 2, 0 >::Out SubsequentThickness; Lazy< NotImplemented > VaryingThicknessLocation; }; // C++ wrapper for IfcPoint struct IfcPoint : IfcGeometricRepresentationItem, ObjectHelper<IfcPoint,0> { IfcPoint() : Object("IfcPoint") {} }; // C++ wrapper for IfcSurfaceOfRevolution struct IfcSurfaceOfRevolution : IfcSweptSurface, ObjectHelper<IfcSurfaceOfRevolution,1> { IfcSurfaceOfRevolution() : Object("IfcSurfaceOfRevolution") {} Lazy< IfcAxis1Placement > AxisPosition; }; // C++ wrapper for IfcFlowTerminal struct IfcFlowTerminal : IfcDistributionFlowElement, ObjectHelper<IfcFlowTerminal,0> { IfcFlowTerminal() : Object("IfcFlowTerminal") {} }; // C++ wrapper for IfcFurnishingElement struct IfcFurnishingElement : IfcElement, ObjectHelper<IfcFurnishingElement,0> { IfcFurnishingElement() : Object("IfcFurnishingElement") {} }; // C++ wrapper for IfcSurfaceStyleShading struct IfcSurfaceStyleShading : ObjectHelper<IfcSurfaceStyleShading,1> { IfcSurfaceStyleShading() : Object("IfcSurfaceStyleShading") {} Lazy< IfcColourRgb > SurfaceColour; }; // C++ wrapper for IfcSurfaceStyleRendering struct IfcSurfaceStyleRendering : IfcSurfaceStyleShading, ObjectHelper<IfcSurfaceStyleRendering,8> { IfcSurfaceStyleRendering() : Object("IfcSurfaceStyleRendering") {} Maybe< IfcNormalisedRatioMeasure::Out > Transparency; Maybe< IfcColourOrFactor::Out > DiffuseColour; Maybe< IfcColourOrFactor::Out > TransmissionColour; Maybe< IfcColourOrFactor::Out > DiffuseTransmissionColour; Maybe< IfcColourOrFactor::Out > ReflectionColour; Maybe< IfcColourOrFactor::Out > SpecularColour; Maybe< IfcSpecularHighlightSelect::Out > SpecularHighlight; IfcReflectanceMethodEnum::Out ReflectanceMethod; }; // C++ wrapper for IfcCircleHollowProfileDef struct IfcCircleHollowProfileDef : IfcCircleProfileDef, ObjectHelper<IfcCircleHollowProfileDef,1> { IfcCircleHollowProfileDef() : Object("IfcCircleHollowProfileDef") {} IfcPositiveLengthMeasure::Out WallThickness; }; // C++ wrapper for IfcFlowMovingDeviceType struct IfcFlowMovingDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowMovingDeviceType,0> { IfcFlowMovingDeviceType() : Object("IfcFlowMovingDeviceType") {} }; // C++ wrapper for IfcFanType struct IfcFanType : IfcFlowMovingDeviceType, ObjectHelper<IfcFanType,1> { IfcFanType() : Object("IfcFanType") {} IfcFanTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcStructuralPlanarActionVarying struct IfcStructuralPlanarActionVarying : IfcStructuralPlanarAction, ObjectHelper<IfcStructuralPlanarActionVarying,2> { IfcStructuralPlanarActionVarying() : Object("IfcStructuralPlanarActionVarying") {} Lazy< NotImplemented > VaryingAppliedLoadLocation; ListOf< Lazy< NotImplemented >, 2, 0 > SubsequentAppliedLoads; }; // C++ wrapper for IfcProductRepresentation struct IfcProductRepresentation : ObjectHelper<IfcProductRepresentation,3> { IfcProductRepresentation() : Object("IfcProductRepresentation") {} Maybe< IfcLabel::Out > Name; Maybe< IfcText::Out > Description; ListOf< Lazy< IfcRepresentation >, 1, 0 > Representations; }; // C++ wrapper for IfcStackTerminalType struct IfcStackTerminalType : IfcFlowTerminalType, ObjectHelper<IfcStackTerminalType,1> { IfcStackTerminalType() : Object("IfcStackTerminalType") {} IfcStackTerminalTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcReinforcingElement struct IfcReinforcingElement : IfcBuildingElementComponent, ObjectHelper<IfcReinforcingElement,1> { IfcReinforcingElement() : Object("IfcReinforcingElement") {} Maybe< IfcLabel::Out > SteelGrade; }; // C++ wrapper for IfcReinforcingMesh struct IfcReinforcingMesh : IfcReinforcingElement, ObjectHelper<IfcReinforcingMesh,8> { IfcReinforcingMesh() : Object("IfcReinforcingMesh") {} Maybe< IfcPositiveLengthMeasure::Out > MeshLength; Maybe< IfcPositiveLengthMeasure::Out > MeshWidth; IfcPositiveLengthMeasure::Out LongitudinalBarNominalDiameter; IfcPositiveLengthMeasure::Out TransverseBarNominalDiameter; IfcAreaMeasure::Out LongitudinalBarCrossSectionArea; IfcAreaMeasure::Out TransverseBarCrossSectionArea; IfcPositiveLengthMeasure::Out LongitudinalBarSpacing; IfcPositiveLengthMeasure::Out TransverseBarSpacing; }; // C++ wrapper for IfcOrderAction struct IfcOrderAction : IfcTask, ObjectHelper<IfcOrderAction,1> { IfcOrderAction() : Object("IfcOrderAction") {} IfcIdentifier::Out ActionID; }; // C++ wrapper for IfcLightSource struct IfcLightSource : IfcGeometricRepresentationItem, ObjectHelper<IfcLightSource,4> { IfcLightSource() : Object("IfcLightSource") {} Maybe< IfcLabel::Out > Name; Lazy< IfcColourRgb > LightColour; Maybe< IfcNormalisedRatioMeasure::Out > AmbientIntensity; Maybe< IfcNormalisedRatioMeasure::Out > Intensity; }; // C++ wrapper for IfcLightSourceDirectional struct IfcLightSourceDirectional : IfcLightSource, ObjectHelper<IfcLightSourceDirectional,1> { IfcLightSourceDirectional() : Object("IfcLightSourceDirectional") {} Lazy< IfcDirection > Orientation; }; // C++ wrapper for IfcLoop struct IfcLoop : IfcTopologicalRepresentationItem, ObjectHelper<IfcLoop,0> { IfcLoop() : Object("IfcLoop") {} }; // C++ wrapper for IfcVertexLoop struct IfcVertexLoop : IfcLoop, ObjectHelper<IfcVertexLoop,1> { IfcVertexLoop() : Object("IfcVertexLoop") {} Lazy< IfcVertex > LoopVertex; }; // C++ wrapper for IfcChamferEdgeFeature struct IfcChamferEdgeFeature : IfcEdgeFeature, ObjectHelper<IfcChamferEdgeFeature,2> { IfcChamferEdgeFeature() : Object("IfcChamferEdgeFeature") {} Maybe< IfcPositiveLengthMeasure::Out > Width; Maybe< IfcPositiveLengthMeasure::Out > Height; }; // C++ wrapper for IfcElementComponentType struct IfcElementComponentType : IfcElementType, ObjectHelper<IfcElementComponentType,0> { IfcElementComponentType() : Object("IfcElementComponentType") {} }; // C++ wrapper for IfcFastenerType struct IfcFastenerType : IfcElementComponentType, ObjectHelper<IfcFastenerType,0> { IfcFastenerType() : Object("IfcFastenerType") {} }; // C++ wrapper for IfcMechanicalFastenerType struct IfcMechanicalFastenerType : IfcFastenerType, ObjectHelper<IfcMechanicalFastenerType,0> { IfcMechanicalFastenerType() : Object("IfcMechanicalFastenerType") {} }; // C++ wrapper for IfcScheduleTimeControl struct IfcScheduleTimeControl : IfcControl, ObjectHelper<IfcScheduleTimeControl,18> { IfcScheduleTimeControl() : Object("IfcScheduleTimeControl") {} Maybe< IfcDateTimeSelect::Out > ActualStart; Maybe< IfcDateTimeSelect::Out > EarlyStart; Maybe< IfcDateTimeSelect::Out > LateStart; Maybe< IfcDateTimeSelect::Out > ScheduleStart; Maybe< IfcDateTimeSelect::Out > ActualFinish; Maybe< IfcDateTimeSelect::Out > EarlyFinish; Maybe< IfcDateTimeSelect::Out > LateFinish; Maybe< IfcDateTimeSelect::Out > ScheduleFinish; Maybe< IfcTimeMeasure::Out > ScheduleDuration; Maybe< IfcTimeMeasure::Out > ActualDuration; Maybe< IfcTimeMeasure::Out > RemainingTime; Maybe< IfcTimeMeasure::Out > FreeFloat; Maybe< IfcTimeMeasure::Out > TotalFloat; Maybe< BOOLEAN::Out > IsCritical; Maybe< IfcDateTimeSelect::Out > StatusTime; Maybe< IfcTimeMeasure::Out > StartFloat; Maybe< IfcTimeMeasure::Out > FinishFloat; Maybe< IfcPositiveRatioMeasure::Out > Completion; }; // C++ wrapper for IfcSurfaceStyle struct IfcSurfaceStyle : IfcPresentationStyle, ObjectHelper<IfcSurfaceStyle,2> { IfcSurfaceStyle() : Object("IfcSurfaceStyle") {} IfcSurfaceSide::Out Side; ListOf< IfcSurfaceStyleElementSelect, 1, 5 >::Out Styles; }; // C++ wrapper for IfcOpenShell struct IfcOpenShell : IfcConnectedFaceSet, ObjectHelper<IfcOpenShell,0> { IfcOpenShell() : Object("IfcOpenShell") {} }; // C++ wrapper for IfcSubContractResource struct IfcSubContractResource : IfcConstructionResource, ObjectHelper<IfcSubContractResource,2> { IfcSubContractResource() : Object("IfcSubContractResource") {} Maybe< IfcActorSelect::Out > SubContractor; Maybe< IfcText::Out > JobDescription; }; // C++ wrapper for IfcSweptDiskSolid struct IfcSweptDiskSolid : IfcSolidModel, ObjectHelper<IfcSweptDiskSolid,5> { IfcSweptDiskSolid() : Object("IfcSweptDiskSolid") {} Lazy< IfcCurve > Directrix; IfcPositiveLengthMeasure::Out Radius; Maybe< IfcPositiveLengthMeasure::Out > InnerRadius; IfcParameterValue::Out StartParam; IfcParameterValue::Out EndParam; }; // C++ wrapper for IfcTankType struct IfcTankType : IfcFlowStorageDeviceType, ObjectHelper<IfcTankType,1> { IfcTankType() : Object("IfcTankType") {} IfcTankTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcSphere struct IfcSphere : IfcCsgPrimitive3D, ObjectHelper<IfcSphere,1> { IfcSphere() : Object("IfcSphere") {} IfcPositiveLengthMeasure::Out Radius; }; // C++ wrapper for IfcPolyLoop struct IfcPolyLoop : IfcLoop, ObjectHelper<IfcPolyLoop,1> { IfcPolyLoop() : Object("IfcPolyLoop") {} ListOf< Lazy< IfcCartesianPoint >, 3, 0 > Polygon; }; // C++ wrapper for IfcCableCarrierFittingType struct IfcCableCarrierFittingType : IfcFlowFittingType, ObjectHelper<IfcCableCarrierFittingType,1> { IfcCableCarrierFittingType() : Object("IfcCableCarrierFittingType") {} IfcCableCarrierFittingTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcHumidifierType struct IfcHumidifierType : IfcEnergyConversionDeviceType, ObjectHelper<IfcHumidifierType,1> { IfcHumidifierType() : Object("IfcHumidifierType") {} IfcHumidifierTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcPerformanceHistory struct IfcPerformanceHistory : IfcControl, ObjectHelper<IfcPerformanceHistory,1> { IfcPerformanceHistory() : Object("IfcPerformanceHistory") {} IfcLabel::Out LifeCyclePhase; }; // C++ wrapper for IfcShapeModel struct IfcShapeModel : IfcRepresentation, ObjectHelper<IfcShapeModel,0> { IfcShapeModel() : Object("IfcShapeModel") {} }; // C++ wrapper for IfcTopologyRepresentation struct IfcTopologyRepresentation : IfcShapeModel, ObjectHelper<IfcTopologyRepresentation,0> { IfcTopologyRepresentation() : Object("IfcTopologyRepresentation") {} }; // C++ wrapper for IfcBuilding struct IfcBuilding : IfcSpatialStructureElement, ObjectHelper<IfcBuilding,3> { IfcBuilding() : Object("IfcBuilding") {} Maybe< IfcLengthMeasure::Out > ElevationOfRefHeight; Maybe< IfcLengthMeasure::Out > ElevationOfTerrain; Maybe< Lazy< NotImplemented > > BuildingAddress; }; // C++ wrapper for IfcRoundedRectangleProfileDef struct IfcRoundedRectangleProfileDef : IfcRectangleProfileDef, ObjectHelper<IfcRoundedRectangleProfileDef,1> { IfcRoundedRectangleProfileDef() : Object("IfcRoundedRectangleProfileDef") {} IfcPositiveLengthMeasure::Out RoundingRadius; }; // C++ wrapper for IfcStairFlight struct IfcStairFlight : IfcBuildingElement, ObjectHelper<IfcStairFlight,4> { IfcStairFlight() : Object("IfcStairFlight") {} Maybe< INTEGER::Out > NumberOfRiser; Maybe< INTEGER::Out > NumberOfTreads; Maybe< IfcPositiveLengthMeasure::Out > RiserHeight; Maybe< IfcPositiveLengthMeasure::Out > TreadLength; }; // C++ wrapper for IfcDistributionChamberElement struct IfcDistributionChamberElement : IfcDistributionFlowElement, ObjectHelper<IfcDistributionChamberElement,0> { IfcDistributionChamberElement() : Object("IfcDistributionChamberElement") {} }; // C++ wrapper for IfcShapeRepresentation struct IfcShapeRepresentation : IfcShapeModel, ObjectHelper<IfcShapeRepresentation,0> { IfcShapeRepresentation() : Object("IfcShapeRepresentation") {} }; // C++ wrapper for IfcRampFlight struct IfcRampFlight : IfcBuildingElement, ObjectHelper<IfcRampFlight,0> { IfcRampFlight() : Object("IfcRampFlight") {} }; // C++ wrapper for IfcBeamType struct IfcBeamType : IfcBuildingElementType, ObjectHelper<IfcBeamType,1> { IfcBeamType() : Object("IfcBeamType") {} IfcBeamTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcRelDecomposes struct IfcRelDecomposes : IfcRelationship, ObjectHelper<IfcRelDecomposes,2> { IfcRelDecomposes() : Object("IfcRelDecomposes") {} Lazy< IfcObjectDefinition > RelatingObject; ListOf< Lazy< IfcObjectDefinition >, 1, 0 > RelatedObjects; }; // C++ wrapper for IfcRoof struct IfcRoof : IfcBuildingElement, ObjectHelper<IfcRoof,1> { IfcRoof() : Object("IfcRoof") {} IfcRoofTypeEnum::Out ShapeType; }; // C++ wrapper for IfcFooting struct IfcFooting : IfcBuildingElement, ObjectHelper<IfcFooting,1> { IfcFooting() : Object("IfcFooting") {} IfcFootingTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcLightSourceAmbient struct IfcLightSourceAmbient : IfcLightSource, ObjectHelper<IfcLightSourceAmbient,0> { IfcLightSourceAmbient() : Object("IfcLightSourceAmbient") {} }; // C++ wrapper for IfcWindowStyle struct IfcWindowStyle : IfcTypeProduct, ObjectHelper<IfcWindowStyle,4> { IfcWindowStyle() : Object("IfcWindowStyle") {} IfcWindowStyleConstructionEnum::Out ConstructionType; IfcWindowStyleOperationEnum::Out OperationType; BOOLEAN::Out ParameterTakesPrecedence; BOOLEAN::Out Sizeable; }; // C++ wrapper for IfcBuildingElementProxyType struct IfcBuildingElementProxyType : IfcBuildingElementType, ObjectHelper<IfcBuildingElementProxyType,1> { IfcBuildingElementProxyType() : Object("IfcBuildingElementProxyType") {} IfcBuildingElementProxyTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcAxis2Placement3D struct IfcAxis2Placement3D : IfcPlacement, ObjectHelper<IfcAxis2Placement3D,2> { IfcAxis2Placement3D() : Object("IfcAxis2Placement3D") {} Maybe< Lazy< IfcDirection > > Axis; Maybe< Lazy< IfcDirection > > RefDirection; }; // C++ wrapper for IfcEdgeCurve struct IfcEdgeCurve : IfcEdge, ObjectHelper<IfcEdgeCurve,2> { IfcEdgeCurve() : Object("IfcEdgeCurve") {} Lazy< IfcCurve > EdgeGeometry; BOOLEAN::Out SameSense; }; // C++ wrapper for IfcClosedShell struct IfcClosedShell : IfcConnectedFaceSet, ObjectHelper<IfcClosedShell,0> { IfcClosedShell() : Object("IfcClosedShell") {} }; // C++ wrapper for IfcTendonAnchor struct IfcTendonAnchor : IfcReinforcingElement, ObjectHelper<IfcTendonAnchor,0> { IfcTendonAnchor() : Object("IfcTendonAnchor") {} }; // C++ wrapper for IfcCondenserType struct IfcCondenserType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCondenserType,1> { IfcCondenserType() : Object("IfcCondenserType") {} IfcCondenserTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcPipeSegmentType struct IfcPipeSegmentType : IfcFlowSegmentType, ObjectHelper<IfcPipeSegmentType,1> { IfcPipeSegmentType() : Object("IfcPipeSegmentType") {} IfcPipeSegmentTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcPointOnSurface struct IfcPointOnSurface : IfcPoint, ObjectHelper<IfcPointOnSurface,3> { IfcPointOnSurface() : Object("IfcPointOnSurface") {} Lazy< IfcSurface > BasisSurface; IfcParameterValue::Out PointParameterU; IfcParameterValue::Out PointParameterV; }; // C++ wrapper for IfcAsset struct IfcAsset : IfcGroup, ObjectHelper<IfcAsset,9> { IfcAsset() : Object("IfcAsset") {} IfcIdentifier::Out AssetID; Lazy< NotImplemented > OriginalValue; Lazy< NotImplemented > CurrentValue; Lazy< NotImplemented > TotalReplacementCost; IfcActorSelect::Out Owner; IfcActorSelect::Out User; Lazy< NotImplemented > ResponsiblePerson; Lazy< NotImplemented > IncorporationDate; Lazy< NotImplemented > DepreciatedValue; }; // C++ wrapper for IfcLightSourcePositional struct IfcLightSourcePositional : IfcLightSource, ObjectHelper<IfcLightSourcePositional,5> { IfcLightSourcePositional() : Object("IfcLightSourcePositional") {} Lazy< IfcCartesianPoint > Position; IfcPositiveLengthMeasure::Out Radius; IfcReal::Out ConstantAttenuation; IfcReal::Out DistanceAttenuation; IfcReal::Out QuadricAttenuation; }; // C++ wrapper for IfcProjectionCurve struct IfcProjectionCurve : IfcAnnotationCurveOccurrence, ObjectHelper<IfcProjectionCurve,0> { IfcProjectionCurve() : Object("IfcProjectionCurve") {} }; // C++ wrapper for IfcFillAreaStyleTiles struct IfcFillAreaStyleTiles : IfcGeometricRepresentationItem, ObjectHelper<IfcFillAreaStyleTiles,3> { IfcFillAreaStyleTiles() : Object("IfcFillAreaStyleTiles") {} Lazy< IfcOneDirectionRepeatFactor > TilingPattern; ListOf< IfcFillAreaStyleTileShapeSelect, 1, 0 >::Out Tiles; IfcPositiveRatioMeasure::Out TilingScale; }; // C++ wrapper for IfcElectricMotorType struct IfcElectricMotorType : IfcEnergyConversionDeviceType, ObjectHelper<IfcElectricMotorType,1> { IfcElectricMotorType() : Object("IfcElectricMotorType") {} IfcElectricMotorTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcTendon struct IfcTendon : IfcReinforcingElement, ObjectHelper<IfcTendon,8> { IfcTendon() : Object("IfcTendon") {} IfcTendonTypeEnum::Out PredefinedType; IfcPositiveLengthMeasure::Out NominalDiameter; IfcAreaMeasure::Out CrossSectionArea; Maybe< IfcForceMeasure::Out > TensionForce; Maybe< IfcPressureMeasure::Out > PreStress; Maybe< IfcNormalisedRatioMeasure::Out > FrictionCoefficient; Maybe< IfcPositiveLengthMeasure::Out > AnchorageSlip; Maybe< IfcPositiveLengthMeasure::Out > MinCurvatureRadius; }; // C++ wrapper for IfcDistributionChamberElementType struct IfcDistributionChamberElementType : IfcDistributionFlowElementType, ObjectHelper<IfcDistributionChamberElementType,1> { IfcDistributionChamberElementType() : Object("IfcDistributionChamberElementType") {} IfcDistributionChamberElementTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcMemberType struct IfcMemberType : IfcBuildingElementType, ObjectHelper<IfcMemberType,1> { IfcMemberType() : Object("IfcMemberType") {} IfcMemberTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcStructuralLinearAction struct IfcStructuralLinearAction : IfcStructuralAction, ObjectHelper<IfcStructuralLinearAction,1> { IfcStructuralLinearAction() : Object("IfcStructuralLinearAction") {} IfcProjectedOrTrueLengthEnum::Out ProjectedOrTrue; }; // C++ wrapper for IfcStructuralLinearActionVarying struct IfcStructuralLinearActionVarying : IfcStructuralLinearAction, ObjectHelper<IfcStructuralLinearActionVarying,2> { IfcStructuralLinearActionVarying() : Object("IfcStructuralLinearActionVarying") {} Lazy< NotImplemented > VaryingAppliedLoadLocation; ListOf< Lazy< NotImplemented >, 1, 0 > SubsequentAppliedLoads; }; // C++ wrapper for IfcProductDefinitionShape struct IfcProductDefinitionShape : IfcProductRepresentation, ObjectHelper<IfcProductDefinitionShape,0> { IfcProductDefinitionShape() : Object("IfcProductDefinitionShape") {} }; // C++ wrapper for IfcFastener struct IfcFastener : IfcElementComponent, ObjectHelper<IfcFastener,0> { IfcFastener() : Object("IfcFastener") {} }; // C++ wrapper for IfcMechanicalFastener struct IfcMechanicalFastener : IfcFastener, ObjectHelper<IfcMechanicalFastener,2> { IfcMechanicalFastener() : Object("IfcMechanicalFastener") {} Maybe< IfcPositiveLengthMeasure::Out > NominalDiameter; Maybe< IfcPositiveLengthMeasure::Out > NominalLength; }; // C++ wrapper for IfcEvaporatorType struct IfcEvaporatorType : IfcEnergyConversionDeviceType, ObjectHelper<IfcEvaporatorType,1> { IfcEvaporatorType() : Object("IfcEvaporatorType") {} IfcEvaporatorTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcDiscreteAccessoryType struct IfcDiscreteAccessoryType : IfcElementComponentType, ObjectHelper<IfcDiscreteAccessoryType,0> { IfcDiscreteAccessoryType() : Object("IfcDiscreteAccessoryType") {} }; // C++ wrapper for IfcStructuralCurveConnection struct IfcStructuralCurveConnection : IfcStructuralConnection, ObjectHelper<IfcStructuralCurveConnection,0> { IfcStructuralCurveConnection() : Object("IfcStructuralCurveConnection") {} }; // C++ wrapper for IfcProjectionElement struct IfcProjectionElement : IfcFeatureElementAddition, ObjectHelper<IfcProjectionElement,0> { IfcProjectionElement() : Object("IfcProjectionElement") {} }; // C++ wrapper for IfcCoveringType struct IfcCoveringType : IfcBuildingElementType, ObjectHelper<IfcCoveringType,1> { IfcCoveringType() : Object("IfcCoveringType") {} IfcCoveringTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcPumpType struct IfcPumpType : IfcFlowMovingDeviceType, ObjectHelper<IfcPumpType,1> { IfcPumpType() : Object("IfcPumpType") {} IfcPumpTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcPile struct IfcPile : IfcBuildingElement, ObjectHelper<IfcPile,2> { IfcPile() : Object("IfcPile") {} IfcPileTypeEnum::Out PredefinedType; Maybe< IfcPileConstructionEnum::Out > ConstructionType; }; // C++ wrapper for IfcUnitAssignment struct IfcUnitAssignment : ObjectHelper<IfcUnitAssignment,1> { IfcUnitAssignment() : Object("IfcUnitAssignment") {} ListOf< IfcUnit, 1, 0 >::Out Units; }; // C++ wrapper for IfcBoundingBox struct IfcBoundingBox : IfcGeometricRepresentationItem, ObjectHelper<IfcBoundingBox,4> { IfcBoundingBox() : Object("IfcBoundingBox") {} Lazy< IfcCartesianPoint > Corner; IfcPositiveLengthMeasure::Out XDim; IfcPositiveLengthMeasure::Out YDim; IfcPositiveLengthMeasure::Out ZDim; }; // C++ wrapper for IfcShellBasedSurfaceModel struct IfcShellBasedSurfaceModel : IfcGeometricRepresentationItem, ObjectHelper<IfcShellBasedSurfaceModel,1> { IfcShellBasedSurfaceModel() : Object("IfcShellBasedSurfaceModel") {} ListOf< IfcShell, 1, 0 >::Out SbsmBoundary; }; // C++ wrapper for IfcFacetedBrep struct IfcFacetedBrep : IfcManifoldSolidBrep, ObjectHelper<IfcFacetedBrep,0> { IfcFacetedBrep() : Object("IfcFacetedBrep") {} }; // C++ wrapper for IfcTextLiteralWithExtent struct IfcTextLiteralWithExtent : IfcTextLiteral, ObjectHelper<IfcTextLiteralWithExtent,2> { IfcTextLiteralWithExtent() : Object("IfcTextLiteralWithExtent") {} Lazy< IfcPlanarExtent > Extent; IfcBoxAlignment::Out BoxAlignment; }; // C++ wrapper for IfcElectricApplianceType struct IfcElectricApplianceType : IfcFlowTerminalType, ObjectHelper<IfcElectricApplianceType,1> { IfcElectricApplianceType() : Object("IfcElectricApplianceType") {} IfcElectricApplianceTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcTrapeziumProfileDef struct IfcTrapeziumProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcTrapeziumProfileDef,4> { IfcTrapeziumProfileDef() : Object("IfcTrapeziumProfileDef") {} IfcPositiveLengthMeasure::Out BottomXDim; IfcPositiveLengthMeasure::Out TopXDim; IfcPositiveLengthMeasure::Out YDim; IfcLengthMeasure::Out TopXOffset; }; // C++ wrapper for IfcRelContainedInSpatialStructure struct IfcRelContainedInSpatialStructure : IfcRelConnects, ObjectHelper<IfcRelContainedInSpatialStructure,2> { IfcRelContainedInSpatialStructure() : Object("IfcRelContainedInSpatialStructure") {} ListOf< Lazy< IfcProduct >, 1, 0 > RelatedElements; Lazy< IfcSpatialStructureElement > RelatingStructure; }; // C++ wrapper for IfcEdgeLoop struct IfcEdgeLoop : IfcLoop, ObjectHelper<IfcEdgeLoop,1> { IfcEdgeLoop() : Object("IfcEdgeLoop") {} ListOf< Lazy< IfcOrientedEdge >, 1, 0 > EdgeList; }; // C++ wrapper for IfcProject struct IfcProject : IfcObject, ObjectHelper<IfcProject,4> { IfcProject() : Object("IfcProject") {} Maybe< IfcLabel::Out > LongName; Maybe< IfcLabel::Out > Phase; ListOf< Lazy< IfcRepresentationContext >, 1, 0 > RepresentationContexts; Lazy< IfcUnitAssignment > UnitsInContext; }; // C++ wrapper for IfcCartesianPoint struct IfcCartesianPoint : IfcPoint, ObjectHelper<IfcCartesianPoint,1> { IfcCartesianPoint() : Object("IfcCartesianPoint") {} ListOf< IfcLengthMeasure, 1, 3 >::Out Coordinates; }; // C++ wrapper for IfcCurveBoundedPlane struct IfcCurveBoundedPlane : IfcBoundedSurface, ObjectHelper<IfcCurveBoundedPlane,3> { IfcCurveBoundedPlane() : Object("IfcCurveBoundedPlane") {} Lazy< IfcPlane > BasisSurface; Lazy< IfcCurve > OuterBoundary; ListOf< Lazy< IfcCurve >, 0, 0 > InnerBoundaries; }; // C++ wrapper for IfcWallType struct IfcWallType : IfcBuildingElementType, ObjectHelper<IfcWallType,1> { IfcWallType() : Object("IfcWallType") {} IfcWallTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcFillAreaStyleHatching struct IfcFillAreaStyleHatching : IfcGeometricRepresentationItem, ObjectHelper<IfcFillAreaStyleHatching,5> { IfcFillAreaStyleHatching() : Object("IfcFillAreaStyleHatching") {} Lazy< NotImplemented > HatchLineAppearance; IfcHatchLineDistanceSelect::Out StartOfNextHatchLine; Maybe< Lazy< IfcCartesianPoint > > PointOfReferenceHatchLine; Maybe< Lazy< IfcCartesianPoint > > PatternStart; IfcPlaneAngleMeasure::Out HatchLineAngle; }; // C++ wrapper for IfcEquipmentStandard struct IfcEquipmentStandard : IfcControl, ObjectHelper<IfcEquipmentStandard,0> { IfcEquipmentStandard() : Object("IfcEquipmentStandard") {} }; // C++ wrapper for IfcDiameterDimension struct IfcDiameterDimension : IfcDimensionCurveDirectedCallout, ObjectHelper<IfcDiameterDimension,0> { IfcDiameterDimension() : Object("IfcDiameterDimension") {} }; // C++ wrapper for IfcStructuralLoadGroup struct IfcStructuralLoadGroup : IfcGroup, ObjectHelper<IfcStructuralLoadGroup,5> { IfcStructuralLoadGroup() : Object("IfcStructuralLoadGroup") {} IfcLoadGroupTypeEnum::Out PredefinedType; IfcActionTypeEnum::Out ActionType; IfcActionSourceTypeEnum::Out ActionSource; Maybe< IfcPositiveRatioMeasure::Out > Coefficient; Maybe< IfcLabel::Out > Purpose; }; // C++ wrapper for IfcConstructionMaterialResource struct IfcConstructionMaterialResource : IfcConstructionResource, ObjectHelper<IfcConstructionMaterialResource,2> { IfcConstructionMaterialResource() : Object("IfcConstructionMaterialResource") {} Maybe< ListOf< IfcActorSelect, 1, 0 >::Out > Suppliers; Maybe< IfcRatioMeasure::Out > UsageRatio; }; // C++ wrapper for IfcRelAggregates struct IfcRelAggregates : IfcRelDecomposes, ObjectHelper<IfcRelAggregates,0> { IfcRelAggregates() : Object("IfcRelAggregates") {} }; // C++ wrapper for IfcBoilerType struct IfcBoilerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcBoilerType,1> { IfcBoilerType() : Object("IfcBoilerType") {} IfcBoilerTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcColourSpecification struct IfcColourSpecification : ObjectHelper<IfcColourSpecification,1> { IfcColourSpecification() : Object("IfcColourSpecification") {} Maybe< IfcLabel::Out > Name; }; // C++ wrapper for IfcColourRgb struct IfcColourRgb : IfcColourSpecification, ObjectHelper<IfcColourRgb,3> { IfcColourRgb() : Object("IfcColourRgb") {} IfcNormalisedRatioMeasure::Out Red; IfcNormalisedRatioMeasure::Out Green; IfcNormalisedRatioMeasure::Out Blue; }; // C++ wrapper for IfcDoorStyle struct IfcDoorStyle : IfcTypeProduct, ObjectHelper<IfcDoorStyle,4> { IfcDoorStyle() : Object("IfcDoorStyle") {} IfcDoorStyleOperationEnum::Out OperationType; IfcDoorStyleConstructionEnum::Out ConstructionType; BOOLEAN::Out ParameterTakesPrecedence; BOOLEAN::Out Sizeable; }; // C++ wrapper for IfcDuctSilencerType struct IfcDuctSilencerType : IfcFlowTreatmentDeviceType, ObjectHelper<IfcDuctSilencerType,1> { IfcDuctSilencerType() : Object("IfcDuctSilencerType") {} IfcDuctSilencerTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcLightSourceGoniometric struct IfcLightSourceGoniometric : IfcLightSource, ObjectHelper<IfcLightSourceGoniometric,6> { IfcLightSourceGoniometric() : Object("IfcLightSourceGoniometric") {} Lazy< IfcAxis2Placement3D > Position; Maybe< Lazy< IfcColourRgb > > ColourAppearance; IfcThermodynamicTemperatureMeasure::Out ColourTemperature; IfcLuminousFluxMeasure::Out LuminousFlux; IfcLightEmissionSourceEnum::Out LightEmissionSource; IfcLightDistributionDataSourceSelect::Out LightDistributionDataSource; }; // C++ wrapper for IfcActuatorType struct IfcActuatorType : IfcDistributionControlElementType, ObjectHelper<IfcActuatorType,1> { IfcActuatorType() : Object("IfcActuatorType") {} IfcActuatorTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcSensorType struct IfcSensorType : IfcDistributionControlElementType, ObjectHelper<IfcSensorType,1> { IfcSensorType() : Object("IfcSensorType") {} IfcSensorTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcAirTerminalBoxType struct IfcAirTerminalBoxType : IfcFlowControllerType, ObjectHelper<IfcAirTerminalBoxType,1> { IfcAirTerminalBoxType() : Object("IfcAirTerminalBoxType") {} IfcAirTerminalBoxTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcAnnotationSurfaceOccurrence struct IfcAnnotationSurfaceOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationSurfaceOccurrence,0> { IfcAnnotationSurfaceOccurrence() : Object("IfcAnnotationSurfaceOccurrence") {} }; // C++ wrapper for IfcZShapeProfileDef struct IfcZShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcZShapeProfileDef,6> { IfcZShapeProfileDef() : Object("IfcZShapeProfileDef") {} IfcPositiveLengthMeasure::Out Depth; IfcPositiveLengthMeasure::Out FlangeWidth; IfcPositiveLengthMeasure::Out WebThickness; IfcPositiveLengthMeasure::Out FlangeThickness; Maybe< IfcPositiveLengthMeasure::Out > FilletRadius; Maybe< IfcPositiveLengthMeasure::Out > EdgeRadius; }; // C++ wrapper for IfcRationalBezierCurve struct IfcRationalBezierCurve : IfcBezierCurve, ObjectHelper<IfcRationalBezierCurve,1> { IfcRationalBezierCurve() : Object("IfcRationalBezierCurve") {} ListOf< REAL, 2, 0 >::Out WeightsData; }; // C++ wrapper for IfcCartesianTransformationOperator2D struct IfcCartesianTransformationOperator2D : IfcCartesianTransformationOperator, ObjectHelper<IfcCartesianTransformationOperator2D,0> { IfcCartesianTransformationOperator2D() : Object("IfcCartesianTransformationOperator2D") {} }; // C++ wrapper for IfcCartesianTransformationOperator2DnonUniform struct IfcCartesianTransformationOperator2DnonUniform : IfcCartesianTransformationOperator2D, ObjectHelper<IfcCartesianTransformationOperator2DnonUniform,1> { IfcCartesianTransformationOperator2DnonUniform() : Object("IfcCartesianTransformationOperator2DnonUniform") {} Maybe< REAL::Out > Scale2; }; // C++ wrapper for IfcMove struct IfcMove : IfcTask, ObjectHelper<IfcMove,3> { IfcMove() : Object("IfcMove") {} Lazy< IfcSpatialStructureElement > MoveFrom; Lazy< IfcSpatialStructureElement > MoveTo; Maybe< ListOf< IfcText, 1, 0 >::Out > PunchList; }; // C++ wrapper for IfcCableCarrierSegmentType struct IfcCableCarrierSegmentType : IfcFlowSegmentType, ObjectHelper<IfcCableCarrierSegmentType,1> { IfcCableCarrierSegmentType() : Object("IfcCableCarrierSegmentType") {} IfcCableCarrierSegmentTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcElectricalElement struct IfcElectricalElement : IfcElement, ObjectHelper<IfcElectricalElement,0> { IfcElectricalElement() : Object("IfcElectricalElement") {} }; // C++ wrapper for IfcChillerType struct IfcChillerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcChillerType,1> { IfcChillerType() : Object("IfcChillerType") {} IfcChillerTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcReinforcingBar struct IfcReinforcingBar : IfcReinforcingElement, ObjectHelper<IfcReinforcingBar,5> { IfcReinforcingBar() : Object("IfcReinforcingBar") {} IfcPositiveLengthMeasure::Out NominalDiameter; IfcAreaMeasure::Out CrossSectionArea; Maybe< IfcPositiveLengthMeasure::Out > BarLength; IfcReinforcingBarRoleEnum::Out BarRole; Maybe< IfcReinforcingBarSurfaceEnum::Out > BarSurface; }; // C++ wrapper for IfcCShapeProfileDef struct IfcCShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCShapeProfileDef,6> { IfcCShapeProfileDef() : Object("IfcCShapeProfileDef") {} IfcPositiveLengthMeasure::Out Depth; IfcPositiveLengthMeasure::Out Width; IfcPositiveLengthMeasure::Out WallThickness; IfcPositiveLengthMeasure::Out Girth; Maybe< IfcPositiveLengthMeasure::Out > InternalFilletRadius; Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInX; }; // C++ wrapper for IfcPermit struct IfcPermit : IfcControl, ObjectHelper<IfcPermit,1> { IfcPermit() : Object("IfcPermit") {} IfcIdentifier::Out PermitID; }; // C++ wrapper for IfcSlabType struct IfcSlabType : IfcBuildingElementType, ObjectHelper<IfcSlabType,1> { IfcSlabType() : Object("IfcSlabType") {} IfcSlabTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcLampType struct IfcLampType : IfcFlowTerminalType, ObjectHelper<IfcLampType,1> { IfcLampType() : Object("IfcLampType") {} IfcLampTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcPlanarExtent struct IfcPlanarExtent : IfcGeometricRepresentationItem, ObjectHelper<IfcPlanarExtent,2> { IfcPlanarExtent() : Object("IfcPlanarExtent") {} IfcLengthMeasure::Out SizeInX; IfcLengthMeasure::Out SizeInY; }; // C++ wrapper for IfcAlarmType struct IfcAlarmType : IfcDistributionControlElementType, ObjectHelper<IfcAlarmType,1> { IfcAlarmType() : Object("IfcAlarmType") {} IfcAlarmTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcElectricFlowStorageDeviceType struct IfcElectricFlowStorageDeviceType : IfcFlowStorageDeviceType, ObjectHelper<IfcElectricFlowStorageDeviceType,1> { IfcElectricFlowStorageDeviceType() : Object("IfcElectricFlowStorageDeviceType") {} IfcElectricFlowStorageDeviceTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcEquipmentElement struct IfcEquipmentElement : IfcElement, ObjectHelper<IfcEquipmentElement,0> { IfcEquipmentElement() : Object("IfcEquipmentElement") {} }; // C++ wrapper for IfcLightFixtureType struct IfcLightFixtureType : IfcFlowTerminalType, ObjectHelper<IfcLightFixtureType,1> { IfcLightFixtureType() : Object("IfcLightFixtureType") {} IfcLightFixtureTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcCurtainWall struct IfcCurtainWall : IfcBuildingElement, ObjectHelper<IfcCurtainWall,0> { IfcCurtainWall() : Object("IfcCurtainWall") {} }; // C++ wrapper for IfcSlab struct IfcSlab : IfcBuildingElement, ObjectHelper<IfcSlab,1> { IfcSlab() : Object("IfcSlab") {} Maybe< IfcSlabTypeEnum::Out > PredefinedType; }; // C++ wrapper for IfcCurtainWallType struct IfcCurtainWallType : IfcBuildingElementType, ObjectHelper<IfcCurtainWallType,1> { IfcCurtainWallType() : Object("IfcCurtainWallType") {} IfcCurtainWallTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcOutletType struct IfcOutletType : IfcFlowTerminalType, ObjectHelper<IfcOutletType,1> { IfcOutletType() : Object("IfcOutletType") {} IfcOutletTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcCompressorType struct IfcCompressorType : IfcFlowMovingDeviceType, ObjectHelper<IfcCompressorType,1> { IfcCompressorType() : Object("IfcCompressorType") {} IfcCompressorTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcCraneRailAShapeProfileDef struct IfcCraneRailAShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCraneRailAShapeProfileDef,12> { IfcCraneRailAShapeProfileDef() : Object("IfcCraneRailAShapeProfileDef") {} IfcPositiveLengthMeasure::Out OverallHeight; IfcPositiveLengthMeasure::Out BaseWidth2; Maybe< IfcPositiveLengthMeasure::Out > Radius; IfcPositiveLengthMeasure::Out HeadWidth; IfcPositiveLengthMeasure::Out HeadDepth2; IfcPositiveLengthMeasure::Out HeadDepth3; IfcPositiveLengthMeasure::Out WebThickness; IfcPositiveLengthMeasure::Out BaseWidth4; IfcPositiveLengthMeasure::Out BaseDepth1; IfcPositiveLengthMeasure::Out BaseDepth2; IfcPositiveLengthMeasure::Out BaseDepth3; Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY; }; // C++ wrapper for IfcFlowSegment struct IfcFlowSegment : IfcDistributionFlowElement, ObjectHelper<IfcFlowSegment,0> { IfcFlowSegment() : Object("IfcFlowSegment") {} }; // C++ wrapper for IfcSectionedSpine struct IfcSectionedSpine : IfcGeometricRepresentationItem, ObjectHelper<IfcSectionedSpine,3> { IfcSectionedSpine() : Object("IfcSectionedSpine") {} Lazy< IfcCompositeCurve > SpineCurve; ListOf< Lazy< IfcProfileDef >, 2, 0 > CrossSections; ListOf< Lazy< IfcAxis2Placement3D >, 2, 0 > CrossSectionPositions; }; // C++ wrapper for IfcElectricTimeControlType struct IfcElectricTimeControlType : IfcFlowControllerType, ObjectHelper<IfcElectricTimeControlType,1> { IfcElectricTimeControlType() : Object("IfcElectricTimeControlType") {} IfcElectricTimeControlTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcFaceSurface struct IfcFaceSurface : IfcFace, ObjectHelper<IfcFaceSurface,2> { IfcFaceSurface() : Object("IfcFaceSurface") {} Lazy< IfcSurface > FaceSurface; BOOLEAN::Out SameSense; }; // C++ wrapper for IfcMotorConnectionType struct IfcMotorConnectionType : IfcEnergyConversionDeviceType, ObjectHelper<IfcMotorConnectionType,1> { IfcMotorConnectionType() : Object("IfcMotorConnectionType") {} IfcMotorConnectionTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcFlowFitting struct IfcFlowFitting : IfcDistributionFlowElement, ObjectHelper<IfcFlowFitting,0> { IfcFlowFitting() : Object("IfcFlowFitting") {} }; // C++ wrapper for IfcPointOnCurve struct IfcPointOnCurve : IfcPoint, ObjectHelper<IfcPointOnCurve,2> { IfcPointOnCurve() : Object("IfcPointOnCurve") {} Lazy< IfcCurve > BasisCurve; IfcParameterValue::Out PointParameter; }; // C++ wrapper for IfcTransportElementType struct IfcTransportElementType : IfcElementType, ObjectHelper<IfcTransportElementType,1> { IfcTransportElementType() : Object("IfcTransportElementType") {} IfcTransportElementTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcCableSegmentType struct IfcCableSegmentType : IfcFlowSegmentType, ObjectHelper<IfcCableSegmentType,1> { IfcCableSegmentType() : Object("IfcCableSegmentType") {} IfcCableSegmentTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcAnnotationSurface struct IfcAnnotationSurface : IfcGeometricRepresentationItem, ObjectHelper<IfcAnnotationSurface,2> { IfcAnnotationSurface() : Object("IfcAnnotationSurface") {} Lazy< IfcGeometricRepresentationItem > Item; Maybe< Lazy< NotImplemented > > TextureCoordinates; }; // C++ wrapper for IfcCompositeCurveSegment struct IfcCompositeCurveSegment : IfcGeometricRepresentationItem, ObjectHelper<IfcCompositeCurveSegment,3> { IfcCompositeCurveSegment() : Object("IfcCompositeCurveSegment") {} IfcTransitionCode::Out Transition; BOOLEAN::Out SameSense; Lazy< IfcCurve > ParentCurve; }; // C++ wrapper for IfcServiceLife struct IfcServiceLife : IfcControl, ObjectHelper<IfcServiceLife,2> { IfcServiceLife() : Object("IfcServiceLife") {} IfcServiceLifeTypeEnum::Out ServiceLifeType; IfcTimeMeasure::Out ServiceLifeDuration; }; // C++ wrapper for IfcPlateType struct IfcPlateType : IfcBuildingElementType, ObjectHelper<IfcPlateType,1> { IfcPlateType() : Object("IfcPlateType") {} IfcPlateTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcVibrationIsolatorType struct IfcVibrationIsolatorType : IfcDiscreteAccessoryType, ObjectHelper<IfcVibrationIsolatorType,1> { IfcVibrationIsolatorType() : Object("IfcVibrationIsolatorType") {} IfcVibrationIsolatorTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcTrimmedCurve struct IfcTrimmedCurve : IfcBoundedCurve, ObjectHelper<IfcTrimmedCurve,5> { IfcTrimmedCurve() : Object("IfcTrimmedCurve") {} Lazy< IfcCurve > BasisCurve; ListOf< IfcTrimmingSelect, 1, 2 >::Out Trim1; ListOf< IfcTrimmingSelect, 1, 2 >::Out Trim2; BOOLEAN::Out SenseAgreement; IfcTrimmingPreference::Out MasterRepresentation; }; // C++ wrapper for IfcMappedItem struct IfcMappedItem : IfcRepresentationItem, ObjectHelper<IfcMappedItem,2> { IfcMappedItem() : Object("IfcMappedItem") {} Lazy< IfcRepresentationMap > MappingSource; Lazy< IfcCartesianTransformationOperator > MappingTarget; }; // C++ wrapper for IfcDirection struct IfcDirection : IfcGeometricRepresentationItem, ObjectHelper<IfcDirection,1> { IfcDirection() : Object("IfcDirection") {} ListOf< REAL, 2, 3 >::Out DirectionRatios; }; // C++ wrapper for IfcBlock struct IfcBlock : IfcCsgPrimitive3D, ObjectHelper<IfcBlock,3> { IfcBlock() : Object("IfcBlock") {} IfcPositiveLengthMeasure::Out XLength; IfcPositiveLengthMeasure::Out YLength; IfcPositiveLengthMeasure::Out ZLength; }; // C++ wrapper for IfcProjectOrderRecord struct IfcProjectOrderRecord : IfcControl, ObjectHelper<IfcProjectOrderRecord,2> { IfcProjectOrderRecord() : Object("IfcProjectOrderRecord") {} ListOf< Lazy< NotImplemented >, 1, 0 > Records; IfcProjectOrderRecordTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcFlowMeterType struct IfcFlowMeterType : IfcFlowControllerType, ObjectHelper<IfcFlowMeterType,1> { IfcFlowMeterType() : Object("IfcFlowMeterType") {} IfcFlowMeterTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcControllerType struct IfcControllerType : IfcDistributionControlElementType, ObjectHelper<IfcControllerType,1> { IfcControllerType() : Object("IfcControllerType") {} IfcControllerTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcBeam struct IfcBeam : IfcBuildingElement, ObjectHelper<IfcBeam,0> { IfcBeam() : Object("IfcBeam") {} }; // C++ wrapper for IfcArbitraryOpenProfileDef struct IfcArbitraryOpenProfileDef : IfcProfileDef, ObjectHelper<IfcArbitraryOpenProfileDef,1> { IfcArbitraryOpenProfileDef() : Object("IfcArbitraryOpenProfileDef") {} Lazy< IfcBoundedCurve > Curve; }; // C++ wrapper for IfcCenterLineProfileDef struct IfcCenterLineProfileDef : IfcArbitraryOpenProfileDef, ObjectHelper<IfcCenterLineProfileDef,1> { IfcCenterLineProfileDef() : Object("IfcCenterLineProfileDef") {} IfcPositiveLengthMeasure::Out Thickness; }; // C++ wrapper for IfcTimeSeriesSchedule struct IfcTimeSeriesSchedule : IfcControl, ObjectHelper<IfcTimeSeriesSchedule,3> { IfcTimeSeriesSchedule() : Object("IfcTimeSeriesSchedule") {} Maybe< ListOf< IfcDateTimeSelect, 1, 0 >::Out > ApplicableDates; IfcTimeSeriesScheduleTypeEnum::Out TimeSeriesScheduleType; Lazy< NotImplemented > TimeSeries; }; // C++ wrapper for IfcRoundedEdgeFeature struct IfcRoundedEdgeFeature : IfcEdgeFeature, ObjectHelper<IfcRoundedEdgeFeature,1> { IfcRoundedEdgeFeature() : Object("IfcRoundedEdgeFeature") {} Maybe< IfcPositiveLengthMeasure::Out > Radius; }; // C++ wrapper for IfcIShapeProfileDef struct IfcIShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcIShapeProfileDef,5> { IfcIShapeProfileDef() : Object("IfcIShapeProfileDef") {} IfcPositiveLengthMeasure::Out OverallWidth; IfcPositiveLengthMeasure::Out OverallDepth; IfcPositiveLengthMeasure::Out WebThickness; IfcPositiveLengthMeasure::Out FlangeThickness; Maybe< IfcPositiveLengthMeasure::Out > FilletRadius; }; // C++ wrapper for IfcSpaceHeaterType struct IfcSpaceHeaterType : IfcEnergyConversionDeviceType, ObjectHelper<IfcSpaceHeaterType,1> { IfcSpaceHeaterType() : Object("IfcSpaceHeaterType") {} IfcSpaceHeaterTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcFlowStorageDevice struct IfcFlowStorageDevice : IfcDistributionFlowElement, ObjectHelper<IfcFlowStorageDevice,0> { IfcFlowStorageDevice() : Object("IfcFlowStorageDevice") {} }; // C++ wrapper for IfcRevolvedAreaSolid struct IfcRevolvedAreaSolid : IfcSweptAreaSolid, ObjectHelper<IfcRevolvedAreaSolid,2> { IfcRevolvedAreaSolid() : Object("IfcRevolvedAreaSolid") {} Lazy< IfcAxis1Placement > Axis; IfcPlaneAngleMeasure::Out Angle; }; // C++ wrapper for IfcDoor struct IfcDoor : IfcBuildingElement, ObjectHelper<IfcDoor,2> { IfcDoor() : Object("IfcDoor") {} Maybe< IfcPositiveLengthMeasure::Out > OverallHeight; Maybe< IfcPositiveLengthMeasure::Out > OverallWidth; }; // C++ wrapper for IfcEllipse struct IfcEllipse : IfcConic, ObjectHelper<IfcEllipse,2> { IfcEllipse() : Object("IfcEllipse") {} IfcPositiveLengthMeasure::Out SemiAxis1; IfcPositiveLengthMeasure::Out SemiAxis2; }; // C++ wrapper for IfcTubeBundleType struct IfcTubeBundleType : IfcEnergyConversionDeviceType, ObjectHelper<IfcTubeBundleType,1> { IfcTubeBundleType() : Object("IfcTubeBundleType") {} IfcTubeBundleTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcAngularDimension struct IfcAngularDimension : IfcDimensionCurveDirectedCallout, ObjectHelper<IfcAngularDimension,0> { IfcAngularDimension() : Object("IfcAngularDimension") {} }; // C++ wrapper for IfcFaceBasedSurfaceModel struct IfcFaceBasedSurfaceModel : IfcGeometricRepresentationItem, ObjectHelper<IfcFaceBasedSurfaceModel,1> { IfcFaceBasedSurfaceModel() : Object("IfcFaceBasedSurfaceModel") {} ListOf< Lazy< IfcConnectedFaceSet >, 1, 0 > FbsmFaces; }; // C++ wrapper for IfcCraneRailFShapeProfileDef struct IfcCraneRailFShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCraneRailFShapeProfileDef,9> { IfcCraneRailFShapeProfileDef() : Object("IfcCraneRailFShapeProfileDef") {} IfcPositiveLengthMeasure::Out OverallHeight; IfcPositiveLengthMeasure::Out HeadWidth; Maybe< IfcPositiveLengthMeasure::Out > Radius; IfcPositiveLengthMeasure::Out HeadDepth2; IfcPositiveLengthMeasure::Out HeadDepth3; IfcPositiveLengthMeasure::Out WebThickness; IfcPositiveLengthMeasure::Out BaseDepth1; IfcPositiveLengthMeasure::Out BaseDepth2; Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY; }; // C++ wrapper for IfcColumnType struct IfcColumnType : IfcBuildingElementType, ObjectHelper<IfcColumnType,1> { IfcColumnType() : Object("IfcColumnType") {} IfcColumnTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcTShapeProfileDef struct IfcTShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcTShapeProfileDef,10> { IfcTShapeProfileDef() : Object("IfcTShapeProfileDef") {} IfcPositiveLengthMeasure::Out Depth; IfcPositiveLengthMeasure::Out FlangeWidth; IfcPositiveLengthMeasure::Out WebThickness; IfcPositiveLengthMeasure::Out FlangeThickness; Maybe< IfcPositiveLengthMeasure::Out > FilletRadius; Maybe< IfcPositiveLengthMeasure::Out > FlangeEdgeRadius; Maybe< IfcPositiveLengthMeasure::Out > WebEdgeRadius; Maybe< IfcPlaneAngleMeasure::Out > WebSlope; Maybe< IfcPlaneAngleMeasure::Out > FlangeSlope; Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY; }; // C++ wrapper for IfcEnergyConversionDevice struct IfcEnergyConversionDevice : IfcDistributionFlowElement, ObjectHelper<IfcEnergyConversionDevice,0> { IfcEnergyConversionDevice() : Object("IfcEnergyConversionDevice") {} }; // C++ wrapper for IfcWorkSchedule struct IfcWorkSchedule : IfcWorkControl, ObjectHelper<IfcWorkSchedule,0> { IfcWorkSchedule() : Object("IfcWorkSchedule") {} }; // C++ wrapper for IfcZone struct IfcZone : IfcGroup, ObjectHelper<IfcZone,0> { IfcZone() : Object("IfcZone") {} }; // C++ wrapper for IfcTransportElement struct IfcTransportElement : IfcElement, ObjectHelper<IfcTransportElement,3> { IfcTransportElement() : Object("IfcTransportElement") {} Maybe< IfcTransportElementTypeEnum::Out > OperationType; Maybe< IfcMassMeasure::Out > CapacityByWeight; Maybe< IfcCountMeasure::Out > CapacityByNumber; }; // C++ wrapper for IfcGeometricRepresentationSubContext struct IfcGeometricRepresentationSubContext : IfcGeometricRepresentationContext, ObjectHelper<IfcGeometricRepresentationSubContext,4> { IfcGeometricRepresentationSubContext() : Object("IfcGeometricRepresentationSubContext") {} Lazy< IfcGeometricRepresentationContext > ParentContext; Maybe< IfcPositiveRatioMeasure::Out > TargetScale; IfcGeometricProjectionEnum::Out TargetView; Maybe< IfcLabel::Out > UserDefinedTargetView; }; // C++ wrapper for IfcLShapeProfileDef struct IfcLShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcLShapeProfileDef,8> { IfcLShapeProfileDef() : Object("IfcLShapeProfileDef") {} IfcPositiveLengthMeasure::Out Depth; Maybe< IfcPositiveLengthMeasure::Out > Width; IfcPositiveLengthMeasure::Out Thickness; Maybe< IfcPositiveLengthMeasure::Out > FilletRadius; Maybe< IfcPositiveLengthMeasure::Out > EdgeRadius; Maybe< IfcPlaneAngleMeasure::Out > LegSlope; Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInX; Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY; }; // C++ wrapper for IfcGeometricCurveSet struct IfcGeometricCurveSet : IfcGeometricSet, ObjectHelper<IfcGeometricCurveSet,0> { IfcGeometricCurveSet() : Object("IfcGeometricCurveSet") {} }; // C++ wrapper for IfcActor struct IfcActor : IfcObject, ObjectHelper<IfcActor,1> { IfcActor() : Object("IfcActor") {} IfcActorSelect::Out TheActor; }; // C++ wrapper for IfcOccupant struct IfcOccupant : IfcActor, ObjectHelper<IfcOccupant,1> { IfcOccupant() : Object("IfcOccupant") {} IfcOccupantTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcBooleanClippingResult struct IfcBooleanClippingResult : IfcBooleanResult, ObjectHelper<IfcBooleanClippingResult,0> { IfcBooleanClippingResult() : Object("IfcBooleanClippingResult") {} }; // C++ wrapper for IfcAnnotationFillArea struct IfcAnnotationFillArea : IfcGeometricRepresentationItem, ObjectHelper<IfcAnnotationFillArea,2> { IfcAnnotationFillArea() : Object("IfcAnnotationFillArea") {} Lazy< IfcCurve > OuterBoundary; Maybe< ListOf< Lazy< IfcCurve >, 1, 0 > > InnerBoundaries; }; // C++ wrapper for IfcLightSourceSpot struct IfcLightSourceSpot : IfcLightSourcePositional, ObjectHelper<IfcLightSourceSpot,4> { IfcLightSourceSpot() : Object("IfcLightSourceSpot") {} Lazy< IfcDirection > Orientation; Maybe< IfcReal::Out > ConcentrationExponent; IfcPositivePlaneAngleMeasure::Out SpreadAngle; IfcPositivePlaneAngleMeasure::Out BeamWidthAngle; }; // C++ wrapper for IfcFireSuppressionTerminalType struct IfcFireSuppressionTerminalType : IfcFlowTerminalType, ObjectHelper<IfcFireSuppressionTerminalType,1> { IfcFireSuppressionTerminalType() : Object("IfcFireSuppressionTerminalType") {} IfcFireSuppressionTerminalTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcElectricGeneratorType struct IfcElectricGeneratorType : IfcEnergyConversionDeviceType, ObjectHelper<IfcElectricGeneratorType,1> { IfcElectricGeneratorType() : Object("IfcElectricGeneratorType") {} IfcElectricGeneratorTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcInventory struct IfcInventory : IfcGroup, ObjectHelper<IfcInventory,6> { IfcInventory() : Object("IfcInventory") {} IfcInventoryTypeEnum::Out InventoryType; IfcActorSelect::Out Jurisdiction; ListOf< Lazy< NotImplemented >, 1, 0 > ResponsiblePersons; Lazy< NotImplemented > LastUpdateDate; Maybe< Lazy< NotImplemented > > CurrentValue; Maybe< Lazy< NotImplemented > > OriginalValue; }; // C++ wrapper for IfcPolyline struct IfcPolyline : IfcBoundedCurve, ObjectHelper<IfcPolyline,1> { IfcPolyline() : Object("IfcPolyline") {} ListOf< Lazy< IfcCartesianPoint >, 2, 0 > Points; }; // C++ wrapper for IfcBoxedHalfSpace struct IfcBoxedHalfSpace : IfcHalfSpaceSolid, ObjectHelper<IfcBoxedHalfSpace,1> { IfcBoxedHalfSpace() : Object("IfcBoxedHalfSpace") {} Lazy< IfcBoundingBox > Enclosure; }; // C++ wrapper for IfcAirTerminalType struct IfcAirTerminalType : IfcFlowTerminalType, ObjectHelper<IfcAirTerminalType,1> { IfcAirTerminalType() : Object("IfcAirTerminalType") {} IfcAirTerminalTypeEnum::Out PredefinedType; }; // C++ wrapper for IfcDistributionPort struct IfcDistributionPort : IfcPort, ObjectHelper<IfcDistributionPort,1> { IfcDistributionPort() : Object("IfcDistributionPort") {} Maybe< IfcFlowDirectionEnum::Out > FlowDirection; }; // C++ wrapper for IfcCostItem struct IfcCostItem : IfcControl, ObjectHelper<IfcCostItem,0> { IfcCostItem() : Object("IfcCostItem") {} }; // C++ wrapper for IfcStructuredDimensionCallout struct IfcStructuredDimensionCallout : IfcDraughtingCallout, ObjectHelper<IfcStructuredDimensionCallout,0> { IfcStructuredDimensionCallout() : Object("IfcStructuredDimensionCallout") {} }; // C++ wrapper for IfcStructuralResultGroup struct IfcStructuralResultGroup : IfcGroup, ObjectHelper<IfcStructuralResultGroup,3> { IfcStructuralResultGroup() : Object("IfcStructuralResultGroup") {} IfcAnalysisTheoryTypeEnum::Out TheoryType; Maybe< Lazy< IfcStructuralLoadGroup > > ResultForLoadGroup; BOOLEAN::Out IsLinear; }; // C++ wrapper for IfcOrientedEdge struct IfcOrientedEdge : IfcEdge, ObjectHelper<IfcOrientedEdge,2> { IfcOrientedEdge() : Object("IfcOrientedEdge") {} Lazy< IfcEdge > EdgeElement; BOOLEAN::Out Orientation; }; // C++ wrapper for IfcCsgSolid struct IfcCsgSolid : IfcSolidModel, ObjectHelper<IfcCsgSolid,1> { IfcCsgSolid() : Object("IfcCsgSolid") {} IfcCsgSelect::Out TreeRootExpression; }; // C++ wrapper for IfcPlanarBox struct IfcPlanarBox : IfcPlanarExtent, ObjectHelper<IfcPlanarBox,1> { IfcPlanarBox() : Object("IfcPlanarBox") {} IfcAxis2Placement::Out Placement; }; // C++ wrapper for IfcMaterialDefinitionRepresentation struct IfcMaterialDefinitionRepresentation : IfcProductRepresentation, ObjectHelper<IfcMaterialDefinitionRepresentation,1> { IfcMaterialDefinitionRepresentation() : Object("IfcMaterialDefinitionRepresentation") {} Lazy< NotImplemented > RepresentedMaterial; }; // C++ wrapper for IfcAsymmetricIShapeProfileDef struct IfcAsymmetricIShapeProfileDef : IfcIShapeProfileDef, ObjectHelper<IfcAsymmetricIShapeProfileDef,4> { IfcAsymmetricIShapeProfileDef() : Object("IfcAsymmetricIShapeProfileDef") {} IfcPositiveLengthMeasure::Out TopFlangeWidth; Maybe< IfcPositiveLengthMeasure::Out > TopFlangeThickness; Maybe< IfcPositiveLengthMeasure::Out > TopFlangeFilletRadius; Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY; }; // C++ wrapper for IfcRepresentationMap struct IfcRepresentationMap : ObjectHelper<IfcRepresentationMap,2> { IfcRepresentationMap() : Object("IfcRepresentationMap") {} IfcAxis2Placement::Out MappingOrigin; Lazy< IfcRepresentation > MappedRepresentation; }; void GetSchema(EXPRESS::ConversionSchema& out); } //! IFC namespace STEP { // ****************************************************************************** // Converter stubs // ****************************************************************************** #define DECL_CONV_STUB(type) template <> size_t GenericFill<IFC::type>(const STEP::DB& db, const EXPRESS::LIST& params, IFC::type* in) DECL_CONV_STUB(IfcRoot); DECL_CONV_STUB(IfcObjectDefinition); DECL_CONV_STUB(IfcTypeObject); DECL_CONV_STUB(IfcTypeProduct); DECL_CONV_STUB(IfcElementType); DECL_CONV_STUB(IfcFurnishingElementType); DECL_CONV_STUB(IfcFurnitureType); DECL_CONV_STUB(IfcObject); DECL_CONV_STUB(IfcProduct); DECL_CONV_STUB(IfcGrid); DECL_CONV_STUB(IfcRepresentationItem); DECL_CONV_STUB(IfcGeometricRepresentationItem); DECL_CONV_STUB(IfcOneDirectionRepeatFactor); DECL_CONV_STUB(IfcTwoDirectionRepeatFactor); DECL_CONV_STUB(IfcElement); DECL_CONV_STUB(IfcElementComponent); DECL_CONV_STUB(IfcSpatialStructureElementType); DECL_CONV_STUB(IfcControl); DECL_CONV_STUB(IfcActionRequest); DECL_CONV_STUB(IfcDistributionElementType); DECL_CONV_STUB(IfcDistributionFlowElementType); DECL_CONV_STUB(IfcEnergyConversionDeviceType); DECL_CONV_STUB(IfcCooledBeamType); DECL_CONV_STUB(IfcCsgPrimitive3D); DECL_CONV_STUB(IfcRectangularPyramid); DECL_CONV_STUB(IfcSurface); DECL_CONV_STUB(IfcBoundedSurface); DECL_CONV_STUB(IfcRectangularTrimmedSurface); DECL_CONV_STUB(IfcGroup); DECL_CONV_STUB(IfcRelationship); DECL_CONV_STUB(IfcHalfSpaceSolid); DECL_CONV_STUB(IfcPolygonalBoundedHalfSpace); DECL_CONV_STUB(IfcAirToAirHeatRecoveryType); DECL_CONV_STUB(IfcFlowFittingType); DECL_CONV_STUB(IfcPipeFittingType); DECL_CONV_STUB(IfcRepresentation); DECL_CONV_STUB(IfcStyleModel); DECL_CONV_STUB(IfcStyledRepresentation); DECL_CONV_STUB(IfcBooleanResult); DECL_CONV_STUB(IfcFeatureElement); DECL_CONV_STUB(IfcFeatureElementSubtraction); DECL_CONV_STUB(IfcOpeningElement); DECL_CONV_STUB(IfcConditionCriterion); DECL_CONV_STUB(IfcFlowTerminalType); DECL_CONV_STUB(IfcFlowControllerType); DECL_CONV_STUB(IfcSwitchingDeviceType); DECL_CONV_STUB(IfcSystem); DECL_CONV_STUB(IfcElectricalCircuit); DECL_CONV_STUB(IfcUnitaryEquipmentType); DECL_CONV_STUB(IfcPort); DECL_CONV_STUB(IfcPlacement); DECL_CONV_STUB(IfcProfileDef); DECL_CONV_STUB(IfcArbitraryClosedProfileDef); DECL_CONV_STUB(IfcCurve); DECL_CONV_STUB(IfcConic); DECL_CONV_STUB(IfcCircle); DECL_CONV_STUB(IfcElementarySurface); DECL_CONV_STUB(IfcPlane); DECL_CONV_STUB(IfcCostSchedule); DECL_CONV_STUB(IfcRightCircularCone); DECL_CONV_STUB(IfcElementAssembly); DECL_CONV_STUB(IfcBuildingElement); DECL_CONV_STUB(IfcMember); DECL_CONV_STUB(IfcBuildingElementProxy); DECL_CONV_STUB(IfcStructuralActivity); DECL_CONV_STUB(IfcStructuralAction); DECL_CONV_STUB(IfcStructuralPlanarAction); DECL_CONV_STUB(IfcTopologicalRepresentationItem); DECL_CONV_STUB(IfcConnectedFaceSet); DECL_CONV_STUB(IfcSweptSurface); DECL_CONV_STUB(IfcSurfaceOfLinearExtrusion); DECL_CONV_STUB(IfcArbitraryProfileDefWithVoids); DECL_CONV_STUB(IfcProcess); DECL_CONV_STUB(IfcProcedure); DECL_CONV_STUB(IfcVector); DECL_CONV_STUB(IfcFaceBound); DECL_CONV_STUB(IfcFaceOuterBound); DECL_CONV_STUB(IfcFeatureElementAddition); DECL_CONV_STUB(IfcNamedUnit); DECL_CONV_STUB(IfcConversionBasedUnit); DECL_CONV_STUB(IfcHeatExchangerType); DECL_CONV_STUB(IfcPresentationStyleAssignment); DECL_CONV_STUB(IfcFlowTreatmentDeviceType); DECL_CONV_STUB(IfcFilterType); DECL_CONV_STUB(IfcResource); DECL_CONV_STUB(IfcEvaporativeCoolerType); DECL_CONV_STUB(IfcOffsetCurve2D); DECL_CONV_STUB(IfcEdge); DECL_CONV_STUB(IfcSubedge); DECL_CONV_STUB(IfcProxy); DECL_CONV_STUB(IfcLine); DECL_CONV_STUB(IfcColumn); DECL_CONV_STUB(IfcObjectPlacement); DECL_CONV_STUB(IfcGridPlacement); DECL_CONV_STUB(IfcDistributionControlElementType); DECL_CONV_STUB(IfcRelConnects); DECL_CONV_STUB(IfcAnnotation); DECL_CONV_STUB(IfcPlate); DECL_CONV_STUB(IfcSolidModel); DECL_CONV_STUB(IfcManifoldSolidBrep); DECL_CONV_STUB(IfcFlowStorageDeviceType); DECL_CONV_STUB(IfcStructuralItem); DECL_CONV_STUB(IfcStructuralMember); DECL_CONV_STUB(IfcStructuralCurveMember); DECL_CONV_STUB(IfcStructuralConnection); DECL_CONV_STUB(IfcStructuralSurfaceConnection); DECL_CONV_STUB(IfcCoilType); DECL_CONV_STUB(IfcDuctFittingType); DECL_CONV_STUB(IfcStyledItem); DECL_CONV_STUB(IfcAnnotationOccurrence); DECL_CONV_STUB(IfcAnnotationCurveOccurrence); DECL_CONV_STUB(IfcDimensionCurve); DECL_CONV_STUB(IfcBoundedCurve); DECL_CONV_STUB(IfcAxis1Placement); DECL_CONV_STUB(IfcStructuralPointAction); DECL_CONV_STUB(IfcSpatialStructureElement); DECL_CONV_STUB(IfcSpace); DECL_CONV_STUB(IfcCoolingTowerType); DECL_CONV_STUB(IfcFacetedBrepWithVoids); DECL_CONV_STUB(IfcValveType); DECL_CONV_STUB(IfcSystemFurnitureElementType); DECL_CONV_STUB(IfcDiscreteAccessory); DECL_CONV_STUB(IfcBuildingElementType); DECL_CONV_STUB(IfcRailingType); DECL_CONV_STUB(IfcGasTerminalType); DECL_CONV_STUB(IfcSpaceProgram); DECL_CONV_STUB(IfcCovering); DECL_CONV_STUB(IfcPresentationStyle); DECL_CONV_STUB(IfcElectricHeaterType); DECL_CONV_STUB(IfcBuildingStorey); DECL_CONV_STUB(IfcVertex); DECL_CONV_STUB(IfcVertexPoint); DECL_CONV_STUB(IfcFlowInstrumentType); DECL_CONV_STUB(IfcParameterizedProfileDef); DECL_CONV_STUB(IfcUShapeProfileDef); DECL_CONV_STUB(IfcRamp); DECL_CONV_STUB(IfcCompositeCurve); DECL_CONV_STUB(IfcStructuralCurveMemberVarying); DECL_CONV_STUB(IfcRampFlightType); DECL_CONV_STUB(IfcDraughtingCallout); DECL_CONV_STUB(IfcDimensionCurveDirectedCallout); DECL_CONV_STUB(IfcRadiusDimension); DECL_CONV_STUB(IfcEdgeFeature); DECL_CONV_STUB(IfcSweptAreaSolid); DECL_CONV_STUB(IfcExtrudedAreaSolid); DECL_CONV_STUB(IfcAnnotationTextOccurrence); DECL_CONV_STUB(IfcStair); DECL_CONV_STUB(IfcFillAreaStyleTileSymbolWithStyle); DECL_CONV_STUB(IfcAnnotationSymbolOccurrence); DECL_CONV_STUB(IfcTerminatorSymbol); DECL_CONV_STUB(IfcDimensionCurveTerminator); DECL_CONV_STUB(IfcRectangleProfileDef); DECL_CONV_STUB(IfcRectangleHollowProfileDef); DECL_CONV_STUB(IfcLocalPlacement); DECL_CONV_STUB(IfcTask); DECL_CONV_STUB(IfcAnnotationFillAreaOccurrence); DECL_CONV_STUB(IfcFace); DECL_CONV_STUB(IfcFlowSegmentType); DECL_CONV_STUB(IfcDuctSegmentType); DECL_CONV_STUB(IfcConstructionResource); DECL_CONV_STUB(IfcConstructionEquipmentResource); DECL_CONV_STUB(IfcSanitaryTerminalType); DECL_CONV_STUB(IfcCircleProfileDef); DECL_CONV_STUB(IfcStructuralReaction); DECL_CONV_STUB(IfcStructuralPointReaction); DECL_CONV_STUB(IfcRailing); DECL_CONV_STUB(IfcTextLiteral); DECL_CONV_STUB(IfcCartesianTransformationOperator); DECL_CONV_STUB(IfcLinearDimension); DECL_CONV_STUB(IfcDamperType); DECL_CONV_STUB(IfcSIUnit); DECL_CONV_STUB(IfcMeasureWithUnit); DECL_CONV_STUB(IfcDistributionElement); DECL_CONV_STUB(IfcDistributionControlElement); DECL_CONV_STUB(IfcTransformerType); DECL_CONV_STUB(IfcLaborResource); DECL_CONV_STUB(IfcFurnitureStandard); DECL_CONV_STUB(IfcStairFlightType); DECL_CONV_STUB(IfcWorkControl); DECL_CONV_STUB(IfcWorkPlan); DECL_CONV_STUB(IfcCondition); DECL_CONV_STUB(IfcRelVoidsElement); DECL_CONV_STUB(IfcWindow); DECL_CONV_STUB(IfcProtectiveDeviceType); DECL_CONV_STUB(IfcJunctionBoxType); DECL_CONV_STUB(IfcStructuralAnalysisModel); DECL_CONV_STUB(IfcAxis2Placement2D); DECL_CONV_STUB(IfcSpaceType); DECL_CONV_STUB(IfcEllipseProfileDef); DECL_CONV_STUB(IfcDistributionFlowElement); DECL_CONV_STUB(IfcFlowMovingDevice); DECL_CONV_STUB(IfcSurfaceStyleWithTextures); DECL_CONV_STUB(IfcGeometricSet); DECL_CONV_STUB(IfcProjectOrder); DECL_CONV_STUB(IfcBSplineCurve); DECL_CONV_STUB(IfcBezierCurve); DECL_CONV_STUB(IfcStructuralPointConnection); DECL_CONV_STUB(IfcFlowController); DECL_CONV_STUB(IfcElectricDistributionPoint); DECL_CONV_STUB(IfcSite); DECL_CONV_STUB(IfcOffsetCurve3D); DECL_CONV_STUB(IfcVirtualElement); DECL_CONV_STUB(IfcConstructionProductResource); DECL_CONV_STUB(IfcSurfaceCurveSweptAreaSolid); DECL_CONV_STUB(IfcCartesianTransformationOperator3D); DECL_CONV_STUB(IfcCartesianTransformationOperator3DnonUniform); DECL_CONV_STUB(IfcCrewResource); DECL_CONV_STUB(IfcStructuralSurfaceMember); DECL_CONV_STUB(Ifc2DCompositeCurve); DECL_CONV_STUB(IfcRepresentationContext); DECL_CONV_STUB(IfcGeometricRepresentationContext); DECL_CONV_STUB(IfcFlowTreatmentDevice); DECL_CONV_STUB(IfcRightCircularCylinder); DECL_CONV_STUB(IfcWasteTerminalType); DECL_CONV_STUB(IfcBuildingElementComponent); DECL_CONV_STUB(IfcBuildingElementPart); DECL_CONV_STUB(IfcWall); DECL_CONV_STUB(IfcWallStandardCase); DECL_CONV_STUB(IfcPath); DECL_CONV_STUB(IfcDefinedSymbol); DECL_CONV_STUB(IfcStructuralSurfaceMemberVarying); DECL_CONV_STUB(IfcPoint); DECL_CONV_STUB(IfcSurfaceOfRevolution); DECL_CONV_STUB(IfcFlowTerminal); DECL_CONV_STUB(IfcFurnishingElement); DECL_CONV_STUB(IfcSurfaceStyleShading); DECL_CONV_STUB(IfcSurfaceStyleRendering); DECL_CONV_STUB(IfcCircleHollowProfileDef); DECL_CONV_STUB(IfcFlowMovingDeviceType); DECL_CONV_STUB(IfcFanType); DECL_CONV_STUB(IfcStructuralPlanarActionVarying); DECL_CONV_STUB(IfcProductRepresentation); DECL_CONV_STUB(IfcStackTerminalType); DECL_CONV_STUB(IfcReinforcingElement); DECL_CONV_STUB(IfcReinforcingMesh); DECL_CONV_STUB(IfcOrderAction); DECL_CONV_STUB(IfcLightSource); DECL_CONV_STUB(IfcLightSourceDirectional); DECL_CONV_STUB(IfcLoop); DECL_CONV_STUB(IfcVertexLoop); DECL_CONV_STUB(IfcChamferEdgeFeature); DECL_CONV_STUB(IfcElementComponentType); DECL_CONV_STUB(IfcFastenerType); DECL_CONV_STUB(IfcMechanicalFastenerType); DECL_CONV_STUB(IfcScheduleTimeControl); DECL_CONV_STUB(IfcSurfaceStyle); DECL_CONV_STUB(IfcOpenShell); DECL_CONV_STUB(IfcSubContractResource); DECL_CONV_STUB(IfcSweptDiskSolid); DECL_CONV_STUB(IfcTankType); DECL_CONV_STUB(IfcSphere); DECL_CONV_STUB(IfcPolyLoop); DECL_CONV_STUB(IfcCableCarrierFittingType); DECL_CONV_STUB(IfcHumidifierType); DECL_CONV_STUB(IfcPerformanceHistory); DECL_CONV_STUB(IfcShapeModel); DECL_CONV_STUB(IfcTopologyRepresentation); DECL_CONV_STUB(IfcBuilding); DECL_CONV_STUB(IfcRoundedRectangleProfileDef); DECL_CONV_STUB(IfcStairFlight); DECL_CONV_STUB(IfcDistributionChamberElement); DECL_CONV_STUB(IfcShapeRepresentation); DECL_CONV_STUB(IfcRampFlight); DECL_CONV_STUB(IfcBeamType); DECL_CONV_STUB(IfcRelDecomposes); DECL_CONV_STUB(IfcRoof); DECL_CONV_STUB(IfcFooting); DECL_CONV_STUB(IfcLightSourceAmbient); DECL_CONV_STUB(IfcWindowStyle); DECL_CONV_STUB(IfcBuildingElementProxyType); DECL_CONV_STUB(IfcAxis2Placement3D); DECL_CONV_STUB(IfcEdgeCurve); DECL_CONV_STUB(IfcClosedShell); DECL_CONV_STUB(IfcTendonAnchor); DECL_CONV_STUB(IfcCondenserType); DECL_CONV_STUB(IfcPipeSegmentType); DECL_CONV_STUB(IfcPointOnSurface); DECL_CONV_STUB(IfcAsset); DECL_CONV_STUB(IfcLightSourcePositional); DECL_CONV_STUB(IfcProjectionCurve); DECL_CONV_STUB(IfcFillAreaStyleTiles); DECL_CONV_STUB(IfcElectricMotorType); DECL_CONV_STUB(IfcTendon); DECL_CONV_STUB(IfcDistributionChamberElementType); DECL_CONV_STUB(IfcMemberType); DECL_CONV_STUB(IfcStructuralLinearAction); DECL_CONV_STUB(IfcStructuralLinearActionVarying); DECL_CONV_STUB(IfcProductDefinitionShape); DECL_CONV_STUB(IfcFastener); DECL_CONV_STUB(IfcMechanicalFastener); DECL_CONV_STUB(IfcEvaporatorType); DECL_CONV_STUB(IfcDiscreteAccessoryType); DECL_CONV_STUB(IfcStructuralCurveConnection); DECL_CONV_STUB(IfcProjectionElement); DECL_CONV_STUB(IfcCoveringType); DECL_CONV_STUB(IfcPumpType); DECL_CONV_STUB(IfcPile); DECL_CONV_STUB(IfcUnitAssignment); DECL_CONV_STUB(IfcBoundingBox); DECL_CONV_STUB(IfcShellBasedSurfaceModel); DECL_CONV_STUB(IfcFacetedBrep); DECL_CONV_STUB(IfcTextLiteralWithExtent); DECL_CONV_STUB(IfcElectricApplianceType); DECL_CONV_STUB(IfcTrapeziumProfileDef); DECL_CONV_STUB(IfcRelContainedInSpatialStructure); DECL_CONV_STUB(IfcEdgeLoop); DECL_CONV_STUB(IfcProject); DECL_CONV_STUB(IfcCartesianPoint); DECL_CONV_STUB(IfcCurveBoundedPlane); DECL_CONV_STUB(IfcWallType); DECL_CONV_STUB(IfcFillAreaStyleHatching); DECL_CONV_STUB(IfcEquipmentStandard); DECL_CONV_STUB(IfcDiameterDimension); DECL_CONV_STUB(IfcStructuralLoadGroup); DECL_CONV_STUB(IfcConstructionMaterialResource); DECL_CONV_STUB(IfcRelAggregates); DECL_CONV_STUB(IfcBoilerType); DECL_CONV_STUB(IfcColourSpecification); DECL_CONV_STUB(IfcColourRgb); DECL_CONV_STUB(IfcDoorStyle); DECL_CONV_STUB(IfcDuctSilencerType); DECL_CONV_STUB(IfcLightSourceGoniometric); DECL_CONV_STUB(IfcActuatorType); DECL_CONV_STUB(IfcSensorType); DECL_CONV_STUB(IfcAirTerminalBoxType); DECL_CONV_STUB(IfcAnnotationSurfaceOccurrence); DECL_CONV_STUB(IfcZShapeProfileDef); DECL_CONV_STUB(IfcRationalBezierCurve); DECL_CONV_STUB(IfcCartesianTransformationOperator2D); DECL_CONV_STUB(IfcCartesianTransformationOperator2DnonUniform); DECL_CONV_STUB(IfcMove); DECL_CONV_STUB(IfcCableCarrierSegmentType); DECL_CONV_STUB(IfcElectricalElement); DECL_CONV_STUB(IfcChillerType); DECL_CONV_STUB(IfcReinforcingBar); DECL_CONV_STUB(IfcCShapeProfileDef); DECL_CONV_STUB(IfcPermit); DECL_CONV_STUB(IfcSlabType); DECL_CONV_STUB(IfcLampType); DECL_CONV_STUB(IfcPlanarExtent); DECL_CONV_STUB(IfcAlarmType); DECL_CONV_STUB(IfcElectricFlowStorageDeviceType); DECL_CONV_STUB(IfcEquipmentElement); DECL_CONV_STUB(IfcLightFixtureType); DECL_CONV_STUB(IfcCurtainWall); DECL_CONV_STUB(IfcSlab); DECL_CONV_STUB(IfcCurtainWallType); DECL_CONV_STUB(IfcOutletType); DECL_CONV_STUB(IfcCompressorType); DECL_CONV_STUB(IfcCraneRailAShapeProfileDef); DECL_CONV_STUB(IfcFlowSegment); DECL_CONV_STUB(IfcSectionedSpine); DECL_CONV_STUB(IfcElectricTimeControlType); DECL_CONV_STUB(IfcFaceSurface); DECL_CONV_STUB(IfcMotorConnectionType); DECL_CONV_STUB(IfcFlowFitting); DECL_CONV_STUB(IfcPointOnCurve); DECL_CONV_STUB(IfcTransportElementType); DECL_CONV_STUB(IfcCableSegmentType); DECL_CONV_STUB(IfcAnnotationSurface); DECL_CONV_STUB(IfcCompositeCurveSegment); DECL_CONV_STUB(IfcServiceLife); DECL_CONV_STUB(IfcPlateType); DECL_CONV_STUB(IfcVibrationIsolatorType); DECL_CONV_STUB(IfcTrimmedCurve); DECL_CONV_STUB(IfcMappedItem); DECL_CONV_STUB(IfcDirection); DECL_CONV_STUB(IfcBlock); DECL_CONV_STUB(IfcProjectOrderRecord); DECL_CONV_STUB(IfcFlowMeterType); DECL_CONV_STUB(IfcControllerType); DECL_CONV_STUB(IfcBeam); DECL_CONV_STUB(IfcArbitraryOpenProfileDef); DECL_CONV_STUB(IfcCenterLineProfileDef); DECL_CONV_STUB(IfcTimeSeriesSchedule); DECL_CONV_STUB(IfcRoundedEdgeFeature); DECL_CONV_STUB(IfcIShapeProfileDef); DECL_CONV_STUB(IfcSpaceHeaterType); DECL_CONV_STUB(IfcFlowStorageDevice); DECL_CONV_STUB(IfcRevolvedAreaSolid); DECL_CONV_STUB(IfcDoor); DECL_CONV_STUB(IfcEllipse); DECL_CONV_STUB(IfcTubeBundleType); DECL_CONV_STUB(IfcAngularDimension); DECL_CONV_STUB(IfcFaceBasedSurfaceModel); DECL_CONV_STUB(IfcCraneRailFShapeProfileDef); DECL_CONV_STUB(IfcColumnType); DECL_CONV_STUB(IfcTShapeProfileDef); DECL_CONV_STUB(IfcEnergyConversionDevice); DECL_CONV_STUB(IfcWorkSchedule); DECL_CONV_STUB(IfcZone); DECL_CONV_STUB(IfcTransportElement); DECL_CONV_STUB(IfcGeometricRepresentationSubContext); DECL_CONV_STUB(IfcLShapeProfileDef); DECL_CONV_STUB(IfcGeometricCurveSet); DECL_CONV_STUB(IfcActor); DECL_CONV_STUB(IfcOccupant); DECL_CONV_STUB(IfcBooleanClippingResult); DECL_CONV_STUB(IfcAnnotationFillArea); DECL_CONV_STUB(IfcLightSourceSpot); DECL_CONV_STUB(IfcFireSuppressionTerminalType); DECL_CONV_STUB(IfcElectricGeneratorType); DECL_CONV_STUB(IfcInventory); DECL_CONV_STUB(IfcPolyline); DECL_CONV_STUB(IfcBoxedHalfSpace); DECL_CONV_STUB(IfcAirTerminalType); DECL_CONV_STUB(IfcDistributionPort); DECL_CONV_STUB(IfcCostItem); DECL_CONV_STUB(IfcStructuredDimensionCallout); DECL_CONV_STUB(IfcStructuralResultGroup); DECL_CONV_STUB(IfcOrientedEdge); DECL_CONV_STUB(IfcCsgSolid); DECL_CONV_STUB(IfcPlanarBox); DECL_CONV_STUB(IfcMaterialDefinitionRepresentation); DECL_CONV_STUB(IfcAsymmetricIShapeProfileDef); DECL_CONV_STUB(IfcRepresentationMap); #undef DECL_CONV_STUB } //! STEP } //! Assimp #endif // INCLUDED_IFC_READER_GEN_H
[ "aramis_acg@67173fc5-114c-0410-ac8e-9d2fd5bffc1f" ]
aramis_acg@67173fc5-114c-0410-ac8e-9d2fd5bffc1f
b5e6acd9c3bb674c819c752506eca92b0636700b
b755517c7020871758ea44f9cb4d49df9378127d
/practice/HackerRank/Insertion_Sort_Part_2.cpp
f12e9102d36656104a7d2c0f917b506473a8b5a6
[]
no_license
ABHISHEK-G0YAL/Competitive-Programming
6cab4e525c7c358e4e1ed84d80006326ec419ae7
6e0acbee6ec48d6f7deaeacb56b480bcd979ba03
refs/heads/master
2023-01-14T10:17:53.050938
2023-01-10T10:30:12
2023-01-10T10:30:12
166,197,560
0
2
null
2020-07-09T19:36:51
2019-01-17T09:23:10
C++
UTF-8
C++
false
false
1,721
cpp
// https://www.hackerrank.com/challenges/insertionsort2/problem #include <bits/stdc++.h> using namespace std; vector<string> split_string(string); void print(vector<int> arr) { for(int i=0;i<arr.size();i++) cout<<arr[i]<<" "; cout<<endl; } void insertionSort2(vector<int> arr) { for(int i=1;i<arr.size();i++) { if(arr[i]<arr[i-1]) { int temp=arr[i]; int j=i-1; while(arr[j]>temp) { arr[j+1]=arr[j]; j--; } arr[j+1]=temp; } print(arr); } } int main() { int n; cin >> n; cin.ignore(numeric_limits<streamsize>::max(), '\n'); string arr_temp_temp; getline(cin, arr_temp_temp); vector<string> arr_temp = split_string(arr_temp_temp); vector<int> arr(n); for (int i = 0; i < n; i++) { int arr_item = stoi(arr_temp[i]); arr[i] = arr_item; } insertionSort2(arr); return 0; } vector<string> split_string(string input_string) { string::iterator new_end = unique(input_string.begin(), input_string.end(), [] (const char &x, const char &y) { return x == y and x == ' '; }); input_string.erase(new_end, input_string.end()); while (input_string[input_string.length() - 1] == ' ') { input_string.pop_back(); } vector<string> splits; char delimiter = ' '; size_t i = 0; size_t pos = input_string.find(delimiter); while (pos != string::npos) { splits.push_back(input_string.substr(i, pos - i)); i = pos + 1; pos = input_string.find(delimiter, i); } splits.push_back(input_string.substr(i, min(pos, input_string.length()) - i + 1)); return splits; }
[ "abhishek252167@gmail.com" ]
abhishek252167@gmail.com
315cd7fc77c3b3b0c24ad8139b7d971de29a17ad
17b9ecd73499196b7180854aac469359453797c2
/Classes/Utils/FileUtilsExtension.h
ab20a80910aeaab429fbfc576176e7437108845e
[]
no_license
bluce/RTChatList
78fa3a647420efe618c0fcf55d56be79c8aa5622
d00e407355699c0bd3222c090def80507a47a297
refs/heads/master
2020-12-30T17:19:49.625879
2015-10-27T15:23:58
2015-10-27T15:23:58
null
0
0
null
null
null
null
UTF-8
C++
false
false
648
h
// // FileDelete.h // ToBeHero // // Created by darklinden on 11/7/14. // // #ifndef __ToBeHero__FileDelete__ #define __ToBeHero__FileDelete__ #include "cocos2d.h" #include <stdio.h> #include <sys/stat.h> #include <unistd.h> #include <dirent.h> #include <vector> class FileUtilsExtension { public: static bool delete_file(const std::string& fileName); static int path_is_directory(const std::string& path); static bool delete_folder_tree(const std::string& directory_name); static std::vector<std::string> content_of_folder(const std::string& path); }; #endif /* defined(__ToBeHero__FileDelete__) */
[ "hanshaokun@100etech.com" ]
hanshaokun@100etech.com
f64842cf0405be8949526674e45cab1564b2c624
f0f62f6ebf4eee8774badffd6eba669f39e335e7
/src/sherlock-beast.cpp
9c36200968e6b6dc5193ba91702d60723d8289f4
[]
no_license
shishir-a412ed/Hacker-Rank
620d0bf5dccf2d1249eace4fbb321f147522f872
3d1284e8949ea11a40e324f0137b69c5fa32f8eb
refs/heads/master
2016-09-06T13:59:24.636699
2015-04-01T14:32:59
2015-04-01T14:32:59
33,250,693
0
0
null
null
null
null
UTF-8
C++
false
false
1,048
cpp
//Hacker Rank Problems. //Solution to Sherlock and the beast problem. //To run the program, please use the test data provided by hacker rank for this problem. //https://www.hackerrank.com/challenges/sherlock-and-the-beast #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int T,N; int x,y,i,j,k; int notFound=-1; cin>>T; bool flag; for(int k=0;k<T;k++) { cin>>N; y=N/3+1; flag=true; for(;y>=0;y--) { x=0; for(;x<=(N/3+1);x++) { if((5*x+3*y)==N) { flag=false; break; } } if(flag==false) break; } if(flag) cout<<notFound; else { for(i=0;i<3*y;i++) cout<<5; for(j=0;j<5*x;j++) cout<<3; } cout<<endl; } return 0; }
[ "shishir.mahajan@redhat.com" ]
shishir.mahajan@redhat.com
d2391d10a3918862706e13889895812b38782f55
3ffb41d4ec67f5ab3aa39dfc0ba39bb47a2651a0
/src/rx/internal/scheduler/main_thread_scheduler.h
b86f15194b017d7bdcf039df00628c68ae70786c
[]
no_license
Zplutor/NotRx
90399fc47e54fcb737d1cb763f8a66fee9dd0e4f
cd0171e43e001d6fbca808e5b40f4819b4463d12
refs/heads/master
2020-04-18T19:10:24.330356
2019-04-01T16:46:29
2019-04-01T16:46:29
167,705,617
0
0
null
null
null
null
UTF-8
C++
false
false
314
h
#pragma once #include "rx/internal/thread/thread_manager.h" #include "rx/scheduler.h" namespace rx { namespace internal { class MainThreadScheduler : public Scheduler { public: MainThreadScheduler(ThreadManager&); void Schedule(Work work) override; private: ThreadManager& thread_manager_; }; } }
[ "zplutor@qq.com" ]
zplutor@qq.com
b7b8188a0e4d672a8f91688b7b548780dc9af337
583e316a7cac69186a784dc04051e5388aa57c9c
/tsMuxer/mlpStreamReader.cpp
202328f5c0a089ff29fc68982bbaded67bbd7ec8
[ "Apache-2.0" ]
permissive
gskening/tsMuxer
7d624be2fe4b3405235859eb4966e26879b05ff2
45ad4809aba93a93b3a196774b6b70a9c1ea0581
refs/heads/master
2023-04-30T02:08:56.226803
2023-04-18T06:17:15
2023-04-18T06:17:15
319,292,064
0
0
Apache-2.0
2020-12-07T11:02:31
2020-12-07T11:02:30
null
UTF-8
C++
false
false
2,308
cpp
#include "mlpStreamReader.h" #include <fs/systemlog.h> #include <iostream> #include "avCodecs.h" #include "nalUnits.h" #include "vodCoreException.h" #include "vod_common.h" int MLPStreamReader::getHeaderLen() { return MLP_HEADER_LEN; } const std::string MLPStreamReader::getStreamInfo() { std::ostringstream str; if (m_subType == MlpSubType::stTRUEHD) str << "TRUE-HD"; else if (m_subType == MlpSubType::stMLP) str << "MLP"; else str << "UNKNOWN"; if (m_substreams == 4) str << " + ATMOS"; str << ". "; str << "Peak bitrate: " << m_bitrate / 1000 << "Kbps "; str << "Sample Rate: " << m_samplerate / 1000 << "KHz "; str << "Channels: " << m_channels; return str.str(); } int MLPStreamReader::decodeFrame(uint8_t* buff, uint8_t* end, int& skipBytes, int& skipBeforeBytes) { skipBytes = 0; skipBeforeBytes = 0; if (MLPCodec::decodeFrame(buff, end)) return getFrameSize(buff); return 0; } int MLPStreamReader::getTSDescriptor(uint8_t* dstBuff, bool blurayMode, bool hdmvDescriptors) { // TODO: fix MLP descriptor *dstBuff++ = (int)TSDescriptorTag::REGISTRATION; // descriptor tag *dstBuff++ = 4; // descriptor length // https://smpte-ra.org/registered-mpeg-ts-ids memcpy(dstBuff, "mlpa", 4); // format_identifier return 6; // total descriptor length } int MLPStreamReader::readPacket(AVPacket& avPacket) { while (1) { int rez = SimplePacketizerReader::readPacket(avPacket); if (rez != 0) return rez; // thg packet avPacket.dts = avPacket.pts = m_totalTHDSamples * INTERNAL_PTS_FREQ / m_samplerate; m_totalTHDSamples += m_samples; m_demuxedTHDSamples += m_samples; if (m_demuxedTHDSamples >= m_samples) { m_demuxedTHDSamples -= m_samples; } return 0; } } int MLPStreamReader::flushPacket(AVPacket& avPacket) { int rez = SimplePacketizerReader::flushPacket(avPacket); if (rez > 0) { if (!(avPacket.flags & AVPacket::PRIORITY_DATA)) avPacket.pts = avPacket.dts = m_totalTHDSamples * INTERNAL_PTS_FREQ / m_samplerate; // replace time to a next HD packet } return rez; }
[ "jessiedeer@hotmail.com" ]
jessiedeer@hotmail.com
b13f171a6302b363c7f2f74c5b755257091dbafa
8a100a50efe9df71962b2552bd9b75300958b1fe
/Transmitters/Old Version/X_CTRL_STM32F10x/ElsCtrl_v1.6/ArduinoAPI/HardwareSerial.cpp
4d4f6f0d13c5cd389f711732531d1d27bb9724e7
[ "MIT" ]
permissive
yu1741588584/X-CTRL
156d608a02a9953de3a92e1d0a0abc62ece74350
9d93a49688fd8526253c9c9119479d04fab8371b
refs/heads/master
2022-12-27T22:29:31.691813
2022-04-30T03:49:20
2022-04-30T03:49:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,610
cpp
#include "HardwareSerial.h" /** * @brief 串口对象构造函数 * @param 串口外设地址 * @retval 无 */ HardwareSerial::HardwareSerial(USART_TypeDef *_USARTx) { this->USARTx = _USARTx; USART_Function = 0; _rx_buffer_head = _rx_buffer_tail = 0; } /** * @brief 串口中断入口 * @param 无 * @retval 无 */ void HardwareSerial::IRQHandler() { if(USART_GetITStatus(USARTx, USART_IT_RXNE) != RESET) { uint8_t c = USART_ReceiveData(USARTx); uint16_t i = (uint16_t)(_rx_buffer_head + 1) % SERIAL_RX_BUFFER_SIZE; if (i != _rx_buffer_tail) { _rx_buffer[_rx_buffer_head] = c; _rx_buffer_head = i; } if(USART_Function) USART_Function(); USART_ClearITPendingBit(USARTx, USART_IT_RXNE); } } /** * @brief 串口初始化 * @param BaudRate: 波特率 * @retval 无 */ void HardwareSerial::begin(uint32_t BaudRate) { begin(BaudRate, SERIAL_Config_Default); } /** * @brief 串口初始化 * @param BaudRate: 波特率 * @param Config: 配置参数 * @retval 无 */ void HardwareSerial::begin(uint32_t BaudRate, SERIAL_Config Config) { begin(BaudRate, Config, USART_PreemptionPriority_Default, USART_SubPriority_Default); } /** * @brief 串口初始化 * @param BaudRate: 波特率 * @param Config: 配置参数 * @param PreemptionPriority: 抢占优先级 * @param SubPriority: 从优先级 * @retval 无 */ void HardwareSerial::begin(uint32_t BaudRate, SERIAL_Config Config, uint8_t PreemptionPriority, uint8_t SubPriority) { GPIO_InitTypeDef GPIO_InitStructure; GPIO_TypeDef *GPIOx; uint16_t Tx_Pin, Rx_Pin; USART_InitTypeDef USART_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; uint8_t USARTx_IRQn; if(USARTx == USART1) { RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1 | RCC_APB2Periph_GPIOA, ENABLE); Tx_Pin = GPIO_Pin_9; Rx_Pin = GPIO_Pin_10; GPIOx = GPIOA; USARTx_IRQn = USART1_IRQn; } else if(USARTx == USART2) { RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); Tx_Pin = GPIO_Pin_2; Rx_Pin = GPIO_Pin_3; GPIOx = GPIOA; USARTx_IRQn = USART2_IRQn; } else if(USARTx == USART3) { RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); Tx_Pin = GPIO_Pin_10; Rx_Pin = GPIO_Pin_11; GPIOx = GPIOB; USARTx_IRQn = USART3_IRQn; } //USART_TX GPIO_InitStructure.GPIO_Pin = Tx_Pin; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //复用推挽输出 GPIO_Init(GPIOx, &GPIO_InitStructure);//初始化 //USART_RX GPIO_InitStructure.GPIO_Pin = Rx_Pin; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;//浮空输入 GPIO_Init(GPIOx, &GPIO_InitStructure);//初始化 //USART NVIC 配置 NVIC_InitStructure.NVIC_IRQChannel = USARTx_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = PreemptionPriority ;//抢占优先级 NVIC_InitStructure.NVIC_IRQChannelSubPriority = SubPriority; //子优先级 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; //IRQ通道使能 NVIC_Init(&NVIC_InitStructure); //根据指定的参数初始化VIC寄存器 //USART 初始化设置 USART_InitStructure.USART_BaudRate = BaudRate;//串口波特率 USART_InitStructure.USART_WordLength = Get_USART_WordLength_x(Config);//字长数据格式 USART_InitStructure.USART_Parity = Get_USART_Parity_x(Config);//奇偶校验位 USART_InitStructure.USART_StopBits = Get_USART_StopBits_x(Config);//停止位 USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;//无硬件数据流控制 USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; //收发模式 USART_Init(USARTx, &USART_InitStructure); //初始化串口 USART_ITConfig(USARTx, USART_IT_RXNE, ENABLE);//开启串口接受中断 USART_Cmd(USARTx, ENABLE); //使能串口 } /** * @brief 关闭串口 * @param 无 * @retval 无 */ void HardwareSerial::end(void) { USART_Cmd(USARTx, DISABLE); } /** * @brief 串口中断回调 * @param Function: 回调函数 * @retval 无 */ void HardwareSerial::attachInterrupt(USART_CallbackFunction_t Function) { USART_Function = Function; } /** * @brief 获取可从串行端口读取的字节数 * @param 无 * @retval 可读取的字节数 */ int HardwareSerial::available(void) { return ((unsigned int)(SERIAL_RX_BUFFER_SIZE + _rx_buffer_head - _rx_buffer_tail)) % SERIAL_RX_BUFFER_SIZE; } /** * @brief 读取传入的串行数据(字符) * @param 无 * @retval 可用的传入串行数据的第一个字节 (如果没有可用的数据, 则为-1) */ int HardwareSerial::read(void) { // if the head isn't ahead of the tail, we don't have any characters if (_rx_buffer_head == _rx_buffer_tail) { return -1; } else { unsigned char c = _rx_buffer[_rx_buffer_tail]; _rx_buffer_tail = (rx_buffer_index_t)(_rx_buffer_tail + 1) % SERIAL_RX_BUFFER_SIZE; return c; } } /** * @brief 返回传入串行数据的下一个字节(字符), 而不将其从内部串行缓冲区中删除 * @param 无 * @retval 可用的传入串行数据的第一个字节 (如果没有可用的数据, 则为-1) */ int HardwareSerial::peek(void) { if (_rx_buffer_head == _rx_buffer_tail) { return -1; } else { return _rx_buffer[_rx_buffer_tail]; } } /** * @brief 清空串口缓存 * @param 无 * @retval 无 */ void HardwareSerial::flush(void) { _rx_buffer_head = _rx_buffer_tail; } /** * @brief 串口写入一个字节 * @param 写入的字节 * @retval 字节 */ size_t HardwareSerial::write(uint8_t n) { while(!IS_USARTx_SendDone(USARTx)) {}; //循环发送,直到发送完毕 USART_SendData(USARTx, n); return n; } //Creat object for user HardwareSerial Serial(USART1);//TX-PA9 RX-PA10 HardwareSerial Serial2(USART2);//TX-PA2 RX-PA3 HardwareSerial Serial3(USART3);//TX-PB10 RX-PB11 //USARTx_IRQHandler extern "C" { void USART1_IRQHandler(void) { Serial.IRQHandler(); } void USART2_IRQHandler(void) { Serial2.IRQHandler(); } void USART3_IRQHandler(void) { Serial3.IRQHandler(); } }
[ "1290176185@qq.com" ]
1290176185@qq.com
41c75c079d19fa4d697ba3acf79a4998c55fae43
b68457c378205b7afe30219405ef5ec1b03453cd
/Src/HSAFdnTrace/HSATraceStringUtils.cpp
6ccbca1c39d3bd3a2536691e688c0d0139c11906
[ "MIT" ]
permissive
GPUWorld/RCP
3b3cbbaf2ddb442c7535d11aa6850fa4cce812fd
2b1967ca22ea928ec138bbf22b773636408fa5ad
refs/heads/master
2020-03-15T04:18:17.399427
2018-04-19T13:48:57
2018-04-19T13:48:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
48,604
cpp
//============================================================================== // Copyright (c) 2015 Advanced Micro Devices, Inc. All rights reserved. /// \author AMD Developer Tools Team /// \file /// \brief This file contains functions to format HSA Trace string output //============================================================================== #include "HSAFunctionDefs.h" #include "HSATraceStringUtils.h" #include "AutoGenerated/HSARTModuleFuncTables.h" #include "AutoGenerated/HSATraceStringOutput.h" bool (*HSATraceStringUtils::pGetApiDisplayName)(HSA_API_Type type, std::string& apiDisplayName) = nullptr; std::string HSATraceStringUtils::GetHSAAPINameString(HSA_API_Type type) { if (nullptr != pGetApiDisplayName) { std::string translatedApiName = ""; if (pGetApiDisplayName(type, translatedApiName)) { return translatedApiName; } } switch (type) { #define X(SYM) case HSA_API_Type_hsa_##SYM: return std::string("hsa_" #SYM); HSA_RUNTIME_API_TABLE HSA_EXT_FINALIZE_API_TABLE HSA_EXT_IMAGE_API_TABLE HSA_EXT_AMD_API_TABLE default: return ""; #undef X } } std::string HSATraceStringUtils::GetStringString(const char* src, bool truncate, bool surroundWithDeref) { if (NULL == src) { return "NULL"; } std::string str(src); return GetStringString(src, str, truncate, surroundWithDeref); } std::string HSATraceStringUtils::GetStringString(const char* src, std::string& srcString, bool truncate, bool surroundWithDeref) { if (NULL == src) { return "NULL"; } std::string str = srcString; if (truncate && str.length() > 60) { str = str.substr(0, 60).append("..."); } size_t found = str.find_first_of("\n\r\t\""); while (std::string::npos != found) { char subst[] = { '\\', '\0', '\0' }; switch (str[found]) { case '\n': subst[1] = 'n'; break; case '\r': subst[1] = 'r'; break; case '\t': subst[1] = 't'; break; case '\"': subst[1] = '\"'; break; default: ++found; continue; } str.replace(found, 1, subst); found += 2; found = str.find_first_of("\n\r\t\"", found); } str = SurroundWith(str, "\"", "\""); if (surroundWithDeref) { str = SurroundWithDeRef(str); } return str; } std::string HSATraceStringUtils::Get_bool_String(bool input) { if (input) { return "true"; } else { return "false"; } } std::string HSATraceStringUtils::Get_bool_Ptr_String(bool* pInput, bool input) { if (nullptr == pInput) { return "NULL"; } return SurroundWithDeRef(Get_bool_String(input)); } std::string HSATraceStringUtils::Get_uint8_t_String(uint8_t input) { return StringUtils::ToString(static_cast<unsigned int>(input)); } unsigned int HSATraceStringUtils::Get_hsa_agent_get_info_AttributeSize(hsa_agent_info_t attribute) { // TODO: add support for attributes defined by extensions switch (attribute) { // char[64] case HSA_AGENT_INFO_NAME: case HSA_AGENT_INFO_VENDOR_NAME: return sizeof(char[64]); // hsa_agent_feature_t case HSA_AGENT_INFO_FEATURE: return sizeof(hsa_agent_feature_t); // hsa_machine_model_t case HSA_AGENT_INFO_MACHINE_MODEL: return sizeof(hsa_machine_model_t); // hsa_profile_t case HSA_AGENT_INFO_PROFILE: return sizeof(hsa_profile_t); // hsa_default_float_rounding_mode_t case HSA_AGENT_INFO_DEFAULT_FLOAT_ROUNDING_MODE: return sizeof(hsa_default_float_rounding_mode_t); //case HSA_AGENT_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES: //case HSA_AGENT_INFO_FAST_F16_OPERATION: // uint32_t case HSA_AGENT_INFO_WAVEFRONT_SIZE: case HSA_AGENT_INFO_WORKGROUP_MAX_SIZE: case HSA_AGENT_INFO_GRID_MAX_SIZE: case HSA_AGENT_INFO_FBARRIER_MAX_SIZE: case HSA_AGENT_INFO_QUEUES_MAX: case HSA_AGENT_INFO_QUEUE_MIN_SIZE: case HSA_AGENT_INFO_QUEUE_MAX_SIZE: case HSA_AGENT_INFO_NODE: return sizeof(uint32_t); // uint16_t[3] case HSA_AGENT_INFO_WORKGROUP_MAX_DIM: return sizeof(uint16_t[3]); // hsa_dim3_t case HSA_AGENT_INFO_GRID_MAX_DIM: return sizeof(hsa_dim3_t); // hsa_queue_type_t case HSA_AGENT_INFO_QUEUE_TYPE: return sizeof(hsa_queue_type_t); // hsa_device_type_t case HSA_AGENT_INFO_DEVICE: return sizeof(hsa_device_type_t); // uint32_t[4] case HSA_AGENT_INFO_CACHE_SIZE: return sizeof(uint32_t[4]); // hsa_isa_t case HSA_AGENT_INFO_ISA: return sizeof(hsa_isa_t); // uint8_t[128] case HSA_AGENT_INFO_EXTENSIONS: return sizeof(uint8_t[128]); // uint16_t case HSA_AGENT_INFO_VERSION_MAJOR: case HSA_AGENT_INFO_VERSION_MINOR: return sizeof(uint16_t); default: return Get_hsa_amd_agent_get_info_AttributeSize(static_cast<hsa_amd_agent_info_t>(attribute)); } } std::string HSATraceStringUtils::Get_hsa_agent_get_info_AttributeString(void* value, hsa_agent_info_t attribute, hsa_status_t retVal) { // TODO: add support for attributes defined by extensions if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // char* case HSA_AGENT_INFO_NAME: case HSA_AGENT_INFO_VENDOR_NAME: ss << GetStringString(static_cast<char*>(value), false, false); break; // hsa_agent_feature_t case HSA_AGENT_INFO_FEATURE: ss << Get_hsa_agent_feature_t_String(*(static_cast<hsa_agent_feature_t*>(value))); break; // hsa_machine_model_t case HSA_AGENT_INFO_MACHINE_MODEL: ss << Get_hsa_machine_model_t_String(*(static_cast<hsa_machine_model_t*>(value))); break; // hsa_profile_t case HSA_AGENT_INFO_PROFILE: ss << Get_hsa_profile_t_String(*(static_cast<hsa_profile_t*>(value))); break; // hsa_default_float_rounding_mode_t case HSA_AGENT_INFO_DEFAULT_FLOAT_ROUNDING_MODE: ss << Get_hsa_default_float_rounding_mode_t_String(*(static_cast<hsa_default_float_rounding_mode_t*>(value))); break; //case HSA_AGENT_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES: //case HSA_AGENT_INFO_FAST_F16_OPERATION: // uint32_t case HSA_AGENT_INFO_WAVEFRONT_SIZE: case HSA_AGENT_INFO_WORKGROUP_MAX_SIZE: case HSA_AGENT_INFO_GRID_MAX_SIZE: case HSA_AGENT_INFO_FBARRIER_MAX_SIZE: case HSA_AGENT_INFO_QUEUES_MAX: case HSA_AGENT_INFO_QUEUE_MIN_SIZE: case HSA_AGENT_INFO_QUEUE_MAX_SIZE: case HSA_AGENT_INFO_NODE: ss << (*(static_cast<uint32_t*>(value))); break; // hsa_dim3_t case HSA_AGENT_INFO_GRID_MAX_DIM: ss << Get_hsa_dim3_t_String(*(static_cast<hsa_dim3_t*>(value))); break; // hsa_queue_type_t case HSA_AGENT_INFO_QUEUE_TYPE: ss << Get_hsa_queue_type_t_String(*(static_cast<hsa_queue_type_t*>(value))); break; // hsa_device_type_t case HSA_AGENT_INFO_DEVICE: ss << Get_hsa_device_type_t_String(*(static_cast<hsa_device_type_t*>(value))); break; // uint16_t case HSA_AGENT_INFO_VERSION_MAJOR: case HSA_AGENT_INFO_VERSION_MINOR: ss << (*(static_cast<uint16_t*>(value))); break; // uint16_t[3] case HSA_AGENT_INFO_WORKGROUP_MAX_DIM: { std::ostringstream tempss; for (int i = 0; i < 3; i++) { tempss << (static_cast<uint16_t*>(value))[i]; if (2 != i) { tempss << ","; } } ss << SurroundWithList(tempss.str()); break; } // uint32_t[4] case HSA_AGENT_INFO_CACHE_SIZE: { std::ostringstream tempss; for (int i = 0; i < 4; i++) { tempss << (static_cast<uint32_t*>(value))[i]; if (3 != i) { tempss << ","; } } ss << SurroundWithList(tempss.str()); break; } // hsa_isa_t case HSA_AGENT_INFO_ISA: ss << Get_hsa_isa_t_String(*(static_cast<hsa_isa_t*>(value))); break; // uint8_t[128] -- not yet implemented case HSA_AGENT_INFO_EXTENSIONS: default: ss << Get_hsa_amd_agent_get_info_AttributeString(value, static_cast<hsa_amd_agent_info_t>(attribute), retVal); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_amd_agent_get_info_AttributeSize(hsa_amd_agent_info_t attribute) { switch (attribute) { // char[64] case HSA_AMD_AGENT_INFO_PRODUCT_NAME: return sizeof(char[64]); // uint32_t case HSA_AMD_AGENT_INFO_CHIP_ID: case HSA_AMD_AGENT_INFO_CACHELINE_SIZE: case HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT: case HSA_AMD_AGENT_INFO_MAX_CLOCK_FREQUENCY: case HSA_AMD_AGENT_INFO_DRIVER_NODE_ID: case HSA_AMD_AGENT_INFO_MAX_ADDRESS_WATCH_POINTS: case HSA_AMD_AGENT_INFO_MEMORY_WIDTH: case HSA_AMD_AGENT_INFO_MEMORY_MAX_FREQUENCY: case HSA_AMD_AGENT_INFO_BDFID: return sizeof(uint32_t); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_amd_agent_get_info_AttributeString(void* value, hsa_amd_agent_info_t attribute, hsa_status_t retVal) { if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // char* case HSA_AMD_AGENT_INFO_PRODUCT_NAME: ss << GetStringString(static_cast<char*>(value), false, false); break; // uint32_t case HSA_AMD_AGENT_INFO_CHIP_ID: case HSA_AMD_AGENT_INFO_CACHELINE_SIZE: case HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT: case HSA_AMD_AGENT_INFO_MAX_CLOCK_FREQUENCY: case HSA_AMD_AGENT_INFO_DRIVER_NODE_ID: case HSA_AMD_AGENT_INFO_MAX_ADDRESS_WATCH_POINTS: case HSA_AMD_AGENT_INFO_MEMORY_WIDTH: case HSA_AMD_AGENT_INFO_MEMORY_MAX_FREQUENCY: case HSA_AMD_AGENT_INFO_BDFID: ss << (*(static_cast<uint32_t*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return ss.str(); } } unsigned int HSATraceStringUtils::Get_hsa_system_get_info_AttributeSize(hsa_system_info_t attribute) { // TODO: add support for attributes defined by extensions switch (attribute) { // uint16_t case HSA_SYSTEM_INFO_VERSION_MAJOR: case HSA_SYSTEM_INFO_VERSION_MINOR: return sizeof(uint16_t); // uint64_t case HSA_SYSTEM_INFO_TIMESTAMP: case HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY: case HSA_SYSTEM_INFO_SIGNAL_MAX_WAIT: return sizeof(uint64_t); // hsa_endianness_t case HSA_SYSTEM_INFO_ENDIANNESS: return sizeof(hsa_endianness_t); // hsa_machine_model_t case HSA_SYSTEM_INFO_MACHINE_MODEL: return sizeof(hsa_machine_model_t); // uint8_t[128] case HSA_SYSTEM_INFO_EXTENSIONS: return sizeof(uint8_t[128]); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_system_get_info_AttributeString(void* value, hsa_system_info_t attribute, hsa_status_t retVal) { // TODO: add support for attributes defined by extensions if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // uint16_t case HSA_SYSTEM_INFO_VERSION_MAJOR: case HSA_SYSTEM_INFO_VERSION_MINOR: ss << (*(static_cast<uint16_t*>(value))); break; // uint64_t case HSA_SYSTEM_INFO_TIMESTAMP: case HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY: case HSA_SYSTEM_INFO_SIGNAL_MAX_WAIT: ss << (*(static_cast<uint64_t*>(value))); break; // hsa_endianness_t case HSA_SYSTEM_INFO_ENDIANNESS: ss << Get_hsa_endianness_t_String(*(static_cast<hsa_endianness_t*>(value))); break; // hsa_machine_model_t case HSA_SYSTEM_INFO_MACHINE_MODEL: ss << Get_hsa_machine_model_t_String(*(static_cast<hsa_machine_model_t*>(value))); break; // uint8_t[128] case HSA_SYSTEM_INFO_EXTENSIONS: default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_region_get_info_AttributeSize(hsa_region_info_t attribute) { // TODO: add support for attributes defined by extensions switch (attribute) { // hsa_region_segment_t case HSA_REGION_INFO_SEGMENT: return sizeof(hsa_region_segment_t); // uint32_t case HSA_REGION_INFO_GLOBAL_FLAGS: // this is actually a bitfield of hsa_region_global_flag_t return sizeof(uint32_t); // size_t case HSA_REGION_INFO_SIZE: case HSA_REGION_INFO_ALLOC_MAX_SIZE: case HSA_REGION_INFO_RUNTIME_ALLOC_GRANULE: case HSA_REGION_INFO_RUNTIME_ALLOC_ALIGNMENT: return sizeof(size_t); // bool case HSA_REGION_INFO_RUNTIME_ALLOC_ALLOWED: return sizeof(bool); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_region_get_info_AttributeString(void* value, hsa_region_info_t attribute, hsa_status_t retVal) { // TODO: add support for attributes defined by extensions if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // hsa_region_segment_t case HSA_REGION_INFO_SEGMENT: ss << Get_hsa_region_segment_t_String(*(static_cast<hsa_region_segment_t*>(value))); break; // uint32_t case HSA_REGION_INFO_GLOBAL_FLAGS: // this is actually a bitfield of hsa_region_global_flag_t ss << Get_hsa_region_global_flag_t_String(*(static_cast<hsa_region_global_flag_t*>(value))); break; // size_t case HSA_REGION_INFO_SIZE: case HSA_REGION_INFO_ALLOC_MAX_SIZE: case HSA_REGION_INFO_RUNTIME_ALLOC_GRANULE: case HSA_REGION_INFO_RUNTIME_ALLOC_ALIGNMENT: ss << (*(static_cast<size_t*>(value))); break; // bool case HSA_REGION_INFO_RUNTIME_ALLOC_ALLOWED: ss << (*(static_cast<bool*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_isa_get_info_AttributeSize(hsa_isa_info_t attribute) { // TODO: add support for attributes defined by extensions switch (attribute) { // uint32_t case HSA_ISA_INFO_NAME_LENGTH: case HSA_ISA_INFO_CALL_CONVENTION_COUNT: case HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONT_SIZE: case HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONTS_PER_COMPUTE_UNIT: return sizeof(uint32_t); // char* case HSA_ISA_INFO_NAME: //TODO: Fix this to make caller read the length from HSA_ISA_INFO_NAME_LENGTH return sizeof(char*); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_isa_get_info_AttributeString(void* value, hsa_isa_info_t attribute, hsa_status_t retVal) { // TODO: add support for attributes defined by extensions if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // uint32_t case HSA_ISA_INFO_NAME_LENGTH: case HSA_ISA_INFO_CALL_CONVENTION_COUNT: case HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONT_SIZE: case HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONTS_PER_COMPUTE_UNIT: ss << (*(static_cast<uint32_t*>(value))); break; // char* case HSA_ISA_INFO_NAME: ss << GetStringString(static_cast<char*>(value), false, false); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_code_object_get_info_AttributeSize(hsa_code_object_info_t attribute) { // TODO: add support for attributes defined by extensions switch (attribute) { // char[64] case HSA_CODE_OBJECT_INFO_VERSION: return sizeof(char[64]); // hsa_code_object_type_t case HSA_CODE_OBJECT_INFO_TYPE: return sizeof(hsa_code_object_type_t); // hsa_isa_t case HSA_CODE_OBJECT_INFO_ISA: return sizeof(hsa_isa_t); // hsa_machine_model_t case HSA_CODE_OBJECT_INFO_MACHINE_MODEL: return sizeof(hsa_machine_model_t); // hsa_profile_t case HSA_CODE_OBJECT_INFO_PROFILE: return sizeof(hsa_profile_t); // hsa_default_float_rounding_mode_t case HSA_CODE_OBJECT_INFO_DEFAULT_FLOAT_ROUNDING_MODE: return sizeof(hsa_default_float_rounding_mode_t); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_code_object_get_info_AttributeString(void* value, hsa_code_object_info_t attribute, hsa_status_t retVal) { // TODO: add support for attributes defined by extensions if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // char[64] case HSA_CODE_OBJECT_INFO_VERSION: ss << GetStringString(((char*)value), false, false); break; // hsa_code_object_type_t case HSA_CODE_OBJECT_INFO_TYPE: ss << HSATraceStringUtils::Get_hsa_code_object_type_t_String(*(static_cast<hsa_code_object_type_t*>(value))); break; // hsa_isa_t case HSA_CODE_OBJECT_INFO_ISA: ss << HSATraceStringUtils::Get_hsa_isa_t_String(*(static_cast<hsa_isa_t*>(value))); break; // hsa_machine_model_t case HSA_CODE_OBJECT_INFO_MACHINE_MODEL: ss << HSATraceStringUtils::Get_hsa_machine_model_t_String(*(static_cast<hsa_machine_model_t*>(value))); break; // hsa_profile_t case HSA_CODE_OBJECT_INFO_PROFILE: ss << HSATraceStringUtils::Get_hsa_profile_t_String(*(static_cast<hsa_profile_t*>(value))); break; // hsa_default_float_rounding_mode_t case HSA_CODE_OBJECT_INFO_DEFAULT_FLOAT_ROUNDING_MODE: ss << HSATraceStringUtils::Get_hsa_default_float_rounding_mode_t_String(*(static_cast<hsa_default_float_rounding_mode_t*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_code_symbol_get_info_AttributeSize(hsa_code_symbol_info_t attribute) { // TODO: add support for attributes defined by extensions switch (attribute) { // hsa_symbol_kind_t case HSA_CODE_SYMBOL_INFO_TYPE: return sizeof(hsa_symbol_kind_t); // uint32_t case HSA_CODE_SYMBOL_INFO_NAME_LENGTH: case HSA_CODE_SYMBOL_INFO_MODULE_NAME_LENGTH: case HSA_CODE_SYMBOL_INFO_VARIABLE_ALIGNMENT: case HSA_CODE_SYMBOL_INFO_VARIABLE_SIZE: case HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE: case HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT: case HSA_CODE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE: case HSA_CODE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE: case HSA_CODE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION: return sizeof(uint32_t); // char* case HSA_CODE_SYMBOL_INFO_NAME: //TODO: Fix this to make caller read the length from HSA_ISA_INFO_NAME_LENGTH case HSA_CODE_SYMBOL_INFO_MODULE_NAME: return sizeof(char*); // hsa_symbol_linkage_t case HSA_CODE_SYMBOL_INFO_LINKAGE: return sizeof(hsa_symbol_linkage_t); // hsa_variable_allocation_t case HSA_CODE_SYMBOL_INFO_VARIABLE_ALLOCATION: return sizeof(hsa_variable_allocation_t); // hsa_variable_segment_t case HSA_CODE_SYMBOL_INFO_VARIABLE_SEGMENT: return sizeof(hsa_variable_segment_t); // bool case HSA_CODE_SYMBOL_INFO_VARIABLE_IS_CONST: case HSA_CODE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK: return sizeof(bool); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_code_symbol_get_info_AttributeString(void* value, hsa_code_symbol_info_t attribute, hsa_status_t retVal) { // TODO: add support for attributes defined by extensions if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // hsa_symbol_t case HSA_CODE_SYMBOL_INFO_TYPE: ss << HSATraceStringUtils::Get_hsa_symbol_kind_t_String(*(static_cast<hsa_symbol_kind_t*>(value))); break; // uint32_t case HSA_CODE_SYMBOL_INFO_NAME_LENGTH: case HSA_CODE_SYMBOL_INFO_MODULE_NAME_LENGTH: case HSA_CODE_SYMBOL_INFO_VARIABLE_ALIGNMENT: case HSA_CODE_SYMBOL_INFO_VARIABLE_SIZE: case HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE: case HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT: case HSA_CODE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE: case HSA_CODE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE: case HSA_CODE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION: ss << (*(static_cast<uint32_t*>(value))); break; // char* case HSA_CODE_SYMBOL_INFO_NAME: //TODO: Fix this to make caller read the length from HSA_ISA_INFO_NAME_LENGTH case HSA_CODE_SYMBOL_INFO_MODULE_NAME: ss << GetStringString(static_cast<char*>(value), false); break; // hsa_symbol_linkage_t case HSA_CODE_SYMBOL_INFO_LINKAGE: ss << HSATraceStringUtils::Get_hsa_symbol_linkage_t_String(*(static_cast<hsa_symbol_linkage_t*>(value))); break; // hsa_variable_allocation_t case HSA_CODE_SYMBOL_INFO_VARIABLE_ALLOCATION: ss << HSATraceStringUtils::Get_hsa_variable_allocation_t_String(*(static_cast<hsa_variable_allocation_t*>(value))); break; // hsa_variable_segment_t case HSA_CODE_SYMBOL_INFO_VARIABLE_SEGMENT: ss << HSATraceStringUtils::Get_hsa_variable_segment_t_String(*(static_cast<hsa_variable_segment_t*>(value))); break; // bool case HSA_CODE_SYMBOL_INFO_VARIABLE_IS_CONST: case HSA_CODE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK: ss << (*(static_cast<bool*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_executable_get_info_AttributeSize(hsa_executable_info_t attribute) { // TODO: add support for attributes defined by extensions switch (attribute) { // hsa_profile_t case HSA_EXECUTABLE_INFO_PROFILE: return sizeof(hsa_profile_t); // hsa_executable_state_t case HSA_EXECUTABLE_INFO_STATE: return sizeof(hsa_executable_state_t); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_executable_get_info_AttributeString(void* value, hsa_executable_info_t attribute, hsa_status_t retVal) { // TODO: add support for attributes defined by extensions if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // hsa_profile_t case HSA_EXECUTABLE_INFO_PROFILE: ss << HSATraceStringUtils::Get_hsa_profile_t_String(*(static_cast<hsa_profile_t*>(value))); break; // hsa_executable_state_t case HSA_EXECUTABLE_INFO_STATE: ss << HSATraceStringUtils::Get_hsa_executable_state_t_String(*(static_cast<hsa_executable_state_t*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_executable_symbol_get_info_AttributeSize(hsa_executable_symbol_info_t attribute) { // TODO: add support for attributes defined by extensions switch (attribute) { // hsa_symbol_kind_t case HSA_EXECUTABLE_SYMBOL_INFO_TYPE: return sizeof(hsa_symbol_kind_t); // uint32_t case HSA_EXECUTABLE_SYMBOL_INFO_NAME_LENGTH: case HSA_EXECUTABLE_SYMBOL_INFO_MODULE_NAME_LENGTH: case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALIGNMENT: case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_SIZE: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE: case HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION: return sizeof(uint32_t); // char* case HSA_EXECUTABLE_SYMBOL_INFO_NAME: //TODO: Fix this to make caller read the length from HSA_ISA_INFO_NAME_LENGTH case HSA_EXECUTABLE_SYMBOL_INFO_MODULE_NAME: return sizeof(char*); // hsa_agent_t case HSA_EXECUTABLE_SYMBOL_INFO_AGENT: return sizeof(hsa_agent_t); // uint64_t case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ADDRESS: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_OBJECT: case HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_OBJECT: // TODO: the size of this one depends on the machine model..... return sizeof(uint64_t); // hsa_variable_allocation_t case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALLOCATION: return sizeof(hsa_variable_allocation_t); // hsa_variable_segment_t case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_SEGMENT: return sizeof(hsa_variable_segment_t); // bool case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_IS_CONST: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK: return sizeof(bool); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_executable_symbol_get_info_AttributeString(void* value, hsa_executable_symbol_info_t attribute, hsa_status_t retVal) { // TODO: add support for attributes defined by extensions if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // hsa_symbol_t case HSA_EXECUTABLE_SYMBOL_INFO_TYPE: ss << HSATraceStringUtils::Get_hsa_symbol_kind_t_String(*(static_cast<hsa_symbol_kind_t*>(value))); break; // uint32_t case HSA_EXECUTABLE_SYMBOL_INFO_NAME_LENGTH: case HSA_EXECUTABLE_SYMBOL_INFO_MODULE_NAME_LENGTH: case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALIGNMENT: case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_SIZE: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE: case HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION: ss << (*(static_cast<uint32_t*>(value))); break; // char* case HSA_EXECUTABLE_SYMBOL_INFO_NAME: //TODO: Fix this to make caller read the length from HSA_ISA_INFO_NAME_LENGTH case HSA_EXECUTABLE_SYMBOL_INFO_MODULE_NAME: ss << GetStringString(static_cast<char*>(value), false); break; // hsa_agent_t case HSA_EXECUTABLE_SYMBOL_INFO_AGENT: ss << HSATraceStringUtils::Get_hsa_agent_t_String(*(static_cast<hsa_agent_t*>(value))); break; // uint64_t case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ADDRESS: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_OBJECT: case HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_OBJECT: // TODO: the size of this one depends on the machine model..... ss << (*(static_cast<uint64_t*>(value))); break; // hsa_variable_allocation_t case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALLOCATION: ss << HSATraceStringUtils::Get_hsa_variable_allocation_t_String(*(static_cast<hsa_variable_allocation_t*>(value))); break; // hsa_variable_segment_t case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_SEGMENT: ss << HSATraceStringUtils::Get_hsa_variable_segment_t_String(*(static_cast<hsa_variable_segment_t*>(value))); break; // bool case HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_IS_CONST: case HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK: ss << (*(static_cast<bool*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_ext_program_get_info_AttributeSize(hsa_ext_program_info_t attribute) { // TODO: add support for attributes defined by extensions switch (attribute) { // hsa_machine_model_t case HSA_EXT_PROGRAM_INFO_MACHINE_MODEL: return sizeof(hsa_machine_model_t); // hsa_profile_t case HSA_EXT_PROGRAM_INFO_PROFILE: return sizeof(hsa_profile_t); // hsa_default_float_rounding_mode_t case HSA_EXT_PROGRAM_INFO_DEFAULT_FLOAT_ROUNDING_MODE: return sizeof(hsa_default_float_rounding_mode_t); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_ext_program_get_info_AttributeString(void* value, hsa_ext_program_info_t attribute, hsa_status_t retVal) { // TODO: add support for attributes defined by extensions if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // hsa_machine_model_t case HSA_EXT_PROGRAM_INFO_MACHINE_MODEL: ss << HSATraceStringUtils::Get_hsa_machine_model_t_String(*(static_cast<hsa_machine_model_t*>(value))); break; // hsa_profile_t case HSA_EXT_PROGRAM_INFO_PROFILE: ss << HSATraceStringUtils::Get_hsa_profile_t_String(*(static_cast<hsa_profile_t*>(value))); break; // hsa_default_float_rounding_mode_t case HSA_EXT_PROGRAM_INFO_DEFAULT_FLOAT_ROUNDING_MODE: ss << HSATraceStringUtils::Get_hsa_default_float_rounding_mode_t_String(*(static_cast<hsa_default_float_rounding_mode_t*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_amd_memory_pool_get_info_AttributeSize(hsa_amd_memory_pool_info_t attribute) { switch (attribute) { // hsa_amd_segment_t case HSA_AMD_MEMORY_POOL_INFO_SEGMENT: return sizeof(hsa_amd_segment_t); // uint32_t case HSA_AMD_MEMORY_POOL_INFO_GLOBAL_FLAGS: return sizeof(uint32_t); // size_t case HSA_AMD_MEMORY_POOL_INFO_SIZE: case HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_GRANULE: case HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_ALIGNMENT: return sizeof(size_t); // bool case HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_ALLOWED: case HSA_AMD_MEMORY_POOL_INFO_ACCESSIBLE_BY_ALL: return sizeof(bool); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_amd_memory_pool_get_info_AttributeString(void* value, hsa_amd_memory_pool_info_t attribute, hsa_status_t retVal) { if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // hsa_amd_segment_t case HSA_AMD_MEMORY_POOL_INFO_SEGMENT: ss << HSATraceStringUtils::Get_hsa_amd_segment_t_String(*(static_cast<hsa_amd_segment_t*>(value))); break; // uint32_t case HSA_AMD_MEMORY_POOL_INFO_GLOBAL_FLAGS: ss << (*(static_cast<uint32_t*>(value))); break; // size_t case HSA_AMD_MEMORY_POOL_INFO_SIZE: case HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_GRANULE: case HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_ALIGNMENT: ss << StringUtils::ToString(*(static_cast<size_t*>(value))); break; // bool case HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_ALLOWED: case HSA_AMD_MEMORY_POOL_INFO_ACCESSIBLE_BY_ALL: ss << (*(static_cast<bool*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_amd_agent_memory_pool_get_info_AttributeSize(hsa_amd_agent_memory_pool_info_t attribute) { switch (attribute) { // hsa_amd_memory_pool_access_t case HSA_AMD_AGENT_MEMORY_POOL_INFO_ACCESS: return sizeof(hsa_amd_memory_pool_access_t); // uint32_t case HSA_AMD_AGENT_MEMORY_POOL_INFO_NUM_LINK_HOPS: return sizeof(uint32_t); // hsa_amd_memory_pool_link_info_t case HSA_AMD_AGENT_MEMORY_POOL_INFO_LINK_INFO: return sizeof(hsa_amd_memory_pool_link_info_t); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_amd_agent_memory_pool_get_info_AttributeString(void* value, hsa_amd_agent_memory_pool_info_t attribute, hsa_status_t retVal) { if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // hsa_amd_memory_pool_access_t case HSA_AMD_AGENT_MEMORY_POOL_INFO_ACCESS: ss << HSATraceStringUtils::Get_hsa_amd_memory_pool_access_t_String(*(static_cast<hsa_amd_memory_pool_access_t*>(value))); break; // uint32_t case HSA_AMD_AGENT_MEMORY_POOL_INFO_NUM_LINK_HOPS: ss << (*(static_cast<uint32_t*>(value))); break; // hsa_amd_memory_pool_link_info_t case HSA_AMD_AGENT_MEMORY_POOL_INFO_LINK_INFO: ss << HSATraceStringUtils::Get_hsa_amd_memory_pool_link_info_t_String(*(static_cast<hsa_amd_memory_pool_link_info_t*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_cache_get_info_AttributeSize(hsa_cache_info_t attribute) { switch (attribute) { // uint32_t case HSA_CACHE_INFO_NAME_LENGTH: case HSA_CACHE_INFO_SIZE: return sizeof(uint32_t); // char* case HSA_CACHE_INFO_NAME: //TODO: Fix this to make caller read the length from HSA_ISA_INFO_NAME_LENGTH return sizeof(char*); // uint8_t case HSA_CACHE_INFO_LEVEL: return sizeof(hsa_amd_memory_pool_link_info_t); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_cache_get_info_AttributeString(void* value, hsa_cache_info_t attribute, hsa_status_t retVal) { if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // uint32_t case HSA_CACHE_INFO_NAME_LENGTH: case HSA_CACHE_INFO_SIZE: ss << (*(static_cast<uint32_t*>(value))); break; // char* case HSA_CACHE_INFO_NAME: ss << GetStringString(static_cast<char*>(value), false, false); break; // uint8_t case HSA_CACHE_INFO_LEVEL: ss << Get_uint8_t_String(*(static_cast<uint8_t*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_wavefront_get_info_AttributeSize(hsa_wavefront_info_t attribute) { switch (attribute) { // uint32_t case HSA_WAVEFRONT_INFO_SIZE: return sizeof(uint32_t); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_wavefront_get_info_AttributeString(void* value, hsa_wavefront_info_t attribute, hsa_status_t retVal) { if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // uint32_t case HSA_WAVEFRONT_INFO_SIZE: ss << (*(static_cast<uint32_t*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_ven_amd_aqlprofile_get_info_AttributeSize(hsa_ven_amd_aqlprofile_info_type_t attribute) { switch (attribute) { // uint32_t case HSA_VEN_AMD_AQLPROFILE_INFO_COMMAND_BUFFER_SIZE: case HSA_VEN_AMD_AQLPROFILE_INFO_PMC_DATA_SIZE: return sizeof(uint32_t); case HSA_VEN_AMD_AQLPROFILE_INFO_PMC_DATA: case HSA_VEN_AMD_AQLPROFILE_INFO_SQTT_DATA: return sizeof(uint64_t); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_ven_amd_aqlprofile_get_info_AttributeString(void* value, hsa_ven_amd_aqlprofile_info_type_t attribute, hsa_status_t retVal) { if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { // uint32_t case HSA_VEN_AMD_AQLPROFILE_INFO_COMMAND_BUFFER_SIZE: case HSA_VEN_AMD_AQLPROFILE_INFO_PMC_DATA_SIZE: ss << (*(static_cast<uint32_t*>(value))); break; // uint64_t case HSA_VEN_AMD_AQLPROFILE_INFO_PMC_DATA: case HSA_VEN_AMD_AQLPROFILE_INFO_SQTT_DATA: ss << (*(static_cast<uint64_t*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } } unsigned int HSATraceStringUtils::Get_hsa_ven_amd_loader_loaded_code_object_get_info_AttributeSize(hsa_ven_amd_loader_loaded_code_object_info_t attribute) { switch (attribute) { // hsa_executable_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_EXECUTABLE: return sizeof(hsa_executable_t); // hsa_ven_amd_loader_loaded_code_object_kind_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_KIND: return sizeof(hsa_ven_amd_loader_loaded_code_object_kind_t); // hsa_agent_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_AGENT: return sizeof(hsa_agent_t); // hsa_ven_amd_loader_code_object_storage_type_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_TYPE: return sizeof(hsa_ven_amd_loader_code_object_storage_type_t); // uint64_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_MEMORY_BASE: case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_MEMORY_SIZE: case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_LOAD_BASE: case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_LOAD_SIZE: return sizeof(uint64_t); // int case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_FILE: return sizeof(int); // int64_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_LOAD_DELTA: return sizeof(int64_t); default: return 0; } } std::string HSATraceStringUtils::Get_hsa_ven_amd_loader_loaded_code_object_get_info_AttributeString(void* value, hsa_ven_amd_loader_loaded_code_object_info_t attribute, hsa_status_t retVal) { if (NULL == value) { return "NULL"; } else { std::ostringstream ss; if (HSA_STATUS_SUCCESS == retVal) { switch (attribute) { case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_EXECUTABLE: ss << HSATraceStringUtils::Get_hsa_executable_t_String(*(static_cast<hsa_executable_t*>(value))); break; // hsa_ven_amd_loader_loaded_code_object_kind_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_KIND: ss << HSATraceStringUtils::Get_hsa_ven_amd_loader_loaded_code_object_kind_t_String(*(static_cast<hsa_ven_amd_loader_loaded_code_object_kind_t*>(value))); break; // hsa_agent_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_AGENT: ss << HSATraceStringUtils::Get_hsa_agent_t_String(*(static_cast<hsa_agent_t*>(value))); break; // hsa_ven_amd_loader_code_object_storage_type_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_TYPE: ss << HSATraceStringUtils::Get_hsa_ven_amd_loader_code_object_storage_type_t_String(*(static_cast<hsa_ven_amd_loader_code_object_storage_type_t*>(value))); break; // uint64_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_MEMORY_BASE: case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_MEMORY_SIZE: case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_LOAD_BASE: case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_LOAD_SIZE: ss << (*(static_cast<uint64_t*>(value))); break; // int case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_FILE: ss << (*(static_cast<int*>(value))); break; // int64_t case HSA_VEN_AMD_LOADER_LOADED_CODE_OBJECT_INFO_LOAD_DELTA: ss << (*(static_cast<int64_t*>(value))); break; default: ss << StringUtils::ToString(*(static_cast<int*>(value))); break; } } return SurroundWithDeRef(ss.str()); } }
[ "christopher.hesik@amd.com" ]
christopher.hesik@amd.com
1ea0d584fbe0ba714c947e3190af2898c2a34f80
177a619d09dc04cfa1ad11700fe5c10683555702
/4-3strtype2.cpp
386a87ca0d0359ae2e7afe9307e2f6431d5f6b91
[]
no_license
Hanaydn/LearningCpp
4b1ddaea300c169c1c00eaca397d0c58d3bb382a
62f852c2d68fb195708f2bb0d0f1e948aadfde11
refs/heads/master
2020-03-22T05:02:05.307573
2018-07-27T03:59:17
2018-07-27T03:59:17
139,537,481
0
0
null
null
null
null
UTF-8
C++
false
false
618
cpp
#include<iostream> #include<string> using namespace std; int main(int argc_, char* argv_[]){ string s1 = "penguin"; string s2, s3; cout << "You can assign one string object to another: s1 = s2 \n"; s1 = s2; cout << "s1: " << s1 << ", s2: " << s2 << endl; cout << "You can assign a C-style string to a string object.\n"; cout << "s2 = \"buzzard\"\n"; s2 = "buzzard"; cout << "s2: " << s2 << endl; cout << "You can concatenate string: s3 = s1 + s2\n"; s3 = s1 + s2; cout << "s1 += s2 yields s1 = " << s1 << endl; s2 += " for a day"; cout << "s2 += \" for a day\" yields s2 = " << s2 << endl; return 0; }
[ "ydanni_fanmily@163.com" ]
ydanni_fanmily@163.com
9461d0a37b025726b7f43ac272e6e330eb071411
3aa67d342fdacafb0e7e163b0883d39f524dd73d
/asylo/daemon/identity/attestation_domain_service_impl.h
6ece00a1156f933fa1d5d1ed5f89921fdd856075
[ "Apache-2.0" ]
permissive
liuhao163/asylo
efd7e01e0218aedb36a5bb15329e70d8c6ee2d16
afed6040887ea9fbb52612b879aaeb5fca987e79
refs/heads/master
2020-03-17T09:17:34.511837
2018-05-10T16:12:00
2018-05-10T23:31:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,691
h
/* * * Copyright 2017 Asylo authors * * 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 ASYLO_DAEMON_IDENTITY_ATTESTATION_DOMAIN_SERVICE_IMPL_H_ #define ASYLO_DAEMON_IDENTITY_ATTESTATION_DOMAIN_SERVICE_IMPL_H_ #include <string> #include "grpcpp/grpcpp.h" #include "asylo/daemon/identity/attestation_domain.grpc.pb.h" namespace asylo { namespace daemon { class AttestationDomainServiceImpl final : public AttestationDomainService::Service { public: // Constructs an AttestationDomainServiceImpl object that retrieves the // attestation-domain name from |domain_file_path|. explicit AttestationDomainServiceImpl(std::string domain_file_path) : domain_file_path_{std::move(domain_file_path)} {} // Retrieves the attestation-domain name from domain_file_path_ and sets // |response| accordingly. grpc::Status GetAttestationDomain( ::grpc::ServerContext *context, const GetAttestationDomainRequest *request, GetAttestationDomainResponse *response) override; private: const std::string domain_file_path_; }; } // namespace daemon } // namespace asylo #endif // ASYLO_DAEMON_IDENTITY_ATTESTATION_DOMAIN_SERVICE_IMPL_H_
[ "github@keithmoyer.com" ]
github@keithmoyer.com
5bd68bb89c72ad287b58c14a76a97907babc8b8f
37851bf986918e7529e7f221e883184ea3f87289
/PreTreatmentStations.h
849309d935a22de8118c7dd14fd52f7242d68729
[]
no_license
Hydrotoast/WashingMachineSimulation
dc7d6624995476b13cbf6a5df4decc39d308e4e0
2a5babee334ac7548855f63b68a8fbf093fbbfe7
refs/heads/master
2021-01-19T00:12:06.820034
2014-03-13T07:35:46
2014-03-13T07:35:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
316
h
/// Gio Carlo Cielo Borje /// 41894135 #ifndef PRETREATMENT_STATION_H #define PRETREATMENT_STATION_H #include "ObjectPool.h" class Event; class SimulationState; class PreTreatmentStations : public ObjectPool { public: PreTreatmentStations(size_t sz); void processWaitingList(SimulationState& state); }; #endif
[ "gccielo@gmail.com" ]
gccielo@gmail.com
52cbfa62e35268b57f56a3cceac3a57cbd857cfd
231db5b6d629d456fbf0bc8eaf35dda5336b1e71
/src/graphics/EntityMesh.hpp
cdb7ed2515cb743d478e29fc52f3d499d05395bb
[]
no_license
HolySmoke86/blank
fc555ff0cbbb5b7ba2f77de5af79d5eef36607c6
28585b166ce3ad765ab613a375a97265449841e7
refs/heads/master
2020-12-24T16:24:00.119868
2018-11-17T12:10:22
2018-11-17T12:10:33
37,578,628
0
0
null
null
null
null
UTF-8
C++
false
false
1,465
hpp
#ifndef BLANK_GRAPHICS_ENTITYMESH_HPP_ #define BLANK_GRAPHICS_ENTITYMESH_HPP_ #include "glm.hpp" #include "VertexArray.hpp" #include <vector> #include <GL/glew.h> namespace blank { class EntityMesh { public: using Position = glm::vec3; using TexCoord = glm::vec3; using ColorMod = TVEC3<unsigned char, glm::precision(0)>; using Normal = glm::vec3; using Index = unsigned int; using Positions = std::vector<Position>; using TexCoords = std::vector<TexCoord>; using ColorMods = std::vector<ColorMod>; using Normals = std::vector<Normal>; using Indices = std::vector<Index>; enum Attribute { ATTRIB_VERTEX, ATTRIB_TEXCOORD, ATTRIB_HSL, ATTRIB_RGB, ATTRIB_NORMAL, ATTRIB_INDEX, ATTRIB_COUNT, }; struct Buffer { Positions vertices; TexCoords tex_coords; ColorMods hsl_mods; ColorMods rgb_mods; Normals normals; Indices indices; void Clear() noexcept { vertices.clear(); tex_coords.clear(); hsl_mods.clear(); rgb_mods.clear(); normals.clear(); indices.clear(); } void Reserve(size_t p, size_t i) { vertices.reserve(p); tex_coords.reserve(p); hsl_mods.reserve(p); rgb_mods.reserve(p); normals.reserve(p); indices.reserve(i); } }; using VAO = VertexArray<ATTRIB_COUNT>; public: void Update(const Buffer &) noexcept; bool Empty() const noexcept { return vao.Empty(); } void Draw() const noexcept { vao.DrawTriangleElements(); } private: VAO vao; }; } #endif
[ "daniel.karbach@localhorst.tv" ]
daniel.karbach@localhorst.tv
84bbb048633eb3d8b61988fa326ddfe6bd90038d
7c748c4642d9a1ba2f6a00788ddc2962fca50f8e
/cube_dll/main.cpp
0ad0c10a8a25ded12a6b54bb17d4c2bd51ffcde2
[]
no_license
plichard/glfw-test
be48780140491ed514b9da965181dbca521c12d4
24e5992361c02f857c4f6a54e6ad4a2d52760a56
refs/heads/master
2021-12-11T10:51:18.234887
2013-08-28T13:30:07
2013-08-28T13:30:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
924
cpp
#pragma once #include "../glfw-test/game_object.h" #include <iostream> #include <functional> class CCube : public IGameObject { public: CCube(void) { //std::cout << "a cute cube created !!!"<<std::endl; } ~CCube(void) { } void Tick() { } void Init() { CONNECT(CCube,"triangle",onTriangle); CONNECT(CCube,"sfml",onsfmlEvent); } bool Event1(void* data) { std::cout << "Event1 received by cube!"<<std::endl; SendEvent(GetID("request_new"),new ObjectRequest("triangle")); return false; } bool onsfmlEvent(void* data) { std::cout << "cube eceived sfml event"<<std::endl; return false; } bool e(void* data) { std::cout << "e hue hue received by cube ["<<this<<"]"<<std::endl; return false; } bool onTriangle(void* data) { std::cout << "received from triangle"<<std::endl; return false; } void HandleEvent(int ID, void* data) //obsolete?? { } }; GAME_OBJECT(CCube)
[ "peter.lichard@gmail.com" ]
peter.lichard@gmail.com
744039615d6090efd842fed4b7d6e2e6d8b11add
964926722cc334658cd000cffeb206fba43fe554
/201906Algorithm/2667.cpp
31fdbe9d4d10ee257d65234ade8706eafa5e774e
[]
no_license
acupofmilktea/Algorithm
ee7c544509ab9d34321afee05a6a7941117717fe
6b498393d8f638501b4d2afb7e3744e7d3206628
refs/heads/master
2020-04-29T21:15:49.373413
2019-12-05T11:15:49
2019-12-05T11:15:49
176,407,992
0
0
null
null
null
null
UTF-8
C++
false
false
1,081
cpp
// // Created by az91t on 2019-06-14. // #include <iostream> #include <algorithm> #include <vector> using namespace std; int vi[4]={0,0,-1,1}, vj[4]={-1,1,0,0}, cnt; void dfs(int graph[27][27], int i, int j){ if(graph[i][j]==0) return; cnt++; graph[i][j]=0; for(int m=0; m<4; m++){ dfs(graph, i+vi[m], j+vj[m]); } } int main(){ int n; cin>>n; int graph[27][27]={0,}; string aprt; for(int i=1; i<=n; i++){ cin>>aprt; for(int j=0; j<n; j++){ if(aprt[j]=='1') graph[i][j+1]=1; } } int total=0; vector<int> v; for(int i=1; i<=n; i++){ for(int j=1; j<=n; j++){ cnt=0; if(graph[i][j]==1){ dfs(graph, i, j); if(cnt>0){ total++; v.push_back(cnt); } } } } cout<<total<<"\n"; if(v.empty()) return 0; sort(v.begin(), v.end()); for(int i=0; i<v.size(); i++) cout<<v[i]<<"\n"; return 0; }
[ "mtoc227@gmail.com" ]
mtoc227@gmail.com
9f0f46ea58b2316e93d9bc8489921402ab1f0052
eaba3a034d52e4860fc638777ce9d5faf87bc15c
/clases/05/1205B/1205B.cpp
a9464622256cc8c3466edf56c584fa279eac452a
[]
no_license
AngheloAlf/2020-1_ProgCompetitiva
f6e78653d9eed020c25f7a6b19d7f15fdfa5b004
d80af23ff7b1a536fb319259649717774208c165
refs/heads/master
2022-11-26T10:22:57.359311
2020-07-29T14:28:46
2020-07-29T14:28:46
255,951,596
0
0
null
null
null
null
UTF-8
C++
false
false
2,789
cpp
#include <iostream> #include <vector> #include <array> #include <unordered_map> #include <queue> #define TAMANO 64 #define GET_BIT(x, bit) (((x) >> (bit)) & 1LL) #define MIN(x, y) ((x) < (y) ? (x) : (y)) #define GRANDE 70 int main(){ /// https://stackoverflow.com/a/12762166/6292472 std::ios::sync_with_stdio(false); int n; std::cin >> n; long long int nodo; std::array<std::vector<long long int>, TAMANO> bits_por_nodo; for(int i = 0; i < n; ++i){ std::cin >> nodo; if(nodo){ for(unsigned j = 0; j < bits_por_nodo.size(); ++j){ if(GET_BIT(nodo, j)){ bits_por_nodo[j].push_back(i); } } } else{ --i; --n; } } //std::unordered_map<int, std::vector<int>> grafo; std::vector<std::vector<int>> grafo; grafo.resize(n); bool tres_o_mas = false; bool al_menos_un_2 = false; for(unsigned i = 0; i < bits_por_nodo.size(); ++i){ auto cantidad = bits_por_nodo[i].size(); if(cantidad >= 3){ tres_o_mas = true; } else if(cantidad == 2){ al_menos_un_2 = true; auto x = bits_por_nodo[i][0]; auto y = bits_por_nodo[i][1]; grafo[x].push_back(y); grafo[y].push_back(x); } } //std::cout << grafo.size() << std::endl; if(tres_o_mas){ std::cout << 3 << std::endl; } else if(!al_menos_un_2){ std::cout << -1 << std::endl; } else{ int nodos_ciclo = GRANDE; std::vector<int> padre; std::vector<int> distancias; for(int i = 0; i < n; ++i){ if(grafo[i].empty()){ continue; } padre.assign(n, -1); distancias.assign(n, GRANDE); distancias[i] = 0; std::queue<int> cola; cola.push(i); while(!cola.empty()){ int nodo = cola.front(); cola.pop(); if(grafo[nodo].empty()){ continue; } for(auto conectado: grafo[nodo]){ if(distancias[conectado] == GRANDE){ distancias[conectado] = distancias[nodo] + 1; padre[conectado] = nodo; cola.push(conectado); } else if(padre[nodo] != conectado && padre[conectado] != nodo){ nodos_ciclo = MIN(nodos_ciclo, distancias[nodo] + distancias[conectado] + 1); } } } } std::cout << ((nodos_ciclo == GRANDE) ? -1 : nodos_ciclo) << std::endl; } return 0; }
[ "angheloalf95@gmail.com" ]
angheloalf95@gmail.com
d2cf2a6f487c3059bd4a4e96fbd0b034b14e5164
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/mutt/gumtree/mutt_new_hunk_227.cpp
c1937626c54c8f62f2c474b19fda29fbe6b7af2b
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
335
cpp
*/ newOffset[i - first].body = ftello (fp) - ctx->hdrs[i]->content->length + offset; mutt_free_body (&ctx->hdrs[i]->content->parts); switch(ctx->magic) { case MUTT_MMDF: if(fputs(MMDF_SEP, fp) == EOF) { mutt_perror (tempfile); mutt_sleep (5); unlink (tempfile); goto bail;
[ "993273596@qq.com" ]
993273596@qq.com
02b0b194ab6a3c4a39345c28fffc6fbaba246d73
490ee4233db2f8833633722041667b8d496d1aea
/CodeBinder.Java/JNI/Resources/JNIShared.cpp
64df18c2842e5847a2029c0703f74874dc4fc52f
[ "MIT" ]
permissive
ceztko/CodeBinder
eb474fcac6d94954fd39cf2e68b87a217d41c0ff
8a86f9740cd199545005023221e026ab2b9af9af
refs/heads/master
2023-08-03T11:36:53.987661
2023-08-02T16:10:13
2023-08-02T16:10:13
154,561,427
1
0
MIT
2023-08-11T08:24:13
2018-10-24T19:58:43
C#
UTF-8
C++
false
false
1,059
cpp
#include <jni.h> #include <cassert> #include "JNIShared.h" #define JNI_VERSION JNI_VERSION_1_6 static JavaVM* s_jvm; static jfieldID handleFieldID; static JNIEnv* getEnv(JavaVM* jvm); jlong GetHandle(JNIEnv* env, jHandleRef handleref) { return env->GetLongField(handleref, handleFieldID); } JNIEnv* GetEnv() { return getEnv(s_jvm); } JNIEnv* getEnv(JavaVM* jvm) { // GetEnv can be used only if current thread was created // with Java, otherwise AttachCurrentProcess should be used // instead JNIEnv* env; jint rs = jvm->GetEnv((void**)&env, JNI_VERSION); assert(rs == JNI_OK); return env; } JavaVM* GetJvm() { return s_jvm; } extern "C" { JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* jvm, void* reserved) { s_jvm = jvm; auto env = getEnv(jvm); jclass cls = env->FindClass("CodeBinder/HandleRef"); handleFieldID = env->GetFieldID(cls, "handle", "J"); env->DeleteLocalRef(cls); return JNI_VERSION; } }
[ "ceztko@gmail.com" ]
ceztko@gmail.com
52685558a7a3de80b8fd566f9df2f090002ce1b3
22212b6400346c5ec3f5927703ad912566d3474f
/src/Plugins/NodeDebugRenderPlugin/NodeDebugRenderService.h
3337ccda22a241bdcf460fad957d9758e1a6a3e2
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
irov/Mengine
673a9f35ab10ac93d42301bc34514a852c0f150d
8118e4a4a066ffba82bda1f668c1e7a528b6b717
refs/heads/master
2023-09-04T03:19:23.686213
2023-09-03T16:05:24
2023-09-03T16:05:24
41,422,567
46
17
MIT
2022-09-26T18:41:33
2015-08-26T11:44:35
C++
UTF-8
C++
false
false
1,637
h
#pragma once #include "NodeDebugRenderServiceInterface.h" #include "Engine/TextField.h" #include "Kernel/ServiceBase.h" #include "Kernel/Hashtable.h" namespace Mengine { ////////////////////////////////////////////////////////////////////////// class NodeDebugRenderService : public ServiceBase<NodeDebugRenderServiceInterface> { public: NodeDebugRenderService(); ~NodeDebugRenderService() override; public: bool _availableService() const override; void _dependencyService() override; bool _initializeService() override; void _finalizeService() override; void _stopService() override; public: void renderDebugNode( const NodePtr & _node, const RenderPipelineInterfacePtr & _renderPipeline, const RenderContext * _context, bool _external, bool _hide ) override; public: void addNodeDebugRender( const ConstString & _type, const NodeDebugRenderInterfacePtr & _nodeDebugRender ) override; void removeNodeDebugRender( const ConstString & _type ) override; public: void updateDebugInfo( const UpdateContext * _context ) override; void renderDebugInfo( const RenderPipelineInterfacePtr & _renderPipeline, const RenderContext * _context ) override; protected: void toggleDebugText_(); protected: typedef Hashtable<ConstString, NodeDebugRenderInterfacePtr> HashtableNodeDebugRenders; HashtableNodeDebugRenders m_nodeDebugRenders; uint32_t m_fps; uint32_t m_showDebugText; UniqueId m_globalKeyHandlerF9; UniqueId m_timerFPS; }; }
[ "irov13@mail.ru" ]
irov13@mail.ru
0ea655a7726dff526968eb3688479a36373c1a97
4b0ecf86208c5f45b3b7dfdac6706c1e39b5cac3
/examples/Player.h
7002ac82345e693300ebbca537d793f4b03cd501
[ "MIT" ]
permissive
mamaral/StateMachine_pattern
1a854b98e7526b9e59c6ae50cf5a4e64e5ede4f8
2b305828303adbeedd9604b5fc33ed86cd1040df
refs/heads/master
2021-01-23T20:31:41.891991
2016-01-04T22:23:40
2016-01-04T22:23:40
49,069,554
3
0
null
2016-01-05T14:04:39
2016-01-05T14:04:39
null
UTF-8
C++
false
false
1,668
h
/* * The MIT License (MIT) * * Copyright (c) 2016 Alan Amaral * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef PLAYER_H #define PLAYER_H #include "PSM.h" #include "StateMachineOwner.h" #define NButtons 7 class Player : public StateMachineOwner<PlayerStateMachine, PlayerState> { public: Player(); virtual ~Player(); int Test(void); protected: private: string m_stateNames[NPlayerStates]; int m_tested[NPlayerStates][NPlayerStates]; }; #endif // To enable vim modelines: // put "set modeline" and "set modelines=5" in ~/.vimrc // vim:ts=4 sw=4 tw=80 expandtab smartindent
[ "alan.amaral@citrix.com" ]
alan.amaral@citrix.com
43fbcdf5c253bd393e13977de6542a1d6ef669e1
8a5c59b7650e5eb6032728bc7e956031741a6add
/progressoverlay.cpp
b5a4363b4d031f69d30e60c9fa6068112b5c664b
[]
no_license
amezin/citnetvis2
d5a6d1cb6334c74a6fc021234aeebca16718734f
cd5ef48bdb88767623ea965783801e6c7e51cd82
refs/heads/master
2020-04-13T03:07:53.765823
2013-06-05T06:06:47
2013-06-05T06:06:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,807
cpp
#include "progressoverlay.h" #include <QResizeEvent> #include <QPoint> #include <QDebug> ProgressOverlay::ProgressOverlay(QWidget *parent) : QWidget(parent), prevAnimationDirection(QAbstractAnimation::Backward) { setAttribute(Qt::WA_TransparentForMouseEvents); bar = new QProgressBar(this); bar->setTextVisible(true); hide(); effect = new QGraphicsOpacityEffect(this); setGraphicsEffect(effect); effect->setOpacity(0.0); animation = new QPropertyAnimation(effect, "opacity", effect); animation->setDuration(1000); animation->setStartValue(0.0); animation->setEndValue(1.0); connect(animation, SIGNAL(valueChanged(QVariant)), SLOT(animating(QVariant))); } void ProgressOverlay::setProgress(int value, int total) { animate(QAbstractAnimation::Forward); bar->setValue(value); bar->setMaximum(total); } void ProgressOverlay::done() { animate(QAbstractAnimation::Backward); } void ProgressOverlay::animating(const QVariant &value) { if (value.toDouble() > 0.0) { show(); } else { hide(); } } void ProgressOverlay::animationDone() { animating(QVariant(effect->opacity())); } void ProgressOverlay::animate(QAbstractAnimation::Direction direction) { if (prevAnimationDirection == direction) { return; } animation->setDirection(direction); animation->start(); prevAnimationDirection = direction; } void ProgressOverlay::resizeEvent(QResizeEvent *e) { QSize barSize(e->size() * 0.5); barSize.setHeight(bar->sizeHint().height()); QPoint topLeft((e->size().width() - barSize.width()) / 2, (e->size().height() - barSize.height()) / 2); QRect barRect(topLeft, barSize); bar->setGeometry(barRect); QWidget::resizeEvent(e); }
[ "mezin.alexander@gmail.com" ]
mezin.alexander@gmail.com
c8b7d1eed9bac9b73ad79d852850db140be73f9a
ffbf41045cff0254df974b47875ebe5b4c6133d0
/include/Wallet/Models/DTOs/WalletOutputDTO.h
12e48a5b098b2a14780bce6a7e2252ff0e43f116
[ "MIT" ]
permissive
yangfenglin/GrinPlusPlus
ba550f21b0f2753c6d0f5a603096562892c96778
886d1ed91e3de6a1754a9b23ffa086b4d6557955
refs/heads/master
2020-09-06T11:04:13.676120
2019-11-07T10:19:04
2019-11-07T10:19:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
943
h
#pragma once #include <Wallet/OutputData.h> #include <Core/Util/JsonUtil.h> class WalletOutputDTO { public: WalletOutputDTO(const OutputData& outputData) : m_outputData(outputData) { } Json::Value ToJSON() const { Json::Value outputJSON; outputJSON["keychain_path"] = m_outputData.GetKeyChainPath().ToString(); outputJSON["commitment"] = m_outputData.GetOutput().GetCommitment().ToHex(); outputJSON["amount"] = m_outputData.GetAmount(); outputJSON["status"] = OutputStatus::ToString(m_outputData.GetStatus()); JsonUtil::AddOptionalField(outputJSON, "mmr_index", m_outputData.GetMMRIndex()); JsonUtil::AddOptionalField(outputJSON, "block_height", m_outputData.GetBlockHeight()); JsonUtil::AddOptionalField(outputJSON, "transaction_id", m_outputData.GetWalletTxId()); JsonUtil::AddOptionalField(outputJSON, "message", m_outputData.GetSlateMessage()); return outputJSON; } private: OutputData m_outputData; };
[ "davidburkett38@gmail.com" ]
davidburkett38@gmail.com
96cfdb519536d956b5a095dc998268ed97ffdf60
4c25432a6d82aaebd82fd48e927317b15a6bf6ab
/data/dataset_2017/dataset_2017_8/pipishrimp0505/8294486_5630967708385280_pipishrimp0505.cpp
350997f716d7389b78fee25aed08126fb9e60104
[]
no_license
wzj1988tv/code-imitator
dca9fb7c2e7559007e5dbadbbc0d0f2deeb52933
07a461d43e5c440931b6519c8a3f62e771da2fc2
refs/heads/master
2020-12-09T05:33:21.473300
2020-01-09T15:29:24
2020-01-09T15:29:24
231,937,335
1
0
null
2020-01-05T15:28:38
2020-01-05T15:28:37
null
UTF-8
C++
false
false
602
cpp
#include <iostream> #include <cstdio> using namespace std; #define INF 0x7f7f7f7f7f7f7f7f int main() { freopen("A-small-attempt1.in", "r", stdin); freopen("A-small-attempt1.out", "w", stdout); int T, cnt = 0; scanf("%d", &T); while(T--) { double D; int N; scanf("%lf%d", &D, &N); double k, s, ans = 0.0; for(int i = 1; i <= N; i++) { scanf("%lf%lf", &k, &s); double tmp = 1.0 * (D - k) / s; if(tmp > ans) ans = tmp; } printf("Case #%d: %.8lf\n", ++cnt, D / ans); } }
[ "e.quiring@tu-bs.de" ]
e.quiring@tu-bs.de
9b8762c7e85799fdc573ba716cf86a85fb3b2253
cf8ddfc720bf6451c4ef4fa01684327431db1919
/SDK/ARKSurvivalEvolved_CrystalWyvern_Character_BP_Blood_functions.cpp
8db800292c310dbec01c4e3cb1f230ad36cad362
[ "MIT" ]
permissive
git-Charlie/ARK-SDK
75337684b11e7b9f668da1f15e8054052a3b600f
c38ca9925309516b2093ad8c3a70ed9489e1d573
refs/heads/master
2023-06-20T06:30:33.550123
2021-07-11T13:41:45
2021-07-11T13:41:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,694
cpp
// ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_CrystalWyvern_Character_BP_Blood_parameters.hpp" namespace sdk { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function CrystalWyvern_Character_BP_Blood.CrystalWyvern_Character_BP_Blood_C.UserConstructionScript // () void ACrystalWyvern_Character_BP_Blood_C::UserConstructionScript() { static auto fn = UObject::FindObject<UFunction>("Function CrystalWyvern_Character_BP_Blood.CrystalWyvern_Character_BP_Blood_C.UserConstructionScript"); ACrystalWyvern_Character_BP_Blood_C_UserConstructionScript_Params params; auto flags = fn->FunctionFlags; UObject::ProcessEvent(fn, &params); fn->FunctionFlags = flags; } // Function CrystalWyvern_Character_BP_Blood.CrystalWyvern_Character_BP_Blood_C.ExecuteUbergraph_CrystalWyvern_Character_BP_Blood // () // Parameters: // int EntryPoint (Parm, ZeroConstructor, IsPlainOldData) void ACrystalWyvern_Character_BP_Blood_C::ExecuteUbergraph_CrystalWyvern_Character_BP_Blood(int EntryPoint) { static auto fn = UObject::FindObject<UFunction>("Function CrystalWyvern_Character_BP_Blood.CrystalWyvern_Character_BP_Blood_C.ExecuteUbergraph_CrystalWyvern_Character_BP_Blood"); ACrystalWyvern_Character_BP_Blood_C_ExecuteUbergraph_CrystalWyvern_Character_BP_Blood_Params params; params.EntryPoint = EntryPoint; auto flags = fn->FunctionFlags; UObject::ProcessEvent(fn, &params); fn->FunctionFlags = flags; } } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "sergey.2bite@gmail.com" ]
sergey.2bite@gmail.com
af5941747c9c0b2dade95061a529bb18850a88f3
02517f985a960337f60b72f96f31d414c1d4ef05
/c/mac/Network.h
249671f825cd4b33226355c9c880979f00526b34
[ "MIT" ]
permissive
ModusCreateOrg/systat
d3d2f92648ac2a7b7e607b4c1ceaa26b8c21e1a4
1f9afb80f845903ddde42f6d9c90b489447c353e
refs/heads/master
2021-11-24T22:08:07.283000
2021-11-15T22:37:03
2021-11-15T22:37:03
125,770,105
4
1
null
null
null
null
UTF-8
C++
false
false
1,649
h
/* * systat for MacOS * * Programmed by Mike Schwartz <mike@moduscreate.com> * * Command line tool that refreshes the terminal/console window each second, * showing uptime, load average, CPU usage/stats, Memory/Swap usage, Disk * Activity (per drive/device), Virtual Memory activity (paging/swapping), and * Network traffic (per interface). * * Run this on a busy system and you can diagnose if: * 1) System is CPU bound * 2) System is RAM bound * 3) System is Disk bound * 4) System is Paging/Swapping heavily * 5) System is Network bound * * To exit, hit ^C. * * This file is based upon httpL//github.com/sklinkert/mac-iostat * which is based upon Apple's iostat.c * which is based upon BSD's iostat.c * * See copyright info in iostat.txt and original iostat.c included in this repo. */ #ifndef C_NETWORK_H #define C_NETWORK_H #include <map> #include <string> struct Interface { std::string name; // interface name (e.g. en0) int flags; u_char type; uint8_t mac[6]; // mac address uint64_t speed; uint64_t packetsIn; uint64_t packetsOut; uint64_t bytesIn; uint64_t bytesOut; public: void diff(Interface *newer, Interface *older); }; class Network { private: std::map<std::string, Interface *> last, current, delta; public: Network(); protected: void read(std::map<std::string, Interface *> &m); void copy(std::map<std::string, Interface *> &src, std::map<std::string, Interface *> &dst); public: void update(); // print network stats, unless test is set, return # lines (would be) printed uint16_t print(bool test); }; extern Network network; #endif // C_NETWORK_H
[ "mykesx@gmail.com" ]
mykesx@gmail.com
170a832d925197cd9a393fb3325844aaac9ae8c1
a39bdc880eb0d3d498d67946bfacd1a2ac895001
/tstring.cpp
e8b19cf61025c7dd097694e12980ca3d0f72ef64
[]
no_license
takamoto/win
421b17f32b17d666efef97e58c1182427cc9bb9b
069abbb32bd5c9cd8b5e24ebe1cfeacab62ac695
refs/heads/master
2021-01-02T08:56:10.251101
2014-10-15T03:11:35
2014-10-15T03:11:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
826
cpp
#include "tstring.h" #include <memory> namespace win{ std::string to_string(const TCHAR* source, UINT codepage) { #ifdef UNICODE int len = WideCharToMultiByte(codepage, WC_SEPCHARS, source, -1, NULL, 0, NULL, NULL); auto output = std::unique_ptr<char[]>(new char[len]); WideCharToMultiByte(codepage, WC_SEPCHARS, source, -1, output.get(), len, NULL, NULL); std::string str = output.get(); return str; #else return source; #endif } tstring to_tstring(const char * source, UINT codepage) { #ifdef UNICODE int len = MultiByteToWideChar(codepage, MB_PRECOMPOSED, source, -1, NULL, 0); auto output = std::unique_ptr<wchar_t[]>(new wchar_t[len]); MultiByteToWideChar(codepage, MB_PRECOMPOSED, source, -1, output.get(), len); tstring str = output.get(); return str; #else return source; #endif } }
[ "tkfmnkn@gmail.com" ]
tkfmnkn@gmail.com
b6ccb7bbf62d6e799420163efa1d0346372a41ac
c18143d0a7c634aa08022d3dad9a7e194315be57
/src/mnemonics/italian.h
8c233d1f325af2ac3445e9cc5345626b26134e01
[ "BSD-3-Clause" ]
permissive
Veronite/veronite
06fff5934f05dc925bccc72605006720b54744ca
e3a358f86f292e959725fd74fed37d3f8d041417
refs/heads/master
2020-04-02T10:54:54.087063
2018-10-23T16:34:27
2018-10-23T16:34:27
144,760,868
4
2
NOASSERTION
2018-10-23T13:54:53
2018-08-14T18:59:24
C++
UTF-8
C++
false
false
32,765
h
// Word list created by Monero contributor Shrikez // // Copyright (c) 2014-2017, The Monero Project // // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other // materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its contributors may be // used to endorse or promote products derived from this software without specific // prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /*! * \file italian.h * * \brief Italian word list and map. */ #ifndef ITALIAN_H #define ITALIAN_H #include <vector> #include <unordered_map> #include "language_base.h" #include <string> /*! * \namespace Language * \brief Mnemonic language related namespace. */ namespace Language { class Italian: public Base { public: Italian(): Base("Italiano", std::vector<std::string>({ "abbinare", "abbonato", "abisso", "abitare", "abominio", "accadere", "accesso", "acciaio", "accordo", "accumulo", "acido", "acqua", "acrobata", "acustico", "adattare", "addetto", "addio", "addome", "adeguato", "aderire", "adorare", "adottare", "adozione", "adulto", "aereo", "aerobica", "affare", "affetto", "affidare", "affogato", "affronto", "africano", "afrodite", "agenzia", "aggancio", "aggeggio", "aggiunta", "agio", "agire", "agitare", "aglio", "agnello", "agosto", "aiutare", "albero", "albo", "alce", "alchimia", "alcool", "alfabeto", "algebra", "alimento", "allarme", "alleanza", "allievo", "alloggio", "alluce", "alpi", "alterare", "altro", "aluminio", "amante", "amarezza", "ambiente", "ambrosia", "america", "amico", "ammalare", "ammirare", "amnesia", "amnistia", "amore", "ampliare", "amputare", "analisi", "anamnesi", "ananas", "anarchia", "anatra", "anca", "ancorato", "andare", "androide", "aneddoto", "anello", "angelo", "angolino", "anguilla", "anidride", "anima", "annegare", "anno", "annuncio", "anomalia", "antenna", "anticipo", "aperto", "apostolo", "appalto", "appello", "appiglio", "applauso", "appoggio", "appurare", "aprile", "aquila", "arabo", "arachidi", "aragosta", "arancia", "arbitrio", "archivio", "arco", "argento", "argilla", "aria", "ariete", "arma", "armonia", "aroma", "arrivare", "arrosto", "arsenale", "arte", "artiglio", "asfalto", "asfissia", "asino", "asparagi", "aspirina", "assalire", "assegno", "assolto", "assurdo", "asta", "astratto", "atlante", "atletica", "atomo", "atropina", "attacco", "attesa", "attico", "atto", "attrarre", "auguri", "aula", "aumento", "aurora", "auspicio", "autista", "auto", "autunno", "avanzare", "avarizia", "avere", "aviatore", "avido", "avorio", "avvenire", "avviso", "avvocato", "azienda", "azione", "azzardo", "azzurro", "babbuino", "bacio", "badante", "baffi", "bagaglio", "bagliore", "bagno", "balcone", "balena", "ballare", "balordo", "balsamo", "bambola", "bancomat", "banda", "barato", "barba", "barista", "barriera", "basette", "basilico", "bassista", "bastare", "battello", "bavaglio", "beccare", "beduino", "bellezza", "bene", "benzina", "berretto", "bestia", "bevitore", "bianco", "bibbia", "biberon", "bibita", "bici", "bidone", "bilancia", "biliardo", "binario", "binocolo", "biologia", "biondina", "biopsia", "biossido", "birbante", "birra", "biscotto", "bisogno", "bistecca", "bivio", "blindare", "bloccare", "bocca", "bollire", "bombola", "bonifico", "borghese", "borsa", "bottino", "botulino", "braccio", "bradipo", "branco", "bravo", "bresaola", "bretelle", "brevetto", "briciola", "brigante", "brillare", "brindare", "brivido", "broccoli", "brontolo", "bruciare", "brufolo", "bucare", "buddista", "budino", "bufera", "buffo", "bugiardo", "buio", "buono", "burrone", "bussola", "bustina", "buttare", "cabernet", "cabina", "cacao", "cacciare", "cactus", "cadavere", "caffe", "calamari", "calcio", "caldaia", "calmare", "calunnia", "calvario", "calzone", "cambiare", "camera", "camion", "cammello", "campana", "canarino", "cancello", "candore", "cane", "canguro", "cannone", "canoa", "cantare", "canzone", "caos", "capanna", "capello", "capire", "capo", "capperi", "capra", "capsula", "caraffa", "carbone", "carciofo", "cardigan", "carenza", "caricare", "carota", "carrello", "carta", "casa", "cascare", "caserma", "cashmere", "casino", "cassetta", "castello", "catalogo", "catena", "catorcio", "cattivo", "causa", "cauzione", "cavallo", "caverna", "caviglia", "cavo", "cazzotto", "celibato", "cemento", "cenare", "centrale", "ceramica", "cercare", "ceretta", "cerniera", "certezza", "cervello", "cessione", "cestino", "cetriolo", "chiave", "chiedere", "chilo", "chimera", "chiodo", "chirurgo", "chitarra", "chiudere", "ciabatta", "ciao", "cibo", "ciccia", "cicerone", "ciclone", "cicogna", "cielo", "cifra", "cigno", "ciliegia", "cimitero", "cinema", "cinque", "cintura", "ciondolo", "ciotola", "cipolla", "cippato", "circuito", "cisterna", "citofono", "ciuccio", "civetta", "civico", "clausola", "cliente", "clima", "clinica", "cobra", "coccole", "cocktail", "cocomero", "codice", "coesione", "cogliere", "cognome", "colla", "colomba", "colpire", "coltello", "comando", "comitato", "commedia", "comodino", "compagna", "comune", "concerto", "condotto", "conforto", "congiura", "coniglio", "consegna", "conto", "convegno", "coperta", "copia", "coprire", "corazza", "corda", "corleone", "cornice", "corona", "corpo", "corrente", "corsa", "cortesia", "corvo", "coso", "costume", "cotone", "cottura", "cozza", "crampo", "cratere", "cravatta", "creare", "credere", "crema", "crescere", "crimine", "criterio", "croce", "crollare", "cronaca", "crostata", "croupier", "cubetto", "cucciolo", "cucina", "cultura", "cuoco", "cuore", "cupido", "cupola", "cura", "curva", "cuscino", "custode", "danzare", "data", "decennio", "decidere", "decollo", "dedicare", "dedurre", "definire", "delegare", "delfino", "delitto", "demone", "dentista", "denuncia", "deposito", "derivare", "deserto", "designer", "destino", "detonare", "dettagli", "diagnosi", "dialogo", "diamante", "diario", "diavolo", "dicembre", "difesa", "digerire", "digitare", "diluvio", "dinamica", "dipinto", "diploma", "diramare", "dire", "dirigere", "dirupo", "discesa", "disdetta", "disegno", "disporre", "dissenso", "distacco", "dito", "ditta", "diva", "divenire", "dividere", "divorare", "docente", "dolcetto", "dolore", "domatore", "domenica", "dominare", "donatore", "donna", "dorato", "dormire", "dorso", "dosaggio", "dottore", "dovere", "download", "dragone", "dramma", "dubbio", "dubitare", "duetto", "durata", "ebbrezza", "eccesso", "eccitare", "eclissi", "economia", "edera", "edificio", "editore", "edizione", "educare", "effetto", "egitto", "egiziano", "elastico", "elefante", "eleggere", "elemento", "elenco", "elezione", "elmetto", "elogio", "embrione", "emergere", "emettere", "eminenza", "emisfero", "emozione", "empatia", "energia", "enfasi", "enigma", "entrare", "enzima", "epidemia", "epilogo", "episodio", "epoca", "equivoco", "erba", "erede", "eroe", "erotico", "errore", "eruzione", "esaltare", "esame", "esaudire", "eseguire", "esempio", "esigere", "esistere", "esito", "esperto", "espresso", "essere", "estasi", "esterno", "estrarre", "eterno", "etica", "euforico", "europa", "evacuare", "evasione", "evento", "evidenza", "evitare", "evolvere", "fabbrica", "facciata", "fagiano", "fagotto", "falco", "fame", "famiglia", "fanale", "fango", "fantasia", "farfalla", "farmacia", "faro", "fase", "fastidio", "faticare", "fatto", "favola", "febbre", "femmina", "femore", "fenomeno", "fermata", "feromoni", "ferrari", "fessura", "festa", "fiaba", "fiamma", "fianco", "fiat", "fibbia", "fidare", "fieno", "figa", "figlio", "figura", "filetto", "filmato", "filosofo", "filtrare", "finanza", "finestra", "fingere", "finire", "finta", "finzione", "fiocco", "fioraio", "firewall", "firmare", "fisico", "fissare", "fittizio", "fiume", "flacone", "flagello", "flirtare", "flusso", "focaccia", "foglio", "fognario", "follia", "fonderia", "fontana", "forbici", "forcella", "foresta", "forgiare", "formare", "fornace", "foro", "fortuna", "forzare", "fosforo", "fotoni", "fracasso", "fragola", "frantumi", "fratello", "frazione", "freccia", "freddo", "frenare", "fresco", "friggere", "frittata", "frivolo", "frizione", "fronte", "frullato", "frumento", "frusta", "frutto", "fucile", "fuggire", "fulmine", "fumare", "funzione", "fuoco", "furbizia", "furgone", "furia", "furore", "fusibile", "fuso", "futuro", "gabbiano", "galassia", "gallina", "gamba", "gancio", "garanzia", "garofano", "gasolio", "gatto", "gazebo", "gazzetta", "gelato", "gemelli", "generare", "genitori", "gennaio", "geologia", "germania", "gestire", "gettare", "ghepardo", "ghiaccio", "giaccone", "giaguaro", "giallo", "giappone", "giardino", "gigante", "gioco", "gioiello", "giorno", "giovane", "giraffa", "giudizio", "giurare", "giusto", "globo", "gloria", "glucosio", "gnocca", "gocciola", "godere", "gomito", "gomma", "gonfiare", "gorilla", "governo", "gradire", "graffiti", "granchio", "grappolo", "grasso", "grattare", "gridare", "grissino", "grondaia", "grugnito", "gruppo", "guadagno", "guaio", "guancia", "guardare", "gufo", "guidare", "guscio", "gusto", "icona", "idea", "identico", "idolo", "idoneo", "idrante", "idrogeno", "igiene", "ignoto", "imbarco", "immagine", "immobile", "imparare", "impedire", "impianto", "importo", "impresa", "impulso", "incanto", "incendio", "incidere", "incontro", "incrocia", "incubo", "indagare", "indice", "indotto", "infanzia", "inferno", "infinito", "infranto", "ingerire", "inglese", "ingoiare", "ingresso", "iniziare", "innesco", "insalata", "inserire", "insicuro", "insonnia", "insulto", "interno", "introiti", "invasori", "inverno", "invito", "invocare", "ipnosi", "ipocrita", "ipotesi", "ironia", "irrigare", "iscritto", "isola", "ispirare", "isterico", "istinto", "istruire", "italiano", "jazz", "labbra", "labrador", "ladro", "lago", "lamento", "lampone", "lancetta", "lanterna", "lapide", "larva", "lasagne", "lasciare", "lastra", "latte", "laurea", "lavagna", "lavorare", "leccare", "legare", "leggere", "lenzuolo", "leone", "lepre", "letargo", "lettera", "levare", "levitare", "lezione", "liberare", "libidine", "libro", "licenza", "lievito", "limite", "lince", "lingua", "liquore", "lire", "listino", "litigare", "litro", "locale", "lottare", "lucciola", "lucidare", "luglio", "luna", "macchina", "madama", "madre", "maestro", "maggio", "magico", "maglione", "magnolia", "mago", "maialino", "maionese", "malattia", "male", "malloppo", "mancare", "mandorla", "mangiare", "manico", "manopola", "mansarda", "mantello", "manubrio", "manzo", "mappa", "mare", "margine", "marinaio", "marmotta", "marocco", "martello", "marzo", "maschera", "matrice", "maturare", "mazzetta", "meandri", "medaglia", "medico", "medusa", "megafono", "melone", "membrana", "menta", "mercato", "meritare", "merluzzo", "mese", "mestiere", "metafora", "meteo", "metodo", "mettere", "miele", "miglio", "miliardo", "mimetica", "minatore", "minuto", "miracolo", "mirtillo", "missile", "mistero", "misura", "mito", "mobile", "moda", "moderare", "moglie", "molecola", "molle", "momento", "moneta", "mongolia", "monologo", "montagna", "morale", "morbillo", "mordere", "mosaico", "mosca", "mostro", "motivare", "moto", "mulino", "mulo", "muovere", "muraglia", "muscolo", "museo", "musica", "mutande", "nascere", "nastro", "natale", "natura", "nave", "navigare", "negare", "negozio", "nemico", "nero", "nervo", "nessuno", "nettare", "neutroni", "neve", "nevicare", "nicotina", "nido", "nipote", "nocciola", "noleggio", "nome", "nonno", "norvegia", "notare", "notizia", "nove", "nucleo", "nuda", "nuotare", "nutrire", "obbligo", "occhio", "occupare", "oceano", "odissea", "odore", "offerta", "officina", "offrire", "oggetto", "oggi", "olfatto", "olio", "oliva", "ombelico", "ombrello", "omuncolo", "ondata", "onore", "opera", "opinione", "opuscolo", "opzione", "orario", "orbita", "orchidea", "ordine", "orecchio", "orgasmo", "orgoglio", "origine", "orologio", "oroscopo", "orso", "oscurare", "ospedale", "ospite", "ossigeno", "ostacolo", "ostriche", "ottenere", "ottimo", "ottobre", "ovest", "pacco", "pace", "pacifico", "padella", "pagare", "pagina", "pagnotta", "palazzo", "palestra", "palpebre", "pancetta", "panfilo", "panino", "pannello", "panorama", "papa", "paperino", "paradiso", "parcella", "parente", "parlare", "parodia", "parrucca", "partire", "passare", "pasta", "patata", "patente", "patogeno", "patriota", "pausa", "pazienza", "peccare", "pecora", "pedalare", "pelare", "pena", "pendenza", "penisola", "pennello", "pensare", "pentirsi", "percorso", "perdono", "perfetto", "perizoma", "perla", "permesso", "persona", "pesare", "pesce", "peso", "petardo", "petrolio", "pezzo", "piacere", "pianeta", "piastra", "piatto", "piazza", "piccolo", "piede", "piegare", "pietra", "pigiama", "pigliare", "pigrizia", "pilastro", "pilota", "pinguino", "pioggia", "piombo", "pionieri", "piovra", "pipa", "pirata", "pirolisi", "piscina", "pisolino", "pista", "pitone", "piumino", "pizza", "plastica", "platino", "poesia", "poiana", "polaroid", "polenta", "polimero", "pollo", "polmone", "polpetta", "poltrona", "pomodoro", "pompa", "popolo", "porco", "porta", "porzione", "possesso", "postino", "potassio", "potere", "poverino", "pranzo", "prato", "prefisso", "prelievo", "premio", "prendere", "prestare", "pretesa", "prezzo", "primario", "privacy", "problema", "processo", "prodotto", "profeta", "progetto", "promessa", "pronto", "proposta", "proroga", "prossimo", "proteina", "prova", "prudenza", "pubblico", "pudore", "pugilato", "pulire", "pulsante", "puntare", "pupazzo", "puzzle", "quaderno", "qualcuno", "quarzo", "quercia", "quintale", "rabbia", "racconto", "radice", "raffica", "ragazza", "ragione", "rammento", "ramo", "rana", "randagio", "rapace", "rapinare", "rapporto", "rasatura", "ravioli", "reagire", "realista", "reattore", "reazione", "recitare", "recluso", "record", "recupero", "redigere", "regalare", "regina", "regola", "relatore", "reliquia", "remare", "rendere", "reparto", "resina", "resto", "rete", "retorica", "rettile", "revocare", "riaprire", "ribadire", "ribelle", "ricambio", "ricetta", "richiamo", "ricordo", "ridurre", "riempire", "riferire", "riflesso", "righello", "rilancio", "rilevare", "rilievo", "rimanere", "rimborso", "rinforzo", "rinuncia", "riparo", "ripetere", "riposare", "ripulire", "risalita", "riscatto", "riserva", "riso", "rispetto", "ritaglio", "ritmo", "ritorno", "ritratto", "rituale", "riunione", "riuscire", "riva", "robotica", "rondine", "rosa", "rospo", "rosso", "rotonda", "rotta", "roulotte", "rubare", "rubrica", "ruffiano", "rumore", "ruota", "ruscello", "sabbia", "sacco", "saggio", "sale", "salire", "salmone", "salto", "salutare", "salvia", "sangue", "sanzioni", "sapere", "sapienza", "sarcasmo", "sardine", "sartoria", "sbalzo", "sbarcare", "sberla", "sborsare", "scadenza", "scafo", "scala", "scambio", "scappare", "scarpa", "scatola", "scelta", "scena", "sceriffo", "scheggia", "schiuma", "sciarpa", "scienza", "scimmia", "sciopero", "scivolo", "sclerare", "scolpire", "sconto", "scopa", "scordare", "scossa", "scrivere", "scrupolo", "scuderia", "scultore", "scuola", "scusare", "sdraiare", "secolo", "sedativo", "sedere", "sedia", "segare", "segreto", "seguire", "semaforo", "seme", "senape", "seno", "sentiero", "separare", "sepolcro", "sequenza", "serata", "serpente", "servizio", "sesso", "seta", "settore", "sfamare", "sfera", "sfidare", "sfiorare", "sfogare", "sgabello", "sicuro", "siepe", "sigaro", "silenzio", "silicone", "simbiosi", "simpatia", "simulare", "sinapsi", "sindrome", "sinergia", "sinonimo", "sintonia", "sirena", "siringa", "sistema", "sito", "smalto", "smentire", "smontare", "soccorso", "socio", "soffitto", "software", "soggetto", "sogliola", "sognare", "soldi", "sole", "sollievo", "solo", "sommario", "sondare", "sonno", "sorpresa", "sorriso", "sospiro", "sostegno", "sovrano", "spaccare", "spada", "spagnolo", "spalla", "sparire", "spavento", "spazio", "specchio", "spedire", "spegnere", "spendere", "speranza", "spessore", "spezzare", "spiaggia", "spiccare", "spiegare", "spiffero", "spingere", "sponda", "sporcare", "spostare", "spremuta", "spugna", "spumante", "spuntare", "squadra", "squillo", "staccare", "stadio", "stagione", "stallone", "stampa", "stancare", "starnuto", "statura", "stella", "stendere", "sterzo", "stilista", "stimolo", "stinco", "stiva", "stoffa", "storia", "strada", "stregone", "striscia", "studiare", "stufa", "stupendo", "subire", "successo", "sudare", "suono", "superare", "supporto", "surfista", "sussurro", "svelto", "svenire", "sviluppo", "svolta", "svuotare", "tabacco", "tabella", "tabu", "tacchino", "tacere", "taglio", "talento", "tangente", "tappeto", "tartufo", "tassello", "tastiera", "tavolo", "tazza", "teatro", "tedesco", "telaio", "telefono", "tema", "temere", "tempo", "tendenza", "tenebre", "tensione", "tentare", "teologia", "teorema", "termica", "terrazzo", "teschio", "tesi", "tesoro", "tessera", "testa", "thriller", "tifoso", "tigre", "timbrare", "timido", "tinta", "tirare", "tisana", "titano", "titolo", "toccare", "togliere", "topolino", "torcia", "torrente", "tovaglia", "traffico", "tragitto", "training", "tramonto", "transito", "trapezio", "trasloco", "trattore", "trazione", "treccia", "tregua", "treno", "triciclo", "tridente", "trilogia", "tromba", "troncare", "trota", "trovare", "trucco", "tubo", "tulipano", "tumulto", "tunisia", "tuono", "turista", "tuta", "tutelare", "tutore", "ubriaco", "uccello", "udienza", "udito", "uffa", "umanoide", "umore", "unghia", "unguento", "unicorno", "unione", "universo", "uomo", "uragano", "uranio", "urlare", "uscire", "utente", "utilizzo", "vacanza", "vacca", "vaglio", "vagonata", "valle", "valore", "valutare", "valvola", "vampiro", "vaniglia", "vanto", "vapore", "variante", "vasca", "vaselina", "vassoio", "vedere", "vegetale", "veglia", "veicolo", "vela", "veleno", "velivolo", "velluto", "vendere", "venerare", "venire", "vento", "veranda", "verbo", "verdura", "vergine", "verifica", "vernice", "vero", "verruca", "versare", "vertebra", "vescica", "vespaio", "vestito", "vesuvio", "veterano", "vetro", "vetta", "viadotto", "viaggio", "vibrare", "vicenda", "vichingo", "vietare", "vigilare", "vigneto", "villa", "vincere", "violino", "vipera", "virgola", "virtuoso", "visita", "vita", "vitello", "vittima", "vivavoce", "vivere", "viziato", "voglia", "volare", "volpe", "volto", "volume", "vongole", "voragine", "vortice", "votare", "vulcano", "vuotare", "zabaione", "zaffiro", "zainetto", "zampa", "zanzara", "zattera", "zavorra", "zenzero", "zero", "zingaro", "zittire", "zoccolo", "zolfo", "zombie", "zucchero" }), 4) { populate_maps(); } }; } #endif
[ "42724418+prometheusdev@users.noreply.github.com" ]
42724418+prometheusdev@users.noreply.github.com
5b8f940f33b17c373b6e1a10c43c173e299ce4e7
8db2e077583df74c803032cfb3245db4a96b1c39
/src/context.h
f5b489b364280672afa8b938cdcee311266db885
[ "BSD-2-Clause" ]
permissive
ezhangle/cmftStudio
1692ee38a18f2be088d84624552b9f65c3ea0f50
17e7ca696d1986ee13949dd3748abdab7cde7f11
refs/heads/master
2021-01-16T18:08:33.396794
2015-03-23T05:01:04
2015-03-23T05:01:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
17,064
h
/* * Copyright 2014-2015 Dario Manesku. All rights reserved. * License: http://www.opensource.org/licenses/BSD-2-Clause */ #ifndef CMFTSTUDIO_CONTEXT_H_HEADER_GUARD #define CMFTSTUDIO_CONTEXT_H_HEADER_GUARD #include <stdint.h> // uint32_t #include <string.h> // memset, memcpy #include "common/cmft.h" // cmft::Image #include "common/datastructures.h" #include <bgfx.h> // bgfx::TextureHandle #include <dm/readerwriter.h> // bx::WriterI, bx::ReaderSeekerI namespace cs { CS_HANDLE(TextureHandle); CS_HANDLE(EnvHandle); CS_HANDLE(MaterialHandle); CS_HANDLE(MeshHandle); // Programs. //----- struct Program { enum Enum { #define PROG_DESC(_name, _vs, _fs) _name, #include "context_res.h" Count, }; }; void setProgram(Program::Enum _prog); bgfx::ProgramHandle getProgram(Program::Enum _prog); // Material. //----- struct Material { enum Texture { Albedo, Normal, Surface, Reflectivity, Occlusion, Emissive, TextureCount }; bool has(Material::Texture _tex) const; void set(Material::Texture _tex, cs::TextureHandle _handle); cs::TextureHandle get(Material::Texture _tex) const; bgfx::TextureHandle getBgfxHandle(Material::Texture _tex) const; enum { Size = 10*4, DataSize = Size*sizeof(float), }; union { float m_data[Size]; struct { /*0 - 45*/ struct /*Albedo*/ { float r,g,b,sample; } m_albedo; /*1 - 46*/ struct /*Reflectivity*/ { float r,g,b,sample; } m_specular; /*2 - 47*/ struct /*Emissive*/ { float r,g,b,sample; } m_emissive; /*3 - 48*/ struct { struct /*Surface*/ { float g, sample; } m_surface; struct /*Normal*/ { float mul,sample; } m_normal; }; /*4 - 49*/ struct { float m_reflectivity, m_metalOrSpec, m_fresnel, m_specAttn; }; /*5 - 50*/ struct { float m_invGloss, m_invMetalness, m_texMultiplier, m_unused00; }; /*6 - 51*/ struct { float m_occlusionSample, m_aoBias, m_emissiveIntensity, m_unused10; }; /*7 - 52*/ struct { float m_swizSurface[4]; }; /*8 - 53*/ struct { float m_swizReflectivity[4]; }; /*9 - 54*/ struct { float m_swizOcclusion[4]; }; }; }; protected: cs::TextureHandle m_tex[TextureCount]; float* m_uniformSample[6]; }; MaterialHandle materialCreate(); MaterialHandle materialCreatePlain(); MaterialHandle materialCreateStripes(); MaterialHandle materialCreateBricks(); MaterialHandle materialCreate(const float* _data , cs::TextureHandle _albedo = cs::TextureHandle::invalid() , cs::TextureHandle _normal = cs::TextureHandle::invalid() , cs::TextureHandle _surface = cs::TextureHandle::invalid() , cs::TextureHandle _reflectivity = cs::TextureHandle::invalid() , cs::TextureHandle _ambientOcclusion = cs::TextureHandle::invalid() , cs::TextureHandle _emmisive = cs::TextureHandle::invalid() ); MaterialHandle materialCreateFrom(MaterialHandle _handle); // Uniforms. //----- struct DirectionalLight { union { struct { float m_color[3]; float m_strenght; }; float m_colorStrenght[4]; }; union { struct { float m_dir[3]; float m_enabled; }; float m_dirEnabled[4]; }; }; struct Uniforms { enum { Size = 46*4 + Material::Size, Num = Size/4, }; union { float m_data[Size]; struct { /*0-3*/ struct { float m_mtx[16]; }; /*4-19*/ struct { float m_offsets[16][4]; }; /*20-21*/ struct { float m_weights[8]; }; /*22*/ struct { float m_skyboxTransition, m_enabled, m_lod, m_lodPrev; }; /*23*/ struct { float m_tonemapGamma, m_tonemapMinLum, m_tonemapLumRange, m_texelHalf; }; /*24*/ struct { float m_camPos[3], m_time; }; /*25*/ struct { float m_rgba[4]; }; /*26*/ struct { float m_doLightAdapt, m_envTransition, m_edgeFixup, m_prevEdgeFixup; }; /*27*/ struct { float m_brightness, m_contrast, m_saturation, m_unused270; }; /*28*/ struct { float m_backgroundType, m_fov, m_blurCoeff, m_toneMapping; }; /*29*/ struct { float m_mipCount, m_prevMipCount, m_mipSize, m_prevMipSize; }; /*30*/ struct { float m_exposure, m_gamma, m_vignette, m_unused300; }; /*31*/ struct { float m_middleGray, m_whiteSqr, m_treshold, m_doBloom; }; /*32*/ struct { float m_diffuseIbl, m_specularIbl, m_ambientLightStrenght, m_lightingModel; }; /*33*/ struct { float m_matCam[3], m_selectedLight; }; /*34-43*/ struct { DirectionalLight m_directionalLights[CS_MAX_LIGHTS]; }; /*46-54*/ struct { float m_material[Material::Size]; }; }; }; }; struct TextureUniform { enum Enum { #define TEXUNI_DESC(_enum, _stage, _name) _enum, #include "context_res.h" Count, }; }; Uniforms& getUniforms(); void submitUniforms(); static inline uint32_t bgfx_submit(uint8_t _id, int32_t _depth = 0) { submitUniforms(); return bgfx::submit(_id, _depth); } // Texture. //----- struct Texture { bgfx::TextureHandle m_bgfxHandle; uint32_t m_size; void* m_data; uint8_t m_numMips; }; cs::TextureHandle textureStripes(); cs::TextureHandle textureBricksN(); cs::TextureHandle textureBricksAo(); cs::TextureHandle textureLoad(const char* _path); cs::TextureHandle textureLoad(const void* _data, uint32_t _size); bgfx::TextureHandle textureLoadPath(const char* _path , uint32_t _flags = BGFX_TEXTURE_NONE , uint8_t _skip = 0 , bgfx::TextureInfo* _info = NULL ); bgfx::TextureHandle textureLoadMem(const void* _data, uint32_t _size , uint32_t _flags = BGFX_TEXTURE_NONE , uint8_t _skip = 0 , bgfx::TextureInfo* _info = NULL ); bgfx::TextureHandle textureGetBgfxHandle(cs::TextureHandle _handle); // Mesh. //----- struct Mesh { float m_normScale; }; MeshHandle meshSphere(); uint32_t meshNumGroups(MeshHandle _mesh); MeshHandle meshLoad(const void* _data, uint32_t _size, const char* _ext); MeshHandle meshLoad(const char* _filePath, void* _userData = NULL, cs::StackAllocatorI* _stack = g_stackAlloc); MeshHandle meshLoad(dm::ReaderSeekerI& _reader, cs::StackAllocatorI* _stack = g_stackAlloc); bool meshSave(MeshHandle _mesh, const char* _filePath); // MeshInstance. //----- struct MeshInstance { MeshInstance(); MeshInstance(const MeshInstance& _other); void set(cs::MeshHandle _mesh); void set(cs::MaterialHandle _material, uint32_t _groupIdx = 0); cs::MaterialHandle getActiveMaterial() const; float* computeMtx(); float m_scale; float m_scaleAdj; float m_rot[3]; float m_pos[3]; float m_mtx[16]; cs::MeshHandle m_mesh; cs::MaterialHandle m_materials[CS_MAX_MESH_GROUPS]; uint16_t m_selectedGroup; }; MeshInstance* acquire(const MeshInstance* _inst); void release(const MeshInstance* _inst); // Environment. //----- struct Environment { enum Enum { Skybox, Pmrem, // Prefiltered Mipmapped Radiance Environment Map (PMREM). Iem, // Irradiance Environment Map (IEM). Count }; cmft::Image m_cubemapImage[Count]; cmft::Image m_origSkyboxImage; cs::TextureHandle m_cubemap[Count]; cs::TextureHandle m_latlong[Count]; cs::TextureHandle m_origSkybox; DirectionalLight m_lights[CS_MAX_LIGHTS]; cmft::EdgeFixup::Enum m_edgeFixup; uint8_t m_lightsNum; bool m_lightUseBackgroundColor[CS_MAX_LIGHTS]; }; EnvHandle envCreateCmftStudioLogo(); EnvHandle envCreate(uint32_t _rgba = 0x303030ff); EnvHandle envCreate(const char* _skyboxPath, const char* _pmremPath, const char* _iemPath); EnvHandle envCreate(dm::ReaderSeekerI& _reader); void envLoad(EnvHandle _handle, Environment::Enum _which, cmft::Image& _image); // Notice: this takes ownership of '_image'. bool envLoad(EnvHandle _handle, Environment::Enum _which, const char* _filePath); void envTransform_UseMacroInstead(EnvHandle _handle, Environment::Enum _which, ...); #define envTransform(_handle, _which, ...) envTransform_UseMacroInstead(_handle, _which, __VA_ARGS__, UINT32_MAX) void envResize(EnvHandle _handle, Environment::Enum _which, uint32_t _faceSize); void envConvert(EnvHandle _handle, Environment::Enum _which, cmft::TextureFormat::Enum _format); void envTonemap(EnvHandle _handle, float _gamma, float _minLum, float _lumRange); void envRestoreSkybox(EnvHandle _handle); cmft::Image& envGetImage(EnvHandle _handle, Environment::Enum _which); // Resource resolver. //----- void resourceMap(uint16_t _id, TextureHandle _handle); void resourceMap(uint16_t _id, MaterialHandle _handle); void resourceMap(uint16_t _id, MeshHandle _handle); void resourceMap(uint16_t _id, EnvHandle _handle); void resourceResolve(TextureHandle* _handle, uint16_t _id); void resourceResolve(MaterialHandle* _handle, uint16_t _id); void resourceResolve(MeshHandle* _handle, uint16_t _id); void resourceResolve(EnvHandle* _handle, uint16_t _id); void resourceResolveAll(); void resourceClearMappings(); // Lists. //----- typedef HandleArray<TextureHandle> TextureList; typedef HandleArray<MaterialHandle> MaterialList; typedef HandleArray<MeshHandle> MeshList; typedef HandleArray<EnvHandle> EnvList; typedef dm::List<MeshInstance> MeshInstanceList; void listRemoveRelease(TextureList& _list, uint16_t _idx); void listRemoveRelease(MaterialList& _list, uint16_t _idx); void listRemoveRelease(MeshList& _list, uint16_t _idx); void listRemoveRelease(EnvList& _list, uint16_t _idx); void listRemoveRelease(MeshInstanceList& _list, uint16_t _idx); void listRemoveReleaseAll(TextureList& _list); void listRemoveReleaseAll(MaterialList& _list); void listRemoveReleaseAll(MeshList& _list); void listRemoveReleaseAll(EnvList& _list); void listRemoveReleaseAll(MeshInstanceList& _list); // Context. //----- void initContext(); void initPrograms(); void initUniforms(); void freeHostMem(TextureHandle _handle); void freeHostMem(MeshHandle _handle); void freeHostMem(EnvHandle _handle); void setTexture(TextureUniform::Enum _which, cs::TextureHandle _handle, uint32_t _flags = UINT32_MAX); void setTexture(TextureUniform::Enum _which, bgfx::TextureHandle _handle, uint32_t _flags = UINT32_MAX); void setTexture(TextureUniform::Enum _which, bgfx::FrameBufferHandle _handle, uint32_t _flags = UINT32_MAX, uint8_t _attachment = 0); void setMaterial(MaterialHandle _handle); void setEnv(EnvHandle _handle); void setEnvTransition(EnvHandle _from); #define CS_DEFAULT_DRAW_STATE 0 \ | BGFX_STATE_RGB_WRITE \ | BGFX_STATE_ALPHA_WRITE \ | BGFX_STATE_DEPTH_WRITE \ | BGFX_STATE_DEPTH_TEST_LESS \ | BGFX_STATE_CULL_CCW \ | BGFX_STATE_MSAA void submit(uint8_t _view , MeshInstance& _instance , Program::Enum _prog , EnvHandle _env = EnvHandle::invalid() , uint64_t _state = CS_DEFAULT_DRAW_STATE ); void submit(uint8_t _view , MeshHandle _mesh , Program::Enum _prog , const float* _mtx , const MaterialHandle* _materials , EnvHandle _env = EnvHandle::invalid() , uint64_t _state = CS_DEFAULT_DRAW_STATE ); void submit(uint8_t _view , MeshHandle _mesh , Program::Enum _prog , const float* _mtx , const MaterialHandle* _materials , EnvHandle _nextEnv , EnvHandle _currEnv , float _progress , uint64_t _state = CS_DEFAULT_DRAW_STATE ); void submit(uint8_t _view , MeshHandle _mesh , Program::Enum _prog , const float* _mtx , uint32_t _groupIdx , MaterialHandle _material , EnvHandle _env = EnvHandle::invalid() , uint64_t _state = CS_DEFAULT_DRAW_STATE ); Texture& getObj(TextureHandle _handle); Material& getObj(MaterialHandle _handle); Mesh& getObj(MeshHandle _handle); Environment& getObj(EnvHandle _handle); void setName(TextureHandle _handle, const char* _name); void setName(MaterialHandle _handle, const char* _name); void setName(MeshHandle _handle, const char* _name); void setName(EnvHandle _handle, const char* _name); char* getName(TextureHandle _handle); char* getName(MaterialHandle _handle); char* getName(MeshHandle _handle); char* getName(EnvHandle _handle); TextureHandle acquire(TextureHandle _handle); MaterialHandle acquire(MaterialHandle _handle); MeshHandle acquire(MeshHandle _handle); EnvHandle acquire(EnvHandle _handle); void release(TextureHandle _handle); void release(MaterialHandle _handle); void release(MeshHandle _handle); void release(EnvHandle _handle); TextureHandle readTexture(dm::ReaderSeekerI* _reader,cs::StackAllocatorI* _stack = g_stackAlloc); MaterialHandle readMaterial(dm::ReaderSeekerI* _reader, cs::StackAllocatorI* _stack = g_stackAlloc); MeshHandle readMesh(dm::ReaderSeekerI* _reader, cs::StackAllocatorI* _stack = g_stackAlloc); EnvHandle readEnv(dm::ReaderSeekerI* _reader, cs::StackAllocatorI* _stack = g_stackAlloc); void readMeshInstance(dm::ReaderSeekerI* _reader, MeshInstance* _instance); /// Notice: after read*(), createGpuBuffers*() need to be called from the main thread. void createGpuBuffers(TextureHandle _handle, uint32_t _flags = BGFX_TEXTURE_NONE, uint8_t _skip = 0, bgfx::TextureInfo* _info = NULL); void createGpuBuffersTex2D(TextureHandle _handle, uint32_t _flags = BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP); void createGpuBuffersCube(TextureHandle _handle, uint32_t _flags = BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP); void createGpuBuffers(MeshHandle _handle); void createGpuBuffers(EnvHandle _handle); void write(bx::WriterI* _writer, TextureHandle _handle); void write(bx::WriterI* _writer, MaterialHandle _handle); void write(bx::WriterI* _writer, MeshHandle _handle); void write(bx::WriterI* _writer, EnvHandle _handle); void write(bx::WriterI* _writer, const MeshInstance& _inst); void resourceGCFor(double _ms); void resourceGC(uint16_t _maxObj); void resourceGC(); void destroyPrograms(); void destroyUniforms(); void destroyTextures(); void destroyMeshes(); void destroyEnvironments(); void destroyContext(); } //namespace cs #endif // CMFTSTUDIO_CONTEXT_H_HEADER_GUARD /* vim: set sw=4 ts=4 expandtab: */
[ "dariomanesku@gmail.com" ]
dariomanesku@gmail.com
8a01f0a5ee03b9a97f0e3bfbd553882d949553af
d861543345fda883471ebd8c9b9a0bd6a876827c
/src/GameUnits/PlayerUnit/Backpack/BackpackItem.cpp
b900d8cf1d1c00dd590d6f6658bdc8a7fef06ab6
[]
no_license
epcoding/CordobaZombie
b32e277823107c28d4e05f9e3abf380c33a6d1a5
a3793d063ae016175b6ceddb48bde272798c2d63
refs/heads/master
2021-01-19T19:52:33.287446
2012-09-05T01:57:49
2012-09-05T01:57:49
null
0
0
null
null
null
null
UTF-8
C++
false
false
681
cpp
/* * BackpackItem.cpp * * Created on: 14/05/2012 * Author: agustin */ #include "BackpackItem.h" //////////////////////////////////////////////////////////////////////////////// void BackpackItem::rightPressed(void) { debugERROR("Tenemos que mostrar el AdditionalInfo asociado a este item. " "Esto es correr la \"MicroApp\" para que muestre la imagen asociada\n"); ASSERT(false); } //////////////////////////////////////////////////////////////////////////////// BackpackItem::BackpackItem(int t) : mSection(t), mUserDef(0), mOwner(0) { } //////////////////////////////////////////////////////////////////////////////// BackpackItem::~BackpackItem() { }
[ "agudpp@gmail.com" ]
agudpp@gmail.com
2656bd6adf3b4b507ef4a6cffeaaff00dd73b3c4
1b526bc0482d068e47b9e7e6c4abbb5dd1d9bfa2
/devel/include/intera_core_msgs/InteractionControlCommand.h
a103bb3727cde7cc9b5ae2234c532c43bb852a8e
[]
no_license
ahadrauf2020/ee290_final_project
df7d6b5f53d36a588d204cd65cea83c2f7b29bc0
3a2cd3b10c39d2bcb46d9f504bdfebcf0de9195d
refs/heads/master
2022-06-29T03:25:32.670331
2020-05-01T17:52:28
2020-05-01T17:52:28
257,447,031
0
0
null
null
null
null
UTF-8
C++
false
false
16,442
h
// Generated by gencpp from file intera_core_msgs/InteractionControlCommand.msg // DO NOT EDIT! #ifndef INTERA_CORE_MSGS_MESSAGE_INTERACTIONCONTROLCOMMAND_H #define INTERA_CORE_MSGS_MESSAGE_INTERACTIONCONTROLCOMMAND_H #include <string> #include <vector> #include <map> #include <ros/types.h> #include <ros/serialization.h> #include <ros/builtin_message_traits.h> #include <ros/message_operations.h> #include <std_msgs/Header.h> #include <geometry_msgs/Pose.h> namespace intera_core_msgs { template <class ContainerAllocator> struct InteractionControlCommand_ { typedef InteractionControlCommand_<ContainerAllocator> Type; InteractionControlCommand_() : header() , interaction_control_active(false) , K_impedance() , max_impedance() , D_impedance() , K_nullspace() , force_command() , interaction_frame() , endpoint_name() , in_endpoint_frame(false) , disable_damping_in_force_control(false) , disable_reference_resetting(false) , interaction_control_mode() , rotations_for_constrained_zeroG(false) { } InteractionControlCommand_(const ContainerAllocator& _alloc) : header(_alloc) , interaction_control_active(false) , K_impedance(_alloc) , max_impedance(_alloc) , D_impedance(_alloc) , K_nullspace(_alloc) , force_command(_alloc) , interaction_frame(_alloc) , endpoint_name(_alloc) , in_endpoint_frame(false) , disable_damping_in_force_control(false) , disable_reference_resetting(false) , interaction_control_mode(_alloc) , rotations_for_constrained_zeroG(false) { (void)_alloc; } typedef ::std_msgs::Header_<ContainerAllocator> _header_type; _header_type header; typedef uint8_t _interaction_control_active_type; _interaction_control_active_type interaction_control_active; typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _K_impedance_type; _K_impedance_type K_impedance; typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _max_impedance_type; _max_impedance_type max_impedance; typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _D_impedance_type; _D_impedance_type D_impedance; typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _K_nullspace_type; _K_nullspace_type K_nullspace; typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _force_command_type; _force_command_type force_command; typedef ::geometry_msgs::Pose_<ContainerAllocator> _interaction_frame_type; _interaction_frame_type interaction_frame; typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _endpoint_name_type; _endpoint_name_type endpoint_name; typedef uint8_t _in_endpoint_frame_type; _in_endpoint_frame_type in_endpoint_frame; typedef uint8_t _disable_damping_in_force_control_type; _disable_damping_in_force_control_type disable_damping_in_force_control; typedef uint8_t _disable_reference_resetting_type; _disable_reference_resetting_type disable_reference_resetting; typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _interaction_control_mode_type; _interaction_control_mode_type interaction_control_mode; typedef uint8_t _rotations_for_constrained_zeroG_type; _rotations_for_constrained_zeroG_type rotations_for_constrained_zeroG; enum { IMPEDANCE_MODE = 1u, FORCE_MODE = 2u, IMPEDANCE_WITH_FORCE_LIMIT_MODE = 3u, FORCE_WITH_MOTION_LIMIT_MODE = 4u, }; typedef boost::shared_ptr< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> > Ptr; typedef boost::shared_ptr< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> const> ConstPtr; }; // struct InteractionControlCommand_ typedef ::intera_core_msgs::InteractionControlCommand_<std::allocator<void> > InteractionControlCommand; typedef boost::shared_ptr< ::intera_core_msgs::InteractionControlCommand > InteractionControlCommandPtr; typedef boost::shared_ptr< ::intera_core_msgs::InteractionControlCommand const> InteractionControlCommandConstPtr; // constants requiring out of line definition template<typename ContainerAllocator> std::ostream& operator<<(std::ostream& s, const ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> & v) { ros::message_operations::Printer< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> >::stream(s, "", v); return s; } } // namespace intera_core_msgs namespace ros { namespace message_traits { // BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': True} // {'intera_core_msgs': ['/home/ee290/ee290_final_project/src/intera_common/intera_core_msgs/msg', '/home/ee290/ee290_final_project/devel/share/intera_core_msgs/msg'], 'geometry_msgs': ['/opt/ros/kinetic/share/geometry_msgs/cmake/../msg'], 'actionlib_msgs': ['/opt/ros/kinetic/share/actionlib_msgs/cmake/../msg'], 'std_msgs': ['/opt/ros/kinetic/share/std_msgs/cmake/../msg'], 'sensor_msgs': ['/opt/ros/kinetic/share/sensor_msgs/cmake/../msg']} // !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types'] template <class ContainerAllocator> struct IsFixedSize< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> > : FalseType { }; template <class ContainerAllocator> struct IsFixedSize< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> const> : FalseType { }; template <class ContainerAllocator> struct IsMessage< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> > : TrueType { }; template <class ContainerAllocator> struct IsMessage< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> const> : TrueType { }; template <class ContainerAllocator> struct HasHeader< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> > : TrueType { }; template <class ContainerAllocator> struct HasHeader< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> const> : TrueType { }; template<class ContainerAllocator> struct MD5Sum< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> > { static const char* value() { return "762b5d197d5d786f83741af7fe6261a6"; } static const char* value(const ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator>&) { return value(); } static const uint64_t static_value1 = 0x762b5d197d5d786fULL; static const uint64_t static_value2 = 0x83741af7fe6261a6ULL; }; template<class ContainerAllocator> struct DataType< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> > { static const char* value() { return "intera_core_msgs/InteractionControlCommand"; } static const char* value(const ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator>&) { return value(); } }; template<class ContainerAllocator> struct Definition< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> > { static const char* value() { return "# Message sets the interaction (impedance/force) control on or off\n\ # It also contains desired cartesian stiffness K, damping D, and force values\n\ \n\ Header header\n\ bool interaction_control_active\n\ \n\ ## Cartesian Impedance Control Parameters\n\ # Stiffness units are (N/m) for first 3 and (Nm/rad) for second 3 values\n\ float64[] K_impedance\n\ # Force certain directions to have maximum possible impedance for a given pose\n\ bool[] max_impedance\n\ # Damping units are (Ns/m) for first 3 and (Nms/rad) for the second 3 values\n\ float64[] D_impedance\n\ # Joint Nullspace stiffness units are in (Nm/rad) (length == number of joints)\n\ float64[] K_nullspace\n\ \n\ ## Parameters for force control or impedance control with force limit\n\ # If in force mode, this is the vector of desired forces/torques\n\ # to be regulated in (N) and (Nm)\n\ # If in impedance with force limit mode, this vector specifies the\n\ # magnitude of forces/torques (N and Nm) that the command will not exceed.\n\ float64[] force_command\n\ \n\ ## Desired frame\n\ geometry_msgs/Pose interaction_frame\n\ string endpoint_name\n\ # True if impedance and force commands are defined in endpoint frame\n\ bool in_endpoint_frame\n\ \n\ # Set to true to disable damping during force control. Damping is used\n\ # to slow down robot motion during force control in free space.\n\ # Option included for SDK users to disable damping in force control\n\ bool disable_damping_in_force_control\n\ \n\ # Set to true to disable reference resetting. Reference resetting is\n\ # used when interaction parameters change, in order to avoid jumps/jerks.\n\ # Option included for SDK users to disable reference resetting if the\n\ # intention is to change interaction parameters.\n\ bool disable_reference_resetting\n\ \n\ ## Mode Selection Parameters\n\ # The possible interaction control modes are:\n\ # Impedance mode: implements desired endpoint stiffness and damping.\n\ uint8 IMPEDANCE_MODE=1\n\ # Force mode: applies force/torque in the specified dimensions.\n\ uint8 FORCE_MODE=2\n\ # Impedance with force limit: impedance control while ensuring the commanded\n\ # forces/torques do not exceed force_command.\n\ uint8 IMPEDANCE_WITH_FORCE_LIMIT_MODE=3\n\ # Force with motion bounds: force control while ensuring the current\n\ # pose/velocities do not exceed forceMotionThreshold (currenetly defined in yaml)\n\ uint8 FORCE_WITH_MOTION_LIMIT_MODE=4\n\ \n\ # Specifies the interaction control mode for each Cartesian dimension (6)\n\ uint8[] interaction_control_mode\n\ \n\ # All 6 values in force and impedance parameter vectors have to be filled,\n\ # If a control mode is not used in a Cartesian dimension,\n\ # the corresponding parameters will be ignored.\n\ \n\ ## Parameters for Constrained Zero-G Behaviors\n\ # Allow for arbitrary rotational displacements from the current orientation\n\ # for constrained zero-G. Setting 'rotations_for_constrained_zeroG = True'\n\ # will disable the rotational stiffness field which limits rotational\n\ # displacements to +/- 82.5 degree.\n\ # NOTE: it will be only enabled for a stationary reference orientation\n\ bool rotations_for_constrained_zeroG\n\ \n\ ================================================================================\n\ MSG: std_msgs/Header\n\ # Standard metadata for higher-level stamped data types.\n\ # This is generally used to communicate timestamped data \n\ # in a particular coordinate frame.\n\ # \n\ # sequence ID: consecutively increasing ID \n\ uint32 seq\n\ #Two-integer timestamp that is expressed as:\n\ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\ # time-handling sugar is provided by the client library\n\ time stamp\n\ #Frame this data is associated with\n\ # 0: no frame\n\ # 1: global frame\n\ string frame_id\n\ \n\ ================================================================================\n\ MSG: geometry_msgs/Pose\n\ # A representation of pose in free space, composed of position and orientation. \n\ Point position\n\ Quaternion orientation\n\ \n\ ================================================================================\n\ MSG: geometry_msgs/Point\n\ # This contains the position of a point in free space\n\ float64 x\n\ float64 y\n\ float64 z\n\ \n\ ================================================================================\n\ MSG: geometry_msgs/Quaternion\n\ # This represents an orientation in free space in quaternion form.\n\ \n\ float64 x\n\ float64 y\n\ float64 z\n\ float64 w\n\ "; } static const char* value(const ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator>&) { return value(); } }; } // namespace message_traits } // namespace ros namespace ros { namespace serialization { template<class ContainerAllocator> struct Serializer< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> > { template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) { stream.next(m.header); stream.next(m.interaction_control_active); stream.next(m.K_impedance); stream.next(m.max_impedance); stream.next(m.D_impedance); stream.next(m.K_nullspace); stream.next(m.force_command); stream.next(m.interaction_frame); stream.next(m.endpoint_name); stream.next(m.in_endpoint_frame); stream.next(m.disable_damping_in_force_control); stream.next(m.disable_reference_resetting); stream.next(m.interaction_control_mode); stream.next(m.rotations_for_constrained_zeroG); } ROS_DECLARE_ALLINONE_SERIALIZER }; // struct InteractionControlCommand_ } // namespace serialization } // namespace ros namespace ros { namespace message_operations { template<class ContainerAllocator> struct Printer< ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator> > { template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::intera_core_msgs::InteractionControlCommand_<ContainerAllocator>& v) { s << indent << "header: "; s << std::endl; Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header); s << indent << "interaction_control_active: "; Printer<uint8_t>::stream(s, indent + " ", v.interaction_control_active); s << indent << "K_impedance[]" << std::endl; for (size_t i = 0; i < v.K_impedance.size(); ++i) { s << indent << " K_impedance[" << i << "]: "; Printer<double>::stream(s, indent + " ", v.K_impedance[i]); } s << indent << "max_impedance[]" << std::endl; for (size_t i = 0; i < v.max_impedance.size(); ++i) { s << indent << " max_impedance[" << i << "]: "; Printer<uint8_t>::stream(s, indent + " ", v.max_impedance[i]); } s << indent << "D_impedance[]" << std::endl; for (size_t i = 0; i < v.D_impedance.size(); ++i) { s << indent << " D_impedance[" << i << "]: "; Printer<double>::stream(s, indent + " ", v.D_impedance[i]); } s << indent << "K_nullspace[]" << std::endl; for (size_t i = 0; i < v.K_nullspace.size(); ++i) { s << indent << " K_nullspace[" << i << "]: "; Printer<double>::stream(s, indent + " ", v.K_nullspace[i]); } s << indent << "force_command[]" << std::endl; for (size_t i = 0; i < v.force_command.size(); ++i) { s << indent << " force_command[" << i << "]: "; Printer<double>::stream(s, indent + " ", v.force_command[i]); } s << indent << "interaction_frame: "; s << std::endl; Printer< ::geometry_msgs::Pose_<ContainerAllocator> >::stream(s, indent + " ", v.interaction_frame); s << indent << "endpoint_name: "; Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.endpoint_name); s << indent << "in_endpoint_frame: "; Printer<uint8_t>::stream(s, indent + " ", v.in_endpoint_frame); s << indent << "disable_damping_in_force_control: "; Printer<uint8_t>::stream(s, indent + " ", v.disable_damping_in_force_control); s << indent << "disable_reference_resetting: "; Printer<uint8_t>::stream(s, indent + " ", v.disable_reference_resetting); s << indent << "interaction_control_mode[]" << std::endl; for (size_t i = 0; i < v.interaction_control_mode.size(); ++i) { s << indent << " interaction_control_mode[" << i << "]: "; Printer<uint8_t>::stream(s, indent + " ", v.interaction_control_mode[i]); } s << indent << "rotations_for_constrained_zeroG: "; Printer<uint8_t>::stream(s, indent + " ", v.rotations_for_constrained_zeroG); } }; } // namespace message_operations } // namespace ros #endif // INTERA_CORE_MSGS_MESSAGE_INTERACTIONCONTROLCOMMAND_H
[ "ahadrauf@berkeley.edu" ]
ahadrauf@berkeley.edu
e2ac56d1e6d887da98355574835764f32bac1768
ffa0e09cbc013b8f3c12dab39effcd88cafb53cc
/windows/runner/main.cpp
68cd6133dd195d5e693ab9e12c1e61e512749d5d
[]
no_license
srujanmhase/neumorphic_srujan
f044173a7d1dd2f57fa0f8da3a489cb0a0638100
c83f525006f27cec931fe0ba8a2526b628ced092
refs/heads/main
2023-07-23T12:06:27.797595
2021-09-03T09:41:53
2021-09-03T09:41:53
402,679,857
0
0
null
null
null
null
UTF-8
C++
false
false
1,227
cpp
#include <flutter/dart_project.h> #include <flutter/flutter_view_controller.h> #include <windows.h> #include "flutter_window.h" #include "run_loop.h" #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, _In_ wchar_t *command_line, _In_ int show_command) { // Attach to console when present (e.g., 'flutter run') or create a // new console when running with a debugger. if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { CreateAndAttachConsole(); } // Initialize COM, so that it is available for use in the library and/or // plugins. ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); RunLoop run_loop; flutter::DartProject project(L"data"); std::vector<std::string> command_line_arguments = GetCommandLineArguments(); project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); FlutterWindow window(&run_loop, project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); if (!window.CreateAndShow(L"neumorphic_srujan", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true); run_loop.Run(); ::CoUninitialize(); return EXIT_SUCCESS; }
[ "srujanmhase5@gmail.com" ]
srujanmhase5@gmail.com
ae8d8baa19a9381a7eb43c28a1d416b6dbcb49e5
748626778e870ce6cdfd0c1f3b46d7f8a096b5a8
/src/condor_startd.V6/StartdPlugin.h
8ef7bd101a9ec353d78567e2334252be9d65dc61
[ "Apache-2.0" ]
permissive
htcondor/htcondor
1c8bab33379299f64e5274a7d525f3c64c64c47f
3b67625b2f4d97bcc28f534340a6fd7ac518dc75
refs/heads/main
2023-08-31T03:17:53.070364
2023-08-31T00:18:04
2023-08-31T00:18:04
5,808,515
249
165
Apache-2.0
2023-09-14T18:44:26
2012-09-14T11:35:15
C++
UTF-8
C++
false
false
2,234
h
/* * Copyright 2008 Red Hat, Inc. * * 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 _STARTD_PLUGIN_H #define _STARTD_PLUGIN_H #include "condor_common.h" #include "PluginManager.h" #include "condor_classad.h" /** * All Startd plugins must subclass StartdPlugin. A Startd plugin can * receive notification an update is set to the pool's main Collector. * * The plugin should have a statically initialized instance of itself, * which results in StartdPlugin's constructor being called and the * plugin being registered. * * Plugins should be compiled within the source of the Condor version * with which they wish to be loaded and with the -shared option, * e.g. compile ExampleStartdPlugin.C with: * $ make ExampleStartdPlugin-plugin.so * (in Imakefile) * %-plugin.so: %.C: * $(CPlusPlus) $(C_PLUS_FLAGS) -shared $< -o $@ */ class StartdPlugin { public: /** * The default constructor registers the plug-in with * StartdPluginManager::registerPlugin * * All plugins should subclass StartdPlugin and provide a * statically initialized instance of itself, so that it will be * registered when its object file is loaded */ StartdPlugin(); virtual ~StartdPlugin(); virtual void initialize() = 0; virtual void shutdown() = 0; virtual void update(const ClassAd *publicAd, const ClassAd *privateAd) = 0; virtual void invalidate(const ClassAd *ad) = 0; }; class StartdPluginManager : public PluginManager<StartdPlugin> { public: static void Initialize(); static void Shutdown(); static void Update(const ClassAd *publicAd, const ClassAd *privateAd); static void Invalidate(const ClassAd *ad); }; #endif /* _STARTD_PLUGIN_H */
[ "matt@redhat.com" ]
matt@redhat.com
11c0988aa50953f2d1380b1cf6a0f49ba91e6822
78cdbfbfa915497c5b0415d0a6e09dcc749fd6ba
/gotcloud/src/premo/src/libs/bamtools/internal/bam/BamMultiMerger_p.h
43352143e2a23a840a45b9dfe841f1cd1a16ebe0
[ "Apache-2.0", "MIT" ]
permissive
statgen/topmed_freeze3_calling
9b00ee64804165e320ae5690ebb42e01345c24e2
b01a53468e1e989988b09fd74f3e9ce9faa62a99
refs/heads/master
2018-12-12T20:02:46.909940
2018-12-05T01:35:08
2018-12-05T01:35:08
68,630,437
11
5
null
null
null
null
UTF-8
C++
false
false
7,434
h
// *************************************************************************** // BamMultiMerger_p.h (c) 2010 Derek Barnett // Marth Lab, Department of Biology, Boston College // --------------------------------------------------------------------------- // Last modified: 10 October 2011 (DB) // --------------------------------------------------------------------------- // Provides merging functionality for BamMultiReader. At this point, supports // sorting results by (refId, position) or by read name. // *************************************************************************** #ifndef BAMMULTIMERGER_P_H #define BAMMULTIMERGER_P_H // ------------- // W A R N I N G // ------------- // // This file is not part of the BamTools API. It exists purely as an // implementation detail. This header file may change from version to version // without notice, or even be removed. // // We mean it. #include "BamAlignment.h" #include "BamReader.h" #include "algorithms/Sort.h" #include <deque> #include <functional> #include <set> #include <string> namespace BamTools { namespace Internal { struct MergeItem { // data members BamReader* Reader; BamAlignment* Alignment; // ctors & dtor MergeItem(BamReader* reader = 0, BamAlignment* alignment = 0) : Reader(reader) , Alignment(alignment) { } MergeItem(const MergeItem& other) : Reader(other.Reader) , Alignment(other.Alignment) { } ~MergeItem(void) { } }; template<typename Compare> struct MergeItemSorter : public std::binary_function<MergeItem, MergeItem, bool> { public: MergeItemSorter(const Compare& comp = Compare()) : m_comp(comp) { } bool operator()(const MergeItem& lhs, const MergeItem& rhs) { const BamAlignment& l = *lhs.Alignment; const BamAlignment& r = *rhs.Alignment; return m_comp(l,r); } private: Compare m_comp; }; // pure ABC so we can just work polymorphically with any specific merger implementation class IMultiMerger { public: IMultiMerger(void) { } virtual ~IMultiMerger(void) { } public: virtual void Add(MergeItem item) =0; virtual void Clear(void) =0; virtual const MergeItem& First(void) const =0; virtual bool IsEmpty(void) const =0; virtual void Remove(BamReader* reader) =0; virtual int Size(void) const =0; virtual MergeItem TakeFirst(void) =0; }; // general merger template<typename Compare> class MultiMerger : public IMultiMerger { public: typedef Compare CompareType; typedef MergeItemSorter<CompareType> MergeType; public: explicit MultiMerger(const Compare& comp = Compare()) : IMultiMerger() , m_data( MergeType(comp) ) { } ~MultiMerger(void) { } public: void Add(MergeItem item); void Clear(void); const MergeItem& First(void) const; bool IsEmpty(void) const; void Remove(BamReader* reader); int Size(void) const; MergeItem TakeFirst(void); private: typedef MergeItem ValueType; typedef std::multiset<ValueType, MergeType> ContainerType; typedef typename ContainerType::iterator DataIterator; typedef typename ContainerType::const_iterator DataConstIterator; ContainerType m_data; }; template <typename Compare> inline void MultiMerger<Compare>::Add(MergeItem item) { // N.B. - any future custom Compare types must define this method // see algorithms/Sort.h if ( CompareType::UsesCharData() ) item.Alignment->BuildCharData(); m_data.insert(item); } template <typename Compare> inline void MultiMerger<Compare>::Clear(void) { m_data.clear(); } template <typename Compare> inline const MergeItem& MultiMerger<Compare>::First(void) const { const ValueType& entry = (*m_data.begin()); return entry; } template <typename Compare> inline bool MultiMerger<Compare>::IsEmpty(void) const { return m_data.empty(); } template <typename Compare> inline void MultiMerger<Compare>::Remove(BamReader* reader) { if ( reader == 0 ) return; const std::string& filenameToRemove = reader->GetFilename(); // iterate over readers in cache DataIterator dataIter = m_data.begin(); DataIterator dataEnd = m_data.end(); for ( ; dataIter != dataEnd; ++dataIter ) { const MergeItem& item = (*dataIter); const BamReader* itemReader = item.Reader; if ( itemReader == 0 ) continue; // remove iterator on match if ( itemReader->GetFilename() == filenameToRemove ) { m_data.erase(dataIter); return; } } } template <typename Compare> inline int MultiMerger<Compare>::Size(void) const { return m_data.size(); } template <typename Compare> inline MergeItem MultiMerger<Compare>::TakeFirst(void) { DataIterator firstIter = m_data.begin(); MergeItem firstItem = (*firstIter); m_data.erase(firstIter); return firstItem; } // unsorted "merger" template<> class MultiMerger<Algorithms::Sort::Unsorted> : public IMultiMerger { public: explicit MultiMerger(const Algorithms::Sort::Unsorted& comp = Algorithms::Sort::Unsorted()) : IMultiMerger() { } ~MultiMerger(void) { } public: void Add(MergeItem item); void Clear(void); const MergeItem& First(void) const; bool IsEmpty(void) const; void Remove(BamReader* reader); int Size(void) const; MergeItem TakeFirst(void); private: typedef MergeItem ValueType; typedef std::deque<ValueType> ContainerType; typedef ContainerType::iterator DataIterator; typedef ContainerType::const_iterator DataConstIterator; ContainerType m_data; }; inline void MultiMerger<Algorithms::Sort::Unsorted>::Add(MergeItem item) { m_data.push_back(item); } inline void MultiMerger<Algorithms::Sort::Unsorted>::Clear(void) { m_data.clear(); } inline const MergeItem& MultiMerger<Algorithms::Sort::Unsorted>::First(void) const { return m_data.front(); } inline bool MultiMerger<Algorithms::Sort::Unsorted>::IsEmpty(void) const { return m_data.empty(); } inline void MultiMerger<Algorithms::Sort::Unsorted>::Remove(BamReader* reader) { if ( reader == 0 ) return; const std::string filenameToRemove = reader->GetFilename(); // iterate over readers in cache DataIterator dataIter = m_data.begin(); DataIterator dataEnd = m_data.end(); for ( ; dataIter != dataEnd; ++dataIter ) { const MergeItem& item = (*dataIter); const BamReader* itemReader = item.Reader; if ( itemReader == 0 ) continue; // remove iterator on match if ( itemReader->GetFilename() == filenameToRemove ) { m_data.erase(dataIter); return; } } } inline int MultiMerger<Algorithms::Sort::Unsorted>::Size(void) const { return m_data.size(); } inline MergeItem MultiMerger<Algorithms::Sort::Unsorted>::TakeFirst(void) { MergeItem firstItem = m_data.front(); m_data.pop_front(); return firstItem; } } // namespace Internal } // namespace BamTools #endif // BAMMULTIMERGER_P_H
[ "hmkang@umich.edu" ]
hmkang@umich.edu
b1c686324e6916288be763ec9516a26f8ec7d277
6cce0d1fbaf63d686a39a2c6ea0f7255e2be7963
/tests/compile/templ_add.src.cpp
e4181193ce23db581e05f6ca49584424d08ca996
[]
no_license
omni-compiler/ClangXcodeML
8bc3345b576f5d280eeddc01e71814b391d2fd5c
90aa8bd4bd3faf065d5e4866f717f975bb10afc3
refs/heads/master
2021-08-08T07:23:18.915508
2020-04-24T05:04:20
2020-04-24T05:04:20
61,346,810
5
4
null
2018-07-24T12:46:26
2016-06-17T05:03:36
C++
UTF-8
C++
false
false
78
cpp
template <typename paramT> paramT add(paramT x, paramT y) { return x + y; }
[ "1995hnagamin@users.noreply.github.com" ]
1995hnagamin@users.noreply.github.com
c1dd13ff34fbbb2730f5403bf96de41da618eac1
f77b2bf99f484dcfbb1840caa7c3a59a985fb44c
/InputManager.cpp
473a27da5022c6675f2fef7d28349645b7fb21de
[]
no_license
RaimonZamora/arounders
1db9fc08a90a11f9a4555590cd30b073903dedf8
36d39effa4366afdf9f39a24229ac6b31ff70caa
refs/heads/master
2020-12-24T15:49:09.758919
2009-12-10T09:07:19
2009-12-10T09:07:19
32,810,750
0
0
null
null
null
null
UTF-8
C++
false
false
3,957
cpp
/* * InputManager.cpp * Arounders * * Created by Raimon Zamora on 21/02/09. * Copyright 2009 __MyCompanyName__. All rights reserved. * */ #include "InputManager.h" #include "const.h" InputManager::InputManager(GameInfo *pGameInfo) { gameInfo = pGameInfo; eixir = false; mouseX = 0; mouseY = 0; mouseButtonLeft = false; mouseButtonRight = false; mouseButtonMiddle = false; oldMouseButtonLeft = false; oldMouseButtonRight = false; oldMouseButtonMiddle = false; pausaPulsada = false; menuPulsat = false; } InputManager::~InputManager(void) { } void InputManager::Update() { keystates = SDL_GetKeyState( NULL ); teclaSoltada = false; pausaPulsada = false; menuPulsat = false; while ( SDL_PollEvent( &event ) ) { if ( event.type == SDL_QUIT ) eixir = true; if( event.type == SDL_MOUSEMOTION ) { mouseX = event.motion.x; mouseY = event.motion.y; if (gameInfo->modeGrafic == MODE_ZOOMX2) { mouseX = mouseX>>1; mouseY = mouseY>>1; } } if( event.type == SDL_MOUSEBUTTONDOWN ) { mouseX = event.button.x; mouseY = event.button.y; if (gameInfo->modeGrafic == MODE_ZOOMX2) { mouseX = mouseX>>1; mouseY = mouseY>>1; } if (event.button.button == SDL_BUTTON_LEFT) { oldMouseButtonLeft = mouseButtonLeft; mouseButtonLeft = true; } if (event.button.button == SDL_BUTTON_MIDDLE) { oldMouseButtonMiddle = mouseButtonMiddle; mouseButtonMiddle = true; } if (event.button.button == SDL_BUTTON_RIGHT) { oldMouseButtonRight = mouseButtonRight; mouseButtonRight = true; } } if( event.type == SDL_MOUSEBUTTONUP ) { if (event.button.button == SDL_BUTTON_LEFT) { oldMouseButtonLeft = mouseButtonLeft; mouseButtonLeft = false; } if (event.button.button == SDL_BUTTON_MIDDLE) { oldMouseButtonMiddle = mouseButtonMiddle; mouseButtonMiddle = false; } if (event.button.button == SDL_BUTTON_RIGHT) { oldMouseButtonRight = mouseButtonRight; mouseButtonRight = false; } } if( event.type == SDL_KEYDOWN ) { cualquierTecla = true; } else { cualquierTecla = false; } if( event.type == SDL_KEYUP ) { teclaSoltada = true; pausaPulsada = (event.key.keysym.sym == SDLK_p); menuPulsat = (event.key.keysym.sym == SDLK_ESCAPE); } if ( event.type == SDL_ACTIVEEVENT ) { if (event.active.state & SDL_APPINPUTFOCUS) { if (event.active.gain) { finestraActiva = true; } else { finestraActiva = false; } } } } } bool InputManager::BotoPulsat(int boto) { switch (boto) { case SDL_BUTTON_LEFT: if (mouseButtonLeft && !oldMouseButtonLeft) { oldMouseButtonLeft = true; return true; } else { return false; } break; case SDL_BUTTON_MIDDLE: if (mouseButtonMiddle && !oldMouseButtonMiddle) { oldMouseButtonMiddle = true; return true; } else { return false; } break; case SDL_BUTTON_RIGHT: if (mouseButtonRight && !oldMouseButtonRight) { oldMouseButtonRight = true; return true; } else { return false; } break; default: return false; break; } } bool InputManager::BotoSoltat(int boto) { switch (boto) { case SDL_BUTTON_LEFT: if (!mouseButtonLeft && oldMouseButtonLeft) { oldMouseButtonLeft = false; return true; } else { return false; } break; case SDL_BUTTON_MIDDLE: if (!mouseButtonMiddle && oldMouseButtonMiddle) { oldMouseButtonMiddle = false; return true; } else { return false; } break; case SDL_BUTTON_RIGHT: if (!mouseButtonRight && oldMouseButtonRight) { oldMouseButtonRight = false; return true; } else { return false; } break; default: return false; break; } } bool InputManager::TeclaPulsada(int tecla) { if (keystates[tecla] != 0) { return true; } else { return false; } } bool InputManager::Pausa() { return pausaPulsada; } bool InputManager::Menu() { return menuPulsat; }
[ "jaildoctor@051515c8-07d0-11de-9036-69e38a880166" ]
jaildoctor@051515c8-07d0-11de-9036-69e38a880166
90fa52ab472a8a064f36741772881fa586d48eee
45abcd41bda2d82961cf2a638c11f219db222960
/Position.h
5ac269e5c11f1921da5185413a10e9936814d417
[]
no_license
AhsanAAR/chess_OOP
0a9d96a385edd30824bca8172eda512e294caffd
a5ec8d33c848b8c01b5cf76cd74ee8de5bc0d0ca
refs/heads/main
2023-03-04T01:26:03.856751
2021-02-14T17:44:47
2021-02-14T17:44:47
338,864,061
0
0
null
null
null
null
UTF-8
C++
false
false
125
h
#pragma once #define screenSize 800 class Position { public: int x, y; Position(int y = 0, int x = 0) : x(x), y(y) {} };
[ "39828020+AhsanAAR@users.noreply.github.com" ]
39828020+AhsanAAR@users.noreply.github.com
5dda0a0b349429b8b0a6d86fe7713a8f6a5e626f
95efaa256914926ac30acbb1a8c89c320c19bf40
/HePlugin/HVernierTracking.h
e21beb2a33db01d197ec825ac033349f2ce25769
[]
no_license
mabo0001/QtCode
bc2d80446a160d97b4034fa1c068324ba939cb20
9038f05da33c870c1e9808791f03467dcc19a4ab
refs/heads/master
2022-08-26T13:36:14.021944
2019-07-15T01:12:51
2019-07-15T01:12:51
266,298,758
1
0
null
2020-05-23T08:54:08
2020-05-23T08:54:07
null
UTF-8
C++
false
false
905
h
/*************************************************************************************************** ** 2018-06-19 HVernierTracking 游标追踪策略。 ***************************************************************************************************/ #ifndef HVERNIERTRACKING_H #define HVERNIERTRACKING_H #include "HAbstractVernierTracking.h" class QPaintEvent; class HVernierTrackingPrivate; class QDESIGNER_WIDGET_EXPORT HVernierTracking : public HAbstractVernierTracking { Q_OBJECT Q_DECLARE_PRIVATE(HVernierTracking) public: explicit HVernierTracking(Qt::Orientation orientation, QWidget *parent = nullptr); ~HVernierTracking() override; public: virtual void paintEvent(QPaintEvent *); virtual bool mouseMoveEvent(QMouseEvent *) override; protected: HVernierTracking(HVernierTrackingPrivate &p, QWidget *parent = nullptr); }; #endif // HVERNIERTRACKING_H
[ "hexianqi@msn.com" ]
hexianqi@msn.com
d19fc9a4e831658c1f454443a71455e9dbdf4def
af4be14586b3df9a95bc0e942f8cc196e8d49e75
/bloom/src/PassCommon.cpp
199b0ece006a6cef0a3063e004da75bec38b5807
[ "MIT" ]
permissive
kravtsun/au-cg
f567b1ecee404779a01d8e8dff2b4e2c6f483a62
8f06e35b0f2aef4f61d58251efbbc5d759038089
refs/heads/master
2022-02-16T15:00:54.592453
2018-03-05T15:17:05
2018-03-05T15:17:05
104,670,722
0
0
MIT
2018-02-25T16:31:53
2017-09-24T19:32:23
C++
UTF-8
C++
false
false
2,445
cpp
#include <cassert> #include "PassCommon.h" void init_texture(const int width, const int height, const GLuint texture, const int attachment) { glBindTexture(GL_TEXTURE_2D, texture); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB32F, width, height, 0, GL_RGB, GL_FLOAT, nullptr); // Poor filtering glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); if (attachment != -1) { glFramebufferTexture2D(GL_FRAMEBUFFER, (GLenum) attachment, GL_TEXTURE_2D, texture, 0); } } void Pass::init_output_texture(GLuint &texture) { glGenTextures(1, &texture); init_texture(getWidth(), getHeight(), texture, GL_COLOR_ATTACHMENT0); const GLenum DrawBuffers[] = { GL_COLOR_ATTACHMENT0 }; const GLsizei drawBuffersCount = sizeof(DrawBuffers) / sizeof(DrawBuffers[0]); static_assert(drawBuffersCount == 1, "drawBuffersCount == 1"); glDrawBuffers(drawBuffersCount, DrawBuffers); const GLenum fbo_status = glCheckFramebufferStatus(GL_FRAMEBUFFER); assert(fbo_status == GL_FRAMEBUFFER_COMPLETE); } static const GLfloat quadz = 1.0f; static const GLfloat g_quad_vertex_buffer_data[] = { -1.0f, -1.0f, quadz, 1.0f, -1.0f, quadz, -1.0f, 1.0f, quadz, -1.0f, 1.0f, quadz, 1.0f, -1.0f, quadz, 1.0f, 1.0f, quadz, }; Pass::Pass(int width, int height) : width(width) , height(height) { glGenBuffers(1, &quad_vertexbuffer); glBindBuffer(GL_ARRAY_BUFFER, quad_vertexbuffer); glBufferData(GL_ARRAY_BUFFER, sizeof(g_quad_vertex_buffer_data), g_quad_vertex_buffer_data, GL_STATIC_DRAW); glGenVertexArrays(1, &quad_VertexArrayID); glBindVertexArray(quad_VertexArrayID); } void Pass::drawTexture() const { // 1rst attribute buffer : vertices glEnableVertexAttribArray(0); glBindBuffer(GL_ARRAY_BUFFER, quad_vertexbuffer); glVertexAttribPointer( 0, 3, GL_FLOAT, GL_FALSE, 0, nullptr ); glDrawArrays(GL_TRIANGLES, 0, 6); glDisableVertexAttribArray(0); } Pass::~Pass() { glDeleteVertexArrays(1, &quad_VertexArrayID); glDeleteBuffers(1, &quad_vertexbuffer); }
[ "avkravtsun@gmail.com" ]
avkravtsun@gmail.com
effb82edd1016819bf08480a810290fc0ca5db34
c7f4a8cf6d68a57154b9021778d3684565891bc2
/Engine/Source/Runtime/Game/Private/Level/World.cpp
1022744258ef69d0d907069c798f7d52da636b98
[]
no_license
Aumoa/CPP.REF
fbe76b59cdb245b7313f45b6ea644db2ac9a7425
6cb8b9867a44a42a1f5032bdb7ef107015d47a80
refs/heads/master
2023-08-21T07:30:39.329916
2022-01-24T16:21:26
2022-01-24T16:21:39
246,570,075
17
2
null
2020-12-17T17:31:06
2020-03-11T12:51:41
C++
UTF-8
C++
false
false
2,377
cpp
// Copyright 2020-2021 Aumoa.lib. All right reserved. #include "Level/World.h" #include "Level/Level.h" #include "GameEngine.h" #include "Components/PrimitiveComponent.h" #include "GameFramework/PlayerController.h" #include "SceneRendering/Scene.h" #include "Scene/PrimitiveSceneProxy.h" #include "Camera/PlayerCameraManager.h" #include "EngineSubsystems/GameRenderSystem.h" #include "Ticking/TickTaskLevelManager.h" #include "Application/SlateApplication.h" GENERATE_BODY(SWorld); DEFINE_LOG_CATEGORY(LogWorld); SWorld::SWorld(EWorldType InWorldType) : Super() , WorldType(InWorldType) { } void SWorld::InitWorld() { Scene = gcnew SScene(GEngine->GetEngineSubsystem<SGameRenderSystem>()->GetRHIDevice()); } void SWorld::DestroyWorld() { if (Scene) { Scene->Dispose(); Scene = nullptr; } } SWorld* SWorld::GetWorld() { return this; } EWorldType SWorld::GetWorldType() { return WorldType; } SScene* SWorld::GetScene() { return Scene; } SLocalPlayer* SWorld::GetLocalPlayer() { return GEngine->GetSlateApplication()->GetLocalPlayer(); } SLevel* SWorld::OpenLevel(SubclassOf<SLevel> InLevelToOpen) { if (!InLevelToOpen.IsValid()) { SE_LOG(LogWorld, Error, L"Class of level to open is not specified. Abort."); return nullptr; } if (Level) { Level->UnloadLevel(); } Level = Cast<SLevel>(InLevelToOpen->Instantiate()); if (!Level->LoadLevel(this)) { SE_LOG(LogWorld, Fatal, L"Could not load level."); return nullptr; } return Level; } SLevel* SWorld::GetLevel() { return Level; } AActor* SWorld::SpawnActor(SubclassOf<AActor> InActorClass) { return Level->SpawnActor(InActorClass, false); } void SWorld::DestroyActor(AActor* InActor) { Level->DestroyActor(InActor); } void SWorld::LevelTick(float InDeltaTime) { Level->IncrementalActorsApply(); if (STickTaskLevelManager* LevelTick = Level->GetLevelTick()) { LevelTick->BeginFrame(); LevelTick->IncrementalDispatchTick(ETickingGroup::PrePhysics, InDeltaTime); LevelTick->IncrementalDispatchTick(ETickingGroup::DuringPhysics, InDeltaTime); LevelTick->IncrementalDispatchTick(ETickingGroup::PostPhysics, InDeltaTime); if (APlayerController* PlayerController = Level->GetPlayerController()) { PlayerController->UpdateCameraManager(InDeltaTime); } LevelTick->IncrementalDispatchTick(ETickingGroup::PostUpdateWork, InDeltaTime); LevelTick->EndFrame(); } }
[ "wkdghcjf1234@naver.com" ]
wkdghcjf1234@naver.com
a745442c6e7eefdf6f1252fd9200a0d0fe1b4692
62bdb8e81d2e0802d504a4b8e87578cd40916de0
/CSES-Problem-set/Introductory-Problems/palindrome-reorder.cpp
66ce84457f4e251eba575d008032e675010bcb5f
[]
no_license
priniraula/CS-Solutions
beab21ec1affcebb685cc34a66d17f07a1ce1353
7949c82769e6afad8a63a68993bffd6c075cf767
refs/heads/main
2023-04-23T04:18:22.114544
2021-05-17T07:26:52
2021-05-17T07:26:52
368,096,008
0
0
null
null
null
null
UTF-8
C++
false
false
2,344
cpp
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <numeric> #include <ostream> #include <queue> #include <random> #include <regex> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <type_traits> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; #define DEBUG(x) do { std::cerr << #x << ": " << x << std::endl; } while (0) std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count()); constexpr int MAXN = 1e9 + 7; constexpr int INF = 0x3f3f3f3f; constexpr long long INFLL = 0x3f3f3f3f3f3f3f3f; int main (){ std::ios::sync_with_stdio(false); std::cin.tie(nullptr); string input; cin >> input; map<char, int> count; for (auto &i: input){ ++count[i]; } bool yes = true; string odd_rev = ""; if (input.size() % 2){ bool one_odd = false; for (auto &[a, b]: count){ if (b % 2 && !one_odd){ one_odd = true; string res (b, a); odd_rev = res; } else if (b % 2 && one_odd){ yes = false; } } } else { for (auto &[a, b]: count){ if (b % 2){ yes = false; } } } if (yes){ if (input.size() % 2){ for (auto &[a, b]: count){ if (a != odd_rev[0]){ for (int i = 0; i < b / 2; ++i){ cout << a; } } } cout << odd_rev; for (auto itr = count.rbegin(); itr != count.rend(); ++itr){ if (itr->first != odd_rev[0]){ for (int i = 0; i < itr->second / 2; ++i){ cout << itr->first; } } } } else { for (auto &[a, b]: count){ for (int i = 0; i < b / 2; ++i){ cout << a; } } for (auto itr = count.rbegin(); itr != count.rend(); ++itr){ for (int i = 0; i < itr->second / 2; ++i){ cout << itr->first; } } } } else { cout << "NO SOLUTION\n"; } }
[ "zslyae@gmail.com" ]
zslyae@gmail.com
a10ce9c35d785608675e2f2dd25f40138edd2dca
e50b5f066628ef65fd7f79078b4b1088f9d11e87
/llvm/tools/clang/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
a9aeab8c28c1983df2fb6a31c0e7d24558699ce9
[ "NCSA" ]
permissive
uzleo/coast
1471e03b2a1ffc9883392bf80711e6159917dca1
04bd688ac9a18d2327c59ea0c90f72e9b49df0f4
refs/heads/master
2020-05-16T11:46:24.870750
2019-04-23T13:57:53
2019-04-23T13:57:53
183,025,687
0
0
null
2019-04-23T13:52:28
2019-04-23T13:52:27
null
UTF-8
C++
false
false
559
cpp
// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple x86_64-apple-darwin %s -o - | FileCheck %s class Test { public: Test () : reserved (new data()) {} unsigned getID() const { return reserved->objectID; } protected: struct data { unsigned objectID; }; data* reserved; }; Test t; // CHECK: !DIDerivedType(tag: DW_TAG_pointer_type // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "data" // CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
[ "jeffrey.goeders@gmail.com" ]
jeffrey.goeders@gmail.com
5b20d2a2753359496a1322b2099e94e5609ae4d6
ba4db75b9d1f08c6334bf7b621783759cd3209c7
/src_main/utils/vmpi/vmpi_distribute_work_default.cpp
c00674ea9761e30fc980c947726774904ffa15d1
[]
no_license
equalent/source-2007
a27326c6eb1e63899e3b77da57f23b79637060c0
d07be8d02519ff5c902e1eb6430e028e1b302c8b
refs/heads/master
2020-03-28T22:46:44.606988
2017-03-27T18:05:57
2017-03-27T18:05:57
149,257,460
2
0
null
2018-09-18T08:52:10
2018-09-18T08:52:09
null
WINDOWS-1252
C++
false
false
16,515
cpp
//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======= // // Purpose: // //============================================================================= #include "vmpi.h" #include "vmpi_distribute_work.h" #include "tier0/platform.h" #include "tier0/dbg.h" #include "utlvector.h" #include "utllinkedlist.h" #include "vmpi_dispatch.h" #include "pacifier.h" #include "vstdlib/random.h" #include "mathlib/mathlib.h" #include "threadhelpers.h" #include "threads.h" #include "tier1/strtools.h" #include "tier1/utlmap.h" #include "tier1/smartptr.h" #include "tier0/icommandline.h" #include "cmdlib.h" #include "vmpi_distribute_tracker.h" #include "vmpi_distribute_work_internal.h" #define DW_SUBPACKETID_WU_ASSIGNMENT (VMPI_DISTRIBUTE_WORK_EXTRA_SUBPACKET_BASE+0) static int s_numWusToDeal = -1; void VMPI_SetWorkUnitsPartitionSize( int numWusToDeal ) { s_numWusToDeal = numWusToDeal; } class CWorkUnitInfo { public: WUIndexType m_iWorkUnit; }; class CWULookupInfo { public: CWULookupInfo() : m_iWUInfo( -1 ), m_iPartition( -222222 ), m_iPartitionListIndex( -1 ) {} public: int m_iWUInfo; // Index into m_WUInfo. int m_iPartition; // Which partition it's in. int m_iPartitionListIndex; // Index into its partition's m_WUs. }; class CPartitionInfo { public: typedef CUtlLinkedList< WUIndexType, int > PartitionWUs; public: int m_iPartition; // Index into m_Partitions. int m_iWorker; // Who owns this partition? PartitionWUs m_WUs; // Which WUs are in this partition? }; // Work units tracker to track consecutive finished blocks class CWorkUnitsTracker { public: CWorkUnitsTracker() {} public: // Initializes the unit tracker to receive numUnits in future void PrepareForWorkUnits( uint64 numUnits ); // Signals that a work unit has been finished // returns a zero-based index of the next pending work unit // up to which the task list has been processed fully now // because the received work unit filled the gap or was the next pending work unit. // returns 0 to indicate that this work unit is a "faster processed future work unit". uint64 WorkUnitFinished( uint64 iWorkUnit ); public: enum WUInfo { kNone, kTrigger, kDone }; CVisibleWindowVector< uint8 > m_arrInfo; }; void CWorkUnitsTracker::PrepareForWorkUnits( uint64 numUnits ) { m_arrInfo.Reset( numUnits + 1 ); if ( numUnits ) { m_arrInfo.ExpandWindow( 2ull, kNone ); m_arrInfo.Get( 0ull ) = kTrigger; } } uint64 CWorkUnitsTracker::WorkUnitFinished( uint64 iWorkUnit ) { uint64 uiResult = uint64( 0 ); if ( iWorkUnit >= m_arrInfo.FirstPossibleIndex() && iWorkUnit < m_arrInfo.PastPossibleIndex() ) { // Need to access the element m_arrInfo.ExpandWindow( iWorkUnit + 1, kNone ); // Set it done uint8 &rchThere = m_arrInfo.Get( iWorkUnit ), chThere = rchThere; rchThere = kDone; // Should we trigger? if ( kTrigger == chThere ) { // Go along all "done" work units and trigger the last found one while ( ( ( ++ iWorkUnit ) < m_arrInfo.PastVisibleIndex() ) && ( kDone == m_arrInfo.Get( iWorkUnit ) ) ) continue; m_arrInfo.Get( iWorkUnit ) = kTrigger; m_arrInfo.ShrinkWindow( iWorkUnit - 1 ); uiResult = iWorkUnit; } else if( iWorkUnit == m_arrInfo.FirstPossibleIndex() ) { // Go along all "done" work units and shrink including the last found one while ( ( ( ++ iWorkUnit ) < m_arrInfo.PastVisibleIndex() ) && ( kDone == m_arrInfo.Get( iWorkUnit ) ) ) continue; m_arrInfo.ShrinkWindow( iWorkUnit - 1 ); } } return uiResult; } CWorkUnitsTracker g_MasterWorkUnitsTracker; static bool CompareSoonestWorkUnitSets( CPartitionInfo::PartitionWUs * const &x, CPartitionInfo::PartitionWUs * const &y ) { // Compare by fourth/second/first job in the partitions WUIndexType missing = ~WUIndexType(0); WUIndexType jobsX[4] = { missing, missing, missing, missing }; WUIndexType jobsY[4] = { missing, missing, missing, missing }; int counter = 0; counter = 0; FOR_EACH_LL( (*x), i ) { jobsX[ counter ++ ] = (*x)[i]; if ( counter >= 4 ) break; } counter = 0; FOR_EACH_LL( (*y), i ) { jobsY[ counter ++ ] = (*y)[i]; if ( counter >= 4 ) break; } // Compare if ( jobsX[3] != jobsY[3] ) return ( jobsX[3] < jobsY[3] ); if ( jobsX[1] != jobsY[1] ) return ( jobsX[1] < jobsY[1] ); return jobsX[0] < jobsY[0]; } class CDistributor_DefaultMaster : public IWorkUnitDistributorMaster { public: virtual void Release() { delete this; } virtual void DistributeWork_Master( CDSInfo *pInfo ) { m_pInfo = pInfo; g_MasterWorkUnitsTracker.PrepareForWorkUnits( m_pInfo->m_nWorkUnits ); m_WULookup.Reset( pInfo->m_nWorkUnits ); while ( m_WULookup.FirstPossibleIndex() < m_WULookup.PastPossibleIndex() ) { VMPI_DispatchNextMessage( 200 ); VMPITracker_HandleDebugKeypresses(); if ( g_pDistributeWorkCallbacks && g_pDistributeWorkCallbacks->Update() ) break; } } virtual void OnWorkerReady( int iSource ) { AssignWUsToWorker( iSource ); } virtual bool HandleWorkUnitResults( WUIndexType iWorkUnit ) { CWULookupInfo *pLookup = NULL; if ( iWorkUnit >= m_WULookup.FirstPossibleIndex() && iWorkUnit < m_WULookup.PastVisibleIndex() ) pLookup = &m_WULookup.Get( iWorkUnit ); if ( !pLookup || pLookup->m_iWUInfo == -1 ) return false; // Mark this WU finished and remove it from the list of pending WUs. m_WUInfo.Remove( pLookup->m_iWUInfo ); pLookup->m_iWUInfo = -1; // Get rid of the WU from its partition. int iPartition = pLookup->m_iPartition; CPartitionInfo *pPartition = m_Partitions[iPartition]; pPartition->m_WUs.Remove( pLookup->m_iPartitionListIndex ); // Shrink the window of the lookup work units if ( iWorkUnit == m_WULookup.FirstPossibleIndex() ) { WUIndexType kwu = iWorkUnit; for ( WUIndexType kwuEnd = m_WULookup.PastVisibleIndex(); kwu < kwuEnd; ++ kwu ) { if ( -1 != m_WULookup.Get( kwu ).m_iWUInfo && kwu > iWorkUnit ) break; } m_WULookup.ShrinkWindow( kwu - 1 ); } // Give the worker some new work if need be. if ( pPartition->m_WUs.Count() == 0 ) { int iPartitionWorker = pPartition->m_iWorker; delete pPartition; m_Partitions.Remove( iPartition ); // If there are any more WUs remaining, give the worker from this partition some more of them. if ( m_WULookup.FirstPossibleIndex() < m_WULookup.PastPossibleIndex() ) { AssignWUsToWorker( iPartitionWorker ); } } uint64 iDoneWorkUnits = g_MasterWorkUnitsTracker.WorkUnitFinished( iWorkUnit ); if ( iDoneWorkUnits && g_pDistributeWorkCallbacks ) { g_pDistributeWorkCallbacks->OnWorkUnitsCompleted( iDoneWorkUnits ); } return true; } virtual void DisconnectHandler( int workerID ) { int iPartitionLookup = FindPartitionByWorker( workerID ); if ( iPartitionLookup != -1 ) { // Mark this guy's partition as unowned so another worker can get it. CPartitionInfo *pPartition = m_Partitions[iPartitionLookup]; pPartition->m_iWorker = -1; } } CPartitionInfo* AddPartition( int iWorker ) { CPartitionInfo *pNew = new CPartitionInfo; pNew->m_iPartition = m_Partitions.AddToTail( pNew ); pNew->m_iWorker = iWorker; return pNew; } bool SplitWUsPartition( CPartitionInfo *pPartitionLarge, CPartitionInfo **ppFirstHalf, CPartitionInfo **ppSecondHalf, int iFirstHalfWorker, int iSecondHalfWorker ) { int nCount = pPartitionLarge->m_WUs.Count(); if ( nCount > 1 ) // Allocate the partitions for the two workers { *ppFirstHalf = AddPartition( iFirstHalfWorker ); *ppSecondHalf = AddPartition( iSecondHalfWorker ); } else // Specially transfer a partition with too few work units { *ppFirstHalf = NULL; *ppSecondHalf = AddPartition( iSecondHalfWorker ); } // Prepare for transfer CPartitionInfo *arrNewParts[2] = { *ppFirstHalf ? *ppFirstHalf : *ppSecondHalf, *ppSecondHalf }; // Transfer the work units: // alternate first/second halves // don't put more than "half deal units" tasks into the second half // e.g. { 1, 2, 3, 4 } // becomes: 1st half { 1, 2 }, 2nd half { 3, 4 } for ( int k = 0; k < nCount; ++ k ) { int iHead = pPartitionLarge->m_WUs.Head(); WUIndexType iWU = pPartitionLarge->m_WUs[ iHead ]; pPartitionLarge->m_WUs.Remove( iHead ); /* int nHalf = !!( ( k % 2 ) || ( k >= nCount - 1 ) ); if ( k == 5 ) // no more than 2 jobs to branch off arrNewParts[ 1 ] = arrNewParts[ 0 ]; */ int nHalf = !( k < nCount/2 ); CPartitionInfo *pTo = arrNewParts[ nHalf ]; CWULookupInfo &li = m_WULookup.Get( iWU ); li.m_iPartition = pTo->m_iPartition; li.m_iPartitionListIndex = pTo->m_WUs.AddToTail( iWU ); } // LogPartitionsWorkUnits( pInfo ); return true; } void AssignWUsToWorker( int iWorker ) { // Get rid of this worker's old partition. int iPrevious = FindPartitionByWorker( iWorker ); if ( iPrevious != -1 ) { delete m_Partitions[iPrevious]; m_Partitions.Remove( iPrevious ); } if ( g_iVMPIVerboseLevel >= 1 ) Msg( "A" ); CVisibleWindowVector< CWULookupInfo > &vlkup = m_WULookup; if ( CommandLine()->FindParm( "-mpi_NoScheduler" ) ) { Warning( "\n\n-mpi_NoScheduler found: Warning - this should only be used for testing and with 1 worker!\n\n" ); vlkup.ExpandWindow( m_pInfo->m_nWorkUnits ); CPartitionInfo *pPartition = AddPartition( iWorker ); for ( int i=0; i < m_pInfo->m_nWorkUnits; i++ ) { CWorkUnitInfo info; info.m_iWorkUnit = i; CWULookupInfo &li = vlkup.Get( i ); li.m_iPartition = pPartition->m_iPartition; li.m_iPartitionListIndex = pPartition->m_WUs.AddToTail( i ); li.m_iWUInfo = m_WUInfo.AddToTail( info ); } SendPartitionToWorker( pPartition, iWorker ); return; } // Any partitions abandoned by workers? int iAbandonedPartition = FindPartitionByWorker( -1 ); if ( -1 != iAbandonedPartition ) { CPartitionInfo *pPartition = m_Partitions[ iAbandonedPartition ]; pPartition->m_iWorker = iWorker; SendPartitionToWorker( pPartition, iWorker ); } // Any absolutely untouched partitions yet? else if ( vlkup.PastVisibleIndex() < vlkup.PastPossibleIndex() ) { // Figure out how many WUs to include in a batch int numWusToDeal = s_numWusToDeal; if ( numWusToDeal <= 0 ) { uint64 uiFraction = vlkup.PastPossibleIndex() / g_nMaxWorkerCount; Assert( uiFraction < INT_MAX/2 ); numWusToDeal = int( uiFraction ); if ( numWusToDeal <= 0 ) numWusToDeal = 8; } // Allocate room for upcoming work units lookup WUIndexType iBegin = vlkup.PastVisibleIndex(); WUIndexType iEnd = min( iBegin + g_nMaxWorkerCount * numWusToDeal, vlkup.PastPossibleIndex() ); vlkup.ExpandWindow( iEnd - 1 ); // Allocate a partition size_t numPartitions = ( size_t ) min( iEnd - iBegin, g_nMaxWorkerCount ); CArrayAutoPtr< CPartitionInfo * > spArrPartitions( new CPartitionInfo* [ numPartitions ] ); CPartitionInfo **arrPartitions = spArrPartitions.Get(); arrPartitions[0] = AddPartition( iWorker ); for ( size_t k = 1; k < numPartitions; ++ k ) arrPartitions[k] = AddPartition( -1 ); // Assign upcoming work units to the partitions. for ( WUIndexType i = iBegin ; i < iEnd; ++ i ) { CWorkUnitInfo info; info.m_iWorkUnit = i; CPartitionInfo *pPartition = arrPartitions[ size_t( (i - iBegin) % numPartitions ) ]; CWULookupInfo &li = vlkup.Get( i ); li.m_iPartition = pPartition->m_iPartition; li.m_iPartitionListIndex = pPartition->m_WUs.AddToTail( i ); li.m_iWUInfo = m_WUInfo.AddToTail( info ); } // Now send this guy the WU list in his partition. SendPartitionToWorker( arrPartitions[0], iWorker ); } // Split one of the last partitions to finish sooner else { // Find a partition to split. int iPartToSplit = FindSoonestPartition(); if ( iPartToSplit >= 0 ) { CPartitionInfo *pPartition = m_Partitions[ iPartToSplit ]; CPartitionInfo *pOldHalf = NULL, *pNewHalf = NULL; int iOldWorker = pPartition->m_iWorker, iNewWorker = iWorker; if ( SplitWUsPartition( pPartition, &pOldHalf, &pNewHalf, iOldWorker, iNewWorker ) ) { if ( pOldHalf ) SendPartitionToWorker( pOldHalf, iOldWorker ); if ( pNewHalf ) SendPartitionToWorker( pNewHalf, iNewWorker ); // Delete the partition that got split Assert( pPartition->m_WUs.Count() == 0 ); delete pPartition; m_Partitions.Remove( iPartToSplit ); } } } } int FindSoonestPartition() { CUtlLinkedList < CPartitionInfo *, int > &lst = m_Partitions; // Sorted partitions CUtlMap< CPartitionInfo::PartitionWUs *, int > sortedPartitions ( CompareSoonestWorkUnitSets ); sortedPartitions.EnsureCapacity( lst.Count() ); FOR_EACH_LL( lst, i ) { sortedPartitions.Insert( &lst[i]->m_WUs, i ); } if ( sortedPartitions.Count() ) { return sortedPartitions.Element( sortedPartitions.FirstInorder() ); } return lst.Head(); } int FindPartitionByWorker( int iWorker ) { FOR_EACH_LL( m_Partitions, i ) { if ( m_Partitions[i]->m_iWorker == iWorker ) return i; } return -1; } void SendPartitionToWorker( CPartitionInfo *pPartition, int iWorker ) { // Stuff the next nWUs work units into the buffer. MessageBuffer mb; PrepareDistributeWorkHeader( &mb, DW_SUBPACKETID_WU_ASSIGNMENT ); FOR_EACH_LL( pPartition->m_WUs, i ) { WUIndexType iWU = pPartition->m_WUs[i]; mb.write( &iWU, sizeof( iWU ) ); VMPITracker_WorkUnitSentToWorker( ( int ) iWU, iWorker ); } VMPI_SendData( mb.data, mb.getLen(), iWorker ); } virtual bool HandlePacket( MessageBuffer *pBuf, int iSource, bool bIgnoreContents ) { return false; } private: CDSInfo *m_pInfo; CUtlLinkedList<CPartitionInfo*,int> m_Partitions; CVisibleWindowVector<CWULookupInfo> m_WULookup; // Map work unit index to CWorkUnitInfo. CUtlLinkedList<CWorkUnitInfo,int> m_WUInfo; // Sorted with most elegible WU at the head. }; class CDistributor_DefaultWorker : public IWorkUnitDistributorWorker { public: virtual void Release() { delete this; } virtual void Init( CDSInfo *pInfo ) { } virtual bool GetNextWorkUnit( WUIndexType *pWUIndex ) { CCriticalSectionLock csLock( &m_CS ); csLock.Lock(); // NOTE: this is called from INSIDE worker threads. if ( m_WorkUnits.Count() == 0 ) { return false; } else { *pWUIndex = m_WorkUnits[ m_WorkUnits.Head() ]; m_WorkUnits.Remove( m_WorkUnits.Head() ); return true; } } virtual void NoteLocalWorkUnitCompleted( WUIndexType iWU ) { } virtual bool HandlePacket( MessageBuffer *pBuf, int iSource, bool bIgnoreContents ) { if ( pBuf->data[1] == DW_SUBPACKETID_WU_ASSIGNMENT ) { // If the message wasn't even related to the current DistributeWork() call we're on, ignore it. if ( bIgnoreContents ) return true; if ( ((pBuf->getLen() - pBuf->getOffset()) % sizeof( WUIndexType )) != 0 ) { Error( "DistributeWork: invalid work units packet from master" ); } // Parse out the work unit indices. CCriticalSectionLock csLock( &m_CS ); csLock.Lock(); m_WorkUnits.Purge(); int nIndices = (pBuf->getLen() - pBuf->getOffset()) / sizeof( WUIndexType ); for ( int i=0; i < nIndices; i++ ) { WUIndexType iWU; pBuf->read( &iWU, sizeof( iWU ) ); // Add the index to the list. m_WorkUnits.AddToTail( iWU ); } csLock.Unlock(); return true; } else { return false; } } // Threads eat up the list of WUs in here. CCriticalSection m_CS; CUtlLinkedList<WUIndexType, int> m_WorkUnits; // A list of work units assigned to this worker }; IWorkUnitDistributorMaster* CreateWUDistributor_DefaultMaster() { return new CDistributor_DefaultMaster; } IWorkUnitDistributorWorker* CreateWUDistributor_DefaultWorker() { return new CDistributor_DefaultWorker; }
[ "sean@csnxs.uk" ]
sean@csnxs.uk
36f6b29d726335025b4b1cb8898b7932fad7802b
d757d8769cb2affe1d26a7a6cdca7f7247883ed1
/maratones/sparceTable.cpp
4554ea7c1d7a63307d1909ad5d05a8d6fa4d64c6
[]
no_license
gdka/CP
c78540ad5743051e13f9af4b4505e0232cb8d195
bc0cae1f7a578aebb529a92b0b874f2b6133c5fd
refs/heads/master
2021-03-27T15:15:03.857594
2018-10-26T19:42:13
2018-10-26T19:42:13
95,737,893
1
0
null
null
null
null
UTF-8
C++
false
false
304
cpp
int query(int x,int y){ len=y-x+1; k=log2(len); return min(M[x][k],M[y+1-(1<<k)][k]); } int N = Array.size(); FOR(i,0,N) M[i][0]=array[ i ]; for(int j=1; j<=log2(N); j++) for(int i=0;i+(1<<(j-1))<N;i++) M[i][j]=min(M[i][j-1],M[i+(1<<(j-1))][j-1]); //MOSCA CON LA PRECEDENCIA >> + - revisar toodo
[ "gdkufatty@gmail.com" ]
gdkufatty@gmail.com
82e03b630e25b62c69f65ebb3dfd36e49fb4fcd1
811da40c07ef2eb60fbae6d475a8ebdc2f1c12bd
/occlusion/src/occlusion_node.cpp
f6f7a6306d23e105f6cfb5d5d942c25350f1b5c7
[]
no_license
s170035u/M2_AW_Develop
0254368064289c5c8de12de349aa9fb5fe31af5e
cc3751ec1525149c4d3aa57ea2e5ea83b6c7b045
refs/heads/master
2020-04-14T04:34:54.893109
2019-01-30T10:55:57
2019-01-30T10:55:57
163,639,665
0
0
null
null
null
null
UTF-8
C++
false
false
440
cpp
// ROSに必要なヘッダーを読み込む #include <ros/ros.h> // includeファイルのocclusion.hを読み込む #include "occlusion.h" // C++の本体関数 int main(int argc, char **argv) { // ROSの初期化 ros::init(argc, argv, "occlusion"); // Occlusion クラスをインスタンス化 Occlusion occlusion; // occlusionクラス:オクルージョン計算メソッド occlusion.run(); // 終了 return 0; }
[ "44498942+s170035u@users.noreply.github.com" ]
44498942+s170035u@users.noreply.github.com
7dd11c9d89a81b35eb9152a9e7b0e2f1620a0833
626557a0eab4f975b791f97cae41f7ac45e6ffa5
/ContextMenuHandler.cpp
da323cf54b8296ac52b939cb626651242df04fed
[]
no_license
alexandr8s/ShellExtension
638d9f4da711b5896ef670035cac8c1c77b10ac0
ac5651f51b2ea0c4a2d641f9cc591831a2f0aff0
refs/heads/master
2021-08-28T06:42:54.513350
2017-12-11T12:55:06
2017-12-11T12:55:06
113,858,633
0
0
null
null
null
null
UTF-8
C++
false
false
2,815
cpp
#include "stdafx.h" #include <string> #include <atlstr.h> #include "ThreadPool.h" #include "ContextMenuHandler.h" ContextMenuHandler::~ContextMenuHandler() { InterlockedDecrement(&g_cObjCount); } ContextMenuHandler::ContextMenuHandler(): m_objRefCount(1) { InterlockedIncrement(&g_cObjCount); } ULONG ContextMenuHandler::AddRef() { return InterlockedIncrement(&m_objRefCount); } ULONG ContextMenuHandler::Release() { ULONG returnValue = InterlockedDecrement(&m_objRefCount); if (returnValue < 1) { delete this; } return returnValue; } HRESULT ContextMenuHandler::QueryInterface(REFIID riid, void ** ppvObject) { if (!ppvObject) return E_POINTER; *ppvObject = NULL; if (IsEqualIID(riid, IID_IUnknown)) { *ppvObject = this; this->AddRef(); return S_OK; } else if (IsEqualIID(riid, IID_IContextMenu)) { *ppvObject = (IContextMenu*)this; this->AddRef(); return S_OK; } else if (IsEqualIID(riid, IID_IShellExtInit)) { *ppvObject = (IShellExtInit*)this; this->AddRef(); return S_OK; } else { return E_NOINTERFACE; } } HRESULT ContextMenuHandler::Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject * pdtobj, HKEY hkeyProgID) { HRESULT hr = E_INVALIDARG; if (NULL == pdtobj) return hr; FORMATETC fe = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; STGMEDIUM stm = {}; if (SUCCEEDED(pdtobj->GetData(&fe, &stm))) { HDROP hDrop = static_cast<HDROP>(GlobalLock(stm.hGlobal)); if (hDrop != NULL) { UINT nFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0); if (nFiles != 0) { for (UINT i = 0; i < nFiles; i++) { int size = DragQueryFile(hDrop, i, NULL, 0) + 1; std::wstring str; str.resize(size); if (DragQueryFile(hDrop, i, &str[0], size) == 0) continue; selectedFiles.emplace(CW2A(str.c_str())); } hr = S_OK; } GlobalUnlock(stm.hGlobal); } ReleaseStgMedium(&stm); } return hr; } HRESULT ContextMenuHandler::GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT * pwReserved, LPSTR pszName, UINT cchMax) { return E_NOTIMPL; } HRESULT ContextMenuHandler::InvokeCommand(LPCMINVOKECOMMANDINFO pici) { ThreadPool & tp = ThreadPool::Instance(); tp.pushTasks(&selectedFiles); return S_OK; } HRESULT ContextMenuHandler::QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) { if (uFlags & CMF_DEFAULTONLY) return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 0); MENUITEMINFO ContextItem = {}; ContextItem.cbSize = sizeof(MENUITEMINFO); ContextItem.dwTypeData = L"Calculate checksum"; ContextItem.fMask = MIIM_STRING | MIIM_ID; ContextItem.wID = idCmdFirst; if (!InsertMenuItem(hmenu, 0, TRUE, &ContextItem)) return HRESULT_FROM_WIN32(GetLastError()); return MAKE_HRESULT(SEVERITY_SUCCESS, 0, ContextItem.wID - idCmdFirst + 1); }
[ "33665711+alexandr8s@users.noreply.github.com" ]
33665711+alexandr8s@users.noreply.github.com