blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
201
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
7
100
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
260 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
11.4k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
80 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
8
9.86M
extension
stringclasses
52 values
content
stringlengths
8
9.86M
authors
sequencelengths
1
1
author
stringlengths
0
119
fdb409c797935fded7240826b2b4827953047942
18dbbf5e29dcf165091ed3dd5797ecedf7492aea
/Codeforces/Contest/640/D.cpp
4d3eda8ca37be1d3c5047f9c30f5614f199e27bb
[]
no_license
BoHauHuang/PCCA-exercise
b12614607dc81f6d1ad9e2ceb66af137e21e9a4b
ac4ed9002939b5e9723ea884435f41454457ac05
refs/heads/master
2021-06-28T05:03:11.076903
2020-10-31T06:14:30
2020-10-31T06:14:30
180,343,175
4
2
null
2020-09-17T03:04:54
2019-04-09T10:31:14
C++
UTF-8
C++
false
false
687
cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t, n, in; cin >> t; while(t--){ cin >> n; deque<int> a; for(int i = 0 ; i < n ; i++){ cin >> in; a.push_back(in); } bool is_a = true; long long p1 = 0, p2 = 0, now = a.front(), pre = 0, ans = 1; a.pop_front(); p1+=now; pre=now; is_a = false; while(!a.empty()){ now = 0; while(now <= pre && !a.empty()){ if(is_a){ now += a.front(); a.pop_front(); } else{ now += a.back(); a.pop_back(); } } ans++; if(is_a) p1+=now; else p2+=now; pre=now; is_a = !is_a; } cout << ans << " " << p1 << " " << p2 << endl; } return 0; }
faea78fc54391f2e6a0f79a06cd66e612c10e9ae
bf91c382483c735a64b685c7fded2a8436a84ac7
/src/ledger/CheckpointRange.cpp
58057b1d2d756cbe2b6540cbea6f71955c760279
[ "MIT", "BSD-3-Clause", "BSL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
tangchain/tang-core
e85f5065217f9a289693c6c28d00bb80f5367b35
b112fc43f7df6153406810fc0ffb6676418d20c8
refs/heads/master
2020-04-14T19:25:02.133375
2019-01-04T04:21:38
2019-01-04T04:21:38
163,907,824
0
0
null
null
null
null
UTF-8
C++
false
false
1,560
cpp
// Copyright 2017 Stellar Development Foundation and contributors. Licensed // under the Apache License, Version 2.0. See the COPYING file at the root // of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 #include "ledger/CheckpointRange.h" #include "history/HistoryManager.h" #include "ledger/LedgerRange.h" #include <cassert> namespace tang { CheckpointRange::CheckpointRange(uint32_t first, uint32_t last, uint32_t frequency) : mFirst{first}, mLast{last}, mFrequency{frequency} { assert(mFirst > 0); assert(mLast >= mFirst); assert((mFirst + 1) % mFrequency == 0); assert((mLast + 1) % mFrequency == 0); } CheckpointRange::CheckpointRange(LedgerRange const& ledgerRange, HistoryManager const& historyManager) : mFirst{historyManager.checkpointContainingLedger(ledgerRange.first())} , mLast{historyManager.checkpointContainingLedger(ledgerRange.last())} , mFrequency{historyManager.getCheckpointFrequency()} { assert(mFirst > 0); assert(mLast >= mFirst); assert((mFirst + 1) % mFrequency == 0); assert((mLast + 1) % mFrequency == 0); } bool operator==(CheckpointRange const& x, CheckpointRange const& y) { if (x.mFirst != y.mFirst) { return false; } if (x.mLast != y.mLast) { return false; } if (x.mFrequency != y.mFrequency) { return false; } return true; } bool operator!=(CheckpointRange const& x, CheckpointRange const& y) { return !(x == y); } }
933018ce87eb5c933f8febd3326068282aa19bdf
0a27812a95ebbc5772c191549967b24889df55b7
/server/game/GravityWell.h
90af3113fe030c6c58526f0385ae6b0c7435eeaf
[]
no_license
ZackMattor/tis
8594fcc65286537d25a5d8fb20e3739eadb6f591
2a203d7dd9b66df24b5e4c3b4d2fbdfa243ede91
refs/heads/master
2020-05-21T08:43:57.660882
2014-02-05T05:02:29
2014-02-05T05:02:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
195
h
#ifndef GRAVITYWELL_H #define GRAVITYWELL_H #include "Vector2D.h" class GravityWell { public: GravityWell(); private: float m_mass; Vector2D m_location; }; #endif // GRAVITYWELL_H
821bc358f1d12e27f6267ae1ba075e3c5cc0f89b
5aaa3824fe15e80c7ee5a5150a7a14d15d8d3089
/engine/include/Render/ShaderProgram.h
bd21baccc6da64d401581f36dcad70c610b86bc0
[ "MIT" ]
permissive
Vbif/geometric-diversity
a7314d5eb2c4182925e8cb901ba054a6d39e1933
6e9d5a923db68acb14a0a603bd2859f4772db201
refs/heads/master
2021-09-04T02:15:33.285195
2018-01-14T13:56:50
2018-01-14T13:56:50
115,753,012
0
0
null
null
null
null
UTF-8
C++
false
false
4,688
h
#ifndef __RENDER_SHADERPROGRAM_H__ #define __RENDER_SHADERPROGRAM_H__ #include "Core/Resource.h" #include "Render/RestorableObject.h" #include "Utils/Matrix4.h" class ShaderProgramLoader; namespace Render { /// Класс для управления вершинными и пиксельными шейдерами. class ShaderProgram : public Resource, public RestorableObject { public: static ShaderProgram* CreateFromXml(rapidxml::xml_node<>* elem); static ShaderProgram* CreateFromFile(const std::string& filenameVS, const std::string& filenamePS); static ShaderProgram* CreateFromSource(const std::string& sourceVS, const std::string& sourcePS); ShaderProgram(); virtual ~ShaderProgram(); const std::string& GetName() const { return _name; } void SetName(const std::string& name) { _name = name; } /// Устанавливает файлы исходника шейдера void SetFileNames(const std::string& filenameVS, const std::string& filenamePS) { _filenameVS = filenameVS; _filenamePS = filenamePS; _isSource = false; } /// Устанавливает текст исходника шейдера void SetSource(const std::string& sourceVS, const std::string& sourcePS) { _filenameVS = sourceVS; _filenamePS = sourcePS; _isSource = true; } /// Добавляет символ препроцессора void AddDefine(const std::string& define) { _defines.push_back("#define " + define + "\n"); } void ClearDefines() { Strings().swap(_defines); } /// Создание пары шейдеров из файлов. Возможно задание пустой строки вместо одного из шейдеров virtual bool LoadFile(const std::string& filenameVS, const std::string& filenamePS) = 0; /// Создание пары шейдеров из строк с программой. Возможно задание пустой строки вместо одного из шейдеров virtual bool LoadSource(const std::string& sourceVS, const std::string& sourcePS) = 0; /// Связывание шейдеров с устройством virtual void Bind() = 0; /// Отвязывание шейдеров от устройства virtual void Unbind() = 0; /// Возвращает идентификатор программы virtual void* GetProgram() const = 0; /// Имеется ли данный параметр virtual bool HasUniform(const std::string& name) const = 0; /// Установка параметров virtual void SetUniform(const std::string& name, const float* value, int size) = 0; virtual void SetUniform(const std::string& name, const int* value, int size) = 0; void SetUniform(const std::string& name, float value) { SetUniform(name, &value, 1); } void SetUniform(const std::string& name, float value1, float value2) { float values[2] = { value1, value2 }; SetUniform(name, values, 2); } void SetUniform(const std::string& name, float value1, float value2, float value3) { float values[3] = { value1, value2, value3 }; SetUniform(name, values, 3); } void SetUniform(const std::string& name, float value1, float value2, float value3, float value4) { float values[4] = { value1, value2, value3, value4 }; SetUniform(name, values, 4); } void SetUniform(const std::string& name, int value) { SetUniform(name, &value, 1); } void SetUniform(const std::string& name, int value1, int value2) { int values[2] = { value1, value2 }; SetUniform(name, values, 2); } void SetUniform(const std::string& name, int value1, int value2, int value3) { int values[3] = { value1, value2, value3 }; SetUniform(name, values, 3); } void SetUniform(const std::string& name, int value1, int value2, int value3, int value4) { int values[4] = { value1, value2, value3, value4 }; SetUniform(name, values, 4); } void SetUniform(const std::string& name, const math::Matrix4& value) { SetUniform(name, value.v, 16); } protected: friend class ::ShaderProgramLoader; /// Загрузка шейдеров в устройство virtual void Upload() { _isSource ? LoadSource(_filenameVS, _filenamePS) : LoadFile(_filenameVS, _filenamePS); } /// Выгрузка шейдеров из устройства virtual void Release() = 0; protected: std::string _name; std::string _filenameVS; std::string _filenamePS; bool _isSource; typedef std::vector<std::string> Strings; Strings _defines; }; typedef boost::intrusive_ptr<ShaderProgram> ShaderProgramPtr; } // namespace Render #endif // __RENDER_SHADERPROGRAM_H__
75fe342a1c537659a21ee700b11d5c17559066a4
0ef4f71c8ff2f233945ee4effdba893fed3b8fad
/misc_microsoft_gamedev_source_code/misc_microsoft_gamedev_source_code/extlib/Scaleform/GFx SDK 2.1.57/Src/GFxPlayer/GFxLoadProcess.h
450789d83f18bac0e4a121923b036a5b414f553f
[]
no_license
sgzwiz/misc_microsoft_gamedev_source_code
1f482b2259f413241392832effcbc64c4c3d79ca
39c200a1642102b484736b51892033cc575b341a
refs/heads/master
2022-12-22T11:03:53.930024
2020-09-28T20:39:56
2020-09-28T20:39:56
null
0
0
null
null
null
null
UTF-8
C++
false
false
16,679
h
/********************************************************************** Filename : GFxLoadProcess.h Content : GFxLoadProcess - tracks loading and binding state. Created : Authors : Michael Antonov Copyright : (c) 2001-2007 Scaleform Corp. All Rights Reserved. Notes : This file contains class declarations used in GFxPlayerImpl.cpp only. Declarations that need to be visible by other player files should be placed in GFxCharacter.h. Licensees may use this file in accordance with the valid Scaleform Commercial License Agreement provided with the software. This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR ANY PURPOSE. **********************************************************************/ #ifndef INC_GFXLOADPROCESS_H #define INC_GFXLOADPROCESS_H #include "GTLTypes.h" #include "GFxStream.h" #include "GFxLoaderImpl.h" //#include "GFxTaskManager.h" // LoadProcess relies no many MovieDef function and APIs. #include "GFxMovieDef.h" // ***** Declared Classes class GFxLoadProcess; // ***** External Classes class GFxLoader; class GFxFontPackParams; class GFxMovieRoot; class GFxLoadQueueEntry; class GJPEGInput; // ***** Loading Process class GFxLoadProcess : public GFxLoaderTask, public GFxLogBase<GFxLoadProcess> { public: typedef GFxMovieDataDef::LoadTaskData LoadTaskData; private: // Load states used during load processing. //GPtr<GFxLoadStates> pStates; // Cached GFxParseControl flags from the states for more efficient checks. UInt ParseFlags; // Optional binding process. This pointer will be assigned if // we are doing frame-by-frame interleaved load/bind on one thread. GPtr<GFxMovieBindProcess> pBindProcess; // We keep a smart pointer to GFxMovieDataDef::LoadTaskData and not // the GFxMovieDataDef itself; this allows us to cancel loading // gracefully if user's GFxMovieDataDef is released. GPtr<LoadTaskData> pLoadData; // A pointer to DataDef used to pass to GFxSpriteDef constructor. // This pointer is usuable from the sprite instance point of view, // but it can go bad if pMovieDef is released in playback thread. // Therefore, we can't really use it during loading. GFxMovieDataDef* pDataDef_Unsafe; // *** Temporary load process state GFxSWFProcessInfo ProcessInfo; GJPEGInput* pJpegIn; // Load flags, from GfxLoader::LoadConstants UInt LoadFlags; // Running total index of import in file, used to // initialize ImportIndex in ImportData objects UInt ImportIndex; // *** Frame Bind Data content allocated // This data is used to initialize GFxFrameBindData object for // each frame, committed at the end of each root frame. UInt ImportDataCount; UInt ResourceDataCount; UInt FontDataCount; // Singly linked lists of imports for this frame. GFxImportData* pImportDataLast; GFxImportData* pImportData; // A linked list of resource data that will be used for binding. GFxResourceDataNode* pResourceData; GFxResourceDataNode* pResourceDataLast; // Fonts referenced in this frame. GFxFontDataUseNode* pFontData; GFxFontDataUseNode* pFontDataLast; // *** Sprite/Root time-line loading stack enum LoadStateType { LS_LoadingRoot = 0, LS_LoadingSprite = 1, LS_LoadState_Count }; LoadStateType LoadState; // Sprite definition into which data is being loaded. This will either // be GFxSpriteDef for loading a sprite or null if we should load into pLoadData. GFxTimelineIODef* pTimelineDef; // Array of loaded frame pointers. Once the frame is done, this // array is re-allocated as tag data and saved in GFxMovieDataDef. // Note that tags themselves also come from Def's allocator. GTL::garray<GASExecuteTag*> FrameTags[LS_LoadState_Count]; GTL::garray<GASExecuteTag*> InitActionTags; GFxStream* pAltStream; public: GFxLoadProcess(GFxMovieDataDef* pdataDef, GFxLoadStates *pstates, UInt loadFlags); ~GFxLoadProcess(); // Initializes SWF/GFX header for loading; returns 0 if there was // an error with loading header. Messages are properly logged. bool BeginSWFLoading(GFile *pfile); // Assign a bind process, if we are to do simultaneous loading and binding. void SetBindProcess(GFxMovieBindProcess *pbindProcess) { pBindProcess = pbindProcess; } // Save/access an input object used for later loading DefineBits // Images (JPEG images without the table info). void SetJpegLoader(GJPEGInput* pjin) { GASSERT(pJpegIn == NULL); pJpegIn = pjin; } GJPEGInput* GetJpegLoader() const { return pJpegIn; } // Return pDataDef pointer; can turn invalid if GFxMovieDef is relased asynchronously. GFxMovieDataDef* GetDataDef_Unsafe() const { return pDataDef_Unsafe; } const GFxSWFProcessInfo& GetProcessInfo() const { return ProcessInfo; } LoadTaskData* GetLoadTaskData() const { return pLoadData; } const char* GetFileURL() const { return pLoadData->GetFileURL(); } UInt GetVersion() const { return pLoadData->GetVersion(); } UInt GetLoadingFrame() const { return pLoadData->LoadingFrame; } const GFxExporterInfo* GetExporterInfo() const { return pLoadData->GetExporterInfo(); } GFxResourceWeakLib* GetWeakLib() const { return pLoadStates->pWeakResourceLib; } GFxLoadStates* GetLoadStates() const { return pLoadStates; } GFxMovieDefBindStates* GetBindStates() const { return pLoadStates->GetBindStates(); } // *** GFxStream Support inline GFxStream* GetStream() { return !pAltStream ? &ProcessInfo.Stream : pAltStream; } // Sets alternative stream. Use with care, since pAltStream is not refcounted // and GFxLoadProcess class does not own it. inline void SetAltStream(GFxStream* ns) { pAltStream = ns; } inline bool HasAltStream() const { return pAltStream != NULL; } // Stream inlines inline UInt8 ReadU8() { return GetStream()->ReadU8(); } inline UInt16 ReadU16() { return GetStream()->ReadU16(); } inline UInt32 ReadU32() { return GetStream()->ReadU32(); } inline SInt8 ReadS8() { return GetStream()->ReadS8(); } inline SInt16 ReadS16() { return GetStream()->ReadS16(); } inline SInt32 ReadS32() { return GetStream()->ReadS32(); } inline void AlignStream() { return GetStream()->Align(); } inline GFile* GetUnderlyingFile () { return GetStream()->GetUnderlyingFile(); } inline int GetTagEndPosition() { return GetStream()->GetTagEndPosition(); } inline int Tell() { return GetStream()->Tell(); } inline void SetPosition(int pos) { GetStream()->SetPosition(pos); } void ReadRgbaTag(GColor *pc, GFxTagType tagType); // *** Delegated Logging Support // GFxLogBase will output log messages to the appropriate logging stream, // but only if the enable option in context is set. GFxLog* GetLog() const { return pLoadStates->pLog; } // These work of captured parse control flags for efficiency. This is ok because // user updates that take place in the middle of loading are not guaranteed to take effect. inline bool IsVerboseParse() const { return (ParseFlags & GFxParseControl::VerboseParse) != 0; } inline bool IsVerboseParseShape() const { return (ParseFlags & GFxParseControl::VerboseParseShape) != 0; } inline bool IsVerboseParseMorphShape() const { return (ParseFlags & GFxParseControl::VerboseParseMorphShape) != 0; } inline bool IsVerboseParseAction() const { return (ParseFlags & GFxParseControl::VerboseParseAction) != 0; } inline bool IsLoadingImageData() const { return 1; } inline bool IsLoadingFontShapes() const { return 1; } // *** Resource Loading / Access // There function are used to add resource data to LoadTaskData during loading, // or query resources loaded so far. Most of I/O data is assigned through here, // GFxMovieDef only implements accessor methods. void SetMetadata(UByte *pdata, UInt size) { pLoadData->SetMetadata(pdata, size); } void SetFileAttributes(UInt attrs) { pLoadData->SetFileAttributes(attrs); } // Allocate MovieData local memory. inline void* AllocTagMemory(size_t bytes) { return pLoadData->AllocTagMemory(bytes); } // Allocate a tag directly through method above. template<class T> inline T* AllocTag() { return GTL::gconstruct<T>(AllocTagMemory(sizeof(T))); } template<class T> inline T* AllocMovieDefClass() { return GTL::gconstruct<T>(AllocTagMemory(sizeof(T))); } GFxResourceId GetNextGradientId() { return pLoadData->GetNextGradientId(); } GFxResourceHandle AddNewResourceHandle(GFxResourceId rid) { return pLoadData->AddNewResourceHandle(rid); } // Add a resource during loading. inline void AddResource(GFxResourceId rid, GFxResource* pres) { GASSERT(LoadState == LS_LoadingRoot); if (LoadState == LS_LoadingRoot) pLoadData->AddResource(rid, pres); } inline void AddCharacter(GFxResourceId rid, GFxCharacterDef* pdef) { return pLoadData->AddCharacter(rid, pdef); } // Adds a new resource and generates a handle for it. GFxResourceHandle AddDataResource(GFxResourceId rid, const GFxResourceData &resData); GFxResourceHandle AddFontDataResource(GFxResourceId rid, GFxFontData *pfontData); // Add a dynamically-loaded image resource, with unique key. // This is normally used for SWF embedded images. // Based on image creator flags, either the resource itself or // its resource data will be added. void AddImageResource(GFxResourceId rid, GImage *pimage); void AddImportData(GFxImportData* pimportData); void ExportResource(const GFxString& symbol, GFxResourceId rid, const GFxResourceHandle &hres) { pLoadData->ExportResource(symbol, rid, hres); } inline bool GetResourceHandle(GFxResourceHandle* phandle, GFxResourceId rid) const { return pLoadData->GetResourceHandle(phandle, rid); } inline GFxFontData* GetFontData(GFxResourceId rid) { return pLoadData->GetFontData(rid); } // *** Frame Loading // Creates a frame binding object; should be called only when // a root frame is finished. Clears the internal import/font/resource lists. GFxFrameBindData* CreateFrameBindData(); // Enter and leave Sprite. // Only one level of nesting is possible in SWF files. void EnterSpriteDef(GFxTimelineIODef *psprite) { GASSERT(LoadState == LS_LoadingRoot); GASSERT(psprite != 0); LoadState = LS_LoadingSprite; pTimelineDef = psprite; } void LeaveSpriteDef() { GASSERT(LoadState == LS_LoadingSprite); LoadState = LS_LoadingRoot; pTimelineDef = 0; } // Get allocator used for path shape storage. GFxPathAllocator* GetPathAllocator() const { return pLoadData->GetPathAllocator(); } // Labels the frame currently being loaded with the given name. // A copy of the name string is made and kept in this object. inline void AddFrameName(const char* pname, GFxLog *plog) { if (LoadState == LS_LoadingSprite) pTimelineDef->AddFrameName(pname, plog); else pLoadData->AddFrameName(pname, plog); } inline void AddExecuteTag(GASExecuteTag* ptag) { FrameTags[LoadState].push_back(ptag); } // Need to execute the given tag before entering the // currently-loading frame for the first time. inline void AddInitAction(GFxResourceId spriteId, GASExecuteTag* ptag) { GUNUSED(spriteId); GASSERT(LoadState == LS_LoadingRoot); InitActionTags.push_back(ptag); } // Helper method used to convert accumulated tags into a frame. GFxTimelineDef::Frame TagArrayToFrame(GTL::garray<GASExecuteTag*> &tagArray); // Apply frame tags that have been accumulated to the MovieDef/SpriteDef. void CommitFrameTags(); // Cleans up frame tags; only used if loading was canceled. void CleanupFrameTags(); inline bool FrameTagsAvailable() const { return (FrameTags[LoadState].size() > 0) || ((LoadState == LS_LoadingRoot) && (InitActionTags.size() > 0)); } void ReportProgress(const GFxString& fileURL, const GFxTagInfo& tagInfo) { if (pLoadStates->pProgressHandler) pLoadStates->pProgressHandler->LoadTagUpdate( GFxProgressHandler::TagInfo(fileURL,tagInfo.TagType,tagInfo.TagOffset, tagInfo.TagLength, tagInfo.TagDataOffset)); } // *** GFxTask implementation virtual void Execute() { //GFxMovieDefImpl::BindTaskData* pbd = NULL; //if (pBindProcess) // pbd = pBindProcess->pBindData.GetPtr(); //printf("GFxLoadProcess::Execute: this: %x, BindData: %x, thread: %d --->>\n",this,pbd,GetCurrentThreadId()); // Do the loading. pLoadData->Read(this, pBindProcess); //printf("GFxLoadProcess::Execute: this: %x, BindData: %x, thread: %d ---<<\n",this,pbd,GetCurrentThreadId()); } virtual void OnAbandon(bool started) { //GFxMovieDefImpl::BindTaskData* pbd = NULL; //if (pBindProcess) // pbd = pBindProcess->pBindData.GetPtr(); //printf("GFxLoadProcess::OnAbandon: this: %x, BindData: %x, thread: %d, started: %d\n",this,pbd,GetCurrentThreadId(),started); if (started) pLoadData->OnMovieDataDefRelease(); if (pBindProcess && !started) pBindProcess->SetBindState(GFxMovieDefImpl::BS_Canceled); } }; // ***** Image creator from files class GFxImageFileResourceCreator : public GFxResourceData::DataInterface { typedef GFxResourceData::DataHandle DataHandle; // Creates/Loads resource based on data and loading process virtual bool CreateResource(DataHandle hdata, GFxResourceBindData *pbindData, GFxLoadStates *plp) const; public: static GFxResourceData CreateImageFileResourceData(GFxImageFileInfo * prfi); }; class GFxImageResourceCreator : public GFxResourceData::DataInterface { typedef GFxResourceData::DataHandle DataHandle; // Creates/Loads resource based on data and loading process virtual bool CreateResource(DataHandle hdata, GFxResourceBindData *pbindData, GFxLoadStates *plp) const; public: static GFxResourceData CreateImageResourceData(GImage* pimage); }; // ***** Font resource creators from embedded font data class GFxFontResourceCreator : public GFxResourceData::DataInterface { typedef GFxResourceData::DataHandle DataHandle; // Creates/Loads resource based on data and loading process virtual bool CreateResource(DataHandle hdata, GFxResourceBindData *pbindData, GFxLoadStates *plp) const; }; #endif // INC_GFXLOADPROCESS_H
e0cd289694ab69d22b1babe925111eedb9858b94
502ed2eacc58c6c6dbc42bad6305bcda8ce8fa94
/object/DedeCMS/data/tplcache/009e2e1d14141a902138d624aeca99ae.inc
d92fd66e7788aef81ebbe96d9985cf9f1f2df4f6
[]
no_license
fengzi930610/nnmtl
98ad4eab21601ca23d8f006fd2766878298e1d6d
0b245c3860f35a06edb3b5ca351fe57cad4fa5d8
refs/heads/master
2020-05-09T20:10:40.216050
2019-10-22T09:11:36
2019-10-22T09:11:36
181,389,342
1
0
null
null
null
null
UTF-8
C++
false
false
682
inc
{dede:pagestyle maxwidth='800' pagepicnum='12' ddmaxwidth='200' row='3' col='4' value='1'/} {dede:img ddimg='/uploads/allimg/171006/1-1G006115343.jpg' text='' width='1046' height='800'} /uploads/allimg/171006/1-1G006115343.jpg {/dede:img} {dede:img ddimg='/uploads/allimg/171006/1-1G006115345.jpg' text='' width='1519' height='750'} /uploads/allimg/171006/1-1G006115345.jpg {/dede:img} {dede:img ddimg='/uploads/allimg/171006/1-1G006115346.jpg' text='' width='1500' height='1136'} /uploads/allimg/171006/1-1G006115346.jpg {/dede:img} {dede:img ddimg='/uploads/allimg/171006/1-1G006115348.jpg' text='' width='1500' height='1110'} /uploads/allimg/171006/1-1G006115348.jpg {/dede:img}
f03eb607b95eb435b2ed2b0cdb2bf5f4873ed59e
61e52d6262b98da6b0df4c1d411e1f876f792833
/src/Application/AppKernel.hpp
0128f9a31fabd4448584dba8fd540aba09acc8c2
[ "MIT" ]
permissive
chapterjason/Clive
b25e3bc528a4f8b7b80fdcc7a8a5de074ef38a3a
29883b5b42233c57870fa4a14e57831d659d1d16
refs/heads/master
2020-06-19T14:48:06.116622
2019-07-21T22:08:00
2019-07-21T22:08:26
196,749,918
1
0
null
null
null
null
UTF-8
C++
false
false
387
hpp
// // Created by jason on 18.07.19. // #ifndef CLIVE_APPKERNEL_HPP #define CLIVE_APPKERNEL_HPP #include "../Core/Kernel/Kernel.hpp" using namespace Clive::Core; namespace Clive::Application { class AppKernel : public Kernel { public: void bootstrap() override; int execute(int argc, char **argv) override; }; } #endif //CLIVE_APPKERNEL_HPP
1b7cb253438d439b3279fc57318f86d4ecae9b72
136e369ec44e329567e305bcc13400592b203c11
/kaue/uva/hunan/a.cpp
53af4e1383512dacc962f5e34d9ed2729da31394
[]
no_license
kssilveira/mara
8ea9a544aba232297c8cb3a5e25e07aaf6434b1f
4deb0a8bfecae7408b0d6e561e4c7fb154c9ff2a
refs/heads/master
2021-01-23T05:39:20.554801
2012-06-19T22:39:00
2012-06-19T22:39:00
2,374,687
1
0
null
null
null
null
UTF-8
C++
false
false
479
cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { string s; string one = "one"; cin >> s; if (s.size() == 5) { cout << "3" << endl; } else { int count = 0; for (int i = 0; i < (int) s.size(); i++) { if (s[i] != one[i]) { count++; } } if (count < 2) { cout << "1" << endl; } else { cout << "2" << endl; } } } }
6368a87cac9c38df3845e87421f74de67e16ae16
7fa06a81b1958ad4bd19f051bdc2429b1ea9c707
/ass3/src/server/tcpServer/tcpServer.cpp
cc29b9db5d919bdf6d05cae7117dca6b252557f4
[]
no_license
ronenius/Advanced-Programming-Project
0b67edd6470543204549519a1fb3750a97f63381
9d10f5f9914fcc01745fe83f3999c0b34631c59d
refs/heads/master
2023-08-18T02:05:08.232992
2021-10-11T21:25:08
2021-10-11T21:25:08
393,982,567
0
0
null
null
null
null
UTF-8
C++
false
false
1,452
cpp
#include "tcpServer.hpp" //The tcp port (42069). const int tcpServer::TCP_PORT = 42069; //The queue size of the server accepting (5). const int tcpServer::QUEUE_SIZE = 5; //The constructor of the tcp server. tcpServer::tcpServer(int sock) : sock(sock){}; //Binds the socket to the tcp port. void tcpServer::bind() { //Builds the sockaddr to get messages from all sockets. struct sockaddr_in sin; memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = INADDR_ANY; sin.sin_port = htons(TCP_PORT); //Binds the tcp server in the port that was decided. if (::bind(sock, (struct sockaddr *)&sin, sizeof(sin)) < 0) { perror("error binding socket"); } } //Listens to any clients that want to connect to the server. void tcpServer::listen() { //Listens to all of the clients. if (::listen(sock, QUEUE_SIZE) < 0) { perror("error listening to a socket"); } } //Accepts the clients that want to cennect to the server. int tcpServer::accept() { //Builds the sockaddr of the client. struct sockaddr_in client_sin; unsigned int addr_len = sizeof(client_sin); //Gets the sockaddr and the socket number of the client socket. int client_sock = ::accept(sock, (struct sockaddr *)&client_sin, &addr_len); //Returns the socket number for future use. return client_sock; } //Closes the socket. void tcpServer::closeSocket() { close(sock); }
c12072d2631864697eb2777efea8cf412f0c675e
6d6c4563789cac707f1a816de531aa5ea010967f
/Source/mslib/Light.cpp
b7610f0f3d2a238313c86073f3495220090488db
[ "MIT" ]
permissive
MasyoLab/Directx9-Framework
b943e43751f0cb8441b1714203014bfdc5332b9f
b7525865744b64a7c10078656cfb086a1276c819
refs/heads/master
2023-06-04T13:45:07.153578
2021-06-24T14:27:10
2021-06-24T14:27:10
379,284,299
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
2,861
cpp
//========================================================================== // ライト [Light.cpp] // author : MasyoLab //========================================================================== #include "Light.h" _MSLIB_BEGIN namespace object { std::list<int> Light::m_lights; LightData::LightData() { ZeroMemory(this, sizeof(*this)); } LightData::~LightData() { } Light::Light(LPDIRECT3DDEVICE9 pDevice) : m_device(pDevice), m_label(0) { SetComponentName("Light"); SetMatrixType(MatrixType::World); SetActivity(true); CreateLabel(); } Light::Light(LPDIRECT3DDEVICE9 pDevice, bool _bInOutFunctionFlag) : InOutFunction(_bInOutFunctionFlag), m_device(pDevice), m_label(0) { SetComponentName("Light"); SetMatrixType(MatrixType::World); SetActivity(true); CreateLabel(); } Light::~Light() { auto itr = std::find(m_lights.begin(), m_lights.end(), m_label); if (itr != m_lights.end()) m_lights.erase(itr); if (m_device != nullptr) m_device->LightEnable(m_label, false); // 使用の許可 } void Light::Init() { Init(D3DXVECTOR3(0.0f, -1.0f, 0.0f)); } void Light::Init(const D3DXVECTOR3& aVecDir) { if (m_device == nullptr) return; // ライトの設定 ZeroMemory(&m_light, sizeof(m_light)); D3DXVec3Normalize((D3DXVECTOR3*)& m_light.Direction, &aVecDir); m_light.Type = D3DLIGHT_DIRECTIONAL; m_light.Diffuse = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f); m_light.Specular = D3DXCOLOR(0.5f, 0.5f, 0.5f, 1.0f); m_light.Ambient = D3DXCOLOR(0.1f, 0.1f, 0.1f, 1.0f); m_light.Direction = D3DXVECTOR3(-5.0f, -1.0f, 1.0f); m_light.Range = 1000.0f; // ライトの設定 m_device->SetLight(m_label, &m_light); // ライトの種類 m_device->LightEnable(m_label, true); // 使用の許可 m_device->SetRenderState(D3DRS_LIGHTING, true); m_device->SetRenderState(D3DRS_SPECULARENABLE, true); m_device->SetRenderState(D3DRS_AMBIENT, 0x00808080); } void Light::Update() { m_light.Position = m_parameter.position; } void Light::UpdateMatrix() { switch (GetMatrixType()) { case MatrixType::Default: CreateWorldMatrix(); break; case MatrixType::World: CreateWorldMatrix(); break; case MatrixType::Local: CreateLocalMatrix(); break; default: CreateWorldMatrix(); break; } } void Light::GUISystem() { GUIGameObject(); GUITransform(); } void Light::InputDataFunction(std::ifstream& _ifstream) { InputDataTransform(_ifstream); } void Light::OutputDataFunction(std::ofstream& _ofstream) { OutputDataTransform(_ofstream); } void Light::CreateLabel() { for (m_label = 0;; m_label++) { auto itr = std::find(m_lights.begin(), m_lights.end(), m_label); // 存在する場合 if (itr != m_lights.end()) continue; // 存在しなければ m_lights.push_back(m_label); return; } } } _MSLIB_END
a55b73e2a00546e4e3b02414866112d517c2c256
9af1ae8ceb520af234b6b2e26e9b5ab6d783fe40
/src/example/json/json_to_json.cpp
884ecb57e14a62e895aea7d0e20c971b5cdcaa6f
[ "Apache-2.0", "BSD-3-Clause", "BSL-1.0", "MIT" ]
permissive
robinchrist/json
2efdbcc1b5d2c00516c84b50ad71828a864bf1be
99c57818ba1644a58f0535ff3e98bd2ae0e75b52
refs/heads/master
2020-08-13T21:24:58.943083
2019-10-24T18:32:19
2019-10-24T20:56:07
215,040,246
0
0
NOASSERTION
2019-10-14T12:37:24
2019-10-14T12:37:24
null
UTF-8
C++
false
false
549
cpp
// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/json/ #include <iostream> #include <tao/json.hpp> int main( int argc, char** argv ) { if( argc != 2 ) { std::cerr << "usage: " << argv[ 0 ] << " file.json" << std::endl; std::cerr << " parses the json file and writes it to stdout as json" << std::endl; return 1; } tao::json::events::to_stream consumer( std::cout ); tao::json::events::parse_file( consumer, argv[ 1 ] ); return 0; }
663db4a1abdda52fa66969e281a1e76d1953b8e1
f861cbae2b4cb616c00c40ea8eb4b46716b45bf2
/Maze/Manager.cpp
24fbcdb5e449289b4bdaaf44c5ee5dff56a68f17
[]
no_license
yutateno/Simple2DMaze
8064be2d2b70782ae120eac9351c22daa63d3552
086b47335253114b2a8d3b59a69146feabca52ff
refs/heads/master
2020-05-16T04:56:34.504659
2019-04-23T09:07:58
2019-04-23T09:07:58
182,796,614
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
2,775
cpp
#include "Manager.hpp" /// -------------------------------------------------------------------------------------------------- void Manager::SceneChange() { // 今のシーン switch (BASICPARAM::e_nowScene) { // タイトル case ESceneNumber::TITLE: POINTER_RELEASE(p_baseMove); for (int i = 0; i != std::extent<decltype(tempMap), 0>::value; ++i) { tempMap[i] = map[i]; } p_baseMove = new Title(tempMap); p_baseMove->SetScene(BASICPARAM::e_nowScene); break; // ゲーム case ESceneNumber::GAME: POINTER_RELEASE(p_baseMove); for (int i = 0; i != std::extent<decltype(tempMap), 0>::value; ++i) { tempMap[i] = map[i]; } p_baseMove = new Game(tempMap); p_baseMove->SetScene(BASICPARAM::e_nowScene); break; // エンディング case ESceneNumber::END: POINTER_RELEASE(p_baseMove); for (int i = 0; i != std::extent<decltype(map), 0>::value; ++i) { for (int j = 0; j != std::extent<decltype(map), 1>::value; ++j) { map[i][j] = -1; } } p_baseMove = new End(); p_baseMove->SetScene(BASICPARAM::e_nowScene); default: break; } } /// -------------------------------------------------------------------------------------------------- Manager::Manager() { // 初期化 BASICPARAM::e_preScene = ESceneNumber::TITLE; BASICPARAM::e_nowScene = ESceneNumber::TITLE; // マップ初期化 for (int i = 0; i != std::extent<decltype(map), 0>::value; ++i) { for (int j = 0; j != std::extent<decltype(map), 1>::value; ++j) { map[i][j] = -1; } } map[0][0] = static_cast<int>(MAPStep::Start); map[std::extent<decltype(map), 0>::value - 1][std::extent<decltype(map), 1>::value - 1] = static_cast<int>(MAPStep::Goal); for (int i = 0; i != std::extent<decltype(tempMap), 0>::value; ++i) { tempMap[i] = map[i]; } // メモリの初期化 p_baseMove = nullptr; p_baseMove = new Title(tempMap); // ゲームに関する gameEnd = false; } /// -------------------------------------------------------------------------------------------------- Manager::~Manager() { POINTER_RELEASE(p_baseMove); } /// -------------------------------------------------------------------------------------------------- void Manager::Update() { // 今のシーンと直前のシーンが同じ if (BASICPARAM::e_nowScene == BASICPARAM::e_preScene) { // ゲームに関する p_baseMove->Draw(); // ゲームに関する p_baseMove->Process(); // 直前のシーンと今のシーンを同じにする BASICPARAM::e_nowScene = p_baseMove->GetScene(); } // シーンを移行するように指定されたら else { // シーンを変える SceneChange(); // 直前のシーンと今のシーンを同じにする BASICPARAM::e_preScene = BASICPARAM::e_nowScene; } }
e31fb6ba0e866b0ac945ddab2cb9d761bfddbe13
3ff1fe3888e34cd3576d91319bf0f08ca955940f
/thpc/src/v20220401/model/SetAutoScalingConfigurationResponse.cpp
b51d7f5aac6c96c6030bf87d5b6a058b46a462d9
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-cpp
9f5df8220eaaf72f7eaee07b2ede94f89313651f
42a76b812b81d1b52ec6a217fafc8faa135e06ca
refs/heads/master
2023-08-30T03:22:45.269556
2023-08-30T00:45:39
2023-08-30T00:45:39
188,991,963
55
37
Apache-2.0
2023-08-17T03:13:20
2019-05-28T08:56:08
C++
UTF-8
C++
false
false
3,106
cpp
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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. */ #include <tencentcloud/thpc/v20220401/model/SetAutoScalingConfigurationResponse.h> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Thpc::V20220401::Model; using namespace std; SetAutoScalingConfigurationResponse::SetAutoScalingConfigurationResponse() { } CoreInternalOutcome SetAutoScalingConfigurationResponse::Deserialize(const string &payload) { rapidjson::Document d; d.Parse(payload.c_str()); if (d.HasParseError() || !d.IsObject()) { return CoreInternalOutcome(Core::Error("response not json format")); } if (!d.HasMember("Response") || !d["Response"].IsObject()) { return CoreInternalOutcome(Core::Error("response `Response` is null or not object")); } rapidjson::Value &rsp = d["Response"]; if (!rsp.HasMember("RequestId") || !rsp["RequestId"].IsString()) { return CoreInternalOutcome(Core::Error("response `Response.RequestId` is null or not string")); } string requestId(rsp["RequestId"].GetString()); SetRequestId(requestId); if (rsp.HasMember("Error")) { if (!rsp["Error"].IsObject() || !rsp["Error"].HasMember("Code") || !rsp["Error"]["Code"].IsString() || !rsp["Error"].HasMember("Message") || !rsp["Error"]["Message"].IsString()) { return CoreInternalOutcome(Core::Error("response `Response.Error` format error").SetRequestId(requestId)); } string errorCode(rsp["Error"]["Code"].GetString()); string errorMsg(rsp["Error"]["Message"].GetString()); return CoreInternalOutcome(Core::Error(errorCode, errorMsg).SetRequestId(requestId)); } return CoreInternalOutcome(true); } string SetAutoScalingConfigurationResponse::ToJsonString() const { rapidjson::Document value; value.SetObject(); rapidjson::Document::AllocatorType& allocator = value.GetAllocator(); rapidjson::Value iKey(rapidjson::kStringType); string key = "RequestId"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value().SetString(GetRequestId().c_str(), allocator), allocator); rapidjson::StringBuffer buffer; rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); value.Accept(writer); return buffer.GetString(); }
488ddbb8b78ef1ebd6387eb4e61ede39340b229a
69784e105ddc2aca3699b6b07dbcb1834d7c242c
/Classes/Native/Vuforia_UnityExtensions_Vuforia_ImageTargetBuilder2457446201.h
5fc99f0aebf4ffb5594ace0b6066974b4de9e392
[]
no_license
ryanmcgrail95/CRHC-iOS
7e72139100b2140143deb424d21fdc69b2959ed1
1b00260e6c59f552d9a8b94e42fcae5e657a6c46
refs/heads/master
2021-06-12T11:21:33.461817
2017-03-04T01:08:34
2017-03-04T01:08:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,781
h
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> // Vuforia.TrackableSource struct TrackableSource_t2832298792; #include "Vuforia_UnityExtensions_Vuforia_ImageTargetBuilder518883741.h" #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Vuforia.ImageTargetBuilderImpl struct ImageTargetBuilderImpl_t2457446201 : public ImageTargetBuilder_t518883741 { public: // Vuforia.TrackableSource Vuforia.ImageTargetBuilderImpl::mTrackableSource TrackableSource_t2832298792 * ___mTrackableSource_0; // System.Boolean Vuforia.ImageTargetBuilderImpl::mIsScanning bool ___mIsScanning_1; public: inline static int32_t get_offset_of_mTrackableSource_0() { return static_cast<int32_t>(offsetof(ImageTargetBuilderImpl_t2457446201, ___mTrackableSource_0)); } inline TrackableSource_t2832298792 * get_mTrackableSource_0() const { return ___mTrackableSource_0; } inline TrackableSource_t2832298792 ** get_address_of_mTrackableSource_0() { return &___mTrackableSource_0; } inline void set_mTrackableSource_0(TrackableSource_t2832298792 * value) { ___mTrackableSource_0 = value; Il2CppCodeGenWriteBarrier(&___mTrackableSource_0, value); } inline static int32_t get_offset_of_mIsScanning_1() { return static_cast<int32_t>(offsetof(ImageTargetBuilderImpl_t2457446201, ___mIsScanning_1)); } inline bool get_mIsScanning_1() const { return ___mIsScanning_1; } inline bool* get_address_of_mIsScanning_1() { return &___mIsScanning_1; } inline void set_mIsScanning_1(bool value) { ___mIsScanning_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif
947a6c6f6d6e0bed32e8ec54ce8c431757e3dcb4
7e4895025ddf4d17147596508026ccd7d824f1bd
/hmrM2500_Ontake/hmLib_v3_04/lab/old/operator_interface.hpp
486440f9da9e2316ab64280158f05d620a0507e3
[]
no_license
HomuraVehicle/HomuraMachine_Ontake
23effe3fe993c1e06fd64888e7afb83ef9e8346f
ba9ef38885801379e9d19c9be262511104b4fba1
refs/heads/master
2020-04-02T13:10:52.137985
2016-08-06T07:48:28
2016-08-06T07:48:28
64,088,198
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
41,320
hpp
#ifndef HMLIB_OPERATORINTERFACE_INC #define HMLIB_OPERATORINTERFACE_INC 1 # /*===operator_interface=== operator関数群用のinterfaceを提供する friend宣言を使うのは、引数に自分自身ではなくmy_typeを使う事で、参照を戻す際にmy_typeへのキャストを避けるため my_type& operator++(){ increment(); return *this; //Error cast from this_type to my_type } operator_interface:v0_01/130308 hmIto operator_patternから継承 関数名をinterfaceタイプに統一 */ namespace hmLib{ namespace interfaces{ // ++ template<typename my_type> struct operator_increment_interface{ private: typedef operator_increment_interface<my_type> this_type; protected: virtual void itf_operator_increment()=0; public: friend my_type& operator++(my_type& My_){ static_cast<this_type&>(My_).itf_operator_increment(); return My_; } friend my_type operator++(my_type& My_,int){ my_type Ans(My_); static_cast<this_type&>(My_).itf_operator_increment(); return Ans; } }; // -- template<typename my_type> struct operator_decrement_interface{ private: typedef operator_decrement_interface<my_type> this_type; protected: virtual void itf_operator_decrement()=0; public: friend my_type& operator--(my_type& My_){ static_cast<this_type&>(My_).itf_operator_decrement(); return My_; } friend my_type operator--(my_type& My_,int){ my_type Ans(My_); static_cast<this_type&>(My_).itf_operator_decrement(); return Ans; } }; // const & template<typename value_type> struct operator_const_pointer_interface{ protected: virtual const value_type* itf_operator_pointer()const=0; public: const value_type* operator&()const{return itf_operator_pointer();} }; // & template<typename value_type> struct operator_pointer_interface:public operator_const_pointer_interface<value_type>{ public: value_type* operator&(){return const_cast<value_type*>(itf_operator_pointer());} }; // const -> template<typename value_type> struct operator_const_access_interface{ protected: virtual const value_type* itf_operator_access()const=0; public: const value_type* operator->()const{return itf_operator_access();} }; // -> template<typename value_type> struct operator_access_interface:public operator_const_access_interface<value_type>{ public: value_type* operator->(){return const_cast<value_type*>(itf_operator_access());} }; // const * template<typename value_type> struct operator_const_reference_interface{ protected: virtual const value_type& itf_operator_reference()const=0; public: const value_type& operator*()const{return itf_operator_reference();} }; // * template<typename value_type> struct operator_reference_interface:public operator_const_reference_interface<value_type>{ public: value_type& operator*(){return const_cast<value_type&>(itf_operator_reference());} }; // const [] template<typename index_type,typename value_type> struct operator_const_index_interface{ protected: virtual const value_type& itf_operator_index(const index_type& Index_)const=0; public: const value_type& operator[](const index_type& Index_)const{return itf_operator_index(Index_);} }; // [] template<typename index_type,typename value_type> struct operator_index_interface:public operator_const_index_interface<index_type,value_type>{ public: value_type& operator[](const index_type& Index_){return const_cast<value_type&>(itf_operator_index(Index_));} }; // add + template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_add_interface{ private: typedef operator_forward_add_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_add(const sub_type& s_)const=0; public: friend ans_type operator+(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_add(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_add_interface{ private: typedef operator_backward_add_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_backward_add(const sub_type& s_)const=0; public: friend ans_type operator+(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_add(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_add_interface{ private: typedef operator_equal_add_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_add(const sub_type& s_)const=0; public: friend my_type operator+=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_add(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_add_interface :public operator_forward_add_interface<my_type,sub_type,ans_type> ,public operator_backward_add_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_add_interface :public operator_forward_add_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_add(const my_type& m_)const override{return itf_operator_add(m_);} virtual ans_type itf_operator_add(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_addable_interface :public operator_forward_add_interface<my_type,sub_type,my_type> ,public operator_equal_add_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_add(const sub_type& s_)const{itf_operator_forward_add(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_addable_interface :public operator_bidirectional_add_interface<my_type,sub_type,my_type> ,public operator_equal_add_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_add(const sub_type& s_)const{itf_operator_forward_add(s_);} }; template<typename my_type> struct operator_addable_interface :public operator_add_interface<my_type,my_type> ,public operator_equal_add_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_add(const my_type& m_)const{itf_operator_add(m_);} }; // sub - template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_sub_interface{ private: typedef operator_forward_sub_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_sub(const sub_type& s_)const=0; public: friend ans_type operator-(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_sub(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_sub_interface{ private: typedef operator_backward_sub_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_equal_sub(const sub_type& s_)const=0; public: friend ans_type operator-(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_sub(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_sub_interface{ private: typedef operator_equal_sub_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_sub(const sub_type& s_)const=0; public: friend my_type operator-=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_sub(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_sub_interface :public operator_forward_sub_interface<my_type,sub_type,ans_type> ,public operator_backward_sub_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_sub_interface :public operator_forward_sub_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_sub(const my_type& m_)const override{return itf_operator_sub(m_);} virtual ans_type itf_operator_sub(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_subable_interface :public operator_forward_sub_interface<my_type,sub_type,my_type> ,public operator_equal_sub_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_sub(const sub_type& s_)const{itf_operator_forward_sub(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_subable_interface :public operator_bidirectional_sub_interface<my_type,sub_type,my_type> ,public operator_equal_sub_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_sub(const sub_type& s_)const{itf_operator_forward_sub(s_);} }; template<typename my_type> struct operator_subable_interface :public operator_sub_interface<my_type,my_type> ,public operator_equal_sub_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_sub(const my_type& m_)const{itf_operator_sub(m_);} }; // multiplicate * template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_multiplicate_interface{ private: typedef operator_forward_multiplicate_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_multiplicate(const sub_type& s_)const=0; public: friend ans_type operator*(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_multiplicate(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_multiplicate_interface{ private: typedef operator_backward_multiplicate_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_equal_multiplicate(const sub_type& s_)const=0; public: friend ans_type operator*(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_multiplicate(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_multiplicate_interface{ private: typedef operator_equal_multiplicate_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_multiplicate(const sub_type& s_)const=0; public: friend my_type operator*=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_multiplicate(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_multiplicate_interface :public operator_forward_multiplicate_interface<my_type,sub_type,ans_type> ,public operator_backward_multiplicate_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_multiplicate_interface :public operator_forward_multiplicate_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_multiplicate(const my_type& m_)const override{return itf_operator_multiplicate(m_);} virtual ans_type itf_operator_multiplicate(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_multiplicatable_interface :public operator_forward_multiplicate_interface<my_type,sub_type,my_type> ,public operator_equal_multiplicate_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_multiplicate(const sub_type& s_)const{itf_operator_forward_multiplicate(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_multiplicatable_interface :public operator_bidirectional_multiplicate_interface<my_type,sub_type,my_type> ,public operator_equal_multiplicate_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_multiplicate(const sub_type& s_)const{itf_operator_forward_multiplicate(s_);} }; template<typename my_type> struct operator_multiplicatable_interface :public operator_multiplicate_interface<my_type,my_type> ,public operator_equal_multiplicate_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_multiplicate(const my_type& m_)const{itf_operator_multiplicate(m_);} }; // divide / template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_divide_interface{ private: typedef operator_forward_divide_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_divide(const sub_type& s_)const=0; public: friend ans_type operator/(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_divide(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_divide_interface{ private: typedef operator_backward_divide_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_equal_divide(const sub_type& s_)const=0; public: friend ans_type operator/(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_divide(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_divide_interface{ private: typedef operator_equal_divide_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_divide(const sub_type& s_)const=0; public: friend my_type operator/=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_divide(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_divide_interface :public operator_forward_divide_interface<my_type,sub_type,ans_type> ,public operator_backward_divide_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_divide_interface :public operator_forward_divide_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_divide(const my_type& m_)const override{return itf_operator_divide(m_);} virtual ans_type itf_operator_divide(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_dividable_interface :public operator_forward_divide_interface<my_type,sub_type,my_type> ,public operator_equal_divide_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_divide(const sub_type& s_)const{itf_operator_forward_divide(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_dividable_interface :public operator_bidirectional_divide_interface<my_type,sub_type,my_type> ,public operator_equal_divide_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_divide(const sub_type& s_)const{itf_operator_forward_divide(s_);} }; template<typename my_type> struct operator_dividable_interface :public operator_divide_interface<my_type,my_type> ,public operator_equal_divide_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_divide(const my_type& m_)const{itf_operator_divide(m_);} }; // surplus % template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_surplus_interface{ private: typedef operator_forward_surplus_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_surplus(const sub_type& s_)const=0; public: friend ans_type operator%(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_surplus(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_surplus_interface{ private: typedef operator_backward_surplus_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_equal_surplus(const sub_type& s_)const=0; public: friend ans_type operator%(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_surplus(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_surplus_interface{ private: typedef operator_equal_surplus_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_surplus(const sub_type& s_)const=0; public: friend my_type operator%=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_surplus(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_surplus_interface :public operator_forward_surplus_interface<my_type,sub_type,ans_type> ,public operator_backward_surplus_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_surplus_interface :public operator_forward_surplus_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_surplus(const my_type& m_)const override{return itf_operator_surplus(m_);} virtual ans_type itf_operator_surplus(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_surplusable_interface :public operator_forward_surplus_interface<my_type,sub_type,my_type> ,public operator_equal_surplus_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_surplus(const sub_type& s_)const{itf_operator_forward_surplus(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_surplusable_interface :public operator_bidirectional_surplus_interface<my_type,sub_type,my_type> ,public operator_equal_surplus_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_surplus(const sub_type& s_)const{itf_operator_forward_surplus(s_);} }; template<typename my_type> struct operator_surplusable_interface :public operator_surplus_interface<my_type,my_type> ,public operator_equal_surplus_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_surplus(const my_type& m_)const{itf_operator_surplus(m_);} }; // leftshift << template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_leftshift_interface{ private: typedef operator_forward_leftshift_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_leftshift(const sub_type& s_)const=0; public: friend ans_type operator<<(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_leftshift(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_leftshift_interface{ private: typedef operator_backward_leftshift_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_equal_leftshift(const sub_type& s_)const=0; public: friend ans_type operator<<(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_leftshift(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_leftshift_interface{ private: typedef operator_equal_leftshift_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_leftshift(const sub_type& s_)const=0; public: friend my_type operator<<=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_leftshift(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_leftshift_interface :public operator_forward_leftshift_interface<my_type,sub_type,ans_type> ,public operator_backward_leftshift_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_leftshift_interface :public operator_forward_leftshift_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_leftshift(const my_type& m_)const override{return itf_operator_leftshift(m_);} virtual ans_type itf_operator_leftshift(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_leftshiftable_interface :public operator_forward_leftshift_interface<my_type,sub_type,my_type> ,public operator_equal_leftshift_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_leftshift(const sub_type& s_)const{itf_operator_forward_leftshift(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_leftshiftable_interface :public operator_bidirectional_leftshift_interface<my_type,sub_type,my_type> ,public operator_equal_leftshift_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_leftshift(const sub_type& s_)const{itf_operator_forward_leftshift(s_);} }; template<typename my_type> struct operator_leftshiftable_interface :public operator_leftshift_interface<my_type,my_type> ,public operator_equal_leftshift_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_leftshift(const my_type& m_)const{itf_operator_leftshift(m_);} }; // rightshift >> template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_rightshift_interface{ private: typedef operator_forward_rightshift_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_rightshift(const sub_type& s_)const=0; public: friend ans_type operator>>(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_rightshift(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_rightshift_interface{ private: typedef operator_backward_rightshift_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_equal_rightshift(const sub_type& s_)const=0; public: friend ans_type operator>>(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_rightshift(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_rightshift_interface{ private: typedef operator_equal_rightshift_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_rightshift(const sub_type& s_)const=0; public: friend my_type operator>>=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_rightshift(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_rightshift_interface :public operator_forward_rightshift_interface<my_type,sub_type,ans_type> ,public operator_backward_rightshift_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_rightshift_interface :public operator_forward_rightshift_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_rightshift(const my_type& m_)const override{return itf_operator_rightshift(m_);} virtual ans_type itf_operator_rightshift(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_rightshiftable_interface :public operator_forward_rightshift_interface<my_type,sub_type,my_type> ,public operator_equal_rightshift_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_rightshift(const sub_type& s_)const{itf_operator_forward_rightshift(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_rightshiftable_interface :public operator_bidirectional_rightshift_interface<my_type,sub_type,my_type> ,public operator_equal_rightshift_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_rightshift(const sub_type& s_)const{itf_operator_forward_rightshift(s_);} }; template<typename my_type> struct operator_rightshiftable_interface :public operator_rightshift_interface<my_type,my_type> ,public operator_equal_rightshift_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_rightshift(const my_type& m_)const{itf_operator_rightshift(m_);} }; // and & template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_and_interface{ private: typedef operator_forward_and_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_and(const sub_type& s_)const=0; public: friend ans_type operator&(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_and(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_and_interface{ private: typedef operator_backward_and_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_equal_and(const sub_type& s_)const=0; public: friend ans_type operator&(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_and(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_and_interface{ private: typedef operator_equal_and_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_and(const sub_type& s_)const=0; public: friend my_type operator&=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_and(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_and_interface :public operator_forward_and_interface<my_type,sub_type,ans_type> ,public operator_backward_and_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_and_interface :public operator_forward_and_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_and(const my_type& m_)const override{return itf_operator_and(m_);} virtual ans_type itf_operator_and(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_andable_interface :public operator_forward_and_interface<my_type,sub_type,my_type> ,public operator_equal_and_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_and(const sub_type& s_)const{itf_operator_forward_and(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_andable_interface :public operator_bidirectional_and_interface<my_type,sub_type,my_type> ,public operator_equal_and_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_and(const sub_type& s_)const{itf_operator_forward_and(s_);} }; template<typename my_type> struct operator_andable_interface :public operator_and_interface<my_type,my_type> ,public operator_equal_and_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_and(const my_type& m_)const{itf_operator_and(m_);} }; // or | template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_or_interface{ private: typedef operator_forward_or_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_or(const sub_type& s_)const=0; public: friend ans_type operator|(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_or(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_or_interface{ private: typedef operator_backward_or_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_equal_or(const sub_type& s_)const=0; public: friend ans_type operator|(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_or(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_or_interface{ private: typedef operator_equal_or_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_or(const sub_type& s_)const=0; public: friend my_type operator|=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_or(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_or_interface :public operator_forward_or_interface<my_type,sub_type,ans_type> ,public operator_backward_or_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_or_interface :public operator_forward_or_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_or(const my_type& m_)const override{return itf_operator_or(m_);} virtual ans_type itf_operator_or(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_orable_interface :public operator_forward_or_interface<my_type,sub_type,my_type> ,public operator_equal_or_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_or(const sub_type& s_)const{itf_operator_forward_or(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_orable_interface :public operator_bidirectional_or_interface<my_type,sub_type,my_type> ,public operator_equal_or_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_or(const sub_type& s_)const{itf_operator_forward_or(s_);} }; template<typename my_type> struct operator_orable_interface :public operator_or_interface<my_type,my_type> ,public operator_equal_or_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_or(const my_type& m_)const{itf_operator_or(m_);} }; // xor ^ template<typename my_type,typename sub_type,typename ans_type> struct operator_forward_xor_interface{ private: typedef operator_forward_xor_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_forward_xor(const sub_type& s_)const=0; public: friend ans_type operator^(const my_type& m_,const sub_type& s_){return static_cast<const this_type&>(m_).itf_operator_forward_xor(s_);} }; template<typename my_type,typename sub_type,typename ans_type> struct operator_backward_xor_interface{ private: typedef operator_backward_xor_interface<my_type,sub_type,ans_type> this_type; protected: virtual ans_type itf_operator_equal_xor(const sub_type& s_)const=0; public: friend ans_type operator^(const sub_type& s_,const my_type& m_){return static_cast<const this_type&>(m_).itf_operator_backward_xor(s_);} }; template<typename my_type,typename sub_type> struct operator_equal_xor_interface{ private: typedef operator_equal_xor_interface<my_type,sub_type> this_type; protected: virtual void itf_operator_equal_xor(const sub_type& s_)const=0; public: friend my_type operator^=(const my_type& m_,const sub_type& s_){ static_cast<const this_type&>(m_).itf_operator_equal_xor(s_); return m_; } }; template<typename my_type,typename sub_type,typename ans_type> struct operator_bidirectional_xor_interface :public operator_forward_xor_interface<my_type,sub_type,ans_type> ,public operator_backward_xor_interface<my_type,sub_type,ans_type>{ }; template<typename my_type,typename ans_type> struct operator_xor_interface :public operator_forward_xor_interface<my_type,my_type,ans_type>{ protected: virtual ans_type itf_operator_forward_xor(const my_type& m_)const override{return itf_operator_xor(m_);} virtual ans_type itf_operator_xor(const my_type& m_)const=0; }; template<typename my_type, typename sub_type> struct operator_forward_xorable_interface :public operator_forward_xor_interface<my_type,sub_type,my_type> ,public operator_equal_xor_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_xor(const sub_type& s_)const{itf_operator_forward_xor(s_);} }; template<typename my_type, typename sub_type> struct operator_bidirectional_xorable_interface :public operator_bidirectional_xor_interface<my_type,sub_type,my_type> ,public operator_equal_xor_interface<my_type,sub_type>{ protected: virtual void itf_operator_equal_xor(const sub_type& s_)const{itf_operator_forward_xor(s_);} }; template<typename my_type> struct operator_xorable_interface :public operator_xor_interface<my_type,my_type> ,public operator_equal_xor_interface<my_type,my_type>{ protected: virtual void itf_operator_equal_xor(const my_type& m_)const{itf_operator_xor(m_);} }; // == template<typename my_type,typename sub_type> struct operator_forward_equal_interface{ private: typedef operator_forward_equal_interface<my_type,sub_type> this_type; protected: virtual bool itf_operator_forward_equal(const sub_type& sub_)const=0; public: friend bool operator==(const my_type& My_,const sub_type& Sub_){ return static_cast<const this_type&>(My_).itf_operator_forward_equal(Sub_); } friend bool operator!=(const my_type& My_,const sub_type& Sub_){ return !(static_cast<const this_type&>(My_).itf_operator_forward_equal(Sub_)); } }; template<typename my_type,typename sub_type> struct operator_bidirectional_equal_interface:public operator_forward_equal_interface<my_type,sub_type>{ private: typedef operator_bidirectional_equal_interface<my_type,sub_type> this_type; protected: virtual bool itf_operator_backward_equal(const sub_type& sub_)const{return itf_operator_equal(sub_);} public: friend bool operator==(const sub_type& Sub_,const my_type& My_){ return static_cast<const this_type&>(My_).itf_operator_backward_equal(Sub_); } friend bool operator!=(const sub_type& Sub_,const my_type& My_){ return !(static_cast<const this_type&>(My_).itf_operator_backward_equal(Sub_)); } }; template<typename my_type> struct operator_equal_interface{ private: typedef operator_equal_interface<my_type> this_type; protected: virtual bool itf_operator_equal(const my_type& m_)const=0; public: friend bool operator==(const my_type& My_,const my_type& Sub_){ return static_cast<const this_type&>(My_).itf_operator_equal(Sub_); } friend bool operator!=(const my_type& My_,const my_type& Sub_){ return !(static_cast<const this_type&>(My_).itf_operator_equal(Sub_)); } }; // <,> template<typename my_type,typename sub_type> struct operator_forward_compare_interface{ private: typedef operator_forward_compare_interface<my_type,sub_type> this_type; protected: virtual bool itf_operator_forward_less(const sub_type& Sub_)const=0; virtual bool itf_operator_forward_more(const sub_type& Sub_)const=0; public: friend bool operator<(const my_type& My_,const sub_type& Sub_){ return static_cast<const this_type&>(My_).itf_operator_forward_less(Sub_); } friend bool operator>(const my_type& My_,const sub_type& Sub_){ return static_cast<const this_type&>(My_).itf_operator_forward_more(Sub_); } }; template<typename my_type,typename sub_type> struct operator_bidirectional_compare_interface:public operator_forward_compare_interface<my_type,sub_type>{ private: typedef operator_bidirectional_compare_interface<my_type,sub_type> this_type; protected: virtual bool itf_operator_backward_less(const sub_type& Sub_)const{return itf_operator_more(Sub_);} virtual bool itf_operator_backward_more(const sub_type& Sub_)const{return itf_operator_less(Sub_);} public: friend bool operator>(const sub_type& Sub_,const my_type& My_){ return static_cast<const this_type&>(My_).itf_operator_backward_less(Sub_); } friend bool operator<(const sub_type& Sub_,const my_type& My_){ return !(static_cast<const this_type&>(My_).itf_operator_backward_more(Sub_)); } }; template<typename my_type> struct operator_compare_interface{ private: typedef operator_compare_interface<my_type> this_type; protected: virtual bool itf_operator_less(const my_type& m_)const=0; public: friend bool operator<(const my_type& My_,const my_type& Sub_){ return static_cast<const this_type&>(My_).itf_operator_less(Sub_); } friend bool operator>(const my_type& My_,const my_type& Sub_){ return !(static_cast<const this_type&>(Sub_).itf_operator_less(My_)); } }; // <=,>= template<typename my_type,typename sub_type> struct operator_forward_equalcompare_interface{ private: typedef operator_forward_equalcompare_interface<my_type,sub_type> this_type; protected: virtual bool itf_operator_forward_equalless(const sub_type& Sub_)const=0; virtual bool itf_operator_forward_equalmore(const sub_type& Sub_)const=0; public: friend bool operator<=(const my_type& My_,const sub_type& Sub_){ return static_cast<const this_type&>(My_).itf_operator_forward_equalless(Sub_); } friend bool operator>=(const my_type& My_,const sub_type& Sub_){ return static_cast<const this_type&>(My_).itf_operator_forward_equalmore(Sub_); } }; template<typename my_type,typename sub_type> struct operator_bidirectional_equalcompare_interface:public operator_forward_equalcompare_interface<my_type,sub_type>{ private: typedef operator_bidirectional_equalcompare_interface<my_type,sub_type> this_type; protected: virtual bool itf_operator_backward_equalless(const sub_type& Sub_)const{return itf_operator_equalmore(Sub_);} virtual bool itf_operator_backward_equalmore(const sub_type& Sub_)const{return itf_operator_equalless(Sub_);} public: friend bool operator>=(const sub_type& Sub_,const my_type& My_){ return static_cast<const this_type&>(My_).itf_operator_backward_equalless(Sub_); } friend bool operator<=(const sub_type& Sub_,const my_type& My_){ return !(static_cast<const this_type&>(My_).itf_operator_backward_equalmore(Sub_)); } }; template<typename my_type> struct operator_equalcompare_interface{ private: typedef operator_equalcompare_interface<my_type> this_type; protected: virtual bool itf_operator_equalless(const my_type& m_)const=0; public: friend bool operator<=(const my_type& My_,const my_type& Sub_){ return static_cast<const this_type&>(My_).itf_operator_equalless(Sub_); } friend bool operator>=(const my_type& My_,const my_type& Sub_){ return !(static_cast<const this_type&>(Sub_).itf_operator_equalless(My_)); } }; // <=,>= template<typename my_type,typename sub_type=my_type> struct operator_forward_comparable_interface :public operator_forward_equal_interface<my_type,sub_type> ,public operator_forward_compare_interface<my_type,sub_type> ,public operator_forward_equalcompare_interface<my_type,sub_type>{ protected: virtual bool itf_operator_forward_equalless(const sub_type& s_)const override{return itf_operator_forward_equal(s_) || itf_operator_forward_less(s_);} virtual bool itf_operator_forward_equalmore(const sub_type& s_)const override{return itf_operator_forward_equal(s_) || itf_operator_forward_more(s_);} }; template<typename my_type,typename sub_type> struct operator_bidirectional_comparable_interface :public operator_bidirectional_equal_interface<my_type,sub_type> ,public operator_bidirectional_compare_interface<my_type,sub_type> ,public operator_bidirectional_equalcompare_interface<my_type,sub_type>{ protected: virtual bool itf_operator_forward_equalless(const sub_type& s_)const override{return itf_operator_forward_equal(s_) || itf_operator_forward_less(s_);} virtual bool itf_operator_forward_equalmore(const sub_type& s_)const override{return itf_operator_forward_equal(s_) || itf_operator_forward_more(s_);} virtual bool itf_operator_backward_equalless(const sub_type& s_)const override{return itf_operator_backward_equal(s_) || itf_operator_backward_less(s_);} virtual bool itf_operator_backward_equalmore(const sub_type& s_)const override{return itf_operator_backward_equal(s_) || itf_operator_backward_more(s_);} }; template<typename my_type> struct operator_comparable_interface :public operator_equal_interface<my_type> ,public operator_compare_interface<my_type> ,public operator_equalcompare_interface<my_type>{ protected: virtual bool itf_operator_equalless(const my_type& s_)const override{return itf_operator_equal(s_) || itf_operator_less(s_);} virtual bool itf_operator_equalmore(const my_type& s_)const override{return itf_operator_equal(s_) || itf_operator_more(s_);} }; } } # #endif
6fd391d09674f3ca44ab8b445fbe652468f42e3a
2c4c827f38412e6d01f0b2c7ead80371e793ac2c
/android/avocado.h
9435823ec09a2d06bcdece80ede630b8ca1a7fe3
[ "BSD-3-Clause" ]
permissive
chuxuewen/Avocado
1df0fb4af165638fae3113026bc5fa94dfc4cefd
8ab3614f690c4ca62d360bdbd32fcf65af204327
refs/heads/master
2020-12-02T10:08:34.379994
2017-07-09T15:01:54
2017-07-09T15:01:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,886
h
/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2015, Louis.chu * 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 Louis.chu 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 Louis.chu 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. * * ***** END LICENSE BLOCK ***** */ #ifndef __avocado__android__avocado__ #define __avocado__android__avocado__ #include "autil/util.h" #if av_android #include "autil/string.h" #include "autil/os/android-jni.h" av_ns(avocado) /** * @class Avocado */ class Avocado: public Object { public: Avocado(); virtual ~Avocado(); void keep_screen(bool value); float display_scale(); String package_code_path(); String files_dir_path(); String cache_dir_path(); String default_typeface(); String version(); String brand(); String subsystem(); int network_status(); bool is_ac_power(); bool is_battery(); float battery_level(); String language(); uint64 available_memory(); uint64 memory(); uint64 used_memory(); // static Avocado* instance(); private: jclass _clazz; jmethodID _keep_screen; jmethodID _display_scale; jmethodID _package_code_path; jmethodID _files_dir_path; jmethodID _cache_dir_path; jmethodID _default_typeface; jmethodID _version; jmethodID _brand; jmethodID _subsystem; jmethodID _network_status; jmethodID _is_ac_power; jmethodID _is_battery; jmethodID _battery_level; jmethodID _language; jmethodID _available_memory; jmethodID _memory; jmethodID _used_memory; }; av_end #endif #endif
674edb082d3cae38f73b3a9247cc4fa41edf3cb2
f10f768be221f79951f8e1cfe6f0fe7c3165dfd4
/3DEngine/Physics/OBB.h
0047e24b519e407fceddb311e2a9a9e73b669a26
[ "MIT" ]
permissive
EricDDK/3DEngineEC
7ef6aa298aa024164a63e4e49047cbe8d89684a7
cf7832e69ba03111d54093b1f797eaabab3455e1
refs/heads/master
2020-06-20T00:35:37.282566
2019-08-03T09:07:13
2019-08-03T09:07:13
196,930,013
6
3
MIT
2019-08-03T09:07:14
2019-07-15T05:29:15
C
UTF-8
C++
false
false
244
h
#ifndef _PHYSICS_OBB_H__ #define _PHYSICS_OBB_H__ #include "../Common/Macro.h" #include "../Math/Math.h" ENGINE_NAMESPACE_START class OBB { public: Vector3 center; Quaternion rotation; Vector3 extents; }; ENGINE_NAMESPACE_END #endif
f318d32397ddfb072661998aa50e01382e7d544c
5318b60b7185251023d5658fa4a5742a4d508051
/Sketch Files/Sprintf/Sprintf.ino
5047f69ceadcc60a4d60fe7c96ebb9e23d5fec0c
[]
no_license
TechStuffBoy/ArduinoDev
ccede08da30ab55ef8c83f5acf8fb3caed3aa893
f76509d16bf831dadc751eb348cb06e30911a8da
refs/heads/master
2020-03-29T21:23:22.207583
2018-11-15T12:20:16
2018-11-15T12:20:16
150,363,936
0
0
null
null
null
null
UTF-8
C++
false
false
262
ino
char buffer[200]; int time=7; void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: sprintf (buffer, "you have %d hours to come to me",time); Serial.println(buffer); }
11cd35f2660300d8f3a998b7a62374182262c27b
4656eadea9a07f49dc7baa1c250aa3ba5855bb0e
/MainComponent.cpp
3a5a09092ac637d0965c1bd898e62cd0cbbb2af6
[]
no_license
HectorGit/MultiGUI_Clone_Thread
0c2c54113c17a80ac89b811873f9512d825d3329
0a209dcfa211b3cf3c62e203002e717d1a0216e6
refs/heads/master
2021-08-06T17:45:23.541580
2017-11-06T17:43:52
2017-11-06T17:43:52
109,728,672
0
0
null
null
null
null
UTF-8
C++
false
false
12,807
cpp
/* ============================================================================== This file was auto-generated! ============================================================================== */ #include "../JuceLibraryCode/JuceHeader.h" #include "AudioRecorderComponent.h" #include "LogWindowComponent.h" #include "AudioPlayBackComponent.h" #include "NeuralNetworkComponent.h" #include "FeatureExtractionComponent.h" #include "FreePlayComponent.h" #include "FlashingComponentMain.h" #include <iostream> //#include "marsyas/Conversions.h" //============================================================================== /* This component lives inside our window, and this is where you should put all your controls and content. */ class MainContentComponent : public AudioAppComponent, private Button::Listener, private Timer, private ComboBox::Listener, private Thread { public: //============================================================================== MainContentComponent() : Thread("Neural Network Training Thread") { //Marsyas::mrs_real freq = (Marsyas::mrs_real)1200.0; //Marsyas::mrs_real result = Marsyas::hertz2octs(freq); class_being_recorded = 0; featuresExtracted = false; networkTrained = false; recordingClass1 = true; //initally recordingClass2 = false; recordingClass3 = false; counterClass1 = 0; counterClass2 = 0; counterClass3 = 0; trainNeuralNetworkButtonComponent.getButton()->addListener(this);//.getButton().addListener(this); featureExtractionButtonComponent.getButton()->addListener(this);//.getButton().addListener(this); activateFreePlayButtonComponent.getButton()->addListener(this); recorder.getButton()->addListener(this); addAndMakeVisible(recorder); addAndMakeVisible(playBack1); addAndMakeVisible(playBack2); addAndMakeVisible(playBack3); addAndMakeVisible(logWindow); addAndMakeVisible(logWindow2); addAndMakeVisible(logWindow3); addAndMakeVisible(classChosenComboBox); classChosenComboBox.addListener(this); classChosenComboBox.addItem("See Messages for Class 1", 1); classChosenComboBox.addItem("See Messages for Class 2", 2); classChosenComboBox.addItem("See Messages for Class 3", 3); classChosenComboBox.setSelectedItemIndex(0); class1recordings.push_back("Class 1 Recordings: \n"); class2recordings.push_back("Class 2 Recordings: \n"); class3recordings.push_back("Class 3 Recordings: \n"); //logWindow.logMessage("result is"+(String)result); //logWindow.logMessage("result is" + (String)result); //logWindow2.logMessage("result is" + (String)result); //logWindow3.logMessage("result is" + (String)result); //dummy buttons addAndMakeVisible(featureExtractionButtonComponent); addAndMakeVisible(trainNeuralNetworkButtonComponent); addAndMakeVisible(activateFreePlayButtonComponent); addAndMakeVisible(flasher); addAndMakeVisible(flasher2); /*------------------------------------------------------------ Initially, only the recorder and the first logbox are enabled.*/ //sector 1 things active initially recorder.setEnabled(true); logWindow.setEnabled(true); // i dont think this will ever become disabled //sector 2 things all inactive initally featureExtractionButtonComponent.setEnabled(false); logWindow2.setEnabled(false); // i dont think this will ever become disabled trainNeuralNetworkButtonComponent.setEnabled(false); logWindow3.setEnabled(false); // i dont think this will ever become disabled activateFreePlayButtonComponent.setEnabled(false); // i dont think this will ever become disabled //sector 3 components inactive as well playBack1.setEnabled(false); // made avail. after free play mode has been activated. playBack2.setEnabled(false); playBack3.setEnabled(false); /* -------------------------------------------------------*/ setSize(1200, 1200); // specify the number of input and output channels that we want to open setAudioChannels(2, 2); } ~MainContentComponent() { shutdownAudio(); } //============================================================================== void prepareToPlay(int samplesPerBlockExpected, double sampleRate) override { // This function will be called when the audio device is started, or when // its settings (i.e. sample rate, block size, etc) are changed. // You can use this function to initialise any resources you might need, // but be careful - it will be called on the audio thread, not the GUI thread. // For more details, see the help for AudioProcessor::prepareToPlay() } void getNextAudioBlock(const AudioSourceChannelInfo& bufferToFill) override { // Your audio-processing code goes here! // For more details, see the help for AudioProcessor::getNextAudioBlock() // Right now we are not producing any data, in which case we need to clear the buffer // (to prevent the output of random noise) bufferToFill.clearActiveBufferRegion(); } void releaseResources() override { // This will be called when the audio device stops, or when it is being // restarted due to a setting change. // For more details, see the help for AudioProcessor::releaseResources() } //============================================================================== void paint(Graphics& g) override { // (Our component is opaque, so we must completely fill the background with a solid colour) g.fillAll(getLookAndFeel().findColour(ResizableWindow::backgroundColourId)); // You can add your drawing code here! } void resized() override { Rectangle<int> area(getLocalBounds()); Rectangle<int> sector1(area.removeFromLeft(getLocalBounds().getWidth() / 3)); Rectangle<int> sector2(area.removeFromLeft(getLocalBounds().getWidth() / 3)); Rectangle<int> sector3(area.removeFromLeft(getLocalBounds().getWidth() / 3)); int buttonSize = area.getHeight() / 20; int regItemSize = area.getHeight() / 6; int logWindowSize = area.getHeight() / 3; int sector3Width = sector3.getWidth(); //sector 1 flasher.setBounds(sector1.removeFromTop(100)); recorder.setBounds(sector1.removeFromTop(regItemSize)); classChosenComboBox.setBounds(sector1.removeFromTop(80).reduced(5)); logWindow.setBounds(sector1.removeFromTop(logWindowSize)); //sector 2 featureExtractionButtonComponent.setBounds(sector2.removeFromTop(buttonSize)); logWindow2.setBounds(sector2.removeFromTop(logWindowSize)); trainNeuralNetworkButtonComponent.setBounds(sector2.removeFromTop(buttonSize)); logWindow3.setBounds(sector2.removeFromTop(logWindowSize)); //sector 3 activateFreePlayButtonComponent.setBounds(sector3.removeFromTop(buttonSize)); playBack1.setBounds(sector3.removeFromTop(regItemSize)); playBack2.setBounds(sector3.removeFromTop(regItemSize)); playBack3.setBounds(sector3.removeFromTop(regItemSize)); flasher2.setBounds(sector3.removeFromTop(100)); } //just trying this out. void run() override { trainNeuralNetworkButtonComponent.run(); } private: //============================================================================== // Your private member variables go here... AudioRecorderComponent recorder; LogWindowComponent logWindow; LogWindowComponent logWindow2; LogWindowComponent logWindow3; AudioPlayBackComponent playBack1; AudioPlayBackComponent playBack2; AudioPlayBackComponent playBack3; bool recordingClass1; int counterClass1; bool recordingClass2; int counterClass2; bool recordingClass3; int counterClass3; String message; /* custom filenames for creating the audio files - could pass this to recorder class. just a detail, not really necessary ! String filename1 = "class1"; String filename2 = "class1"; String filename3 = "class1";*/ /* IMPLEMENT THIS LATER.*/ ComboBox classChosenComboBox; std::vector<String> class1recordings; std::vector<String> class2recordings; std::vector<String> class3recordings; //Dummy Buttons for Now - need to create them as components bool recordingsDone; FeatureExtractionComponent featureExtractionButtonComponent; //associated with bool featuresExtracted bool featuresExtracted; NeuralNetworkComponent trainNeuralNetworkButtonComponent;//associated with bool networkTrained bool networkTrained; FreePlayComponent activateFreePlayButtonComponent; //associated with both previous bools. bool freePlayActivated; FlashingComponentMain flasher; FlashingComponentMain flasher2; int class_being_recorded; void buttonClicked(Button* button) override { if (recordingClass1) { class_being_recorded = 1; if (counterClass1 >= 2) { recordingClass1 = false; //done recordingClass2 = true; recordingClass3 = false; message = "recordings done for class 1"; logWindow.logMessage(message); class1recordings.push_back(message); //will retrieve these later. logWindow.clearMessages(); } } if (recordingClass2) { class_being_recorded = 2; if (counterClass2 >= 2) { recordingClass1 = false; //done recordingClass2 = false; recordingClass3 = true; message = "recordings done for class 2"; logWindow.logMessage(message); class2recordings.push_back(message); //will retrieve these later. logWindow.clearMessages(); } } if (recordingClass3) { class_being_recorded = 3; if (counterClass3 >= 2) { recordingClass1 = false; //done recordingClass2 = false; recordingClass3 = false; message = "recordings done for class 3"; logWindow.logMessage(message); class3recordings.push_back(message); class_being_recorded = -1; recordingsDone = true; // this allows us to go and click on Feature Extraction Button recorder.setEnabled(false); // weird placement for this? featureExtractionButtonComponent.setEnabled(true); logWindow2.setEnabled(true); logWindow.clearMessages(); } } bool isRecording = recorder.getAudioRecorder()->isRecording(); if (button == recorder.getButton() && !isRecording)//recorder.getButton()) { if (class_being_recorded == 1) { message = "Class 1 being recorded"; logWindow.logMessage(message); class1recordings.push_back(message); counterClass1++; } else if (class_being_recorded == 2) { message = "Class 2 being recorded"; logWindow.logMessage(message); class2recordings.push_back(message); counterClass2++; } else if (class_being_recorded == 3) { message = "Class 3 being recorded"; logWindow.logMessage(message); class3recordings.push_back(message); counterClass3++; } else { //do nothing. } } if (button == featureExtractionButtonComponent.getButton()) { logWindow2.logMessage("Extracting Features..."); featuresExtracted = true; trainNeuralNetworkButtonComponent.setEnabled(true); featureExtractionButtonComponent.setEnabled(false); //disable itself //startTimer(500); } if (button == trainNeuralNetworkButtonComponent.getButton()) { logWindow3.logMessage("Training Neural Network..."); //trainNeuralNetworkButtonComponent.run();//experiment. //should start_thread //be called instead? startThread(); //this actually puts the function call in a different thread //this is my last attempt - then moving on. networkTrained = true; activateFreePlayButtonComponent.setEnabled(true); trainNeuralNetworkButtonComponent.setEnabled(false);//disable itself //startTimer(500); } if (button == activateFreePlayButtonComponent.getButton()) { //startTimer(500); freePlayActivated = true; playBack1.setEnabled(true); playBack2.setEnabled(true); playBack3.setEnabled(true); activateFreePlayButtonComponent.classifyIncomingVectors(); } } void comboBoxChanged(ComboBox* comboBoxThatHasChanged) override { if (comboBoxThatHasChanged == &classChosenComboBox) { //determine what the choice was! if (classChosenComboBox.getSelectedId() == 1) { logWindow.clearMessages(); retrieveMessages(class1recordings); } else if (classChosenComboBox.getSelectedId() == 2) { logWindow.clearMessages(); retrieveMessages(class2recordings); } else if (classChosenComboBox.getSelectedId() == 3) { logWindow.clearMessages(); retrieveMessages(class3recordings); } else { //nothing } } } void retrieveMessages(std::vector<String> &messageVector) { for (int i = 0; i < messageVector.size(); i++) { logWindow.logMessage(messageVector[i]); } } void timerCallback() override { //logWindow3.logMessage("Training Neural Network..."); //stopTimer(); } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MainContentComponent) }; // (This function is called by the app startup code to create our main component) Component* createMainContentComponent() { return new MainContentComponent(); }
e16c1208d51a1971934e3d055c07ecf5df2479ae
d34730c4d11d2c38d3db77ca6bef7eedaf1e3885
/src/include/Data_element.hpp
911ee79127f9b8233f4436c13e3520caf0a72723
[]
no_license
romaingroux/lib_filetools
f8514460144542059f9121fdd94e5c4f52b5984f
ac3ddc5da5805c7185c04aef288ffbfbcc7d3e49
refs/heads/master
2021-04-06T18:10:26.479881
2018-03-08T12:55:08
2018-03-08T12:55:08
124,391,571
1
0
null
null
null
null
UTF-8
C++
false
false
271
hpp
#ifndef DATAELEMENT_H #define DATAELEMENT_H /*! * \brief The Data_element class is a simple virtual interface for classes modelising any type of data. */ class Data_element { public: virtual ~Data_element() = 0 ; private: } ; #endif // DATAELEMENT_H
9ec7910d503eb7973ce376cb131d47d6eba6d291
777a75e6ed0934c193aece9de4421f8d8db01aac
/src/Providers/UNIXProviders/InfraredController/UNIX_InfraredControllerMain.cpp
9d457bca4c6e28f2ed2c476aa9bab3d2cbdb3e8b
[ "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
2,207
cpp
//%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 <Pegasus/Common/Config.h> #include <Pegasus/Common/String.h> #include <Pegasus/Common/PegasusVersion.h> PEGASUS_USING_PEGASUS; PEGASUS_USING_STD; #include "UNIX_InfraredControllerProvider.h" extern "C" PEGASUS_EXPORT CIMProvider* PegasusCreateProvider(const String& providerName) { if (String::equalNoCase(providerName, CIMHelper::EmptyString)) return NULL; else if (String::equalNoCase(providerName, "UNIX_InfraredControllerProvider")) return new UNIX_InfraredControllerProvider(); return NULL; }
cc9e37054ce16f8c0e7cbd41cc0666e49f0543c3
1af8836f8b5e9fef36ca68e0ff82a9acba3ee9b0
/cocos2dx/000.Project/7.Holygrail/Classes/FirstScene.cpp
42d75d3b24a6e7250cf122779c0de121f268443a
[]
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
14,367
cpp
#include "FirstScene.h" #include "SecondScene.h" #include "HelloWorldScene.h" USING_NS_CC; Scene* FirstScene::createScene() { auto scene = Scene::create(); auto layer = FirstScene::create(); scene->addChild(layer); return scene; } bool FirstScene::init() { if ( !LayerColor::initWithColor(Color4B(0, 255, 0, 255) )) { return false; } sword = false; right_sword = false; mase = false; key = false; item = 0; winSize2 = Director::getInstance()->getWinSize(); tmap2 = TMXTiledMap::create("TileMaps/HolygrailTile2.tmx"); background2 = tmap2->getLayer("Background"); items2 = tmap2->getLayer("Items2"); Tree = tmap2->getLayer("Tree"); metainfo2 = tmap2->getLayer("MetaInfo"); metainfo2->setVisible(false); this->addChild(tmap2); auto objects = tmap2->getObjectGroup("Objects"); ValueMap spawnPoint = objects->getObject("SpawnPoint"); int x = spawnPoint["x"].asInt(); int y = spawnPoint["y"].asInt(); dragonPosition2 = Vec2(x, y); texture = Director::getInstance()->getTextureCache()->addImage("TileMaps/front_man.png"); this->createDragon2(dragonPosition2); createMenubar(); for (int i = 0; i < 10; i++) { for (int j = 0; j < 15; j++) { Vec2 tileCoord = this->tileCoordForPosition2(Vec2(j * 32 + 16, i * 32 + 16)); //log("%f, %f", tileCoord.x , tileCoord.y); int tileGid = this->metainfo2->getTileGIDAt(tileCoord); //log("%d", tileGid); if (tileGid) { Value properties = tmap2->getPropertiesForGID(tileGid); if (!properties.isNull()) { std::string item1 = properties.asValueMap()["Items"].asString(); if (item1 == "wall") { continue; } if (item1 == "wolf") { texture = Director::getInstance()->getTextureCache()->addImage("TileMaps/act_wolf.png"); Animation* animation_wolf = Animation::create(); animation_wolf->setDelayPerUnit(0.2f); for (int i = 0; i < 3; i++) { int index = i % 3; int rowIndex = i / 3; animation_wolf->addSpriteFrameWithTexture(texture, Rect(index * 32, rowIndex * 48, 32, 48)); } wolf = Sprite::createWithTexture(texture, Rect(0, 0, 32, 48)); wolf->setPosition(Vec2(j * 32 + 16, i * 32 + 16)); wolf->setTag(TagNum++); MonsterVector.pushBack(wolf); this->addChild(wolf); Animate *animate_wolf = Animate::create(animation_wolf); auto rep = RepeatForever::create(animate_wolf); wolf->runAction(rep); //this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); } if (item1 == "devil") { texture = Director::getInstance()->getTextureCache()->addImage("TileMaps/act_devil.png"); Animation* animation_devil = Animation::create(); animation_devil->setDelayPerUnit(0.2f); for (int i = 0; i < 3; i++) { int index = i % 3; int rowIndex = i / 3; animation_devil->addSpriteFrameWithTexture(texture, Rect(index * 32, rowIndex * 48, 32, 48)); } devil = Sprite::createWithTexture(texture, Rect(0, 0, 32, 48)); devil->setPosition(Vec2(j * 32 + 16, i * 32 + 16)); devil->setTag(TagNum++); MonsterVector.pushBack(devil); this->addChild(devil); Animate *animate_devil = Animate::create(animation_devil); auto rep = RepeatForever::create(animate_devil); devil->runAction(rep); //this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); } if (item1 == "water") { texture = Director::getInstance()->getTextureCache()->addImage("TileMaps/act_water.png"); Animation* animation_water = Animation::create(); animation_water->setDelayPerUnit(0.2f); for (int i = 0; i < 3; i++) { int index = i % 3; int rowIndex = i / 3; animation_water->addSpriteFrameWithTexture(texture, Rect(index * 32, rowIndex * 48, 32, 48)); } water = Sprite::createWithTexture(texture, Rect(0, 0, 32, 48)); water->setPosition(Vec2(j * 32 + 16, i * 32 + 16)); water->setTag(TagNum++); MonsterVector.pushBack(water); this->addChild(water); Animate *animate_water = Animate::create(animation_water); auto rep = RepeatForever::create(animate_water); water->runAction(rep); //this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); } } } } } for (int i = 0; i < MonsterVector.size(); i++) { log("%d, %f, %f", MonsterVector.at(i)->getTag(), MonsterVector.at(i)->getPosition().x, MonsterVector.at(i)->getPosition().y); } return true; } void FirstScene::onEnter() { Layer::onEnter(); auto listener = EventListenerTouchOneByOne::create(); listener->setSwallowTouches(true); listener->onTouchBegan = CC_CALLBACK_2(FirstScene::onTouchBegan, this); listener->onTouchEnded = CC_CALLBACK_2(FirstScene::onTouchEnded, this); //listener->onTouchEnded = CC_CALLBACK_2(FirstScene::onTouchEnded, this); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); } void FirstScene::onExit() { _eventDispatcher->removeEventListenersForType(EventListener::Type::TOUCH_ONE_BY_ONE); Layer::onExit(); } bool FirstScene::onTouchBegan(cocos2d::Touch* touch, cocos2d::Event* event) { //auto touchPoint = touch->getLocation(); return true; } void FirstScene::onTouchEnded(cocos2d::Touch* touch, cocos2d::Event* event) { auto touchPoint = touch->getLocation(); bool bTouch = Resetbar->getBoundingBox().containsPoint(touchPoint); if (bTouch) { auto pScene = FirstScene::createScene(); Director::getInstance()->replaceScene(pScene); return; } touchPoint = this->convertToNodeSpace(touchPoint); Vec2 playerPos = dragon2->getPosition(); Vec2 diff = touchPoint - playerPos; //animation->addSpriteFrameWithTexture(texture, Rect(index * 130, rowIndex * 140, 130, 140)); if (abs(diff.x) > abs(diff.y)) { if (diff.x > 0) { texture = Director::getInstance()->getTextureCache()->addImage("TileMaps/right_man.png"); removeChild(dragon2); this->createDragon2(playerPos); playerPos.x += tmap2->getTileSize().width; } else { texture = Director::getInstance()->getTextureCache()->addImage("TileMaps/left_man.png"); removeChild(dragon2); this->createDragon2(playerPos); playerPos.x -= tmap2->getTileSize().width; } } else { if (diff.y > 0) { texture = Director::getInstance()->getTextureCache()->addImage("TileMaps/rear_man.png"); removeChild(dragon2); this->createDragon2(playerPos); playerPos.y += tmap2->getTileSize().height; } else { texture = Director::getInstance()->getTextureCache()->addImage("TileMaps/front_man.png"); removeChild(dragon2); this->createDragon2(playerPos); playerPos.y -= tmap2->getTileSize().height; } } if (playerPos.x <= (tmap2->getMapSize().width * tmap2->getTileSize().width) && playerPos.y <= (tmap2->getMapSize().height* tmap2->getTileSize().height) && playerPos.y >= 0 && playerPos.x >= 0) { this->setPlayerPosition2(playerPos); //dragon->setPosition(playerPos); } this->setViewpointCenter2(dragon2->getPosition()); } void FirstScene::setViewpointCenter2(Vec2 position) { int x = MAX(position.x, winSize2.width / 2); int y = MAX(position.y, winSize2.height / 2); x = MIN(x, (tmap2->getMapSize().width * tmap2->getTileSize().width) - winSize2.width / 2); y = MIN(y, (tmap2->getMapSize().height * tmap2->getTileSize().height) - winSize2.height / 2); Vec2 actualPosition = Vec2(x, y); Vec2 centerOfView = Vec2(winSize2.width / 2, winSize2.height / 2); Vec2 viewPoint = centerOfView - actualPosition; this->setPosition(viewPoint); } void FirstScene::createDragon2(Vec2 vector) { animation = Animation::create(); animation->setDelayPerUnit(0.2f); for (int i = 0; i < 3; i++) { int index = i % 3; int rowIndex = i / 3; animation->addSpriteFrameWithTexture(texture, Rect(index * 32, rowIndex * 48, 32, 48)); } dragon2 = Sprite::createWithTexture(texture, Rect(0, 0, 32, 48)); dragon2->setPosition(vector); this->addChild(dragon2); animate = Animate::create(animation); rep = RepeatForever::create(animate); dragon2->runAction(rep); } void FirstScene::createMenubar() { auto Menuber = Sprite::create("TileMaps/Menuber.png"); Menuber->setPosition(Vec2(448, 160)); Menuber->setOpacity(128); this->addChild(Menuber); auto Itembar = Sprite::create("TileMaps/Itembar.png"); Itembar->setPosition(Vec2(448, 288)); this->addChild(Itembar); Resetbar = Sprite::create("TileMaps/Resetbar.png"); Resetbar->setPosition(Vec2(448, 32)); this->addChild(Resetbar); auto statusLabel = LabelTTF::create("Stage2", "", 18); statusLabel->setColor(Color3B::WHITE); statusLabel->setPosition(Vec2(448, 80)); addChild(statusLabel); } Vec2 FirstScene::tileCoordForPosition2(cocos2d::Vec2 position) { int x = position.x / tmap2->getTileSize().width; int y = ((tmap2->getMapSize().height * tmap2->getTileSize().height) - position.y) / tmap2->getTileSize().height; return Vec2(x, y); } void FirstScene::setPlayerPosition2(Vec2 position) { Vec2 tileCoord = this->tileCoordForPosition2(position); int tileGid = this->metainfo2->getTileGIDAt(tileCoord); if (tileGid) { Value properties = tmap2->getPropertiesForGID(tileGid); if (!properties.isNull()) { std::string item1 = properties.asValueMap()["Items"].asString(); if (item1 == "wall") { log("wall...."); return; } if (sword) { if (item1 == "wolf") { item++; this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); for (int i = 0; i < MonsterVector.size(); i++) { if (MonsterVector.at(i)->getPosition().x - 16 <= position.x && MonsterVector.at(i)->getPosition().x + 16 >= position.x && MonsterVector.at(i)->getPosition().y + 16 >= position.y && MonsterVector.at(i)->getPosition().y - 16 <= position.y) { //log("%f, %f, %f, %f", position.x, position.y, MonsterVector.at(i)->getPosition().x, MonsterVector.at(i)->getPosition().y); log("%d, %f, %f", MonsterVector.at(i)->getTag(), MonsterVector.at(i)->getPosition().x, MonsterVector.at(i)->getPosition().y); removeChildByTag(MonsterVector.at(i)->getTag()); break; } } log("아이템 획득 !!! wolf"); } } else { if (item1 == "wolf") { log("wolf를 죽이지 못합니다."); return; } } if (right_sword) { if (item1 == "devil") { item++; this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); for (int i = 0; i < MonsterVector.size(); i++) { if (MonsterVector.at(i)->getPosition().x - 16 <= position.x && MonsterVector.at(i)->getPosition().x + 16 >= position.x && MonsterVector.at(i)->getPosition().y + 16 >= position.y && MonsterVector.at(i)->getPosition().y - 16 <= position.y) { //log("%f, %f, %f, %f", position.x, position.y, MonsterVector.at(i)->getPosition().x, MonsterVector.at(i)->getPosition().y); log("%d, %f, %f", MonsterVector.at(i)->getTag(), MonsterVector.at(i)->getPosition().x, MonsterVector.at(i)->getPosition().y); removeChildByTag(MonsterVector.at(i)->getTag()); break; } } log("아이템 획득 !!! devil"); } } else { if (item1 == "devil") { log("devil을 죽이지 못합니다."); return; } } if (mase) { if (item1 == "water") { item++; this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); for (int i = 0; i < MonsterVector.size(); i++) { if (MonsterVector.at(i)->getPosition().x - 16 <= position.x && MonsterVector.at(i)->getPosition().x + 16 >= position.x && MonsterVector.at(i)->getPosition().y + 16 >= position.y && MonsterVector.at(i)->getPosition().y - 16 <= position.y) { //log("%f, %f, %f, %f", position.x, position.y, MonsterVector.at(i)->getPosition().x, MonsterVector.at(i)->getPosition().y); log("%d, %f, %f", MonsterVector.at(i)->getTag(), MonsterVector.at(i)->getPosition().x, MonsterVector.at(i)->getPosition().y); removeChildByTag(MonsterVector.at(i)->getTag()); break; } } log("아이템 획득 !!! water"); } } else { if (item1 == "water") { log("water을 죽이지 못합니다."); return; } } if (key) { if (item == 22) { if (item1 == "box") { this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); auto pScene = SecondScene::createScene(); Director::getInstance()->replaceScene(pScene); log("아이템 획득 !!! box"); } } else { log("Item이 부족 합니다."); return; } } else { if (item1 == "box") { log("box를 가지지 못합니다."); return; } } if (item1 == "sword") { item++; sword = true; right_sword = false; mase = false; key = false; removeChild(ItemsMenu); ItemsMenu = Sprite::create("TileMaps/sword.png"); ItemsMenu->setPosition(Vec2(448, 288)); this->addChild(ItemsMenu); this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); log("아이템 획득 !!! sword"); } if (item1 == "right_sword") { item++; sword = false; right_sword = true; mase = false; key = false; removeChild(ItemsMenu); ItemsMenu = Sprite::create("TileMaps/right_sword.png"); ItemsMenu->setPosition(Vec2(448, 288)); this->addChild(ItemsMenu); this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); log("아이템 획득 !!! right_sword"); } if (item1 == "mase") { item++; sword = false; right_sword = false; mase = true; key = false; removeChild(ItemsMenu); ItemsMenu = Sprite::create("TileMaps/mase.png"); ItemsMenu->setPosition(Vec2(448, 288)); this->addChild(ItemsMenu); this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); log("아이템 획득 !!! mase"); } if (item1 == "key") { item++; sword = false; right_sword = false; mase = false; key = true; removeChild(ItemsMenu); ItemsMenu = Sprite::create("TileMaps/key.png"); ItemsMenu->setPosition(Vec2(448, 288)); this->addChild(ItemsMenu); this->metainfo2->removeTileAt(tileCoord); items2->removeTileAt(tileCoord); log("아이템 획득 !!! key"); } } } dragon2->setPosition(position); }
b937164849cfd66bc51043ec8773b95990db28f1
ad74f7a42e8dec14ec7576252fcbc3fc46679f27
/PioletDC/stdafx.h
0cb851c3c2ef0842b94363f919b838ea7790716e
[]
no_license
radtek/TrapperKeeper
56fed7afa259aee20d6d81e71e19786f2f0d9418
63f87606ae02e7c29608fedfdf8b7e65339b8e9a
refs/heads/master
2020-05-29T16:49:29.708375
2013-05-15T08:33:23
2013-05-15T08:33:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,325
h
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently #pragma once #ifndef VC_EXTRALEAN #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #endif // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. #define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. #define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 2000 or later. #endif #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later. #define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later. #endif #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit #include <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #ifndef _AFX_NO_OLE_SUPPORT #include <afxole.h> // MFC OLE classes #include <afxodlgs.h> // MFC OLE dialog classes #include <afxdisp.h> // MFC Automation classes #endif // _AFX_NO_OLE_SUPPORT #ifndef _AFX_NO_DB_SUPPORT #include <afxdb.h> // MFC ODBC database classes #endif // _AFX_NO_DB_SUPPORT #ifndef _AFX_NO_DAO_SUPPORT #include <afxdao.h> // MFC DAO database classes #endif // _AFX_NO_DAO_SUPPORT #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT #include <vector> using namespace std; #include <algorithm> #define PIOLET_DATABASE "piolet" #define PIOLET_SUPPLY_TABLE "piolet_raw_supply" #define PIOLET_DEMAND_TABLE "piolet_raw_demand" #define PIOLET_RAW_DATA_TTL 2 //keeping 2 day of raw data
91325a1b080b119f8d31125d9b87d306f127bda3
a86f1a570706894d0bf20c7499de467c95f92b90
/src/pxMatrix4T.cpp
21fbd81d15af8e505231790d144782af16223e2b
[ "Apache-2.0" ]
permissive
kkartunov/pxCore
59eb7901ba632f6344e19043358e416b5f2f54f1
c9f56b6e0a8f6e96a6b418c666435d2767d58329
refs/heads/master
2021-06-12T08:25:19.877221
2017-03-03T21:50:15
2017-03-03T21:50:15
83,960,343
1
0
null
null
null
null
UTF-8
C++
false
false
179
cpp
#include "pxMatrix4T.h" void sincos(double x, double *s, double *c) { *s = sin(x); *c = cos(x); } void sincosf(float x, float *s, float *c) { *s = sin(x); *c = cos(x); }
effaee60ac903408dd0790306c428d9cab846923
cccfb7be281ca89f8682c144eac0d5d5559b2deb
/components/viz/service/surfaces/surface_saved_frame.h
cac37b248cc8bc1ec8bad6289b691bc7f3213c3b
[ "BSD-3-Clause" ]
permissive
SREERAGI18/chromium
172b23d07568a4e3873983bf49b37adc92453dd0
fd8a8914ca0183f0add65ae55f04e287543c7d4a
refs/heads/master
2023-08-27T17:45:48.928019
2021-11-11T22:24:28
2021-11-11T22:24:28
428,659,250
1
0
BSD-3-Clause
2021-11-16T13:08:14
2021-11-16T13:08:14
null
UTF-8
C++
false
false
6,874
h
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_VIZ_SERVICE_SURFACES_SURFACE_SAVED_FRAME_H_ #define COMPONENTS_VIZ_SERVICE_SURFACES_SURFACE_SAVED_FRAME_H_ #include <memory> #include <vector> #include "base/compiler_specific.h" #include "base/containers/flat_map.h" #include "base/memory/weak_ptr.h" #include "components/viz/common/frame_sinks/copy_output_result.h" #include "components/viz/common/quads/compositor_frame.h" #include "components/viz/common/quads/compositor_frame_transition_directive.h" #include "components/viz/common/quads/compositor_render_pass.h" #include "components/viz/common/resources/release_callback.h" #include "components/viz/service/viz_service_export.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace viz { class Surface; class VIZ_SERVICE_EXPORT SurfaceSavedFrame { public: using TransitionDirectiveCompleteCallback = base::OnceCallback<void(uint32_t)>; struct RenderPassDrawData { RenderPassDrawData(); RenderPassDrawData(const CompositorRenderPass& render_pass, float opacity); // This represents the size of the copied texture. gfx::Size size; // This is a transform that takes `rect` into a root render pass space. Note // that this makes this result dependent on the structure of the compositor // frame render pass list used to request the copy output. gfx::Transform target_transform; // Opacity accumulated from the original frame. float opacity = 1.f; }; struct OutputCopyResult { OutputCopyResult(); OutputCopyResult(OutputCopyResult&& other); ~OutputCopyResult(); OutputCopyResult& operator=(OutputCopyResult&& other); // Texture representation. gpu::Mailbox mailbox; gpu::SyncToken sync_token; // Software bitmap representation. SkBitmap bitmap; // This is information needed to draw the texture as if it was a part of the // original frame. RenderPassDrawData draw_data; // Is this a software or a GPU copy result? bool is_software = false; // Release callback used to return a GPU texture. ReleaseCallback release_callback; }; struct FrameResult { FrameResult(); FrameResult(FrameResult&& other); ~FrameResult(); FrameResult& operator=(FrameResult&& other); OutputCopyResult root_result; std::vector<absl::optional<OutputCopyResult>> shared_results; }; SurfaceSavedFrame(CompositorFrameTransitionDirective directive, TransitionDirectiveCompleteCallback finished_callback); ~SurfaceSavedFrame(); // Returns true iff the frame is valid and complete. bool IsValid() const; const CompositorFrameTransitionDirective& directive() { return directive_; } // Appends copy output requests to the needed render passes in the active // frame. void RequestCopyOfOutput(Surface* surface); void ReleaseSurface(); absl::optional<FrameResult> TakeResult() WARN_UNUSED_RESULT; // For testing functionality that ensures that we have a valid frame. void CompleteSavedFrameForTesting(); private: enum class ResultType { kRoot, kShared }; // Replaced the CompositorFrame on the |surface| with a copy that places // shared elements in individual render passes. This effectively allows them // to be in independent layers that can be cached as textures. class ScopedCleanSurface { public: ScopedCleanSurface(Surface* surface, CompositorFrame clean_frame); ~ScopedCleanSurface(); private: Surface* surface_; }; // Queues copy requests by creating a copy of the CompositorFrame as specified // in ScopedCleanSurface. void CopyUsingCleanFrame(Surface* surface, std::unique_ptr<CopyOutputRequest> root_request); // Queues copy requests from the original CompositorFrame. This mode is used // when the frame produced by the renderer already has independent render // passes for each shared element. void CopyUsingOriginalFrame(Surface* surface, std::unique_ptr<CopyOutputRequest> root_request); std::unique_ptr<CopyOutputRequest> CreateCopyRequestIfNeeded( const CompositorRenderPass& render_pass, const CompositorRenderPassList& render_pass_list) const; void NotifyCopyOfOutputComplete(ResultType type, size_t shared_index, const RenderPassDrawData& info, std::unique_ptr<CopyOutputResult> result); size_t ExpectedResultCount() const; // Collects metadata to create a copy of the source CompositorFrame for shared // element snapshots. // |render_passes| is the render pass list from the source frame. // |max_id| returns the maximum render pass id in the list above. // |tainted_to_clean_pass_ids| populates the set of render passes which // include shared elements and need clean render passes for snapshots. void PrepareForCopy( const CompositorRenderPassList& render_passes, CompositorRenderPassId& max_id, base::flat_map<CompositorRenderPassId, CompositorRenderPassId>& tainted_to_clean_pass_ids) const; // Used to filter render pass draw quads when copying render passes for shared // element snapshots. // |tained_to_clean_pass_ids| is used to replace tainted quads with the // equivalent clean render passes. // |pass_quad| is the quad from the source pass being copied. // |copy_pass| is the new clean pass being created. bool FilterSharedElementAndTaintedQuads( const base::flat_map<CompositorRenderPassId, CompositorRenderPassId>* tainted_to_clean_pass_ids, const DrawQuad& quad, CompositorRenderPass& copy_pass) const; // Returns true if |pass_id|'s content is 1:1 with a shared element. bool IsSharedElementRenderPass(CompositorRenderPassId pass_id) const; CompositorFrameTransitionDirective directive_; TransitionDirectiveCompleteCallback directive_finished_callback_; absl::optional<FrameResult> frame_result_; // This is the number of copy requests we requested. We decrement this value // anytime we get a result back. When it reaches 0, we notify that this frame // is complete. size_t copy_request_count_ = 0; // This counts the total number of valid results. For example, if one of // several requests is not valid (e.g. it's empty) then this count will be // smaller than the number of requests we made. This is used to determine // whether the SurfaceSavedFrame is "valid". size_t valid_result_count_ = 0; absl::optional<ScopedCleanSurface> clean_surface_; base::WeakPtrFactory<SurfaceSavedFrame> weak_factory_{this}; }; } // namespace viz #endif // COMPONENTS_VIZ_SERVICE_SURFACES_SURFACE_SAVED_FRAME_H_
cc727ad210ec045081a311eff68a970b5134b8c7
3dbf3b1a91f539631898624cfd8771cf8e395087
/src/tea/graphicscomponent.cpp
aff0234091850076694c4cb3bfed4b4877aba051
[]
no_license
FredTheDino/Tea
daa5596beef860ffcde0a543f407dae62614f0b0
4f838626bf3ac139863794fc0a3d2353f43a6f45
refs/heads/master
2021-01-17T20:57:21.435863
2016-11-03T21:06:54
2016-11-03T21:06:54
61,391,835
0
0
null
null
null
null
UTF-8
C++
false
false
2,304
cpp
#include "graphicscomponent.h" namespace Tea { GLuint GraphicsComponent::_vertexBufferObject = -1; GLuint GraphicsComponent::_vertexArrayObject = -1; bool GraphicsComponent::_setUp = false; std::vector<Vertex> GraphicsComponent::_vertices; std::vector<GraphicsComponent*> GraphicsComponent::_componentList; GraphicsComponent::GraphicsComponent(GameObject* parent, Material* material): Component(parent), _material(material) { _componentList.push_back(this); init(); } GraphicsComponent::~GraphicsComponent() { for (size_t i = 0; i < _componentList.size(); i++) { if (this == _componentList[i]) { _componentList.erase(_componentList.begin() + i); break; } } } void GraphicsComponent::init() { if (_setUp) { return; } _setUp = true; _vertices.push_back(Vertex(-0.5f, 0.5f, 0.0)); _vertices.push_back(Vertex(-0.5f, -0.5f, 0.0)); _vertices.push_back(Vertex( 0.5f, -0.5f, 0.0)); _vertices.push_back(Vertex( 0.5f, 0.5f, 0.0)); _vertices.push_back(Vertex( 0.5f, -0.5f, 0.0)); _vertices.push_back(Vertex(-0.5f, 0.5f, 0.0)); glGenVertexArrays(1, &_vertexArrayObject); glBindVertexArray(_vertexArrayObject); { glGenBuffers(1, &_vertexBufferObject); glBindBuffer(GL_ARRAY_BUFFER, _vertexBufferObject); glBufferData(GL_ARRAY_BUFFER, sizeof(Vertex) * _vertices.size(), &_vertices[0], GL_STATIC_DRAW); glEnableVertexAttribArray(0); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); } glBindVertexArray(0); } void GraphicsComponent::drawEverything(double delta) { if (!_setUp) { init(); } glBindVertexArray(_vertexArrayObject); for (size_t i = 0; i < _componentList.size(); i++) { _componentList[i]->_material->bind(); _componentList[i]->_material->bindSubSprite(_componentList[i]->_subSprite); glm::mat4 matrix = _componentList[i]->_parent->transform.generateTransformationMatrix(); glUniformMatrix4fv(glGetUniformLocation(Shader::getCurrentProgram(), "translationMatrix"), 1, GL_FALSE, &matrix[0][0]); glDrawArrays(GL_TRIANGLES, 0, (GLsizei) _vertices.size()); } glBindVertexArray(0); } void GraphicsComponent::destroy() { glBindVertexArray(_vertexArrayObject); glDeleteBuffers(1, &_vertexBufferObject); glBindVertexArray(0); glDeleteVertexArrays(1, &_vertexArrayObject); } }
dd853582f62f1f853c1b49c0a7f237970c273c86
4d5f2cdc0b7120f74ba6f357b21dac063e71b606
/xercesc/xerces-c1_7_0-win32/include/xercesc/validators/datatype/DateDatatypeValidator.hpp
1f7b7e61df8cd68d30ce416608e52c7a7b75e837
[ "Apache-1.1", "Apache-2.0", "BSD-2-Clause" ]
permissive
anjingbin/starccm
cf499238ceb1e4f0235421cb6f3cb823b932a2cd
70db48004aa20bbb82cc24de80802b40c7024eff
refs/heads/master
2021-01-11T19:49:04.306906
2017-01-19T02:02:50
2017-01-19T02:02:50
79,404,002
2
0
null
null
null
null
UTF-8
C++
false
false
4,657
hpp
/* * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Xerces" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache\@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation, and was * originally based on software copyright (c) 2001, International * Business Machines, Inc., http://www.ibm.com . For more information * on the Apache Software Foundation, please see * <http://www.apache.org/>. */ /* * $Id: DateDatatypeValidator.hpp,v 1.1 2003/11/12 01:58:42 AnJingBin Exp $ * $Log: DateDatatypeValidator.hpp,v $ * Revision 1.1 2003/11/12 01:58:42 AnJingBin * *** empty log message *** * * Revision 1.1 2003/10/23 20:58:28 AnJingBin * *** empty log message *** * * Revision 1.1.1.1 2002/02/01 22:22:40 peiyongz * sane_include * * Revision 1.1 2001/11/07 19:18:52 peiyongz * DateTime Port * */ #if !defined(DATE_DATATYPE_VALIDATOR_HPP) #define DATE_DATATYPE_VALIDATOR_HPP #include <xercesc/validators/datatype/DateTimeValidator.hpp> class VALIDATORS_EXPORT DateDatatypeValidator : public DateTimeValidator { public: // ----------------------------------------------------------------------- // Public ctor/dtor // ----------------------------------------------------------------------- /** @name Constructor. */ //@{ DateDatatypeValidator(); DateDatatypeValidator(DatatypeValidator* const baseValidator , RefHashTableOf<KVStringPair>* const facets , RefVectorOf<XMLCh>* const enums , const int finalSet); ~DateDatatypeValidator(); //@} /** * Returns an instance of the base datatype validator class * Used by the DatatypeValidatorFactory. */ virtual DatatypeValidator* newInstance(RefHashTableOf<KVStringPair>* const facets , RefVectorOf<XMLCh>* const enums , const int finalSet); protected: // ----------------------------------------------------------------------- // implementation of (DateTimeValidator's) virtual interface // ----------------------------------------------------------------------- virtual XMLDateTime* parse(const XMLCh* const); }; /** * End of file DateDatatypeValidator.hpp */ #endif
301a633dddfcf4ce8d67603698b89a3bcccd05ec
d0c44dd3da2ef8c0ff835982a437946cbf4d2940
/cmake-build-debug/programs_tiling/function14646/function14646_schedule_11/function14646_schedule_11_wrapper.cpp
42db0ebfe1f603806803bc42f3c99db9f5a6e241
[]
no_license
IsraMekki/tiramisu_code_generator
8b3f1d63cff62ba9f5242c019058d5a3119184a3
5a259d8e244af452e5301126683fa4320c2047a3
refs/heads/master
2020-04-29T17:27:57.987172
2019-04-23T16:50:32
2019-04-23T16:50:32
176,297,755
1
2
null
null
null
null
UTF-8
C++
false
false
857
cpp
#include "Halide.h" #include "function14646_schedule_11_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){Halide::Buffer<int32_t> buf0(1024, 512, 64); init_buffer(buf0, (int32_t)0); auto t1 = std::chrono::high_resolution_clock::now(); function14646_schedule_11(buf0.raw_buffer()); auto t2 = std::chrono::high_resolution_clock::now(); std::chrono::duration<double> diff = t2 - t1; std::ofstream exec_times_file; exec_times_file.open("../data/programs/function14646/function14646_schedule_11/exec_times.txt", std::ios_base::app); if (exec_times_file.is_open()){ exec_times_file << diff.count() * 1000000 << "us" <<std::endl; exec_times_file.close(); } return 0; }
22112578b051d26cfab70981ccdb2dee46528d4f
8403738e873da6add2b5d32beb8105fe8d2e66cb
/C++ Primer plus/4_compoundtype/example/structur.cpp
a076965fd41d1d6eabc112fe05a1f216c67d8617
[]
no_license
autyinjing/Cpp-learning
415a9e9130c1d864b28b749e8a27935936a08234
fea63fed9c124c6a4218c61ce455554a8d6f29e4
refs/heads/master
2021-01-19T01:52:59.513207
2017-04-21T10:18:22
2017-04-21T10:18:22
38,310,895
0
0
null
null
null
null
UTF-8
C++
false
false
962
cpp
// ===================================================================================== // // Filename: structur.cpp // // Description: // // Version: 1.0 // Created: 2014年02月21日 20时28分50秒 // Revision: none // Compiler: g++ // // Author: Aut(yinjing), [email protected] // Company: Class 1201 of Information and Computing Science // // ===================================================================================== #include <iostream> struct inflatable { char name[20]; float volume; double price; }; int main( void ) { using namespace std; inflatable guest = { "GFlorious Gloria", 1.88, 29.99 }; inflatable pal = { "Audacious Arthur", 3.12, 32.99 }; cout << "Expand your guest list with " << guest.name; cout << " and " << pal.name << "!\n"; cout << "You can have both for $"; cout << guest.price + pal.price << ".\n"; return 0; }
43abba7d39f69ce541505dbb994321076188ab47
6550126ec9f3310fb7083edb17edb84faac71e9f
/src/E/1/E14_LongestCommonPrefix.cpp
2ac150ec9b3768bb381b2a5d5369546cc1a18645
[]
no_license
d2macster/leetcode-cpp
d9dd988a18f3721141b4a174e44fb4cbffa47e1d
48caf45921107f5003bf5b766242c11840e5b84c
refs/heads/master
2021-07-16T20:50:55.500503
2018-08-26T22:10:05
2018-08-26T22:10:05
116,715,207
0
1
null
2019-10-24T17:45:49
2018-01-08T18:54:01
C++
UTF-8
C++
false
false
609
cpp
// // Created by Andrii Cherniak on 3/7/18. // #include <string> #include <vector> using std::string; using std::vector; class Solution { public: string longestCommonPrefix(vector<string> &strs) { int L = strs.size(); if (L == 0) return ""; string prefix = strs[0]; for (int i = 1; i < L; i++) { int l = std::min(prefix.length(), strs[i].length()); int j = 0; for (; j < l && prefix[j] == strs[i][j]; j++) {} if (!j) return ""; prefix = prefix.substr(0, j); } return prefix; } };
63308346e1f763901248fc9aad33f126ccda336e
ff45a52977730ca9d9937526cbe072ce70130278
/thorns/ML_BSSN_NoVec/src/ML_BSSN_NoVec_RHSStaticBoundary.cc
4bd5297299c940d808e3fe9011f92efaa4e3ab05
[]
no_license
ianhinder/KrancData
74c0d2d218949e04e37be4cf7f91b40072f5f0e3
dab5896ec41b65ae0986b36d697317d7de599d7e
refs/heads/master
2020-12-24T15:13:35.012149
2014-03-19T11:18:16
2014-03-19T11:18:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
18,031
cc
/* File produced by Kranc */ #define KRANC_C #include <algorithm> #include <assert.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h" #include "Kranc.hh" #include "Differencing.h" #include "loopcontrol.h" namespace ML_BSSN_NoVec { extern "C" void ML_BSSN_NoVec_RHSStaticBoundary_SelectBCs(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; if (cctk_iteration % ML_BSSN_NoVec_RHSStaticBoundary_calc_every != ML_BSSN_NoVec_RHSStaticBoundary_calc_offset) return; CCTK_INT ierr CCTK_ATTRIBUTE_UNUSED = 0; ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_NoVec::ML_curvrhs","flat"); if (ierr < 0) CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_NoVec::ML_curvrhs."); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_NoVec::ML_dtlapserhs","flat"); if (ierr < 0) CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_NoVec::ML_dtlapserhs."); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_NoVec::ML_dtshiftrhs","flat"); if (ierr < 0) CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_NoVec::ML_dtshiftrhs."); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_NoVec::ML_Gammarhs","flat"); if (ierr < 0) CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_NoVec::ML_Gammarhs."); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_NoVec::ML_lapserhs","flat"); if (ierr < 0) CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_NoVec::ML_lapserhs."); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_NoVec::ML_log_confacrhs","flat"); if (ierr < 0) CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_NoVec::ML_log_confacrhs."); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_NoVec::ML_metricrhs","flat"); if (ierr < 0) CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_NoVec::ML_metricrhs."); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_NoVec::ML_shiftrhs","flat"); if (ierr < 0) CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_NoVec::ML_shiftrhs."); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_NoVec::ML_trace_curvrhs","flat"); if (ierr < 0) CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_NoVec::ML_trace_curvrhs."); return; } static void ML_BSSN_NoVec_RHSStaticBoundary_Body(const cGH* restrict const cctkGH, const int dir, const int face, const CCTK_REAL normal[3], const CCTK_REAL tangentA[3], const CCTK_REAL tangentB[3], const int imin[3], const int imax[3], const int n_subblock_gfs, CCTK_REAL* restrict const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; /* Include user-supplied include files */ /* Initialise finite differencing variables */ const ptrdiff_t di CCTK_ATTRIBUTE_UNUSED = 1; const ptrdiff_t dj CCTK_ATTRIBUTE_UNUSED = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0); const ptrdiff_t dk CCTK_ATTRIBUTE_UNUSED = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0); const ptrdiff_t cdi CCTK_ATTRIBUTE_UNUSED = sizeof(CCTK_REAL) * di; const ptrdiff_t cdj CCTK_ATTRIBUTE_UNUSED = sizeof(CCTK_REAL) * dj; const ptrdiff_t cdk CCTK_ATTRIBUTE_UNUSED = sizeof(CCTK_REAL) * dk; const ptrdiff_t cctkLbnd1 CCTK_ATTRIBUTE_UNUSED = cctk_lbnd[0]; const ptrdiff_t cctkLbnd2 CCTK_ATTRIBUTE_UNUSED = cctk_lbnd[1]; const ptrdiff_t cctkLbnd3 CCTK_ATTRIBUTE_UNUSED = cctk_lbnd[2]; const CCTK_REAL t CCTK_ATTRIBUTE_UNUSED = cctk_time; const CCTK_REAL cctkOriginSpace1 CCTK_ATTRIBUTE_UNUSED = CCTK_ORIGIN_SPACE(0); const CCTK_REAL cctkOriginSpace2 CCTK_ATTRIBUTE_UNUSED = CCTK_ORIGIN_SPACE(1); const CCTK_REAL cctkOriginSpace3 CCTK_ATTRIBUTE_UNUSED = CCTK_ORIGIN_SPACE(2); const CCTK_REAL dt CCTK_ATTRIBUTE_UNUSED = CCTK_DELTA_TIME; const CCTK_REAL dx CCTK_ATTRIBUTE_UNUSED = CCTK_DELTA_SPACE(0); const CCTK_REAL dy CCTK_ATTRIBUTE_UNUSED = CCTK_DELTA_SPACE(1); const CCTK_REAL dz CCTK_ATTRIBUTE_UNUSED = CCTK_DELTA_SPACE(2); const CCTK_REAL dxi CCTK_ATTRIBUTE_UNUSED = pow(dx,-1); const CCTK_REAL dyi CCTK_ATTRIBUTE_UNUSED = pow(dy,-1); const CCTK_REAL dzi CCTK_ATTRIBUTE_UNUSED = pow(dz,-1); const CCTK_REAL khalf CCTK_ATTRIBUTE_UNUSED = 0.5; const CCTK_REAL kthird CCTK_ATTRIBUTE_UNUSED = 0.333333333333333333333333333333; const CCTK_REAL ktwothird CCTK_ATTRIBUTE_UNUSED = 0.666666666666666666666666666667; const CCTK_REAL kfourthird CCTK_ATTRIBUTE_UNUSED = 1.33333333333333333333333333333; const CCTK_REAL hdxi CCTK_ATTRIBUTE_UNUSED = 0.5*dxi; const CCTK_REAL hdyi CCTK_ATTRIBUTE_UNUSED = 0.5*dyi; const CCTK_REAL hdzi CCTK_ATTRIBUTE_UNUSED = 0.5*dzi; /* Initialize predefined quantities */ const CCTK_REAL p1o12dx CCTK_ATTRIBUTE_UNUSED = 0.0833333333333333333333333333333*pow(dx,-1); const CCTK_REAL p1o12dy CCTK_ATTRIBUTE_UNUSED = 0.0833333333333333333333333333333*pow(dy,-1); const CCTK_REAL p1o12dz CCTK_ATTRIBUTE_UNUSED = 0.0833333333333333333333333333333*pow(dz,-1); const CCTK_REAL p1o144dxdy CCTK_ATTRIBUTE_UNUSED = 0.00694444444444444444444444444444*pow(dx,-1)*pow(dy,-1); const CCTK_REAL p1o144dxdz CCTK_ATTRIBUTE_UNUSED = 0.00694444444444444444444444444444*pow(dx,-1)*pow(dz,-1); const CCTK_REAL p1o144dydz CCTK_ATTRIBUTE_UNUSED = 0.00694444444444444444444444444444*pow(dy,-1)*pow(dz,-1); const CCTK_REAL p1o24dx CCTK_ATTRIBUTE_UNUSED = 0.0416666666666666666666666666667*pow(dx,-1); const CCTK_REAL p1o24dy CCTK_ATTRIBUTE_UNUSED = 0.0416666666666666666666666666667*pow(dy,-1); const CCTK_REAL p1o24dz CCTK_ATTRIBUTE_UNUSED = 0.0416666666666666666666666666667*pow(dz,-1); const CCTK_REAL p1o2dx CCTK_ATTRIBUTE_UNUSED = 0.5*pow(dx,-1); const CCTK_REAL p1o2dy CCTK_ATTRIBUTE_UNUSED = 0.5*pow(dy,-1); const CCTK_REAL p1o2dz CCTK_ATTRIBUTE_UNUSED = 0.5*pow(dz,-1); const CCTK_REAL p1o4dx CCTK_ATTRIBUTE_UNUSED = 0.25*pow(dx,-1); const CCTK_REAL p1o4dxdy CCTK_ATTRIBUTE_UNUSED = 0.25*pow(dx,-1)*pow(dy,-1); const CCTK_REAL p1o4dxdz CCTK_ATTRIBUTE_UNUSED = 0.25*pow(dx,-1)*pow(dz,-1); const CCTK_REAL p1o4dy CCTK_ATTRIBUTE_UNUSED = 0.25*pow(dy,-1); const CCTK_REAL p1o4dydz CCTK_ATTRIBUTE_UNUSED = 0.25*pow(dy,-1)*pow(dz,-1); const CCTK_REAL p1o4dz CCTK_ATTRIBUTE_UNUSED = 0.25*pow(dz,-1); const CCTK_REAL p1o64dx CCTK_ATTRIBUTE_UNUSED = 0.015625*pow(dx,-1); const CCTK_REAL p1o64dy CCTK_ATTRIBUTE_UNUSED = 0.015625*pow(dy,-1); const CCTK_REAL p1o64dz CCTK_ATTRIBUTE_UNUSED = 0.015625*pow(dz,-1); const CCTK_REAL p1odx CCTK_ATTRIBUTE_UNUSED = pow(dx,-1); const CCTK_REAL p1odx2 CCTK_ATTRIBUTE_UNUSED = pow(dx,-2); const CCTK_REAL p1ody CCTK_ATTRIBUTE_UNUSED = pow(dy,-1); const CCTK_REAL p1ody2 CCTK_ATTRIBUTE_UNUSED = pow(dy,-2); const CCTK_REAL p1odz CCTK_ATTRIBUTE_UNUSED = pow(dz,-1); const CCTK_REAL p1odz2 CCTK_ATTRIBUTE_UNUSED = pow(dz,-2); const CCTK_REAL pm1o12dx2 CCTK_ATTRIBUTE_UNUSED = -0.0833333333333333333333333333333*pow(dx,-2); const CCTK_REAL pm1o12dy2 CCTK_ATTRIBUTE_UNUSED = -0.0833333333333333333333333333333*pow(dy,-2); const CCTK_REAL pm1o12dz2 CCTK_ATTRIBUTE_UNUSED = -0.0833333333333333333333333333333*pow(dz,-2); const CCTK_REAL pm1o16dx CCTK_ATTRIBUTE_UNUSED = -0.0625*pow(dx,-1); const CCTK_REAL pm1o16dy CCTK_ATTRIBUTE_UNUSED = -0.0625*pow(dy,-1); const CCTK_REAL pm1o16dz CCTK_ATTRIBUTE_UNUSED = -0.0625*pow(dz,-1); const CCTK_REAL pm1o2dx CCTK_ATTRIBUTE_UNUSED = -0.5*pow(dx,-1); const CCTK_REAL pm1o2dy CCTK_ATTRIBUTE_UNUSED = -0.5*pow(dy,-1); const CCTK_REAL pm1o2dz CCTK_ATTRIBUTE_UNUSED = -0.5*pow(dz,-1); const CCTK_REAL pm1o4dx CCTK_ATTRIBUTE_UNUSED = -0.25*pow(dx,-1); const CCTK_REAL pm1o4dy CCTK_ATTRIBUTE_UNUSED = -0.25*pow(dy,-1); const CCTK_REAL pm1o4dz CCTK_ATTRIBUTE_UNUSED = -0.25*pow(dz,-1); /* Jacobian variable pointers */ const bool usejacobian1 = (!CCTK_IsFunctionAliased("MultiPatch_GetMap") || MultiPatch_GetMap(cctkGH) != jacobian_identity_map) && strlen(jacobian_group) > 0; const bool usejacobian = assume_use_jacobian>=0 ? assume_use_jacobian : usejacobian1; if (usejacobian && (strlen(jacobian_derivative_group) == 0)) { CCTK_WARN(1, "GenericFD::jacobian_group and GenericFD::jacobian_derivative_group must both be set to valid group names"); } const CCTK_REAL* restrict jacobian_ptrs[9]; if (usejacobian) GroupDataPointers(cctkGH, jacobian_group, 9, jacobian_ptrs); const CCTK_REAL* restrict const J11 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_ptrs[0] : 0; const CCTK_REAL* restrict const J12 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_ptrs[1] : 0; const CCTK_REAL* restrict const J13 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_ptrs[2] : 0; const CCTK_REAL* restrict const J21 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_ptrs[3] : 0; const CCTK_REAL* restrict const J22 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_ptrs[4] : 0; const CCTK_REAL* restrict const J23 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_ptrs[5] : 0; const CCTK_REAL* restrict const J31 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_ptrs[6] : 0; const CCTK_REAL* restrict const J32 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_ptrs[7] : 0; const CCTK_REAL* restrict const J33 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_ptrs[8] : 0; const CCTK_REAL* restrict jacobian_determinant_ptrs[1] CCTK_ATTRIBUTE_UNUSED; if (usejacobian && strlen(jacobian_determinant_group) > 0) GroupDataPointers(cctkGH, jacobian_determinant_group, 1, jacobian_determinant_ptrs); const CCTK_REAL* restrict const detJ CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_determinant_ptrs[0] : 0; const CCTK_REAL* restrict jacobian_inverse_ptrs[9] CCTK_ATTRIBUTE_UNUSED; if (usejacobian && strlen(jacobian_inverse_group) > 0) GroupDataPointers(cctkGH, jacobian_inverse_group, 9, jacobian_inverse_ptrs); const CCTK_REAL* restrict const iJ11 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_inverse_ptrs[0] : 0; const CCTK_REAL* restrict const iJ12 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_inverse_ptrs[1] : 0; const CCTK_REAL* restrict const iJ13 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_inverse_ptrs[2] : 0; const CCTK_REAL* restrict const iJ21 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_inverse_ptrs[3] : 0; const CCTK_REAL* restrict const iJ22 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_inverse_ptrs[4] : 0; const CCTK_REAL* restrict const iJ23 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_inverse_ptrs[5] : 0; const CCTK_REAL* restrict const iJ31 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_inverse_ptrs[6] : 0; const CCTK_REAL* restrict const iJ32 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_inverse_ptrs[7] : 0; const CCTK_REAL* restrict const iJ33 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_inverse_ptrs[8] : 0; const CCTK_REAL* restrict jacobian_derivative_ptrs[18] CCTK_ATTRIBUTE_UNUSED; if (usejacobian) GroupDataPointers(cctkGH, jacobian_derivative_group, 18, jacobian_derivative_ptrs); const CCTK_REAL* restrict const dJ111 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[0] : 0; const CCTK_REAL* restrict const dJ112 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[1] : 0; const CCTK_REAL* restrict const dJ113 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[2] : 0; const CCTK_REAL* restrict const dJ122 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[3] : 0; const CCTK_REAL* restrict const dJ123 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[4] : 0; const CCTK_REAL* restrict const dJ133 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[5] : 0; const CCTK_REAL* restrict const dJ211 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[6] : 0; const CCTK_REAL* restrict const dJ212 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[7] : 0; const CCTK_REAL* restrict const dJ213 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[8] : 0; const CCTK_REAL* restrict const dJ222 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[9] : 0; const CCTK_REAL* restrict const dJ223 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[10] : 0; const CCTK_REAL* restrict const dJ233 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[11] : 0; const CCTK_REAL* restrict const dJ311 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[12] : 0; const CCTK_REAL* restrict const dJ312 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[13] : 0; const CCTK_REAL* restrict const dJ313 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[14] : 0; const CCTK_REAL* restrict const dJ322 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[15] : 0; const CCTK_REAL* restrict const dJ323 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[16] : 0; const CCTK_REAL* restrict const dJ333 CCTK_ATTRIBUTE_UNUSED = usejacobian ? jacobian_derivative_ptrs[17] : 0; /* Assign local copies of arrays functions */ /* Calculate temporaries and arrays functions */ /* Copy local copies back to grid functions */ /* Loop over the grid points */ const int imin0=imin[0]; const int imin1=imin[1]; const int imin2=imin[2]; const int imax0=imax[0]; const int imax1=imax[1]; const int imax2=imax[2]; #pragma omp parallel CCTK_LOOP3(ML_BSSN_NoVec_RHSStaticBoundary, i,j,k, imin0,imin1,imin2, imax0,imax1,imax2, cctk_ash[0],cctk_ash[1],cctk_ash[2]) { const ptrdiff_t index CCTK_ATTRIBUTE_UNUSED = di*i + dj*j + dk*k; /* Assign local copies of grid functions */ /* Include user supplied include files */ /* Precompute derivatives */ switch (fdOrder) { case 2: { break; } case 4: { break; } default: CCTK_BUILTIN_UNREACHABLE(); } /* Calculate temporaries and grid functions */ CCTK_REAL phirhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL gt11rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL gt12rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL gt13rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL gt22rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL gt23rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL gt33rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL trKrhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL At11rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL At12rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL At13rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL At22rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL At23rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL At33rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL Xt1rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL Xt2rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL Xt3rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL alpharhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL ArhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL beta1rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL beta2rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL beta3rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL B1rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL B2rhsL CCTK_ATTRIBUTE_UNUSED = 0; CCTK_REAL B3rhsL CCTK_ATTRIBUTE_UNUSED = 0; /* Copy local copies back to grid functions */ alpharhs[index] = alpharhsL; Arhs[index] = ArhsL; At11rhs[index] = At11rhsL; At12rhs[index] = At12rhsL; At13rhs[index] = At13rhsL; At22rhs[index] = At22rhsL; At23rhs[index] = At23rhsL; At33rhs[index] = At33rhsL; B1rhs[index] = B1rhsL; B2rhs[index] = B2rhsL; B3rhs[index] = B3rhsL; beta1rhs[index] = beta1rhsL; beta2rhs[index] = beta2rhsL; beta3rhs[index] = beta3rhsL; gt11rhs[index] = gt11rhsL; gt12rhs[index] = gt12rhsL; gt13rhs[index] = gt13rhsL; gt22rhs[index] = gt22rhsL; gt23rhs[index] = gt23rhsL; gt33rhs[index] = gt33rhsL; phirhs[index] = phirhsL; trKrhs[index] = trKrhsL; Xt1rhs[index] = Xt1rhsL; Xt2rhs[index] = Xt2rhsL; Xt3rhs[index] = Xt3rhsL; } CCTK_ENDLOOP3(ML_BSSN_NoVec_RHSStaticBoundary); } extern "C" void ML_BSSN_NoVec_RHSStaticBoundary(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; if (verbose > 1) { CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN_NoVec_RHSStaticBoundary_Body"); } if (cctk_iteration % ML_BSSN_NoVec_RHSStaticBoundary_calc_every != ML_BSSN_NoVec_RHSStaticBoundary_calc_offset) { return; } const char* const groups[] = { "ML_BSSN_NoVec::ML_curvrhs", "ML_BSSN_NoVec::ML_dtlapserhs", "ML_BSSN_NoVec::ML_dtshiftrhs", "ML_BSSN_NoVec::ML_Gammarhs", "ML_BSSN_NoVec::ML_lapserhs", "ML_BSSN_NoVec::ML_log_confacrhs", "ML_BSSN_NoVec::ML_metricrhs", "ML_BSSN_NoVec::ML_shiftrhs", "ML_BSSN_NoVec::ML_trace_curvrhs"}; AssertGroupStorage(cctkGH, "ML_BSSN_NoVec_RHSStaticBoundary", 9, groups); switch (fdOrder) { case 2: { break; } case 4: { break; } default: CCTK_BUILTIN_UNREACHABLE(); } LoopOverBoundary(cctkGH, ML_BSSN_NoVec_RHSStaticBoundary_Body); if (verbose > 1) { CCTK_VInfo(CCTK_THORNSTRING,"Leaving ML_BSSN_NoVec_RHSStaticBoundary_Body"); } } } // namespace ML_BSSN_NoVec
c51eef4442de9ad0163806f92e8996a3972fabd3
7bb793c39d512bc3490608ec028c06677fdd7b05
/hrserver/src/base/ServInfo.cpp
a97f1622bb71a3e42117268dfc15144b83d20679
[]
no_license
rineishou/highwayns_rin
11564fc667633720db50f31ff9baf7654ceaac3f
dfade9705a95a41f44a7c921c94bd3b9e7a1e360
refs/heads/master
2021-06-17T23:06:29.082403
2018-12-17T12:13:09
2018-12-17T12:13:09
88,716,361
0
0
null
null
null
null
UTF-8
C++
false
false
1,303
cpp
/* * ServInfo.cpp * * Created on: 2013-8-8 * Author: [email protected] */ #include "ServInfo.h" serv_info_t* read_server_config(CConfigFileReader* config_file, const char* server_ip_format, const char* server_port_format, uint32_t& server_count) { char server_ip_key[64]; char server_port_key[64]; server_count = 0; // get server_count first; while (true) { sprintf(server_ip_key, "%s%d", server_ip_format, server_count + 1); sprintf(server_port_key, "%s%d", server_port_format, server_count + 1); char* server_ip_value = config_file->GetConfigName(server_ip_key); char* server_port_value = config_file->GetConfigName(server_port_key); if (!server_ip_value || !server_port_value) { break; } server_count++; } if (server_count == 0) { return NULL; } serv_info_t* server_list = new serv_info_t [server_count]; for (uint32_t i = 0; i < server_count; i++) { sprintf(server_ip_key, "%s%d", server_ip_format, i + 1); sprintf(server_port_key, "%s%d", server_port_format, i + 1); char* server_ip_value = config_file->GetConfigName(server_ip_key); char* server_port_value = config_file->GetConfigName(server_port_key); server_list[i].server_ip = server_ip_value; server_list[i].server_port = atoi(server_port_value); } return server_list; }
c9ff924ff37b22fe978e229a93c7e3035df4eeee
a2111a80faf35749d74a533e123d9da9da108214
/raw/pmsb13/pmsb13-data-20130530/sources/21gbd4mgnulhm130/2013-04-12T10-51-20.292+0200/sandbox/olfrik/apps/t5Graphs/t5Graphs.cpp
73e6fd0a45a6961ad89c3fda023b2cb761f3924b
[ "MIT" ]
permissive
bkahlert/seqan-research
f2c550d539f511825842a60f6b994c1f0a3934c2
21945be863855077eec7cbdb51c3450afcf560a3
refs/heads/master
2022-12-24T13:05:48.828734
2015-07-01T01:56:22
2015-07-01T01:56:22
21,610,669
1
0
null
null
null
null
UTF-8
C++
false
false
3,262
cpp
// ========================================================================== // t5Graphs // ========================================================================== // Copyright (c) 2006-2012, Knut Reinert, FU Berlin // 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 Knut Reinert or the FU Berlin 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 KNUT REINERT OR THE FU BERLIN 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. // // ==== // ====================================================================== // Author: Your Name <[email protected]> // ========================================================================== #include <seqan/basic.h> #include <seqan/sequence.h> #include <seqan/arg_parse.h> #include <iostream> #include <seqan/graph_types.h> #include <seqan/graph_algorithms.h> using namespace seqan; int digraph () { typedef unsigned int TCargo; typedef Graph<Directed<TCargo> > TGraph; typedef VertexDescriptor<TGraph>::Type TVertexDescriptor; TGraph g; TVertexDescriptor vertices[] = {1,0, 0,4, 2,1, 4,1, 5,1, 6,2, 3,2, 2,3, 7,3, 5,4, 6,5, 5,6, 7,6, 7,7}; int size = (sizeof( vertices)/sizeof(TVertexDescriptor))/2; std::cout << "sizeof " << size << std::endl; addEdges(g, vertices, size); FILE* strmWrite = fopen("graph.dot", "w"); write(strmWrite, g, DotDrawing()); fclose(strmWrite); std::cout << g << ::std::endl; return 0; } int hmmGraph(){ typedef unsigned int TCargo; typedef Graph<Hmm<Dna,TCargo> > TGraph; typedef VertexDescriptor<TGraph>::Type TVertexDescriptor; TGraph g; TVertexDescriptor exonState, spliceState, intronState; addVertex(g, exonState); addVertex(g, spliceState); addVertex(g, intronState); assignBeginState(g,exonState); assignEndState(g,intronState); return 0; } int main(){ return hmmGraph(); }
0fa42e203ea5f4aae427c98c2356ad85753d3c98
5f53f13ff320c50af317f6812ab85ed820cd8fab
/source/binary_image_analysis/find_hull.cpp
35b11d41e6a9b3b679bd734d0c51adcfc7affea7
[]
no_license
mehome/Learn_OpenCV
59e726e55fddfccb2311a27c0aebe1e093995ba4
0c4eaf142bdd16bdf0747aae32cbbaadc6a77a48
refs/heads/master
2022-04-12T19:10:20.807446
2020-04-08T07:21:58
2020-04-08T07:21:58
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,729
cpp
/* 凸包检测 */ #include<iostream> #include<opencv2\opencv.hpp> using namespace std; using namespace cv; int main(int argc, char**argv) { Mat src = imread("./test_images/tubao.png"); //imshow("src", src); Mat gray,bin; cvtColor(src, gray, CV_BGR2GRAY); threshold(gray, bin, 0, 255, THRESH_BINARY); vector<vector<Point>> contours; vector<Vec4i>hierarchy; findContours(bin, contours, hierarchy, RETR_EXTERNAL, CHAIN_APPROX_SIMPLE, Point()); for (size_t i = 0; i < contours.size(); ++i) { drawContours(src, contours, i, Scalar(0, 255, 0), 2, 8); /* OpenCV中的凸包寻找算法基于Graham’s扫描法: void cv::convexHull( InputArray points, OutputArray hull, bool clockwise = false, bool returnPoints = true) 其中points是输入的轮廓点集 hull凸包检测的输出结果 当returnPoints为ture的时候返回凸包的顶点坐标是个点集 returnPoints为false的是返回的是一个integer的vector里面是凸包各个顶点在轮廓点集对应的index clockwise 表示顺时针方向或者逆时针方向 returnPoints表示是否返回点集 OpenCV中还提供了另外一个API函数用来判断一个轮廓是否为凸包: bool cv::isContourConvex( InputArray contour) 只有一个输入参数就是轮廓点集 */ vector<Point> hull; convexHull(contours[i], hull); bool isHull = isContourConvex(contours[i]); cout << isHull << endl; int len = hull.size(); for (int j = 0; j < hull.size(); ++j) { circle(src, hull[j], 4, Scalar(255, 0, 0), 2, 8,0); line(src, hull[j%len], hull[(j + 1) % len], Scalar(0, 0, 255), 2, 8, 0); } } imshow("tubao", src); waitKey(0); return 0; }
156e6eb4dfcdce0430db32737066c9102d56b62c
4bcc9806152542ab43fc2cf47c499424f200896c
/tensorflow/compiler/mlir/tensorflow/utils/cluster_util_test.cc
df641fb2176357f5073720d83a099bac35f61a4c
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "BSD-2-Clause" ]
permissive
tensorflow/tensorflow
906276dbafcc70a941026aa5dc50425ef71ee282
a7f3934a67900720af3d3b15389551483bee50b8
refs/heads/master
2023-08-25T04:24:41.611870
2023-08-25T04:06:24
2023-08-25T04:14:08
45,717,250
208,740
109,943
Apache-2.0
2023-09-14T20:55:50
2015-11-07T01:19:20
C++
UTF-8
C++
false
false
7,984
cc
/* Copyright 2023 The TensorFlow Authors. 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. ==============================================================================*/ #include "tensorflow/compiler/mlir/tensorflow/utils/cluster_util.h" #include <string> #include <gmock/gmock.h> #include <gtest/gtest.h> #include "mlir/Dialect/Func/IR/FuncOps.h" // from @llvm-project #include "tensorflow/compiler/mlir/tensorflow/dialect_registration.h" #include "tensorflow/compiler/mlir/tensorflow/utils/serialize_mlir_module_utils.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/tsl/lib/core/status_test_util.h" #include "tensorflow/tsl/platform/statusor.h" namespace mlir::TF { namespace { constexpr StringRef kTestClusterName = "tpu0"; tsl::StatusOr<OwningOpRef<ModuleOp>> GetMlirModuleFromString( StringRef string, MLIRContext* context) { DialectRegistry mlir_registry; RegisterAllTensorFlowDialects(mlir_registry); context->appendDialectRegistry(mlir_registry); OwningOpRef<ModuleOp> mlir_module; auto status = tensorflow::DeserializeMlirModule(string, context, &mlir_module); if (!status.ok()) { return status; } return mlir_module; } std::string GetDevice(Operation* op) { auto device_attr = op->getAttrOfType<StringAttr>("device"); return device_attr ? device_attr.getValue().str() : ""; } bool CanBeIgnoredInCluster(Operation* op) { auto device_attr = op->getAttrOfType<StringAttr>("device"); return !device_attr || device_attr.getValue().empty(); } llvm::StringMap<SmallVector<Cluster>> GetClusters(ModuleOp module) { TF::SideEffectAnalysis side_effect_analysis(module); auto main_func = module.lookupSymbol<func::FuncOp>("main"); const TF::SideEffectAnalysis::Info& info = side_effect_analysis.GetAnalysisForFunc(main_func); llvm::StringMap<SmallVector<Cluster>> clusters = BuildAllClusters( main_func.front(), info, GetDevice, CanBeIgnoredInCluster); return clusters; } TEST(BuildClusters, TestSingleCluster) { static const char* const module_with_single_cluster = R"(module { func.func @main(%arg0: tensor<?xi32>) -> tensor<?xi32> { %0 = "tf.A"(%arg0) : (tensor<?xi32>) -> tensor<?xi32> %1 = "tf.B"(%0) {device = "tpu0"} : (tensor<?xi32>) -> tensor<?xi32> %2 = "tf.C"(%0, %1) {device = "tpu0"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> %3 = "tf.D"(%2) : (tensor<?xi32>) -> tensor<?xi32> func.return %3 : tensor<?xi32> } } )"; MLIRContext context; TF_ASSERT_OK_AND_ASSIGN( OwningOpRef<ModuleOp> module, GetMlirModuleFromString(module_with_single_cluster, &context)); auto clusters = GetClusters(module.get()); EXPECT_EQ(clusters.count(kTestClusterName), 1); EXPECT_EQ(clusters.lookup(kTestClusterName).size(), 1); EXPECT_EQ(clusters.lookup(kTestClusterName)[0].ops.size(), 2); } TEST(BuildClusters, TestMultipleClusters) { static const char* const module_with_two_clusters = R"(module { func.func @main(%arg0: tensor<?xi32>) -> tensor<?xi32> { %0 = "tf.A"(%arg0) : (tensor<?xi32>) -> tensor<?xi32> %1 = "tf.B"(%0) {device = "tpu0"} : (tensor<?xi32>) -> tensor<?xi32> %2 = "tf.C"(%0, %1) {device = "tpu0"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> %3 = "tf.D"(%2) : (tensor<?xi32>) -> tensor<?xi32> %4 = "tf.E"(%3) {device = "tpu0"} : (tensor<?xi32>) -> tensor<?xi32> %5 = "tf.F"(%3, %4) {device = "tpu0"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> func.return %5 : tensor<?xi32> } } )"; MLIRContext context; TF_ASSERT_OK_AND_ASSIGN( OwningOpRef<ModuleOp> module, GetMlirModuleFromString(module_with_two_clusters, &context)); auto clusters = GetClusters(module.get()); EXPECT_EQ(clusters.count(kTestClusterName), 1); EXPECT_EQ(clusters[kTestClusterName].size(), 2); EXPECT_EQ(clusters[kTestClusterName][0].ops.size(), 2); EXPECT_EQ(clusters[kTestClusterName][1].ops.size(), 2); } TEST(BuildClusters, TestMultipleTargets) { static const char* const module_with_two_clusters = R"(module { func.func @main(%arg0: tensor<?xi32>) -> tensor<?xi32> { %0 = "tf.A"(%arg0) : (tensor<?xi32>) -> tensor<?xi32> %1 = "tf.B"(%0) {device = "tpu0"} : (tensor<?xi32>) -> tensor<?xi32> %2 = "tf.C"(%0, %1) {device = "tpu0"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> %3 = "tf.D"(%2) : (tensor<?xi32>) -> tensor<?xi32> %4 = "tf.E"(%3) {device = "tpu1"} : (tensor<?xi32>) -> tensor<?xi32> %5 = "tf.F"(%3, %4) {device = "tpu1"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> func.return %5 : tensor<?xi32> } } )"; MLIRContext context; TF_ASSERT_OK_AND_ASSIGN( OwningOpRef<ModuleOp> module, GetMlirModuleFromString(module_with_two_clusters, &context)); auto clusters = GetClusters(module.get()); constexpr StringRef kTarget0 = "tpu0"; EXPECT_EQ(clusters.count(kTarget0), 1); EXPECT_EQ(clusters[kTarget0].size(), 1); EXPECT_EQ(clusters[kTarget0][0].ops.size(), 2); constexpr StringRef kTarget1 = "tpu1"; EXPECT_EQ(clusters.count(kTarget1), 1); EXPECT_EQ(clusters[kTarget1].size(), 1); EXPECT_EQ(clusters[kTarget1][0].ops.size(), 2); } TEST(BuildClusters, TestMergedClusters) { static const char* const module_with_single_cluster = R"(module { func.func @main(%arg0: tensor<?xi32>) -> (tensor<?xi32>, tensor<?xi32>) { %0 = "tf.Relu"(%arg0) : (tensor<?xi32>) -> tensor<?xi32> %1 = "tf.Relu"(%0) {device = "tpu0"} : (tensor<?xi32>) -> tensor<?xi32> %2 = "tf.Add"(%0, %1) {device = "tpu0"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> %3 = "tf.Relu"(%2) : (tensor<?xi32>) -> tensor<?xi32> %4 = "tf.Relu"(%1) {device = "tpu0"} : (tensor<?xi32>) -> tensor<?xi32> %5 = "tf.Add"(%1, %2) {device = "tpu0"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> func.return %3, %5 : tensor<?xi32>, tensor<?xi32> } } )"; MLIRContext context; TF_ASSERT_OK_AND_ASSIGN( OwningOpRef<ModuleOp> module, GetMlirModuleFromString(module_with_single_cluster, &context)); auto clusters = GetClusters(module.get()); EXPECT_EQ(clusters.count(kTestClusterName), 1); EXPECT_EQ(clusters[kTestClusterName].size(), 1); EXPECT_EQ(clusters[kTestClusterName][0].ops.size(), 4); } TEST(BuildClusters, TestMergedClustersWithDataDependen) { static const char* const module_with_single_cluster = R"(module { func.func @main(%arg0: tensor<?xi32>, %arg1: tensor<?xi32>) -> (tensor<?xi32>, tensor<?xi32>) { %0 = "tf.Relu"(%arg0) : (tensor<?xi32>) -> tensor<?xi32> %1 = "tf.Relu"(%0) {device = "tpu0"} : (tensor<?xi32>) -> tensor<?xi32> %2 = "tf.Add"(%0, %1) {device = "tpu0"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> %3 = "tf.Relu"(%arg1) {device = "tpu1"} : (tensor<?xi32>) -> tensor<?xi32> %4 = "tf.Add"(%3, %arg1) {device = "tpu1"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> %5 = "tf.Relu"(%4) {device = "tpu0"} : (tensor<?xi32>) -> tensor<?xi32> %6 = "tf.Add"(%4, %5) {device = "tpu0"} : (tensor<?xi32>, tensor<?xi32>) -> tensor<?xi32> func.return %3, %5 : tensor<?xi32>, tensor<?xi32> } } )"; MLIRContext context; TF_ASSERT_OK_AND_ASSIGN( OwningOpRef<ModuleOp> module, GetMlirModuleFromString(module_with_single_cluster, &context)); auto clusters = GetClusters(module.get()); EXPECT_EQ(clusters.count(kTestClusterName), 1); EXPECT_EQ(clusters[kTestClusterName].size(), 1); EXPECT_EQ(clusters[kTestClusterName][0].ops.size(), 4); } } // namespace } // namespace mlir::TF
6d37077ad3b61c32d1eefa563c4cf269d82dbc88
0954c102d25ae4e26fdc3453d3cf4d405aedd35b
/Noah-doho-6-and-6---master (Animation) 2/Classes/JNICalls/InterfaceJNI.h
b580b6409a5590baa38d7a7911c812056d79882f
[]
no_license
73153/Cocos2dx-animation-cocosbuuilder
c987c34c3e24cf1b44c9560bf10f1ac3af05b433
1f423549b7da96da86cdc5eb92afea8011ecbf66
refs/heads/master
2020-04-06T04:41:50.056706
2017-02-22T11:21:02
2017-02-22T11:21:02
82,796,159
0
0
null
null
null
null
UTF-8
C++
false
false
322
h
#ifndef __INTERFACE_JNI_H__ #define __INTERFACE_JNI_H__ #include "cocos2d.h" class InterfaceJNI { public: static void helloWorld(); static void postMessageToFB(); static void postMessageEMail(); static void postMessageToTweet(); static bool isInternetConnected(); protected: }; #endif // __INTERFACE_JNI_H__
c8313c4b79dd176df881af5b1e10359d124c1fe5
1525009b676640b0f59539f56dfc7571e8a1a786
/src/cibsmartptr_helper.cpp
f8c7173250392efefbc227f35b6324f06197a0bd
[ "MIT" ]
permissive
satya-das/cib
d402236aa59ff70d28cb61c3860e14f321cbf366
369333ea58b0530b8789a340e21096ba7d159d0e
refs/heads/master
2023-06-08T05:56:47.354269
2021-12-05T20:18:38
2021-12-05T20:18:38
20,096,881
42
5
null
2019-02-15T05:18:56
2014-05-23T11:16:13
C++
UTF-8
C++
false
false
2,184
cpp
/* The MIT License (MIT) Copyright (c) 2018 Satya Das 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 "cibcompound.h" #include "cibhelper.h" #include <algorithm> bool CibHelper::isSmartPtr(const std::string& typeName) const { if (smartPtrNames_.count(typeName)) return true; auto nameEndPos = typeName.find('<'); if (nameEndPos == typeName.npos) return false; return isSmartPtr(typeName.substr(0, nameEndPos)); } bool CibHelper::isCopyable(const CppVar* var) const { if (ptrLevel(var->varType())) return true; const auto& varType = baseType(var->varType()); if (isSmartPtr(varType)) return false; if (strstr(varType.c_str(), "unique_ptr")) return false; if (strstr(varType.c_str(), "atomic")) return false; if (strstr(varType.c_str(), "ostringstream")) return false; if (strstr(varType.c_str(), "istringstream")) return false; return true; } std::string CibHelper::convertSmartPtr(const std::string& typeName) const { auto nameStartPos = typeName.find('<') + 1; auto nameEndPos = typeName.find_last_of('>'); return typeName.substr(nameStartPos, nameEndPos - nameStartPos); }
495d902f1c301bfaa5f4278c44c8607d6f5fe4ae
fe7150e6178a9d93baa720f1eb4fe2b8365613ae
/src/lib_common/SimMap/DragMap.cpp
47f7a4a33dfbd341bde52c5410fa275e948b5ce4
[]
no_license
nicrip/moos-ivp-marineswarm
2db0a327881a528e5b8914b795b0516590c7bfd7
f2e2043e278c9ca51d3aee37ed2ab31005d98ca1
refs/heads/master
2021-01-10T07:09:46.987103
2015-10-22T19:59:40
2015-10-22T19:59:40
44,127,701
6
2
null
2015-10-21T15:39:36
2015-10-12T18:56:24
C++
UTF-8
C++
false
false
1,120
cpp
#include <iostream> #include "DragMap.h" #include "MBUtils.h" using namespace std; //---------------------------------------------------------------- // Constructor DragMap::DragMap() { m_reflect_negative = false; m_figlog.setLabel("DragMap"); m_factor = 0; } //---------------------------------------------------------------- // Procedure: setDragFactor void DragMap::setDragFactor(double value) { setFactor(value); } //---------------------------------------------------------------- // Procedure: getDragValue double DragMap::getDragValue(double speed) const { return(getYValue(speed)); } //---------------------------------------------------------------- // Procedure: getSpeedValue double DragMap::getSpeedValue(double drag) const { return(getXValue(drag)); } //---------------------------------------------------------------- // Procedure: getDragFactor double DragMap::getDragFactor() const { return(getFactor()); } //---------------------------------------------------------------- // Procedure: usingDragFactor bool DragMap::usingDragFactor() const { return(usingFactor()); }
bb6321e3afbb90800e788919e0edb7610709ae94
521cf08108137c3d56593d7251ea1544752d257b
/main.cpp
2f79a6529f39d5f56ffe5ee7239a5f37c4bb151f
[]
no_license
Schunk/pru
40398e1aebc94865c517350d0a60a48a85974db2
6d1c27069871328dcadf0607c8122e5f417e3c28
refs/heads/master
2020-08-13T10:02:18.441579
2019-10-17T15:02:16
2019-10-17T15:02:16
214,951,282
0
0
null
2019-10-14T04:57:26
2019-10-14T04:57:26
null
UTF-8
C++
false
false
1,409
cpp
#include<iostream> #include<cstdlib> #include<string.h> #include <cstdio> #include <cstring> #include<clocale> #include<ctime> using namespace std; #include "rlutil.h" using namespace rlutil; #include"Mapa.h" #include"Avatar.h" #include"Movimiento.h" int main() { ///Mapa: MAPA map_game; ///Avatar: AVATAR pj; map_game.imprimir_caracter(pj.gets_eje_x_ext(), pj.gets_eje_y_ext(), pj.gets_eje_x_int(), pj.gets_eje_y_int(), pj.gets_caracter()); ///Menu: char mov; while(true){ map_game.leer_mapa(); cout<< endl<< endl<< endl; cout<< "W) Arriba."<< endl; cout<< "S) Abajo."<< endl; cout<< "A) Izquierda."<< endl; cout<< "D) Derecha."<< endl; cout<< endl; cout<< pj.gets_eje_x_ext(); cout<< pj.gets_eje_y_ext(); cout<< pj.gets_eje_x_int(); cout<< pj.gets_eje_y_int(); mov = getch(); system("pause>>NULL"); system("cls"); switch(mov){ case 'w': case 's': case 'a': case 'd': mover(mov, map_game, pj); break; default: cout<< "Opcion invalida"<< endl; system("pause>> NULL"); system("cls"); break; } } return 0; }
fa890778c124aab27db187dc4c5384ca45f73b7a
779bb7108d6891aafbfbcc48ce2aada7d8e5ae69
/Winsock/Game.h
54aac1df3d946ec1c241e127a5ed7189378c2a75
[]
no_license
Mathew977/Network-Game-Server
a73a2d9d271655f27496b7888c9b51837b9c7889
d68367eb2b689c57de1e401e19f358c7cbd381ef
refs/heads/master
2020-06-21T20:38:50.430355
2019-07-18T08:38:11
2019-07-18T08:38:11
197,547,311
0
0
null
null
null
null
UTF-8
C++
false
false
172
h
#pragma once #define DEFAULT_BUFLEN 512 class Game { private: public: //Handles retrieving the leaderboard from the files char* getLeadboard(); Game(); ~Game(); };
11abe74c43cd04e532b49e2fad9b15c017c98759
e723b0cb7ba718563676c459ca72ee9a93b430b1
/GameClient.h
a3334f27558d3524cb40af47504a17159b85e16c
[]
no_license
omerorhun/game_client
2d143e820cd8711b6ad74ab429295ef2590091b3
be3c17226b07d6b7ff939fde6cf78f935c60c841
refs/heads/main
2023-01-13T08:03:11.104714
2020-11-15T23:20:06
2020-11-15T23:20:06
313,139,941
0
0
null
null
null
null
UTF-8
C++
false
false
1,476
h
#ifndef _GAME_CLIENT_H_ #define _GAME_CLIENT_H_ #include <stdint.h> #include <string> #include "json.hpp" typedef struct { std::string question; std::string choice_a; std::string choice_b; std::string choice_c; std::string choice_d; std::string correct_answer; }QuestionInfo; typedef struct { uint8_t category; QuestionInfo questions[5]; }TourInfo; typedef struct { uint8_t category = 1; int right = 0; int wrong = 0; }ResultInfo; typedef struct { uint64_t uid = 0; ResultInfo tour_result[3]; uint8_t tour_wins = 0; }GameUser; class GameClient { public: GameClient(); ~GameClient(); static GameClient *get_instance(); void set_questions(nlohmann::json questions); QuestionInfo get_next_question(); bool check_answer(uint64_t uid, std::string answer); void show_next_question(); bool finish_question(); bool finish_tour(); void set_uid(uint8_t who, uint64_t uid); void set_game_id(int game_id); int get_game_id(); uint64_t get_op_uid(); uint64_t get_my_uid(); void finish_game(); uint64_t get_winner(); GameUser get_results(uint8_t who); private: static GameClient *_ps_instance; int _game_id; TourInfo _tours[3]; int _current_question; int _current_tour; GameUser _me; GameUser _op; uint64_t _winner; std::string get_current_correct_answer(); }; #endif // _GAME_CLIENT_H_
63240b9e477999cb993b51622b2999428c7cad8f
52d7262e25cd3635a4d6d711aad9891cf959facc
/C++Primer/chapter9/test_9.43.cpp
899a68ea8b8e39cea7dbbd01ad10e79131ee124d
[]
no_license
blackDogSheriff/MyNote
bedad79b66eefc1f15eae300361b3665c852b045
f54a83a3052f458ae3294dc2c27b880dbf59ecc5
refs/heads/main
2023-06-04T02:00:51.802379
2021-06-21T08:02:14
2021-06-21T08:02:14
357,460,967
0
0
null
null
null
null
UTF-8
C++
false
false
887
cpp
#include <iostream> #include <vector> #include <string> using namespace std; void replace_string(string &s, const string &odlVal, const string &newVal) { auto l = oldVal.size(); if (!l) return; auto iter = s.begin(); while (iter <= s.end() - 1) { auto iter1 = iter; auto iter2 = oldVal.begin(); while (iter2 != oldVal.end() && *iter1 == *iter2) { iter1++; iter2++; } if (iter2 == oldVal.end()) { iter = s.erase(iter, iter1); if (newVal.size()) { iter2 = newVal.end(); do { iter2--; iter = s.insert(iter, *iter2); } while (iter2 > newVal.begin()); } iter += newVal.size(); } else iter++; } } int main(void) { string s = "tho thru tho!"; replace_string(s, "thru", "through"); cout << s << endl; replace_string(s, "tho", "though"); cout << s << endl; replace_string(s, "through", ""); cout << s << endl; return 0; }
99f8c9f315b3a9aed36388ab354a9fa69128d247
089316887010fa4af569b8235534701246dcba88
/doc/S9/main.cpp
cde2fa0ceee7770f1e7c3ca185ac034d6ab1b587
[]
no_license
jorgealemangonzalez/SoftwareArchitecture
ea537b3388b08d71c34a69b6c8c2e67898341507
0197b755f47faf6e68ea0c8adfe1f1b728926e6c
refs/heads/master
2021-01-11T11:59:06.816423
2016-06-28T18:55:13
2016-06-28T18:55:13
76,684,072
1
0
null
null
null
null
UTF-8
C++
false
false
1,208
cpp
#include "Fraction.cpp" #include <iostream> int main(){ Fraction < int > init1(5,10); Fraction < int > init2(9,14); Fraction <int> res = init1+init2; std::cout << "("<< init1._numerator << " / " << init1._denominator << ") + (" << init2._numerator << " / " << init2._denominator; std::cout << ") = " << res._numerator << " / " << res._denominator << std::endl; res = init2 * init1; std::cout << "("<< init1._numerator << " / " << init1._denominator << ") * (" << init2._numerator << " / " << init2._denominator; std::cout << ") = " << res._numerator << " / " << res._denominator << std::endl; Fraction < short > short1(-5,-10); Fraction < short > short2(9,-14); Fraction <short> res1 = short1+short2; std::cout << "("<< short1._numerator << " / " << short1._denominator << ") + (" << short2._numerator << " / " << short2._denominator; std::cout << ") = " << res1._numerator << " / " << res1._denominator << std::endl; res1 = short2 * short1; std::cout << "("<< short1._numerator << " / " << short1._denominator << ") * (" << short2._numerator << " / " << short2._denominator; std::cout << ") = " << res1._numerator << " / " << res1._denominator << std::endl; return 0; }
ecfd52e881aa5fdc79268ae80ab5aaea135a716c
6bb17032355b8eb0dfc1ece3c1af891ccadd5ca2
/Lineclippingalgorithms/cohensutherland.cpp
8657e100908029e0122e7c45e86b361f0b06d487
[]
no_license
VasaviSingh/OpenGL
cf375ff6ae8eac9a2c40e870969aa7fa8fa09dc4
ab46a200da52be115b36c6eedd5f08a84d9daea7
refs/heads/master
2020-08-31T15:58:35.488193
2019-11-23T04:36:34
2019-11-23T04:36:34
218,727,531
0
0
null
null
null
null
UTF-8
C++
false
false
3,883
cpp
#include<GL/gl.h> #include<glut.h> #include<stdlib.h> #include<stdio.h> double y_max = 100, y_min = 50, x_max = 100, x_min = 50; double ny_max = 300, ny_min = 200, nx_max = 300, nx_min = 200; int TOP = 8, BOTTOM = 4, RIGHT = 2, LEFT = 1; double x1 = 10, y1 = 120; double x2 = 120, y2 = 50; void myInit(); void myDisplay(); void draw_lineAndPort(double x1, double y1, double x2, double y2, double y_max, double y_min, double x_max, double x_min); void cohenSutherland(double x1, double y1, double x2, double y2); int outcode(double x, double y); int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowPosition(0, 0); glutInitWindowSize(500, 500); glutCreateWindow("Cohen Sutherland"); glutDisplayFunc(myDisplay); myInit(); glutMainLoop(); return 0; } void myInit() { glLoadIdentity(); glMatrixMode(GL_PROJECTION); gluOrtho2D(0, 500, 0, 500); glMatrixMode(GL_MODELVIEW); } void myDisplay() { glClear(GL_COLOR_BUFFER_BIT); draw_lineAndPort(x1, y1, x2, y2, y_max, y_min, x_max, x_min); cohenSutherland(x1, y1, x2, y2); glFlush(); } void draw_lineAndPort(double x1, double y1, double x2, double y2, double y_max, double y_min, double x_max, double x_min) { glColor3d(1, 0, 0); glBegin(GL_LINE_LOOP); glVertex2d(x_min, y_min); glVertex2d(x_max, y_min); glVertex2d(x_max, y_max); glVertex2d(x_min, y_max); glEnd(); glColor3d(1, 1, 1); glBegin(GL_LINES); glVertex2d(x1, y1); glVertex2d(x2, y2); glEnd(); } int outcode(double x, double y) { int out=0; if (y > y_max) out|= TOP; else if (y < y_min) out|= BOTTOM; if (x > x_max) out|= RIGHT; else if (x < x_min) out|= LEFT; return out; } void cohenSutherland(double x1, double y1, double x2, double y2) { int c1 = outcode(x1, y1); int c2 = outcode(x2, y2); int outcodeOut; bool accept = false, done = false; do { if ((c1 | c2) == 0) { accept = true; done = true; } else if ((c1 & c2) != 0) { done = true; } else { outcodeOut = (c1 != 0)? c1:c2; double x, y; double slope = (y2 - y1) / (x2 - x1); if (outcodeOut & TOP) { y = y_max; x = x1 + (y - y1) / slope; } else if (outcodeOut & BOTTOM) { y = y_min; x = x1 + (y - y1) / slope; } else if (outcodeOut & RIGHT) { x = x_max; y = y1 + (x - x1) * slope; } else { x = x_min; y = y1 + (x - x1) * slope; } if (outcodeOut ==c1) { x1 = x; y1 = y; c1 = outcode(x1, y1); } else { x2 = x; y2 = y; c2 = outcode(x2, y2); } } } while (!done); if(accept) { double scale_x = (nx_max - nx_min) / (x_max - x_min); double scale_y = (ny_max - ny_min) / (y_max - y_min); double nx1 = nx_min + (x1 - x_min) * scale_x; double ny1 = ny_min + (y1 - y_min) * scale_y; double nx2 = nx_min + (x2 - x_min) * scale_x; double ny2 = ny_min + (y2 - y_min) * scale_y; draw_lineAndPort(nx1, ny1, nx2, ny2, ny_max, ny_min, nx_max, nx_min); } }
1f6f9bdbaff9f5341a88d4d97a0c71218dc5e7ef
dd80a584130ef1a0333429ba76c1cee0eb40df73
/external/chromium_org/content/browser/android/load_url_params.cc
57eff2d5fae0fc62777a32fe90aa3c34841fae6b
[ "MIT", "BSD-3-Clause" ]
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
1,257
cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/android/load_url_params.h" #include <jni.h> #include "base/android/jni_string.h" #include "content/public/browser/navigation_controller.h" #include "content/public/common/url_constants.h" #include "jni/LoadUrlParams_jni.h" #include "url/gurl.h" namespace { using content::NavigationController; void RegisterConstants(JNIEnv* env) { Java_LoadUrlParams_initializeConstants(env, NavigationController::LOAD_TYPE_DEFAULT, NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST, NavigationController::LOAD_TYPE_DATA, NavigationController::UA_OVERRIDE_INHERIT, NavigationController::UA_OVERRIDE_FALSE, NavigationController::UA_OVERRIDE_TRUE); } } // namespace namespace content { bool RegisterLoadUrlParams(JNIEnv* env) { if (!RegisterNativesImpl(env)) return false; RegisterConstants(env); return true; } jboolean IsDataScheme(JNIEnv* env, jclass clazz, jstring jurl) { GURL url(base::android::ConvertJavaStringToUTF8(env, jurl)); return url.SchemeIs(chrome::kDataScheme); } } // namespace content
81f93896910ebcae7a6bfbdc35fa6b68f8804d9a
b87d3c7c3f24beb2dcc5323f33f8886d0315d8be
/TestingCppOut/PointerPointerTester.cpp
aa84ba837738d87f69d57a039012a8f259806f43
[]
no_license
ramzy2000/TestingCppOut
76b1108a709283f3a78204432d6ffbf74df09d9f
c8751268e0c01c1714862ae4f27a7176e1de4d0f
refs/heads/master
2023-06-27T23:04:47.676149
2021-08-03T01:48:30
2021-08-03T01:48:30
380,108,155
0
0
null
null
null
null
UTF-8
C++
false
false
336
cpp
#include "PointerPointerTester.h" PointerPointerTester::PointerPointerTester() { test(); } void PointerPointerTester::test() { std::cout << "number == " << ***triplePtr << '\n'; std::cout << "ptr == " << **triplePtr << '\n'; std::cout << "doublePtr == " << *triplePtr << '\n'; std::cout << "triplePtr == " << triplePtr << '\n'; }
e00ebe599b2a4da72871bce0b50166f344ca9342
8137fad2b71bbf297c191a506de897a9d2c4024c
/LevelHEngine/Core/WindowFrame.cpp
1e9b0d4f71f2dc64a7bf67c73c58ef48d48541ea
[ "MIT" ]
permissive
JSlowgrove/LevelHEngine-GEP-Assignment-1
90e77c2c55149065608f3fd44df44c85c610a74d
ab5f59414e712c1c10177e3063f9e1554cda8331
refs/heads/master
2020-03-30T19:14:55.422012
2018-10-05T17:07:34
2018-10-05T17:07:34
151,534,933
0
0
null
null
null
null
UTF-8
C++
false
false
1,656
cpp
#include "WindowFrame.h" std::string WindowFrame::title; Vec2 WindowFrame::windowPos; Vec2 WindowFrame::windowRes; bool WindowFrame::fullscreen; float WindowFrame::frameRate; void WindowFrame::setWindow(std::string title, Vec2 windowPos, Vec2 windowRes, bool fullscreen, float frameRate) { setTitle(title); setWindowPos(windowPos); setWindowRes(windowRes); setFullscreen(fullscreen); setFrameRate(frameRate); //Log window details Logging::logI("Window title: " + title); Logging::logI("Window position: " + std::to_string(int(windowPos.x)) + ", " + std::to_string(int(windowPos.y))); Logging::logI("Window resolution: " + std::to_string(int(windowRes.x)) + ", " + std::to_string(int(windowRes.y))); Logging::logI("Window fullscreen: " + Logging::boolToString(fullscreen)); Logging::logI("Window frame rate: " + std::to_string(frameRate)); } void WindowFrame::setTitle(std::string title) { WindowFrame::title = title; } void WindowFrame::setWindowPos(Vec2 windowPos) { WindowFrame::windowPos = windowPos; } void WindowFrame::setWindowRes(Vec2 windowRes) { WindowFrame::windowRes = windowRes; } void WindowFrame::setFullscreen(bool fullscreen) { WindowFrame::fullscreen = fullscreen; } void WindowFrame::setFrameRate(float frameRate) { WindowFrame::frameRate = frameRate; } std::string WindowFrame::getTitle() { return title; } Vec2 WindowFrame::getWindowPos() { return windowPos; } Vec2 WindowFrame::getWindowRes() { return windowRes; } bool WindowFrame::getFullscreen() { return fullscreen; } float WindowFrame::getFrameRate() { return frameRate; } float WindowFrame::getAspect() { return (windowRes.x / windowRes.y); }
d650ee9b7a3f20ab9c5870943b2e4f4ad34745cb
38d389eb9ff8540e814f84d69d56677d400a8c37
/xmu/xmu 1036the lost card.cpp
a5b604fbafd60a6bba73ea69199b7919ce738653
[]
no_license
sndnyang/programCode
ffc48717af8ee66a3852c8f7422b610b3a5aadb2
2bedd34ffdd035f91a0d3baef7c9a5fd819c221c
refs/heads/master
2020-05-17T23:12:24.413702
2017-03-09T08:43:58
2017-03-09T08:43:58
5,778,480
0
1
null
null
null
null
UTF-8
C++
false
false
263
cpp
#include<stdio.h> #include<stdlib.h> int main() { int i,n,k=0,p,t; scanf("%d",&n); for(i=0;i<2*n-1;i++) { scanf("%d",&p); t=p^k; k=t; } printf("%d\n",t); system("pause"); return 0; }
fc326c3df0074aff0a2417b2434f28168aeedec0
153c1f29c7d31aed68ab68ef5d3964338f97f8dd
/protocol/gate.pb.h
7f38057377c921ce04033ec8a11e05ade7cf7b75
[]
no_license
Nickqiaoo/cppim
78f2b00915c8fed61819de9c1e6923e10c36fccd
9c6789df48b55a416515711b212e0f081c5d3b1d
refs/heads/master
2022-04-12T00:53:23.026806
2020-03-30T08:37:36
2020-03-30T08:37:36
207,251,145
3
1
null
null
null
null
UTF-8
C++
false
true
49,617
h
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: gate.proto #ifndef PROTOBUF_gate_2eproto__INCLUDED #define PROTOBUF_gate_2eproto__INCLUDED #include <string> #include <google/protobuf/stubs/common.h> #if GOOGLE_PROTOBUF_VERSION < 3000000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif #if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif #include <google/protobuf/arena.h> #include <google/protobuf/arenastring.h> #include <google/protobuf/generated_message_util.h> #include <google/protobuf/metadata.h> #include <google/protobuf/message.h> #include <google/protobuf/repeated_field.h> #include <google/protobuf/extension_set.h> #include <google/protobuf/map.h> #include <google/protobuf/map_field_inl.h> #include <google/protobuf/service.h> #include <google/protobuf/unknown_field_set.h> // @@protoc_insertion_point(includes) namespace gate { // Internal implementation detail -- do not call these. void protobuf_AddDesc_gate_2eproto(); void protobuf_AssignDesc_gate_2eproto(); void protobuf_ShutdownFile_gate_2eproto(); class BroadcastReply; class BroadcastReq; class BroadcastRoomReply; class BroadcastRoomReq; class Empty; class Proto; class PushMsgReply; class PushMsgReq; class RoomsReply; class RoomsReq; // =================================================================== class Proto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.Proto) */ { public: Proto(); virtual ~Proto(); Proto(const Proto& from); inline Proto& operator=(const Proto& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const Proto& default_instance(); void Swap(Proto* other); // implements Message ---------------------------------------------- inline Proto* New() const { return New(NULL); } Proto* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const Proto& from); void MergeFrom(const Proto& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(Proto* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional int32 ver = 1; void clear_ver(); static const int kVerFieldNumber = 1; ::google::protobuf::int32 ver() const; void set_ver(::google::protobuf::int32 value); // optional int32 op = 2; void clear_op(); static const int kOpFieldNumber = 2; ::google::protobuf::int32 op() const; void set_op(::google::protobuf::int32 value); // optional int32 seq = 3; void clear_seq(); static const int kSeqFieldNumber = 3; ::google::protobuf::int32 seq() const; void set_seq(::google::protobuf::int32 value); // optional bytes body = 4; void clear_body(); static const int kBodyFieldNumber = 4; const ::std::string& body() const; void set_body(const ::std::string& value); void set_body(const char* value); void set_body(const void* value, size_t size); ::std::string* mutable_body(); ::std::string* release_body(); void set_allocated_body(::std::string* body); // @@protoc_insertion_point(class_scope:gate.Proto) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; ::google::protobuf::int32 ver_; ::google::protobuf::int32 op_; ::google::protobuf::internal::ArenaStringPtr body_; ::google::protobuf::int32 seq_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static Proto* default_instance_; }; // ------------------------------------------------------------------- class Empty : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.Empty) */ { public: Empty(); virtual ~Empty(); Empty(const Empty& from); inline Empty& operator=(const Empty& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const Empty& default_instance(); void Swap(Empty* other); // implements Message ---------------------------------------------- inline Empty* New() const { return New(NULL); } Empty* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const Empty& from); void MergeFrom(const Empty& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(Empty* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // @@protoc_insertion_point(class_scope:gate.Empty) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static Empty* default_instance_; }; // ------------------------------------------------------------------- class PushMsgReq : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.PushMsgReq) */ { public: PushMsgReq(); virtual ~PushMsgReq(); PushMsgReq(const PushMsgReq& from); inline PushMsgReq& operator=(const PushMsgReq& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const PushMsgReq& default_instance(); void Swap(PushMsgReq* other); // implements Message ---------------------------------------------- inline PushMsgReq* New() const { return New(NULL); } PushMsgReq* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const PushMsgReq& from); void MergeFrom(const PushMsgReq& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(PushMsgReq* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // repeated string keys = 1; int keys_size() const; void clear_keys(); static const int kKeysFieldNumber = 1; const ::std::string& keys(int index) const; ::std::string* mutable_keys(int index); void set_keys(int index, const ::std::string& value); void set_keys(int index, const char* value); void set_keys(int index, const char* value, size_t size); ::std::string* add_keys(); void add_keys(const ::std::string& value); void add_keys(const char* value); void add_keys(const char* value, size_t size); const ::google::protobuf::RepeatedPtrField< ::std::string>& keys() const; ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_keys(); // optional int32 protoOp = 3; void clear_protoop(); static const int kProtoOpFieldNumber = 3; ::google::protobuf::int32 protoop() const; void set_protoop(::google::protobuf::int32 value); // optional .gate.Proto proto = 2; bool has_proto() const; void clear_proto(); static const int kProtoFieldNumber = 2; const ::gate::Proto& proto() const; ::gate::Proto* mutable_proto(); ::gate::Proto* release_proto(); void set_allocated_proto(::gate::Proto* proto); // @@protoc_insertion_point(class_scope:gate.PushMsgReq) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; ::google::protobuf::RepeatedPtrField< ::std::string> keys_; ::gate::Proto* proto_; ::google::protobuf::int32 protoop_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static PushMsgReq* default_instance_; }; // ------------------------------------------------------------------- class PushMsgReply : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.PushMsgReply) */ { public: PushMsgReply(); virtual ~PushMsgReply(); PushMsgReply(const PushMsgReply& from); inline PushMsgReply& operator=(const PushMsgReply& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const PushMsgReply& default_instance(); void Swap(PushMsgReply* other); // implements Message ---------------------------------------------- inline PushMsgReply* New() const { return New(NULL); } PushMsgReply* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const PushMsgReply& from); void MergeFrom(const PushMsgReply& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(PushMsgReply* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // @@protoc_insertion_point(class_scope:gate.PushMsgReply) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static PushMsgReply* default_instance_; }; // ------------------------------------------------------------------- class BroadcastReq : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.BroadcastReq) */ { public: BroadcastReq(); virtual ~BroadcastReq(); BroadcastReq(const BroadcastReq& from); inline BroadcastReq& operator=(const BroadcastReq& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const BroadcastReq& default_instance(); void Swap(BroadcastReq* other); // implements Message ---------------------------------------------- inline BroadcastReq* New() const { return New(NULL); } BroadcastReq* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const BroadcastReq& from); void MergeFrom(const BroadcastReq& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(BroadcastReq* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional int32 protoOp = 1; void clear_protoop(); static const int kProtoOpFieldNumber = 1; ::google::protobuf::int32 protoop() const; void set_protoop(::google::protobuf::int32 value); // optional .gate.Proto proto = 2; bool has_proto() const; void clear_proto(); static const int kProtoFieldNumber = 2; const ::gate::Proto& proto() const; ::gate::Proto* mutable_proto(); ::gate::Proto* release_proto(); void set_allocated_proto(::gate::Proto* proto); // optional int32 speed = 3; void clear_speed(); static const int kSpeedFieldNumber = 3; ::google::protobuf::int32 speed() const; void set_speed(::google::protobuf::int32 value); // @@protoc_insertion_point(class_scope:gate.BroadcastReq) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; ::gate::Proto* proto_; ::google::protobuf::int32 protoop_; ::google::protobuf::int32 speed_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static BroadcastReq* default_instance_; }; // ------------------------------------------------------------------- class BroadcastReply : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.BroadcastReply) */ { public: BroadcastReply(); virtual ~BroadcastReply(); BroadcastReply(const BroadcastReply& from); inline BroadcastReply& operator=(const BroadcastReply& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const BroadcastReply& default_instance(); void Swap(BroadcastReply* other); // implements Message ---------------------------------------------- inline BroadcastReply* New() const { return New(NULL); } BroadcastReply* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const BroadcastReply& from); void MergeFrom(const BroadcastReply& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(BroadcastReply* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // @@protoc_insertion_point(class_scope:gate.BroadcastReply) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static BroadcastReply* default_instance_; }; // ------------------------------------------------------------------- class BroadcastRoomReq : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.BroadcastRoomReq) */ { public: BroadcastRoomReq(); virtual ~BroadcastRoomReq(); BroadcastRoomReq(const BroadcastRoomReq& from); inline BroadcastRoomReq& operator=(const BroadcastRoomReq& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const BroadcastRoomReq& default_instance(); void Swap(BroadcastRoomReq* other); // implements Message ---------------------------------------------- inline BroadcastRoomReq* New() const { return New(NULL); } BroadcastRoomReq* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const BroadcastRoomReq& from); void MergeFrom(const BroadcastRoomReq& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(BroadcastRoomReq* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional string roomID = 1; void clear_roomid(); static const int kRoomIDFieldNumber = 1; const ::std::string& roomid() const; void set_roomid(const ::std::string& value); void set_roomid(const char* value); void set_roomid(const char* value, size_t size); ::std::string* mutable_roomid(); ::std::string* release_roomid(); void set_allocated_roomid(::std::string* roomid); // optional .gate.Proto proto = 2; bool has_proto() const; void clear_proto(); static const int kProtoFieldNumber = 2; const ::gate::Proto& proto() const; ::gate::Proto* mutable_proto(); ::gate::Proto* release_proto(); void set_allocated_proto(::gate::Proto* proto); // @@protoc_insertion_point(class_scope:gate.BroadcastRoomReq) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; ::google::protobuf::internal::ArenaStringPtr roomid_; ::gate::Proto* proto_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static BroadcastRoomReq* default_instance_; }; // ------------------------------------------------------------------- class BroadcastRoomReply : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.BroadcastRoomReply) */ { public: BroadcastRoomReply(); virtual ~BroadcastRoomReply(); BroadcastRoomReply(const BroadcastRoomReply& from); inline BroadcastRoomReply& operator=(const BroadcastRoomReply& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const BroadcastRoomReply& default_instance(); void Swap(BroadcastRoomReply* other); // implements Message ---------------------------------------------- inline BroadcastRoomReply* New() const { return New(NULL); } BroadcastRoomReply* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const BroadcastRoomReply& from); void MergeFrom(const BroadcastRoomReply& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(BroadcastRoomReply* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // @@protoc_insertion_point(class_scope:gate.BroadcastRoomReply) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static BroadcastRoomReply* default_instance_; }; // ------------------------------------------------------------------- class RoomsReq : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.RoomsReq) */ { public: RoomsReq(); virtual ~RoomsReq(); RoomsReq(const RoomsReq& from); inline RoomsReq& operator=(const RoomsReq& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const RoomsReq& default_instance(); void Swap(RoomsReq* other); // implements Message ---------------------------------------------- inline RoomsReq* New() const { return New(NULL); } RoomsReq* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RoomsReq& from); void MergeFrom(const RoomsReq& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(RoomsReq* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // @@protoc_insertion_point(class_scope:gate.RoomsReq) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static RoomsReq* default_instance_; }; // ------------------------------------------------------------------- class RoomsReply : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gate.RoomsReply) */ { public: RoomsReply(); virtual ~RoomsReply(); RoomsReply(const RoomsReply& from); inline RoomsReply& operator=(const RoomsReply& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); static const RoomsReply& default_instance(); void Swap(RoomsReply* other); // implements Message ---------------------------------------------- inline RoomsReply* New() const { return New(NULL); } RoomsReply* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RoomsReply& from); void MergeFrom(const RoomsReply& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { return InternalSerializeWithCachedSizesToArray(false, output); } int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(RoomsReply* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // map<string, bool> rooms = 1; int rooms_size() const; void clear_rooms(); static const int kRoomsFieldNumber = 1; const ::google::protobuf::Map< ::std::string, bool >& rooms() const; ::google::protobuf::Map< ::std::string, bool >* mutable_rooms(); // @@protoc_insertion_point(class_scope:gate.RoomsReply) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; typedef ::google::protobuf::internal::MapEntryLite< ::std::string, bool, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL, 0 > RoomsReply_RoomsEntry; ::google::protobuf::internal::MapField< ::std::string, bool, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL, 0 > rooms_; mutable int _cached_size_; friend void protobuf_AddDesc_gate_2eproto(); friend void protobuf_AssignDesc_gate_2eproto(); friend void protobuf_ShutdownFile_gate_2eproto(); void InitAsDefaultInstance(); static RoomsReply* default_instance_; }; // =================================================================== class Gate_Stub; class Gate : public ::google::protobuf::Service { protected: // This class should be treated as an abstract interface. inline Gate() {}; public: virtual ~Gate(); typedef Gate_Stub Stub; static const ::google::protobuf::ServiceDescriptor* descriptor(); virtual void Ping(::google::protobuf::RpcController* controller, const ::gate::Empty* request, ::gate::Empty* response, ::google::protobuf::Closure* done); virtual void Close(::google::protobuf::RpcController* controller, const ::gate::Empty* request, ::gate::Empty* response, ::google::protobuf::Closure* done); virtual void PushMsg(::google::protobuf::RpcController* controller, const ::gate::PushMsgReq* request, ::gate::PushMsgReply* response, ::google::protobuf::Closure* done); virtual void Broadcast(::google::protobuf::RpcController* controller, const ::gate::BroadcastReq* request, ::gate::BroadcastReply* response, ::google::protobuf::Closure* done); virtual void BroadcastRoom(::google::protobuf::RpcController* controller, const ::gate::BroadcastRoomReq* request, ::gate::BroadcastRoomReply* response, ::google::protobuf::Closure* done); virtual void Rooms(::google::protobuf::RpcController* controller, const ::gate::RoomsReq* request, ::gate::RoomsReply* response, ::google::protobuf::Closure* done); // implements Service ---------------------------------------------- const ::google::protobuf::ServiceDescriptor* GetDescriptor(); void CallMethod(const ::google::protobuf::MethodDescriptor* method, ::google::protobuf::RpcController* controller, const ::google::protobuf::Message* request, ::google::protobuf::Message* response, ::google::protobuf::Closure* done); const ::google::protobuf::Message& GetRequestPrototype( const ::google::protobuf::MethodDescriptor* method) const; const ::google::protobuf::Message& GetResponsePrototype( const ::google::protobuf::MethodDescriptor* method) const; private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Gate); }; class Gate_Stub : public Gate { public: Gate_Stub(::google::protobuf::RpcChannel* channel); Gate_Stub(::google::protobuf::RpcChannel* channel, ::google::protobuf::Service::ChannelOwnership ownership); ~Gate_Stub(); inline ::google::protobuf::RpcChannel* channel() { return channel_; } // implements Gate ------------------------------------------ void Ping(::google::protobuf::RpcController* controller, const ::gate::Empty* request, ::gate::Empty* response, ::google::protobuf::Closure* done); void Close(::google::protobuf::RpcController* controller, const ::gate::Empty* request, ::gate::Empty* response, ::google::protobuf::Closure* done); void PushMsg(::google::protobuf::RpcController* controller, const ::gate::PushMsgReq* request, ::gate::PushMsgReply* response, ::google::protobuf::Closure* done); void Broadcast(::google::protobuf::RpcController* controller, const ::gate::BroadcastReq* request, ::gate::BroadcastReply* response, ::google::protobuf::Closure* done); void BroadcastRoom(::google::protobuf::RpcController* controller, const ::gate::BroadcastRoomReq* request, ::gate::BroadcastRoomReply* response, ::google::protobuf::Closure* done); void Rooms(::google::protobuf::RpcController* controller, const ::gate::RoomsReq* request, ::gate::RoomsReply* response, ::google::protobuf::Closure* done); private: ::google::protobuf::RpcChannel* channel_; bool owns_channel_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Gate_Stub); }; // =================================================================== // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS // Proto // optional int32 ver = 1; inline void Proto::clear_ver() { ver_ = 0; } inline ::google::protobuf::int32 Proto::ver() const { // @@protoc_insertion_point(field_get:gate.Proto.ver) return ver_; } inline void Proto::set_ver(::google::protobuf::int32 value) { ver_ = value; // @@protoc_insertion_point(field_set:gate.Proto.ver) } // optional int32 op = 2; inline void Proto::clear_op() { op_ = 0; } inline ::google::protobuf::int32 Proto::op() const { // @@protoc_insertion_point(field_get:gate.Proto.op) return op_; } inline void Proto::set_op(::google::protobuf::int32 value) { op_ = value; // @@protoc_insertion_point(field_set:gate.Proto.op) } // optional int32 seq = 3; inline void Proto::clear_seq() { seq_ = 0; } inline ::google::protobuf::int32 Proto::seq() const { // @@protoc_insertion_point(field_get:gate.Proto.seq) return seq_; } inline void Proto::set_seq(::google::protobuf::int32 value) { seq_ = value; // @@protoc_insertion_point(field_set:gate.Proto.seq) } // optional bytes body = 4; inline void Proto::clear_body() { body_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& Proto::body() const { // @@protoc_insertion_point(field_get:gate.Proto.body) return body_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void Proto::set_body(const ::std::string& value) { body_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:gate.Proto.body) } inline void Proto::set_body(const char* value) { body_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:gate.Proto.body) } inline void Proto::set_body(const void* value, size_t size) { body_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:gate.Proto.body) } inline ::std::string* Proto::mutable_body() { // @@protoc_insertion_point(field_mutable:gate.Proto.body) return body_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Proto::release_body() { // @@protoc_insertion_point(field_release:gate.Proto.body) return body_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void Proto::set_allocated_body(::std::string* body) { if (body != NULL) { } else { } body_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), body); // @@protoc_insertion_point(field_set_allocated:gate.Proto.body) } // ------------------------------------------------------------------- // Empty // ------------------------------------------------------------------- // PushMsgReq // repeated string keys = 1; inline int PushMsgReq::keys_size() const { return keys_.size(); } inline void PushMsgReq::clear_keys() { keys_.Clear(); } inline const ::std::string& PushMsgReq::keys(int index) const { // @@protoc_insertion_point(field_get:gate.PushMsgReq.keys) return keys_.Get(index); } inline ::std::string* PushMsgReq::mutable_keys(int index) { // @@protoc_insertion_point(field_mutable:gate.PushMsgReq.keys) return keys_.Mutable(index); } inline void PushMsgReq::set_keys(int index, const ::std::string& value) { // @@protoc_insertion_point(field_set:gate.PushMsgReq.keys) keys_.Mutable(index)->assign(value); } inline void PushMsgReq::set_keys(int index, const char* value) { keys_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:gate.PushMsgReq.keys) } inline void PushMsgReq::set_keys(int index, const char* value, size_t size) { keys_.Mutable(index)->assign( reinterpret_cast<const char*>(value), size); // @@protoc_insertion_point(field_set_pointer:gate.PushMsgReq.keys) } inline ::std::string* PushMsgReq::add_keys() { // @@protoc_insertion_point(field_add_mutable:gate.PushMsgReq.keys) return keys_.Add(); } inline void PushMsgReq::add_keys(const ::std::string& value) { keys_.Add()->assign(value); // @@protoc_insertion_point(field_add:gate.PushMsgReq.keys) } inline void PushMsgReq::add_keys(const char* value) { keys_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:gate.PushMsgReq.keys) } inline void PushMsgReq::add_keys(const char* value, size_t size) { keys_.Add()->assign(reinterpret_cast<const char*>(value), size); // @@protoc_insertion_point(field_add_pointer:gate.PushMsgReq.keys) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& PushMsgReq::keys() const { // @@protoc_insertion_point(field_list:gate.PushMsgReq.keys) return keys_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* PushMsgReq::mutable_keys() { // @@protoc_insertion_point(field_mutable_list:gate.PushMsgReq.keys) return &keys_; } // optional int32 protoOp = 3; inline void PushMsgReq::clear_protoop() { protoop_ = 0; } inline ::google::protobuf::int32 PushMsgReq::protoop() const { // @@protoc_insertion_point(field_get:gate.PushMsgReq.protoOp) return protoop_; } inline void PushMsgReq::set_protoop(::google::protobuf::int32 value) { protoop_ = value; // @@protoc_insertion_point(field_set:gate.PushMsgReq.protoOp) } // optional .gate.Proto proto = 2; inline bool PushMsgReq::has_proto() const { return !_is_default_instance_ && proto_ != NULL; } inline void PushMsgReq::clear_proto() { if (GetArenaNoVirtual() == NULL && proto_ != NULL) delete proto_; proto_ = NULL; } inline const ::gate::Proto& PushMsgReq::proto() const { // @@protoc_insertion_point(field_get:gate.PushMsgReq.proto) return proto_ != NULL ? *proto_ : *default_instance_->proto_; } inline ::gate::Proto* PushMsgReq::mutable_proto() { if (proto_ == NULL) { proto_ = new ::gate::Proto; } // @@protoc_insertion_point(field_mutable:gate.PushMsgReq.proto) return proto_; } inline ::gate::Proto* PushMsgReq::release_proto() { // @@protoc_insertion_point(field_release:gate.PushMsgReq.proto) ::gate::Proto* temp = proto_; proto_ = NULL; return temp; } inline void PushMsgReq::set_allocated_proto(::gate::Proto* proto) { delete proto_; proto_ = proto; if (proto) { } else { } // @@protoc_insertion_point(field_set_allocated:gate.PushMsgReq.proto) } // ------------------------------------------------------------------- // PushMsgReply // ------------------------------------------------------------------- // BroadcastReq // optional int32 protoOp = 1; inline void BroadcastReq::clear_protoop() { protoop_ = 0; } inline ::google::protobuf::int32 BroadcastReq::protoop() const { // @@protoc_insertion_point(field_get:gate.BroadcastReq.protoOp) return protoop_; } inline void BroadcastReq::set_protoop(::google::protobuf::int32 value) { protoop_ = value; // @@protoc_insertion_point(field_set:gate.BroadcastReq.protoOp) } // optional .gate.Proto proto = 2; inline bool BroadcastReq::has_proto() const { return !_is_default_instance_ && proto_ != NULL; } inline void BroadcastReq::clear_proto() { if (GetArenaNoVirtual() == NULL && proto_ != NULL) delete proto_; proto_ = NULL; } inline const ::gate::Proto& BroadcastReq::proto() const { // @@protoc_insertion_point(field_get:gate.BroadcastReq.proto) return proto_ != NULL ? *proto_ : *default_instance_->proto_; } inline ::gate::Proto* BroadcastReq::mutable_proto() { if (proto_ == NULL) { proto_ = new ::gate::Proto; } // @@protoc_insertion_point(field_mutable:gate.BroadcastReq.proto) return proto_; } inline ::gate::Proto* BroadcastReq::release_proto() { // @@protoc_insertion_point(field_release:gate.BroadcastReq.proto) ::gate::Proto* temp = proto_; proto_ = NULL; return temp; } inline void BroadcastReq::set_allocated_proto(::gate::Proto* proto) { delete proto_; proto_ = proto; if (proto) { } else { } // @@protoc_insertion_point(field_set_allocated:gate.BroadcastReq.proto) } // optional int32 speed = 3; inline void BroadcastReq::clear_speed() { speed_ = 0; } inline ::google::protobuf::int32 BroadcastReq::speed() const { // @@protoc_insertion_point(field_get:gate.BroadcastReq.speed) return speed_; } inline void BroadcastReq::set_speed(::google::protobuf::int32 value) { speed_ = value; // @@protoc_insertion_point(field_set:gate.BroadcastReq.speed) } // ------------------------------------------------------------------- // BroadcastReply // ------------------------------------------------------------------- // BroadcastRoomReq // optional string roomID = 1; inline void BroadcastRoomReq::clear_roomid() { roomid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& BroadcastRoomReq::roomid() const { // @@protoc_insertion_point(field_get:gate.BroadcastRoomReq.roomID) return roomid_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void BroadcastRoomReq::set_roomid(const ::std::string& value) { roomid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:gate.BroadcastRoomReq.roomID) } inline void BroadcastRoomReq::set_roomid(const char* value) { roomid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:gate.BroadcastRoomReq.roomID) } inline void BroadcastRoomReq::set_roomid(const char* value, size_t size) { roomid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:gate.BroadcastRoomReq.roomID) } inline ::std::string* BroadcastRoomReq::mutable_roomid() { // @@protoc_insertion_point(field_mutable:gate.BroadcastRoomReq.roomID) return roomid_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* BroadcastRoomReq::release_roomid() { // @@protoc_insertion_point(field_release:gate.BroadcastRoomReq.roomID) return roomid_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void BroadcastRoomReq::set_allocated_roomid(::std::string* roomid) { if (roomid != NULL) { } else { } roomid_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), roomid); // @@protoc_insertion_point(field_set_allocated:gate.BroadcastRoomReq.roomID) } // optional .gate.Proto proto = 2; inline bool BroadcastRoomReq::has_proto() const { return !_is_default_instance_ && proto_ != NULL; } inline void BroadcastRoomReq::clear_proto() { if (GetArenaNoVirtual() == NULL && proto_ != NULL) delete proto_; proto_ = NULL; } inline const ::gate::Proto& BroadcastRoomReq::proto() const { // @@protoc_insertion_point(field_get:gate.BroadcastRoomReq.proto) return proto_ != NULL ? *proto_ : *default_instance_->proto_; } inline ::gate::Proto* BroadcastRoomReq::mutable_proto() { if (proto_ == NULL) { proto_ = new ::gate::Proto; } // @@protoc_insertion_point(field_mutable:gate.BroadcastRoomReq.proto) return proto_; } inline ::gate::Proto* BroadcastRoomReq::release_proto() { // @@protoc_insertion_point(field_release:gate.BroadcastRoomReq.proto) ::gate::Proto* temp = proto_; proto_ = NULL; return temp; } inline void BroadcastRoomReq::set_allocated_proto(::gate::Proto* proto) { delete proto_; proto_ = proto; if (proto) { } else { } // @@protoc_insertion_point(field_set_allocated:gate.BroadcastRoomReq.proto) } // ------------------------------------------------------------------- // BroadcastRoomReply // ------------------------------------------------------------------- // RoomsReq // ------------------------------------------------------------------- // RoomsReply // map<string, bool> rooms = 1; inline int RoomsReply::rooms_size() const { return rooms_.size(); } inline void RoomsReply::clear_rooms() { rooms_.Clear(); } inline const ::google::protobuf::Map< ::std::string, bool >& RoomsReply::rooms() const { // @@protoc_insertion_point(field_map:gate.RoomsReply.rooms) return rooms_.GetMap(); } inline ::google::protobuf::Map< ::std::string, bool >* RoomsReply::mutable_rooms() { // @@protoc_insertion_point(field_mutable_map:gate.RoomsReply.rooms) return rooms_.MutableMap(); } #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // @@protoc_insertion_point(namespace_scope) } // namespace gate // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_gate_2eproto__INCLUDED
5453ed945d1140143ff771f3b4736d41ef17ec20
0934679bbf0793d0103dfe144470f4169def36b9
/src/makethreeinter.cpp
e5f4166d0b08939321a75985096a76c40b72865b
[]
no_license
cran/sparsereg
c9ac647badcfc9f0353b9d3177c473a27ac66057
cac952e8477e78f3ae3af6add4afaca32f12add6
refs/heads/master
2021-01-13T01:13:28.062858
2016-03-10T23:32:18
2016-03-10T23:32:18
39,434,372
0
0
null
null
null
null
UTF-8
C++
false
false
2,067
cpp
# include <RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] using namespace Rcpp ; ////// make interactions: interact X0 and X1, place in X2 ////// // [[Rcpp::export()]] Rcpp::List makethreeinter_cpp(Rcpp::NumericVector X00, Rcpp::NumericVector X10, Rcpp::NumericVector X110, Rcpp::NumericVector X20 ) { //Declare inputs arma::mat X0 = Rcpp::as< arma::mat >(X00); arma::mat X1 = Rcpp::as< arma::mat >(X10); arma::mat X11 = Rcpp::as< arma::mat >(X110); arma::mat X2 = Rcpp::as< arma::mat >(X20); int p1 = X0.n_cols; int p2 = X1.n_cols; int p3 = X11.n_cols; int n = X1.n_rows; int initcol = 0; arma::mat Xtemp=arma::zeros<arma::mat>(n,7); arma::mat colvec=arma::zeros<arma::mat>(p1*p2*p3,1); arma::mat XtX = arma::strans(Xtemp)*Xtemp; for(int idum = 0; idum < n; idum++) Xtemp(idum,0) =1; int pcurr = 0; for(int i1 = 0; i1<p1; i1++){ for(int i2 = 0; i2<p2; i2++){ for(int i3 = 0; i3<p3; i3++){ //Generate components arma::mat x0_curr = X0.submat(0,i1,n-1,i1); arma::mat x1_curr = X1.submat(0,i2,n-1,i2); arma::mat x11_curr = X11.submat(0,i3,n-1,i3); arma::mat inter = x1_curr; //Generate interaction term for(int idum = 0; idum < n; idum++) { inter(idum,0) =x0_curr(idum,0)*x1_curr(idum,0)*x11_curr(idum,0); Xtemp(idum,1)=x0_curr(idum,0); Xtemp(idum,2)=x1_curr(idum,0); Xtemp(idum,3)=x11_curr(idum,0); Xtemp(idum,4)=x0_curr(idum,0)*x1_curr(idum,0); Xtemp(idum,5)=x0_curr(idum,0)*x11_curr(idum,0); Xtemp(idum,6)=x1_curr(idum,0)*x11_curr(idum,0); } //Generate hat matrix XtX = arma::strans(Xtemp)*Xtemp; XtX=.5*XtX+.5*arma::strans(XtX); arma::mat XtXinvXty=arma::pinv(XtX)*(arma::strans(Xtemp)*inter); inter = inter-Xtemp*XtXinvXty; //Place in X2 double checksum = 0; for(int idum = 0; idum < n; idum++) { X2(idum,pcurr) =inter(idum,0); checksum += inter(idum,0)*inter(idum,0); } initcol = initcol+1; //check nonzero if(checksum>.0000000000001) { colvec(pcurr,0)=initcol; pcurr = pcurr+1; } //Close out triple loop } } } return Rcpp::List::create(Rcpp::Named("X") = X2,Rcpp::Named("colvec") = colvec); }
013863e91d46c8b8a8be36e5a86b0346aac55455
ead0e66fe1c4079b6e8216989bff5ef1cae136e6
/Engine/Vector4.cpp
485351b192511774d7b6ec13b2a7e02afe22c3d7
[]
no_license
Trevor802/A-Simple-Game-Engine
5dc8afd5c8e9d55fce5d785ccd55fc719b7c3b2a
5186c27aee33ff4b0c56f18dde7632644077fc7a
refs/heads/main
2022-12-20T17:34:21.411168
2020-04-01T07:06:26
2020-04-01T07:06:26
304,770,612
0
0
null
null
null
null
UTF-8
C++
false
false
3,167
cpp
#include "Vector4.h" #include "Numeric.h" #include <assert.h> #include <algorithm> namespace Engine { Vector4::Vector4(void) : m_x(0), m_y(0), m_z(0) {} Vector4::Vector4(float i_x, float i_y, float i_z, float i_w) : m_x(i_x), m_y(i_y), m_z(i_z), m_w(i_w) {} Vector4::Vector4(const Vector3& i_other, float i_w) : m_x(i_other.GetX()), m_y(i_other.GetY()), m_z(i_other.GetZ()), m_w(i_w) {} Vector4::Vector4(const Vector4& i_other) : m_x(i_other.m_x), m_y(i_other.m_y), m_z(i_other.m_z), m_w(i_other.m_w) {} Vector4& Vector4::operator=(const Vector4& i_other) { m_x = i_other.m_x; m_y = i_other.m_y; m_z = i_other.m_z; m_w = i_other.m_w; return *this; } Vector4::Vector4(Vector4&& i_other) noexcept { m_x = i_other.m_x; m_y = i_other.m_y; m_z = i_other.m_z; m_w = i_other.m_w; i_other.m_x = 0; i_other.m_y = 0; i_other.m_z = 0; i_other.m_w = 0; } Vector4& Vector4::operator=(Vector4&& i_other) { if (this != &i_other) { m_x = i_other.m_x; m_y = i_other.m_y; m_z = i_other.m_z; m_w = i_other.m_w; i_other.m_x = 0; i_other.m_y = 0; i_other.m_z = 0; i_other.m_w = 0; } return *this; } const bool Vector4::operator==(const Vector4& i_rhs) const { return Numeric::AreEqual(m_x, i_rhs.m_x) && Numeric::AreEqual(m_y, i_rhs.m_y) && Numeric::AreEqual(m_z, i_rhs.m_z) && Numeric::AreEqual(m_w, i_rhs.m_w); } const bool Vector4::operator!=(const Vector4& i_rhs) const { return !operator==(i_rhs); } Vector4& Vector4::operator+=(const Vector4& i_rhs) { m_x += i_rhs.m_x; m_y += i_rhs.m_y; m_z += i_rhs.m_z; m_w += i_rhs.m_w; return *this; } const Vector4 Vector4::operator+(const Vector4& i_rhs) const { Vector4 result = *this; result += i_rhs; return result; } Vector4& Vector4::operator-=(const Vector4& i_rhs) { m_x -= i_rhs.m_x; m_y -= i_rhs.m_y; m_z -= i_rhs.m_z; m_w -= i_rhs.m_w; return *this; } const Vector4 Vector4::operator-(const Vector4& i_rhs) const { Vector4 result = *this; result -= i_rhs; return result; } Vector4& Vector4::operator*=(const float i_scalar) { m_x *= i_scalar; m_y *= i_scalar; m_z *= i_scalar; m_w *= i_scalar; return *this; } const float Vector4::AngleBetween(const Vector4& i_lhs, const Vector4& i_rhs) { float dotResult = i_lhs.DotProduct(i_rhs); float lengthLHS = i_lhs.Magnitude(); float lengthRHS = i_rhs.Magnitude(); if (Numeric::AreEqual(lengthLHS, 0.0f) || Numeric::AreEqual(lengthRHS, 0.0f)) return 0.0f; float quotient = Numeric::clamp(dotResult / (lengthLHS * lengthRHS), -1.0f, 1.0f); return acos(quotient);; } const float Vector4::DotProduct(const Vector4& i_rhs) const { return m_x * i_rhs.m_x + m_y * i_rhs.m_y + m_z * i_rhs.m_z + m_w * i_rhs.m_w; } const Vector4 Vector4::Normalized() const { float magnitude = Magnitude(); assert(!Numeric::AreEqual(magnitude, 0.0f)); return Vector4( m_x / magnitude, m_y / magnitude, m_z / magnitude, m_w / magnitude); } const float Vector4::Magnitude() const { return sqrt(m_x * m_x + m_y * m_y + m_z * m_z + m_w * m_w); } const Vector4 Vector4::ZERO_VECTOR(0, 0, 0, 0); }
f8b2ffe6152e88b283880f138f6a249c2a5294d1
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/xgboost/xgboost-old-new/xgboost-old-new-joern/dmlc_xgboost_old_new_old_function_180.cpp
35b14d921ef1691ec80e22e8b2c55431f3b9da47
[]
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
300
cpp
virtual void Load(IStream &fi) { uint64_t sz; utils::Assert(fi.Read(&sz, sizeof(sz)) != 0, "Read pickle string"); p_str->resize(sz); if (sz != 0) { utils::Assert(fi.Read(&(*p_str)[0], sizeof(char) * sz) != 0, "Read pickle string"); } }
935fb83fa87e0bfc2c657f3b988cd6cc38617307
58febce6be896835382f03b21162f0090b3fcb0a
/leetcode/weekly/191.cpp
c56037391d32ad2c345720e3c77e1194bcaa1855
[ "Apache-2.0" ]
permissive
bvbasavaraju/competitive_programming
5e63c0710b02476ecb499b2087ddec674fdb049f
bc17ec49b601aac62fa94449927fd64b620352d7
refs/heads/master
2022-10-31T15:17:00.151024
2022-10-23T09:14:52
2022-10-23T09:14:52
216,365,719
1
0
null
null
null
null
UTF-8
C++
false
false
3,590
cpp
/**************************************************** Date: May 31th, 2020 Successful submissions : 1 Time expiration : 1 Not Solved : 1 Wrong Answer/ Partial result : 1 link: https://leetcode.com/contest/weekly-contest-191 ****************************************************/ #include <iostream> #include <vector> #include <list> #include <algorithm> #include <string> #include <stack> #include <queue> #include <map> #include <unordered_map> #include <unordered_set> #include <cmath> #include <limits.h> using namespace std; /* Q: 1464. Maximum Product of Two Elements in an Array */ class Solution1_t { public: int maxProduct(vector<int>& nums) { sort(nums.begin(), nums.end()); int l = nums.size(); return (nums[l-1] - 1) * (nums[l-2] - 1); } }; /* Q: 1465. Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts - time limit exceeded */ class Solution2_1 { public: int maxArea(int h, int w, vector<int>& hc, vector<int>& vc) { const int MOD = 1000000007; hc.push_back(h); vc.push_back(w); sort(hc.begin(), hc.end()); sort(vc.begin(), vc.end()); int lh = hc.size(); int lc = vc.size(); int ans = 0; vector<vector<int>> a(lh, vector<int>(lc, 0)); vector<vector<int>> p(lh, vector<int>(lc, 0)); for(int i = 0; i < lh; ++i) { int row_sum = 0; for(int j = 0; j < lc; ++j) { p[i][j] = ((hc[i] % MOD) * (vc[j] % MOD)) % MOD; if(i == 0 && j == 0) { a[i][j] = p[i][j]; } else if(j == 0) { a[i][j] = (((p[i][j] - p[i-1][j]) % MOD ) + MOD) % MOD; } else if(i == 0) { a[i][j] = (((p[i][j] - p[i][j-1]) % MOD ) + MOD) % MOD; } else { a[i][j] = ((((((p[i][j] - p[i-1][j]) % MOD ) + MOD ) % MOD - row_sum) % MOD) + MOD ) % MOD; } row_sum = (row_sum + a[i][j]) % MOD; ans = max(ans, a[i][j]); } } return ans; } }; /* Q: 1466. Reorder Routes to Make All Paths Lead to the City Zero */ class Solution3_t { private: bool isReachable(int source, vector<bool>& v, unordered_map<int, vector<int>>& source_dest_map) { if(source == 0) { return true; } v[source] = true; for(auto s : source_dest_map[source]) { if(isReachable(s, v, source_dest_map)) { v[source] = false; return true; } } v[source] = false; return false; } public: int minReorder(int n, vector<vector<int>>& connections) { unordered_map<int, vector<int>> source_dest_map; unordered_map<int, vector<int>> dest_source_map; for(auto c : connections) { source_dest_map[c[0]].push_back(c[1]); dest_source_map[c[1]].push_back(c[0]); } int ans = 0; vector<bool> v(n, false); for(int i = 1; i < n; ++i) { if(!isReachable(i, v, source_dest_map)) { if(dest_source_map.find(i) != dest_source_map.end() && dest_source_map[i].size() > 0) { source_dest_map[i].push_back(dest_source_map[i][0]); } ans++; } } return ans; } }; /* Q: 1467. Probability of a Two Boxes Having The Same Number of Distinct Balls */ class Solution4_t { public: double getProbability(vector<int>& balls) { return 0.0; } }; int main() { { Solution2_1 s2; vector<int> h = {1,2,4}; vector<int> v = {1,3}; cout << s2.maxArea(5, 4, h, v) << endl; } return 0; }
c26dbffb5eb4cf04b34250134958482a896f2aa3
1c4da399b9d4eb2b51e1f69a32b118299d5ab490
/DS/Exp9/LinearSearch.cpp
dffd5f9d56dd3d73cd2543f7159edf371cf0b1c9
[]
no_license
Shreyansh-1/Data-Structures
1aba7434ab2ea88bd5d67ddeec358268204228e5
9caddbbaab2ef168dd607deb874d61077c514039
refs/heads/master
2022-10-26T04:39:25.339611
2020-06-18T11:50:39
2020-06-18T11:50:39
264,176,710
0
0
null
null
null
null
UTF-8
C++
false
false
435
cpp
#include<iostream> using namespace std; int main() { int arr[20],n,x,i,flag=0; cout<<"How many elements:"; cin>>n; cout<<"\nEnter elements of the array:\n"; for(i=0;i<n;++i) cin>>arr[i]; cout<<"\nEnter element to search:"; cin>>x; for(i=0;i<n;++i) { if(arr[i]==x) { flag=1; break; } } if(flag) cout<<"\nElement is found at position "<<i+1; else cout<<"\nElement not found"; return 0; }
ee5442685414929b45e13f64098db2542f434db8
c35d9e80739c5f972ab051df78eacaa6405f3e63
/ConsolePacMan/GameEngine/src/GameEngine/Core/ECS/Components/TransformComponent.h
b29a977d6394b4227265ba9bf88b9081e3d458e7
[ "MIT" ]
permissive
lhurt51/CC-AdvanceCPP
7ea652573020ded79e166489fe543cd0e9f1e136
3834c60956c7198159e851fd80998cc86f1c6e52
refs/heads/master
2020-05-29T20:03:45.198995
2019-08-19T00:10:41
2019-08-19T00:10:41
189,346,291
0
0
null
null
null
null
UTF-8
C++
false
false
968
h
#pragma once #include "gepch.h" #include "GameEngine/Core/TimeStep.h" #include "GameEngine/Core/ECS/Components.h" #include <glm/glm.hpp> namespace GameEngine { class TransformComponent : public Component { public: TransformComponent(float inSpeed = 10.0f) { position = { 0.0f }; scale = { 1.0f }; rotation = 0.0f; speed = inSpeed; } TransformComponent(const glm::vec2& pos, float inSpeed = 10.0f) { position = pos; scale = { 1.0f }; rotation = 0.0f; speed = inSpeed; } TransformComponent(const glm::vec2& pos, const glm::vec2& sc, float rot = 0.0f, float inSpeed = 10.0f) { position = pos; scale = sc; rotation = rot; speed = inSpeed; } void Init() override { velocity = { 0 }; } void Update(TimeStep ts) override { position = position + velocity * speed * (float)ts; } public: glm::vec2 position; glm::vec2 scale; float rotation; glm::vec2 velocity; float speed; }; }
b1e19c623f9c5a1c5ffa1d8d7abbe18722584387
a6562c37cbf85f66f448ea05c81d984440e3025a
/Penguin Glide/PenguinGlide/Source/PenguinGlide/public/SpeedBoostGenerator.h
bc1853b77425ba2ece3b94046e9e7646ebf26ce0
[]
no_license
Energyslam/PenguinGlideUnreal
5120805d2bc65dd2c80ffa9b06f6157f2d3d03e8
6fa141f3b3ce60963c475d12beb81f8e33cd55af
refs/heads/master
2021-07-04T22:12:51.238836
2021-02-16T18:38:17
2021-02-16T18:38:17
218,162,565
0
0
null
null
null
null
UTF-8
C++
false
false
11,093
h
#pragma once #include "SoundManager.h" #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "ProceduralMeshComponent.h" #include "Engine/Public/TimerManager.h" #include "TempPlayer.h" #include "SpeedBoostGenerator.generated.h" class ATempPlayer; UCLASS() /*! * \brief This class generates the speedboost and ramp * \details For the generation of the meshes, Unreal Engines ProceduralMeshComponent is used. This component makes it * possible to create a procedurally generated mesh. The function responsible for generating the meshes is called in the * track class, each time a new part of the track gets spawned, because the newly spawned track part is still empty and yet * has to get a speedboost. * * <b>Generation process</b> * The speedboosts gets spawned on a random location in the middle of the track. To find the position of where to be generated, * it uses the vertex coordinates of the track. Based on the position of 1 vertex of the track, the rest of the speedboost * gets generated. Before the generating process will happen, there will be checked whether there is already an object on the chosen * random position. If there is already an object on that position, a new random position on the track will be chosen untill one is found * which is empty. There are two seperate functions which are responsible for calculating the vertex and the triangle data. After * the speedboost is generated, there is a 50 percent change that a ramp will be generated right after the speedboost. There is a * seperate function that handles the generation of the ramp. * * <b>Speed up process</b> * For the speedboost, overlap events are enabled in the constructor. The speedboost mesh is set as rootcomponent, because otherwise * collission detection cannot take place. Every tick, there will be checked whether the speedboost overlaps with the player. If this is * true the following events will take place: * - the speed of the player will be multiplied with a value greater than 1 * - the field of view will temporarily increase in size * - a sound will be played through the SoundManager class * * <b>Design choices</b> * I chose to use mesh generation for creating the arrows, because this way it can easily fit exactly on the generated track, but still * have collision detection on its own. The ramp also gets generated in this class because it is part of the speedboost as well; * it always gets generated, paired together with the speedboost. This is because the player needs a speedboost before entering the ramp * to get launched in the air. * * <b>Note: This script should be placed in the scene for the meshes to be able to spawn.</b> * \author Lisa Groen * \version 1 * \date 11/06/2019 */ class PENGUINGLIDE_API ASpeedBoostGenerator : public AActor { GENERATED_BODY() public: /** \brief Constructor * \details - The procedural mesh component of the speedboost and ramp are initialized. * - All overlap settings are set for the speedboost to be able to detect overlap events. */ ASpeedBoostGenerator(); /** \brief Generates the mesh for the speedboost * \details - Checks what position on the track is available (there is no other object on that spot present), untill it finds an emtpy spot * - Calls CalculateSpeedboostVertices() to calculate the vertices of the speedboost * - Calls CreateTriangle() to create each triangle of the mesh * - Generates a random int which makes sure that there is a 50% chance of calling CreateRamp() */ void GenerateSpeedBoost(TArray<FVector> vertices, TArray<FVector> trackNormals, int trackVertAmount, int counter, FVector trackScale, int engagedVert); protected: /** \brief Calls when game starts or when spawned in the scene * \details Starts overlap detection of the speedboost and loops through the inspector to find the soundmanager. */ virtual void BeginPlay() override; private: UProceduralMeshComponent *speedboostMesh; //!< \brief This is the procedural mesh component of the speedboost UProceduralMeshComponent *rampMesh; //!< \brief This is the procedural mesh component of the ramp UPROPERTY(EditAnywhere) UMaterialInterface* speedBoostMaterial; //!< \brief Material of the speedboost, should be assigned in the inspector UPROPERTY(EditAnywhere) UMaterialInterface* rampMaterial; //!< \brief Material of the ramp, should be assigned in the inspector UPROPERTY(EditAnywhere) ATempPlayer* player; //!< \brief Pointer to the player in the scene, should be assigned in the inspector bool isSpeedUp = false; //!< \brief This bool wil be set to true on overlap to prevent double overlap detection on the same speedboost FTimerHandle timehandle; //!< \brief Unreal Engines timerhandle to handle the timer UFUNCTION() /** \brief Causes the player to slow down over time untill the default speed has been reached once again * \details Subtracts a value of the speed untill it reaches the default speed. Sets bool isSpeedUp back to false, so the player * will regain the ability to speed up. */ void SpeedUp(); UPROPERTY(EditAnywhere) class ASoundManager* soundManager; //!< \brief Pointer to the soundManager which handles the in game soundeffects, should be assigned in the inspector /** \brief <h3>A function to calculate the normal of a point</h3> * \details This function calculates and normalized the normal. In this class, it is used to determine the thickness of the speedboost mesh. * * <h3>Parameters</h3> * - <b style="color:#80b3ff;">\a FVector firstPoint</b> The point of which the normal is calculated * - <b style="color:#80b3ff;">\a FVector secondPoint</b> The direction point of the normal - the normalized direction towards from firstPoint to Secondpoint is the final result */ FVector CalculateNormal(FVector firstPoint, FVector secondPoint); /** \brief <h3>Generates the ramp mesh</h3> * \details Calculates the vertices, triangles and uvs of the ramp mesh and draws it on the screen. * * <h3>Parameters</h3> * - <b style="color:#80b3ff;">\a int arrowAmount</b> the amount of arrows of the speedboost determines the offset on the position of the ramp on the track * - <b style="color:#80b3ff;">\a int position</b> the relative position of the ramp * - <b style="color:#80b3ff;">\a TArray<FVector> trackVertices</b> The position of the vertices of the track. Used to determine the coordinates of the ramp. * - <b style="color:#80b3ff;">\a TArray<FVector> trackNormals</b> The normals of the track, used to determine the angle of the ramp. * - <b style="color:#80b3ff;">\a int trackVertAmount</b> The amount of Vertices on the track, used to determine on which row of the track the ramp will spawn. * - <b style="color:#80b3ff;">\a int counter</b> The mesh section index of the track. The mesh section index of the ramp will be set equal to this number. * - <b style="color:#80b3ff;">\a FVector trackScale</b> The scale of the Track. The positions of the ramp vertices should be multiplied by this number, to get the right position coordinates. * */ void GenerateRamp(int arrowAmount, int position, TArray<FVector> trackVertices, TArray<FVector> trackNormals, int trackVertAmount, int counter, FVector trackScale); /** \brief <h3>Calculates a single triangle from three vertices</h3> * \details This function calculates a triangle from three vertices and returns this value. It's reusable for different classes. Triangles should be drawn counter-clockwise. * * <h3>Parameters</h3> * - <b style="color:#80b3ff;">\a int firstVertex</b> the first vertex of the triangle * - <b style="color:#80b3ff;">\a int secondVertex</b> the second vertex of the triangle * - <b style="color:#80b3ff;">\a int thirdVertex</b> the third vertex of the triangle * - <b style="color:#80b3ff;">\a int vertexAmount</b> A factor that is used by the speedboost to calculate the position of the arrow vertices when there are multiple arrows * - <b style="color:#80b3ff;">\a int arrowIndex</b> The index of the arrow that is being drawn. Only used for the speedboost. * */ TArray<int32> CreateTriangle(int firstVertex, int secondVertex, int thirdVertex, int vertexAmount, int arrowIndex); /** \brief <h3>Calculates the vertices of the speedboost</h3> * \details This function is responsible for calculating the vertices of the speedboost mesh. * * <h3>Parameters</h3> * - <b style="color:#80b3ff;">\a TArray<FVector> trackVertices</b> The vertices of the track, used to determine the location of the speedboost vertices. * - <b style="color:#80b3ff;">\a int position</b> The position of the top vertex of the arrow-shaped mesh. From this position the rest of the vertices are calculated. * - <b style="color:#80b3ff;">\a int i</b> The index of the arrow. Determines which arrow is being drawn. * - <b style="color:#80b3ff;">\a int trackVertAmount</b> The amount of Vertices on the track, used to determine on which row of the track the ramp will spawn. * - <b style="color:#80b3ff;">\a FVector trackScale</b> The scale of the Track. The positions of the ramp vertices should be multiplied by this number, to get the right position coordinates. * - <b style="color:#80b3ff;">\a int arrowVertices</b> The amount of vertices on one arrow. Is used to determine the index of the arrow when there are more arrows than 1. * - <b style="color:#80b3ff;">\a int arrowThickness</b> A factor that determines the thickness of the arrows. */ TArray<FVector> CalculateSpeedboostVertices(TArray<FVector> trackVertices, int position, int i, int trackVertAmount, FVector trackScale, int arrowVertices, int arrowThickness); UFUNCTION() /** \brief <h3>Causes the player to speed up</h3> * \details Gets called when there is overlap between the player and the speedboost. When there is overlap: * - The players speed will be multiplied with a factor greater than 1 * - The field of view wil temporarily increase, so the player gets a nice feel of speeding up * - A sound will be played * * Lastly, a timer will start which will cause the player to slow down after x seconds * * * <h3>Parameters</h3> * - <b style="color:#80b3ff;">\a UPrimitiveComponent* ThisComp</b> The component from which the overlap event is detected. * - <b style="color:#80b3ff;">\a AActor *OtherActor</b> The actor that overlaps with ThisComp. * - <b style="color:#80b3ff;">\a UPrimitiveComponent* OtherComp</b> The component that overlaps with ThisComp. * - <b style="color:#80b3ff;">\a int32 OtherBodyIndex</b> The body index of the object that overlaps with ThisComp. * - <b style="color:#80b3ff;">\a bool bFromSweep</b> Set to true if it is hit by a sweep function. * - <b style="color:#80b3ff;">\a FHitResult &SweepResult</b> If bFromSweep is true, this contains the data of the sweep. */ void Notify(class UPrimitiveComponent *ThisComp, AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult); };
[ "max.groen4" ]
max.groen4
80ea9eb552e9193ca7bcb086dd1cf3a89ab4fb88
43f42ce170085a5253d4a6f3f844cec648aa0904
/MultipleModels/Texture.h
9d5043862ef4875142e2eae2b0e31ff9d225e9a5
[]
no_license
anjaldoshi/vk_forge
eb3148b0864102d05f02fcae5c65e45af9fc1f32
35606a510f9e7ac9d80aaa696a8bafdca4baa493
refs/heads/master
2020-04-07T18:12:12.162678
2018-11-21T21:24:58
2018-11-21T21:24:58
158,601,161
0
0
null
null
null
null
UTF-8
C++
false
false
958
h
#pragma once //Vulkan #include <vulkan/vulkan.h> //STL #include <string> #include <memory> #include "BufferManager.h" #include "ImageManager.h" class Texture { public: Texture(std::shared_ptr<VulkanContext> context, std::shared_ptr<BufferManager> bufferManager, std::shared_ptr<ImageManager> imageManager); Texture& load(unsigned char* data, int width, int height, int channels); void free(); VkImageView getImageView() const { return mImageView; }; VkSampler getSampler() const { return mSampler; }; protected: int mWidth; int mHeight; int mChannels; VkDeviceSize mImageSize; //Vulkan handles VkImage mImage; VkDeviceMemory mImageMemory; VkImageView mImageView; VkSampler mSampler; std::shared_ptr<VulkanContext> mContext; std::shared_ptr<BufferManager> mBufferManager; std::shared_ptr<ImageManager> mImageManager; void createTextureImage(unsigned char* pixelData); void createTextureImageView(); void createTextureSampler(); };
3bebc206f93a75d614b20e1ae827d6ed03116df4
c9cdb8772eb74c832b703624f6395f1e8b84c09e
/HCore/CCore/test/test1021.PTPEcho.cpp
b63c328fbb4094c3914400177f1383e0f926c94c
[ "BSL-1.0" ]
permissive
SergeyStrukov/CCore
70799f40d0ecfec75ab9298f60e7396413931800
509bd439ae5621603f9fbe8e8b3ca03721ac283b
refs/heads/master
2021-01-17T17:01:19.899215
2015-08-12T18:41:25
2015-08-12T18:41:25
3,891,233
6
1
null
null
null
null
UTF-8
C++
false
false
2,785
cpp
/* test1021.PTPEcho.cpp */ //---------------------------------------------------------------------------------------- // // Project: CCore 1.02 // // Tag: HCore // // License: Boost Software License - Version 1.0 - August 17th, 2003 // // see http://www.boost.org/LICENSE_1_0.txt or the local copy // // Copyright (c) 2010 Sergey Strukov. All rights reserved. // //---------------------------------------------------------------------------------------- #include <CCore/test/test.h> #include <CCore/test/testNet.h> #include <CCore/inc/net/UDPDevice.h> namespace App { namespace Private_1021 { /* class Engine */ class Engine : NoCopy { Net::UDPEndpointDevice udp1; Net::UDPEndpointDevice udp2; ObjMaster udp1_master; ObjMaster udp2_master; Net::PTP::ClientDevice ptp1; Net::PTP::ClientDevice ptp2; ObjMaster ptp1_master; ObjMaster ptp2_master; PTPEchoTest test1; PTPEchoTest test2; public: explicit Engine(Net::UDPoint dst) : udp1(Net::PTPClientUDPort,dst), udp2(Net::PTPClientUDPort+1,dst), udp1_master(udp1,"udp[1]"), udp2_master(udp2,"udp[2]"), ptp1("udp[1]"), ptp2("udp[2]"), ptp1_master(ptp1,"ptp[1]"), ptp2_master(ptp2,"ptp[2]"), test1("ptp[1]"), test2("ptp[2]") { } ~Engine() { } void showStat() { ShowStat(udp1,"udp1"); ShowStat(udp2,"udp2"); ShowStat(ptp1,"ptp1"); ShowStat(ptp2,"ptp2"); ShowStat(test1,"test1"); ShowStat(test2,"test2"); } class StartStop : NoCopy { Net::UDPEndpointDevice::StartStop udp1; Net::UDPEndpointDevice::StartStop udp2; struct Pause { Pause() { Task::Sleep(1_sec); } ~Pause() { Task::Sleep(1_sec); } } pause; PTPEchoTest::StartStop test1; PTPEchoTest::StartStop test2; public: explicit StartStop(Engine &engine) : udp1(engine.udp1), udp2(engine.udp2), test1(engine.test1), test2(engine.test2) { } ~StartStop() { } }; }; } // namespace Private_1021 using namespace Private_1021; /* Testit<1021> */ template<> const char *const Testit<1021>::Name="Test1021 PTPEcho"; template<> bool Testit<1021>::Main() { Engine engine(Net::UDPoint(127,0,0,1,Net::PTPServerUDPort)); { Engine::StartStop start_stop(engine); Task::Sleep(10_sec); } engine.showStat(); return true; } } // namespace App
78b5bca132a1cd1363fef54ca332927e987a8e77
785f344c187ace2389af593aa8b0dcd9b1173a97
/Հավաքածու.cpp
c0c71ba47ade1350c2f0c4df542590b8e6a5e148
[]
no_license
Anahit13/something1
5c5ff52555deee3fa35e52e71cb3a96ad891ad74
47bb47859340f8b5afb88c15d5b5095d199ec77b
refs/heads/master
2021-04-24T11:52:59.942841
2020-06-25T18:16:30
2020-06-25T18:16:30
250,114,904
0
0
null
null
null
null
UTF-8
C++
false
false
3,243
cpp
#include <algorithm> #include <cassert> #include <iostream> #include<iomanip> #include "Merge.h" void generateGraph(int*, int); void PrintMat(int[20][20], int); bool graph_checker(int*, int, int); bool check_for_graph(int* p, int n) { std::sort(p, p + n, std::greater<int>()); return graph_checker(p, n, 0); } int main() { int n; int o[10]; do { std::cout << "Input a positive integer for array size: "; std::cin >> n; } while (n < 2); int* p = new int[n]; int s = 0; do { std::cout << "Input " << n << " numbers with even sum:" << std::endl; for (int i = 0; i < n; ++i) { std::cin >> p[i]; while (p[i] <= 0 || p[i] >= n) { std::cout << "Input number within the range [1; " << n - 1 << "]: "; std::cin >> p[i]; } s += p[i]; } } while (s % 2 != 0); for (int i = 0; i < n; ++i) o[i] = p[i]; std::cout << "\nThe numbers"; if (!check_for_graph(p, n)) { std::cout << " do not"; } std::cout << " make up a valid graph." << std::endl; generateGraph(o, n); delete[] p; return 0; } bool graph_checker(int* p, int n, int start) { assert(p); assert(start < n - 1); assert(p[start] < n); if (p[start] > n - start - 1) { return false; } assert(start < n); bool is_zero = true; for (int i = 0; i < p[start]; ++i) { const int index = start + i + 1; --p[index]; if (p[index] < 0) { return false; } if (p[index] != 0) { is_zero = false; } } if (is_zero) { int i = start + p[start]; for (; i < n; ++i) { if (p[i] != 0) { break; } } if (i == n) { return true; } } merge(p, start + 1, start + p[start], n - 1); return graph_checker(p, n, start + 1); } // A function to print the adjacency matrix. void PrintMat(int mat[][20], int n) { int i, j; std::cout << "\n\n" << std::setw(3) << " "; for (i = 0; i < n; i++) std::cout << std::setw(3) << "(" << i + 1 << ")"; std::cout << "\n\n"; // Print 1 if the corresponding vertexes are connected otherwise 0. for (i = 0; i < n; i++) { std::cout << std::setw(4) << "(" << i + 1 << ")"; for (j = 0; j < n; j++) { std::cout << std::setw(5) << mat[i][j]; } std::cout << "\n\n"; } } void generateGraph(int* p, int n) { int AdjMat[20][20] = { 0 }; for (int i = 0; i < n; i++) { for (int j = i+1; j <n; j++) { // For each pair of vertex decrement the degree of both vertex. if (p[i] > 0 && p[j] > 0) { std::cout << p[i] << " " << p[j] << std::endl; p[i]--; p[j]--; AdjMat[i][j] = 1; AdjMat[j][i] = 1; } } } PrintMat(AdjMat, n); }
c56ad219ced3b4057d51028cb96a7e9806833a5f
ea90486b2c0174818e02ef7ba17e2c67c2eaaa00
/motion/sweetie_bot_servo_inv/src/servo_inv_lead.cpp
0f131ccbcabfaa0aa2a3f1cbcf188e9ab6ae9e4b
[]
no_license
sweetie-bot-project/sweetie_bot_rt_control
f760df3e991c10cbeacb7f656e8825cf381a6fcc
ee523681773327ab7b1328e646779e828473e919
refs/heads/master
2021-06-14T19:48:26.210352
2020-01-04T16:47:09
2020-01-04T16:47:09
190,021,034
0
1
null
null
null
null
UTF-8
C++
false
false
4,515
cpp
#include <rtt/Component.hpp> #include <iostream> #include "servo_inv_lead.hpp" using namespace RTT; using sweetie_bot::logger::Logger; namespace sweetie_bot { namespace motion { ServoInvLead::ServoInvLead(std::string const& name) : TaskContext(name), log(logger::categoryFromComponentName(name)) { if (!log.ready()) { RTT::Logger::In in("ServoInvLead"); RTT::log(RTT::Error) << "Logger is not ready!" << endlog(); this->fatal(); return; } this->addEventPort("in_joints_fixed", joints_port) .doc("Desired joints state. Order of joints should not change. "); this->addPort("out_goals", goals_port) .doc("Position controlled servos goals."); this->addPort("sync_step", sync_port) .doc("Timer event indicating beginig of next control cycle."); this->addProperty("period", period) .doc("Control cycle duration (seconds).") .set(0.0224); this->addProperty("lead", lead) .doc("Goal position lead in seconds. Goal position is equal desired position plus desired velocity multiplied by lead.") .set(0.0112); this->addProperty("gear_joints", gear_joints) .doc("Names of joints with equiped with reductor gear."); this->addProperty("gear_ratios", gear_ratios) .doc("Gear ratios for joints listed in gear_joints property. Arrays must have the same sizes. gear_ratio = torque_out/troque_in."); } bool ServoInvLead::processJointStateSample(const sensor_msgs::JointState& joints) { // allocate memory position_perv.clear(); position_perv.reserve(joints.name.size()); // prepare transmit buffer goals.name = joints.name; goals.target_pos.resize(joints.name.size()); goals.playtime.assign(joints.name.size(), period + lead); // set default gear ratios gear_ratio_array.assign(joints.name.size(), 1.0); // check if gear properties are correct if (gear_joints.size() != gear_ratios.size()) { log(ERROR) << "gear_joints and gear_ratios properties must have the same size." << endlog(); return false; } // assign gear ratios for(int i = 0; i < gear_joints.size(); i++) { auto it = std::find(joints.name.begin(), joints.name.end(), gear_joints[i]); if (it != joints.name.end()) { gear_ratio_array[it - joints.name.begin()] = gear_ratios[i]; } } return true; } bool ServoInvLead::startHook() { joints_port.getDataSample(joints); // create gear ratio array if (!processJointStateSample(joints)) return false; // provide data sample goals_port.setDataSample(goals); RTT::os::Timer::TimerId timer_id; sync_port.readNewest(timer_id); log(INFO) << "ServoInvLead started!" << endlog(); return true; } void ServoInvLead::updateHook() { RTT::os::Timer::TimerId timer_id; if (sync_port.read(timer_id) == NewData) { // Renew state variables. // At end of control period desired position of servo must be equal to reference position. position_perv = joints.position; } if (joints_port.read(joints, false) == NewData) { unsigned int njoints = joints.name.size(); if (njoints != joints.position.size() || njoints != joints.velocity.size()) { log(WARN) << "goal message has incorrect structure." << endlog(); return; } // check if array size has changed // we does not check name content: due to fixed requipment it should be always the same. if (njoints != goals.name.size()) { processJointStateSample(joints); log(WARN) << "Size of the in_joints port message has changed." << endlog(); } if (position_perv.size() == njoints) { // take defined lead goals.target_pos.resize(njoints); for(unsigned int i = 0; i < njoints; i++) { goals.target_pos[i] = gear_ratio_array[i] * (joints.position[i] + (joints.position[i] - position_perv[i]) * lead / period); } goals.playtime.assign(njoints, period + lead); } else { // message size has changed, fallback to direct assigment goals.target_pos = joints.position; goals.playtime.assign(njoints, period); } goals_port.write(goals); } } void ServoInvLead::stopHook() { log(INFO) << "ServoInvLead stopped!" << endlog(); } } // nmaespace motion } // namespace sweetie_bot /* * Using this macro, only one component may live * in one library *and* you may *not* link this library * with another component library. Use * ORO_CREATE_COMPONENT_TYPE() * ORO_LIST_COMPONENT_TYPE(ServoInvLead) * In case you want to link with another library that * already contains components. * * If you have put your component class * in a namespace, don't forget to add it here too: */ ORO_CREATE_COMPONENT(sweetie_bot::motion::ServoInvLead)
6fcd188ca01b8fdc06550b368d91a9707d95a1bc
d1535b84fdb0d0d1d76a00096f557f03be71554f
/src/Scheme_values/Built_in.cpp
60c23cf52514c5f034c2443e5595858c1550f711
[]
no_license
mrsch/CPPScheme
38e46701a2bb2ea1575d64c2cde1a27ec5903aa3
80902ae2299f11bddde3fa2665ea0f5d6b4ec39c
refs/heads/master
2021-05-16T13:43:14.239260
2017-10-02T14:03:49
2017-10-02T14:03:49
105,409,114
0
0
null
null
null
null
UTF-8
C++
false
false
650
cpp
#include "Scheme_values/Built_in.hpp" #include "Environment.hpp" #include "Scheme_values/Scheme_value.hpp" Built_in::Built_in(Procedure proc) : proc(proc) { } std::string Built_in::as_string() const { return "Built-in procedure"; } Eval_result Built_in::execute(const std::shared_ptr<Environment>& env, const std::deque<Scheme_ptr>& args) const { std::deque<Scheme_ptr> evaled_args; for (auto& arg : args) { auto result = eval(arg, env); if (result) { evaled_args.emplace_back(*result); } else { // TODO: error message return result; } } return proc(evaled_args, env); }
fbcf48948d102cc670491a13662802fe39b577c5
54d8acb9f614f1da82d4fbe5cfc1ead5972ab3b7
/codeforces/training/CF-1311A.cpp
de08eaf1f7832108654e44bc4bd122a4c5ec5717
[]
no_license
JohnItoo/Solvay
9efd2e5a0318a0cf48a7e9d913a287e95188231d
150b9460fe6332317362eba816e14b1ba6620ef5
refs/heads/master
2023-04-08T03:51:10.432417
2022-09-06T21:00:00
2022-09-06T21:00:00
188,384,500
1
2
null
null
null
null
UTF-8
C++
false
false
2,063
cpp
//============================================================================ // Name : template.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <bits/stdc++.h> using namespace std; #define _CRT_SECURE_NO_DEPRECATE // suppress some compilation warning messages (for VC++ users) // Shortcuts for "common" data types in contests typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef set<int> si; typedef map<string, int> msi; // To simplify repetitions/loops, Note: define your loop style and stick with it! #define x first #define y second #define pb push_back #define mp make_pair #define REP(i, a, b) \ for (int i = int(a); i <= int(b); i++) // a to b, and variable i is local! #define forn(i,n) \ for (int i =0; i<(n); i++) #define TRvi(c, it) \ for (vi::iterator it = (c).begin(); it != (c).end(); it++) #define TRvii(c, it) \ for (vii::iterator it = (c).begin(); it != (c).end(); it++) #define TRmsi(c, it) \ for (msi::iterator it = (c).begin(); it != (c).end(); it++) #define INF 2000000000 // 2 billion // If you need to recall how to use memset: #define MEMSET_INF 127 // about 2B #define MEMSET_HALF_INF 63 // about 1B //memset(dist, MEMSET_INF, sizeof dist); // useful to initialize shortest path distances //memset(dp_memo, -1, sizeof dp_memo); // useful to initialize DP memoization table //memset(arr, 0, sizeof arr); // useful to clear array of integers int main() { ios::sync_with_stdio(false); cin.tie(0); int tc; cin >> tc; while (tc--) { ll a, b; cin >> a >> b; if (a == b) { cout << 0 << "\n"; } else if ( a > b) { if ((a & 1) && (b & 1) || ((a % 2 == 0) && (b % 2 == 0))) { cout << 1 << "\n"; } else { cout << 2 << "\n"; } } else { if (((a & 1) && (b % 2 == 0)) || ((b & 1) && (a % 2 == 0))) { cout << 1 << "\n"; } else { cout << 2 << "\n"; } } } return 0; }
31287323279232f3af48a128ae6984f67e6c61cc
35cbc0049d0c88cd9282a3c82980500bc2093cf2
/2017-11-21/da3.cpp
a1f0a8b5f747290e48339e04f31c19887c5f71df
[]
no_license
ciwomuli/NOIP2017exercise
9f96026a7c88548a0d2783374b0a9582012acf33
e13a818f14da49b3ec94626e7f664301a9da985e
refs/heads/master
2023-01-22T14:02:02.850686
2020-12-04T14:21:08
2020-12-04T14:21:08
108,097,370
0
0
null
null
null
null
UTF-8
C++
false
false
865
cpp
#include<iostream> #include<algorithm> #include<cstdio> #include<cstdlib> //int bi_find(int *a,int l,int r,int s){ // if (l==r && a[l]!=s){ // return 0; // } // // int mid=(l+r)/2; // if (a[mid]==s){ // return mid; // } // if (a[mid]<s){ // return bi_find(a,mid+1,r,s); // } else { // return bi_find(a,l,mid-1,s); // } //// std::cout<<1<<std::endl; //} bool com(int a,int b){ return a<b?true:false; } using namespace std; int main(){ int a[100000]; int n,num_q,cnt=0; while (scanf("%d%d",&n,&num_q)){ printf("CASE#%d:\n",++cnt); for(int i=0;i<n;i++){ scanf("%d",&a[i]); } sort(a,a+n,com); for(int i=0;i<num_q;i++){ int tmp,v233; scanf("%d",&tmp); v233=lower_bound(a,a+n,tmp,com)-a; if (a[v233]==tmp){ // while (a[v233-1]==tmp) v233--; printf("%d found at %d\n",tmp,v233+1); } else printf("%d not found\n",tmp); } } }
ac3eaf470d0af268b35c49424d29dd07696da9f5
4b4c32e96cce176935dd6d506d65080b14715f8d
/view/Binary-Search/Search-Step-Simulation/POW.cpp
4a289354c5ab16428c28e86711efd936ffebc525
[]
no_license
working12/CODE
3432b24a74726e4a589d45393521630f05a5938a
cf456d7070a5c44faa2c572d7f69cce2474a2bca
refs/heads/master
2021-01-10T02:21:07.493004
2017-03-08T16:15:02
2017-03-08T16:15:02
44,948,196
0
0
null
null
null
null
UTF-8
C++
false
false
898
cpp
int Solution::pow(int x1, int n1, int d) { /* 2^7 7-->1 6--> 3--> 2--> 1--> 1*2 4 8 16 16*8=128 */ long long r=1; long long x=x1,n=n1;//to avoid overflow. Otherwise int creates problem. if(x==0) return 0; if(n==0) return 1%d; x=x%d; //redundant while(n) { if((n&1)==0) { x=(x*x)%d; n/=2; } else { r=(r*x)%d; n--; } //n/=2; This must not be here..it should be in even part. Trick..logic.. } return r<0?r+d:r%d; // Do not write main() function. // Do not read input, instead use the arguments to the function. // Do not print the output, instead return values as specified // Still have a doubt. Checkout www.interviewbit.com/pages/sample_codes/ for more details }
69685f5d0825af275a4919e9676927be78fe2e40
87367cfd5fa3f123dd0c47d376499b3e2c7d01b2
/exercise2.cpp
4b89b2ec6f6b01001a0e2703e27d49095570e74c
[]
no_license
guettler/advanced_algorithms
21aaac77ebaf6ce5a6c05012099e08410d699367
b06045ce697b980f0b1882e8c12f5f7f5f684daf
refs/heads/master
2020-05-16T20:38:08.013601
2012-06-24T16:09:58
2012-06-24T16:09:58
null
0
0
null
null
null
null
UTF-8
C++
false
false
21,969
cpp
/* * File: exercise2.cpp * Authors: Group 5 */ #include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> #include <sys/time.h> #include <bitset> #include <math.h> using namespace std; #define match 0 #define mismatch 1 #define gap 1 #define Q 12 // maximal expected value for q /* Function prototypes (instead of header file)*/ string readGenome(string &path); int getNrOfReads(string &path); void readReads(string &path, vector<string> &reads); void time_int(int print); void printVector(vector<int> &v); void printTable(vector<vector<int> > &v); void fastUkkonen(vector<vector<int> > &tmp_pos_score, int &k, string &sequence, string &read, bool &useUkkonenTrick); void filterHitsAndBacktrack(vector<vector<int> > &pos_score, vector<vector<int> > &tmp_pos_score, int &k, string &sequence, string &read, int &readNr, bool &filterResults); void writeOutput(vector<vector<int> > &pos_score2); void firstTerminateWrite(); /* @TODO: complete section with the declaration of new functions */ /* Function definitions */ string readGenome(string &path) { ifstream file; string line, input; try { file.open(path.c_str(), ifstream::in); if(!file) cout<< "File could not be opened. Please check path and file's name..."<< endl; while(!file.eof()) { getline(file, line); if(line.at(0)!= '>') // if not id line input.append(line); } } catch(exception e) { cout << e.what() << endl; } file.close(); return input; } int getNrOfReads(string &path) { ifstream file; string line; int nr_of_reads=0; try { file.open(path.c_str(), ifstream::in); if(!file) cout<< "File could not be opened. Please check path and file's name..."<< endl; while(!file.eof()) { getline(file, line); if(line.at(0)== '>') nr_of_reads++; } file.close(); }catch(exception e) { // cout << e.what() << endl; } return nr_of_reads; } void readReads(string &path, vector<string> &reads) { ifstream file; string line; int read_nr=-1; try { file.open(path.c_str(), ifstream::in); if(!file) cout<< "File could not be opened. Please check path and file's name..."<< endl; while(!file.eof()) { getline(file, line); if(line.at(0)!='>') reads[read_nr].append(line); else read_nr++; } file.close(); } catch(exception e) { //cout << e.what() << endl; } } /* Running time calculation (C style)*/ void time_int(int print){ static struct timeval t1; /* var for previous time stamp */ static struct timeval t2; /* var of current time stamp */ struct timezone tzp; if(gettimeofday(&t2, &tzp) == -1) return; if(print == 1){ double elapsed_seconds=(double)(t2.tv_sec - t1.tv_sec) + ((double)(t2.tv_usec - t1.tv_usec))/1000000; printf("Time spent [%.2fs] \n", elapsed_seconds); } t1 = t2; } void printVector(vector<int> &v) { int length = v.size(); for(int i=0; i<length; ++i) cout << v[i]<< " "; cout << endl; } void printTable(vector<vector<int> > &v) { int length = v.size(); int width = v[0].size(); for(int i=0; i<length; ++i) { for(int j=0; j<width; ++j) cout << v[i][j]<< " "; cout << endl; } } /* Filter the results of fastUkkonen and do backtracking for remaining hits */ void filterHitsAndBacktrack(vector<vector<int> > &pos_score, vector<vector<int> > &tmp_pos_score, int &k, string &sequence, string &read, int &readNr, bool &filterResults){ int m = read.size(); int n = m + k; // we only calculate an m+k wide part of the dp-matrix for backtracking (worst case: k gaps in the read) // filter and backtracking if(tmp_pos_score.size() > 2){ // if there are any results (exept the two dummy-results added by fastUkkonen) for(int unsigned pos=1; pos<(tmp_pos_score.size()-1); pos++){ // then for every result in tmp_pos_score // filter to get only the best results in the neighborhood of a hit. if( (tmp_pos_score[pos][0] != tmp_pos_score[pos-1][0] + 1 && // if there is no hit in the direct neighborhood tmp_pos_score[pos][0] != tmp_pos_score[pos+1][0] - 1) || // OR (tmp_pos_score[pos][0] == tmp_pos_score[pos-1][0] + 1 && // if the the hit has two direct neighbors tmp_pos_score[pos][0] == tmp_pos_score[pos+1][0] - 1 && // with equal or higher (worse) score --> local score minimum tmp_pos_score[pos][1] <= tmp_pos_score[pos-1][1] && tmp_pos_score[pos][1] <= tmp_pos_score[pos+1][1]) || !filterResults){ // OR if the filter is turned off string B_sequence = sequence.substr(tmp_pos_score[pos][0] - n, n); // get a m+k long part of the genome sequence from known end-position of the hit reverse(B_sequence.begin(), B_sequence.end()); // and reverse it string B_read = read; // make a copy of the read reverse(B_read.begin(), B_read.end()); // and reverse it // run semiglobal alignment (normal smith waterman without ukkonen) for our new sequences (see fastUkkonen for code details) int *cj = new int[m+1]; // g++ doesnt liked 'int cj[m+1]' int cp, cn; int min_score = k+1; int min_score_pos=-1; for(int j=0; j<=m; j++){ cj[j] = j; } for(int i=1; i<=n; i++){ cn = 0; cp = 0; for(int j=1; j<=m; j++){ if(B_sequence[i-1] == B_read[j-1]){ // match cn = cp; }else if(cp < cn || cj[j] < cn){ if(cp < cn){ // mismatch cn = cp; } if(cj[j] < cn){ // gap in read cn = cj[j]; } cn++; }else{ // gap in sequence cn++; } cp = cj[j]; cj[j] = cn; } if(cj[m] < min_score){ // save the position of the minimal score in bottom row of the DP-matrix min_score = cj[m]; min_score_pos = i; } } delete [] cj;// free reserved space for int-array // start_pos of the hit is the known end_pos minus the min_score_pos we just calculated int start_pos = tmp_pos_score[pos][0] - min_score_pos; int end_pos = tmp_pos_score[pos][0]; int score = tmp_pos_score[pos][1]; vector<int> scoreVector(4,0); // fill a result vector with: (read Nr., start position, end position, score) scoreVector[0] = readNr; scoreVector[1] = start_pos; scoreVector[2] = end_pos; scoreVector[3] = score; pos_score.push_back(scoreVector); // save it in pos_score }//end if }//end for }//end if cout<<"Procedure 'filterHitsAndBacktrack' for read Nr. "<< readNr<< " done!" <<endl; } /* Ukkonen algorithm implemented with one int array and single integer values, see lecture 2 script for pseudo code */ void fastUkkonen(vector<vector<int> > &tmp_pos_score, int &k, string &sequence, string &read, bool &useUkkonenTrick){ int m,n; int lact = k+1; // initialize last active cell indicator m= read.size(); // initialize 'sequence' and 'read' size n= sequence.size(); int *cj=new int[m+1]; // int-vector cj is more or less a column of the DP-matrix. 'vector<int>' was not chosen, becaused it slowed the procedure down int cp, cn; // single integer values for storage of other DP-matrix cell values tmp_pos_score.push_back(vector<int>(2,-5)); // initialize temporary result vector with a "dummy" entry (used for filtering) for(int j=0; j<=m; j++){ // initialize our DP-matrix column cj[j] = j; } // Smith-Waterman WITH Ukkonen-trick if(useUkkonenTrick){ for(int i=1; i<=n; i++){ // for every character of 'sequence' cp = 0; cn = 0; // set cp and cn zero (correspond to entries [i-1] [0] and [i] [0] of the DP-matrix here for(int j=1; j<=lact; j++){ // for characters of 'read' until last active cell if(sequence[i-1] == read[j-1]){ // match cn = cp; }else{ if(cp < cn){ // mismatch cn = cp; } if(cj[j] < cn){ // gap in read cn = cj[j]; } cn++; // else: gap in sequence } cp = cj[j]; cj[j] = cn; } // after calculation of the column actualize the lact indicator while(cj[lact] > k){ // reduce lact until last active cell has score lower than k (no need to calculate mor of the column next time) lact--; } if(lact == m){ // if lact == m we have a hit !! int pos_end = i; // end pos of the match is i int score = cj[lact]; // score is saved in the last(bottom) cell of cj vector<int> tmp_scoreVector(2,0); // fill a temporary result vector with this info tmp_scoreVector[0] = pos_end; tmp_scoreVector[1] = score; tmp_pos_score.push_back(tmp_scoreVector); }else{ // if lact < m we have to increase it by one lact++; } } // Smith-Waterman WITHOUT Ukkonen-trick }else{ for(int i=1; i<=n; i++){ // for every character of 'sequence' cn = 0; cp = 0; // set cp and cn zero (correspond to entries [i-1] [0] and [i] [0] of the DP-matrix here for(int j=1; j<=m; j++){ // for all characters of 'read' if(sequence[i-1] == read[j-1]){ // match cn = cp; }else{ if(cp < cn){ // mismatch cn = cp; } if(cj[j] < cn){ // gap in read cn = cj[j]; } cn++; // else: gap in sequence } cp = cj[j]; cj[j] = cn; } if(cj[m] <= k){ // if cj[m] <= k we have a hit !! int pos_end = i; // end pos of the match is i int score = cj[m]; // score is saved in the last(bottom) cell of cj vector<int> tmp_scoreVector(2,0); // fill a temporary result vector with this info tmp_scoreVector[0] = pos_end; tmp_scoreVector[1] = score; tmp_pos_score.push_back(tmp_scoreVector); } } }//end else tmp_pos_score.push_back(vector<int>(2,-5)); // add another "dummy" entry at the end of the temporary result vector delete [] cj; // free reserved space for int-array } /* Function to write the results according to the given format */ void writeOutput(vector<vector<int> > &pos_score2) { ofstream outfile("hits.result"); // creates a file to write in string sep = ","; // symbor for separtion string nl = "\n"; // new line int m=pos_score2.size(); // number of rows try { for (int i = 0; i < m; i++) outfile<<"read_"<<pos_score2[i][0]<<sep<<pos_score2[i][1]<<sep<<pos_score2[i][2]<<sep<<pos_score2[i][3]<<nl; outfile.close(); }catch(exception e) { cout << "Error during writing!" << endl; cout << e.what() << endl; } } /* write a warning message in the result file according to the given case */ void writeAndTerminate(int termination_case){ ofstream outfile("hits.result"); // creates a file to write in if(termination_case==1) { outfile<<"read length exceeds block size"; cout<<"WARNING: 1st abort condition detected => program will terminate..."<<endl; } else if(termination_case==2) { outfile<<"Bad choice of k and q for input read length"; cout<<"WARNING: 2nd abort condition detected => program will terminate..."<<endl; } outfile.close(); } void convBase(char &input, int &output) { switch(input){ case 'A': output=0; break; case 'C': output=1; break; case 'G': output=2; break; case 'T': output=3; break; default: output=-1; break; } } /* Given a number (permunation id) compute the corresponding string(nucleotide * sequence) of length q * works up to q=12*/ string getQGramFromIndex(int id, int &q) { string sigma="ACGT"; bitset< (2*Q) > permutation(id); // cout<<"permuataion: "<<permutation<<endl; bitset<2> tmp; // bit representation of one nucleotide string seq; int j; for (int i =(2*q-1); i>0; i-=2) { tmp[1]=permutation[i]; tmp[0]=permutation[i-1]; j=tmp.to_ulong(); seq.append(sigma,j,1); } return seq; } /* check whether all expected occurences were found */ void allOccurencesFound(string &seq, int nr_occ[],int &q, int &nr_rows) { int counter=0; for (int i = 0; i < nr_rows; i++) { counter+= nr_occ[i]; } int expected= seq.size()-q+1; if(expected==counter) cout<<"All occurences were found!"<<endl; else cout<<"Warning: expected: "<<expected<<", founded: "<<counter<<endl; } /* Scan an input sequence counting the occurrence of the found permutations and saving their positions in a vector */ void getNrOfOccAndPositions(string &seq, int *output, vector<vector<int> > &occ, int &q){ bitset<2*Q> bit_array; // all entries equal 0 int base_id; // nr in the range (0,3) int permutation_id; /* read initial q positions of the sequence*/ for (int i = 0; i < q; i++) { convBase(seq[i],base_id); bit_array=bit_array<<2 |bitset<2*Q>(base_id); } permutation_id=bit_array.to_ulong(); output[permutation_id]++; // increment the occurence of the given q-gram occ[permutation_id].push_back(0); // cout<<permutation_id<<endl; /* same as above, for the rest of the sequence */ for (unsigned int i = q; i < seq.size(); i++) { convBase(seq[i],base_id); bit_array=bit_array<<2 |bitset<2*Q>(base_id); // cout<<"i: "<<i<< "bit_array: "<<bit_array<<endl; if(q<Q) { bit_array.set((q*2),0); bit_array.set((q*2+1),0); // cout<<"bitarray: "<<bit_array<<endl; } permutation_id=bit_array.to_ulong(); // cout<<"Permutation id :"<<permutation_id<<endl; output[permutation_id]++; occ[permutation_id].push_back(i-q+1); // cout<<"Output at: "<<output[permutation_id]<<endl; } } /* Initializes an integer array with a given value. Implemented since the array * initializations with constructor are not reliable */ void initializeIntArray(int *arr, int &nr_of_elements, int value) { for (int i = 0; i < nr_of_elements; i++) arr[i] = value; } void printIntArray(int v[], int size) { for(int i=0; i< size; ++i) cout << "["<<i<<"] "<<v[i]<< " "<<endl; } /* ########################## MAIN ########################## */ int main(int argc, char**argv) { time_int(0); // start timing string genome_file, reads_file; int k,q,b,threshold,w; bool useUkkonenTrick=true; //indicates whether the ukkonen trick will be used or not. bool filterResults = true; // default value for filtering // format: ./exercise2 <genome.fasta> <reads.fasta> <k> <q> <b> /* Print the arguments */ if (argc > 1) { cout << "Welcome..."<<endl << "---- Introduced arguments ----" << endl; for (int i = 1; i < argc; i++) { switch (i){ case 1: cout <<"Genome's file:" << "\t" << argv[1] << endl; break; case 2: cout <<"Reads file:" << "\t" << argv[2] << endl; break; case 3: cout <<"Nr. of allowed erros:" << "\t" << argv[3] << endl; break; case 4: cout <<"Length of the q-grams:" << "\t" << argv[4] << endl; break; case 5: cout <<"Block size:" << "\t\t" << argv[5] << endl; break; default: cout<<"undefined input"<< "\t" <<argv[i]<<endl; break; } } if(argc<6) cout<<"WARNING: not enough arguments given!"<<endl; /* set given arguments */ genome_file = argv[1]; reads_file = argv[2]; k = atoi(argv[3]); // number of errors q = atoi(argv[4]);// length of the q-grams b = atoi(argv[5]); // block size for the genome } /* ------ Input block for the working phase.------------------------------ * -------To be erased before checking -----*/ else if(argc==1) // if no arguments are given by running the progam. { string fileNames[]={"random10M.fasta","random10M_reads50_100.fasta","random10M_reads50_1k.fasta", "random10M_reads100_100.fasta","random10M_reads100_1k.fasta", "random10M_reads400_100.fasta","random10M_reads400_1k.fasta"}; // 7 given test files genome_file=fileNames[0]; reads_file=fileNames[6]; k=0; q= 0; b=400; } /* ------------------------------------------------------------------------*/ /* Read fasta files*/ cout <<"---- Reading ----" << endl; string genome = readGenome(genome_file); int m = getNrOfReads(reads_file); // number of reads vector<string> reads(m, "" ); readReads(reads_file, reads); cout <<"Nr. of reads: "<< m<<endl; cout <<"Text's size: "<< genome.size()<<endl; cout <<"Pattern's size: "<< reads[0].size()<<endl; /* check for 1st and 2nd abort condition */ w=reads[0].size(); threshold = w+1-(k+1)*q; //lemma 2 (q-gramm) cout<<"Computed threshold: "<<threshold<<endl; if(b<w) //block size is smaller than the read length writeAndTerminate(1); // write a warning and terminate (jump to the end) else if(threshold<=0) writeAndTerminate(2); else { /* MAIN */ int nr_of_rows=(int)pow(4,q); //expected nr of permutation of a sequence of length q // allocate int array and vector for the scan int *nr_of_occ=new int[nr_of_rows](); // initialized with zero initializeIntArray(nr_of_occ,nr_of_rows,0); // ensures that the array was initialized with 0 vector<vector<int> > occurrences(nr_of_rows); // to save the start positions getNrOfOccAndPositions(genome,nr_of_occ,occurrences,q); // scan the given sequence and save nr of occurrences as well their positions /* @TODO: counting q-grams, blocking, etc*/ /* main process for the computation of m reads */ // @TODO: to be adapted according to: "For each block where the matches // exceed the threshold (q-gram Lemma) use the semi-global aligner from Exercise 1 for verification." // vector<vector<int> > pos_score; // score vector for format: (nr. of read, start position, end position, score) // cout <<"---- Starting computation ----" << endl; // for(int readNr = 0; readNr < m; readNr++){ // run ukkonen for readNr many reads, save all scores in pos_score // vector<vector<int> > tmp_pos_score; // fastUkkonen(tmp_pos_score, k, genome, reads[readNr], useUkkonenTrick); // filterHitsAndBacktrack(pos_score, tmp_pos_score, k, genome, reads[readNr], readNr, filterResults); // } // // /* Ending */ // cout<<"Nr. of occurences: "<<pos_score.size()<<endl; // writeOutput(pos_score); // export of the results allOccurencesFound(genome,nr_of_occ,q,nr_of_rows); //delete [] nr_of_occ; // may be not necessary since program terminates and the allocated space will be erased anyway } time_int(1); // print out elapsed time return 0; }
ba4cb7dc63a17825b523c3cf409f307fcfd05e96
c3590f02e6c0a94a6ac22441beb1bcd3f3788eee
/implot_test_main/main.cpp
82e7d8ada323daced39560ad8568291f9a32d70f
[]
no_license
PashaPlastic1/implot_test
e768d59cafb8fb390c17f60886f71b91cf8d28c1
ef58eefee339e9706a2ead92926a3db9ee28232d
refs/heads/main
2023-01-05T13:53:52.793066
2020-10-11T12:49:25
2020-10-11T12:49:25
302,459,247
0
0
null
null
null
null
UTF-8
C++
false
false
2,807
cpp
#include <QtImGui.h> #include <implot.h> #include <imgui.h> #include <QApplication> #include <QTimer> #include <QSurfaceFormat> #include <QOpenGLWidget> #include <QOpenGLExtraFunctions> class DemoWindow : public QOpenGLWidget, private QOpenGLExtraFunctions { protected: void initializeGL() override { initializeOpenGLFunctions(); QtImGui::initialize(this); ImPlot::CreateContext(); ImGuiIO& io = ImGui::GetIO(); io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; } void paintGL() override { QtImGui::newFrame(); // 1. Show a simple window // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets appears in a window automatically called "Debug" { static float f = 0.0f; ImGui::Text("Hello, world!"); ImGui::SliderFloat("float", &f, 0.0f, 1.0f); ImGui::ColorEdit3("clear color", (float*)&clear_color); if (ImGui::Button("Test Window")) show_test_window ^= 1; if (ImGui::Button("Another Window")) show_another_window ^= 1; ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate); } // 2. Show another simple window, this time using an explicit Begin/End pair if (show_another_window) { ImGui::SetNextWindowPos(ImVec2(350, 20), ImGuiCond_FirstUseEver); ImPlot::ShowDemoWindow(); } // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow() // if (show_test_window) // { // ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // ImGui::ShowDemoWindow(); // } // Do render before ImGui UI is rendered glViewport(0, 0, width(), height()); glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w); glClear(GL_COLOR_BUFFER_BIT); ImGui::Render(); } private: bool show_test_window = true; bool show_another_window = false; ImVec4 clear_color = ImColor(114, 144, 154); }; int main(int argc, char *argv[]) { QApplication a(argc, argv); // Use OpenGL 3 Core Profile, when available QSurfaceFormat glFormat; if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) { glFormat.setVersion(3, 3); glFormat.setProfile(QSurfaceFormat::CoreProfile); } QSurfaceFormat::setDefaultFormat(glFormat); // Show window DemoWindow w; w.setWindowTitle("QtImGui widget example"); w.resize(1280, 720); w.show(); // Update at 60 fps QTimer timer; QObject::connect(&timer, SIGNAL(timeout()), &w, SLOT(update())); timer.start(16); return a.exec(); }
6c3d8ef1b8548cb87a73c30daa8153f41d3d0603
dd267038685dcefd5f89016c63f72c2ad4aa7fdf
/src/chrome/browser/chromeos/attestation/tpm_challenge_key_subtle.cc
8a73400ac0e6eb9ec663116919e5379bb7e86ee9
[ "BSD-3-Clause" ]
permissive
webosose/chromium87
044d5c74ae9c2815cf096fd98bf9ea4e7e2fe6b3
75729b78817d49249cd004ef734c032269f06e53
refs/heads/master
2022-11-05T07:23:21.710708
2021-10-06T11:24:51
2021-10-08T08:30:55
392,617,373
4
2
null
2022-11-01T02:23:21
2021-08-04T08:54:03
null
UTF-8
C++
false
false
18,442
cc
// Copyright 2020 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 "chrome/browser/chromeos/attestation/tpm_challenge_key_subtle.h" #include "base/base64.h" #include "base/bind.h" #include "base/check_op.h" #include "base/compiler_specific.h" #include "base/notreached.h" #include "base/strings/stringprintf.h" #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/attestation/attestation_ca_client.h" #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/extensions/chrome_extension_function_details.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" #include "chromeos/cryptohome/async_method_caller.h" #include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/dbus/constants/attestation_constants.h" #include "chromeos/settings/cros_settings_names.h" #include "chromeos/tpm/install_attributes.h" #include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_service.h" namespace chromeos { namespace attestation { using Result = TpmChallengeKeyResult; using ResultCode = TpmChallengeKeyResultCode; //==================== TpmChallengeKeySubtleFactory ============================ TpmChallengeKeySubtle* TpmChallengeKeySubtleFactory::next_result_for_testing_ = nullptr; // static std::unique_ptr<TpmChallengeKeySubtle> TpmChallengeKeySubtleFactory::Create() { if (UNLIKELY(next_result_for_testing_)) { std::unique_ptr<TpmChallengeKeySubtle> result(next_result_for_testing_); next_result_for_testing_ = nullptr; return result; } return std::make_unique<TpmChallengeKeySubtleImpl>(); } // static std::unique_ptr<TpmChallengeKeySubtle> TpmChallengeKeySubtleFactory::CreateForPreparedKey(AttestationKeyType key_type, bool will_register_key, const std::string& key_name, Profile* profile) { auto result = TpmChallengeKeySubtleFactory::Create(); result->RestorePreparedKeyState(key_type, will_register_key, key_name, profile); return result; } // static void TpmChallengeKeySubtleFactory::SetForTesting( std::unique_ptr<TpmChallengeKeySubtle> next_result) { DCHECK(next_result_for_testing_ == nullptr); // unique_ptr itself cannot be stored in a static variable because of its // complex destructor. next_result_for_testing_ = next_result.release(); } // static bool TpmChallengeKeySubtleFactory::WillReturnTestingInstance() { return (next_result_for_testing_ != nullptr); } //===================== TpmChallengeKeySubtleImpl ============================== namespace { // Returns true if the device is enterprise managed. bool IsEnterpriseDevice() { return InstallAttributes::Get()->IsEnterpriseManaged(); } // For personal devices, we don't need to check if remote attestation is // enabled in the device, but we need to ask for user consent if the key // does not exist. bool IsUserConsentRequired() { return !IsEnterpriseDevice(); } // If no key name was given, use default well-known key names so they can be // reused across attestation operations (multiple challenge responses can be // generated using the same key). std::string GetDefaultKeyName(AttestationKeyType key_type) { switch (key_type) { case KEY_DEVICE: return kEnterpriseMachineKey; case KEY_USER: return kEnterpriseUserKey; } NOTREACHED(); } // Returns the key name that should be used for the attestation platform APIs. std::string GetKeyNameWithDefault(AttestationKeyType key_type, const std::string& key_name) { if (!key_name.empty()) return key_name; return GetDefaultKeyName(key_type); } } // namespace TpmChallengeKeySubtleImpl::TpmChallengeKeySubtleImpl() : default_attestation_flow_(std::make_unique<AttestationFlow>( cryptohome::AsyncMethodCaller::GetInstance(), CryptohomeClient::Get(), std::make_unique<AttestationCAClient>())), attestation_flow_(default_attestation_flow_.get()) {} TpmChallengeKeySubtleImpl::TpmChallengeKeySubtleImpl( AttestationFlow* attestation_flow_for_testing) : attestation_flow_(attestation_flow_for_testing) {} TpmChallengeKeySubtleImpl::~TpmChallengeKeySubtleImpl() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } void TpmChallengeKeySubtleImpl::RestorePreparedKeyState( AttestationKeyType key_type, bool will_register_key, const std::string& key_name, Profile* profile) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // For user keys, a |profile| is strictly necessary. DCHECK(key_type != KEY_USER || profile); key_type_ = key_type; will_register_key_ = will_register_key; key_name_ = GetKeyNameWithDefault(key_type, key_name); profile_ = profile; } void TpmChallengeKeySubtleImpl::StartPrepareKeyStep( AttestationKeyType key_type, bool will_register_key, const std::string& key_name, Profile* profile, TpmChallengeKeyCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(callback_.is_null()); // For device key: if |will_register_key| is true, |key_name| should not be // empty, if |register_key| is false, |key_name| will not be used. DCHECK((key_type != KEY_DEVICE) || (will_register_key == !key_name.empty())) << "Invalid arguments: " << will_register_key << " " << !key_name.empty(); // For user keys, a |profile| is strictly necessary. DCHECK(key_type != KEY_USER || profile); key_type_ = key_type; will_register_key_ = will_register_key; key_name_ = GetKeyNameWithDefault(key_type, key_name); profile_ = profile; callback_ = std::move(callback); switch (key_type_) { case KEY_DEVICE: PrepareMachineKey(); return; case KEY_USER: PrepareUserKey(); return; } NOTREACHED(); } void TpmChallengeKeySubtleImpl::PrepareMachineKey() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // Check if the device is enterprise enrolled. if (!IsEnterpriseDevice()) { std::move(callback_).Run( Result::MakeError(ResultCode::kNonEnterpriseDeviceError)); return; } // Check whether the user is managed unless this is a device-wide instance. if (GetUser() && !IsUserAffiliated()) { std::move(callback_).Run( Result::MakeError(ResultCode::kUserNotManagedError)); return; } // Check if remote attestation is enabled in the device policy. GetDeviceAttestationEnabled(base::BindRepeating( &TpmChallengeKeySubtleImpl::GetDeviceAttestationEnabledCallback, weak_factory_.GetWeakPtr())); } void TpmChallengeKeySubtleImpl::PrepareUserKey() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // Check if user keys are available in this profile. if (!GetUser()) { std::move(callback_).Run( Result::MakeError(ResultCode::kUserKeyNotAvailableError)); return; } if (!IsRemoteAttestationEnabledForUser()) { std::move(callback_).Run( Result::MakeError(ResultCode::kUserPolicyDisabledError)); return; } if (IsEnterpriseDevice()) { if (!IsUserAffiliated()) { std::move(callback_).Run( Result::MakeError(ResultCode::kUserNotManagedError)); return; } // Check if remote attestation is enabled in the device policy. GetDeviceAttestationEnabled(base::BindRepeating( &TpmChallengeKeySubtleImpl::GetDeviceAttestationEnabledCallback, weak_factory_.GetWeakPtr())); } else { GetDeviceAttestationEnabledCallback(true); } } bool TpmChallengeKeySubtleImpl::IsUserAffiliated() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); const user_manager::User* const user = GetUser(); if (user) { return user->IsAffiliated(); } return false; } bool TpmChallengeKeySubtleImpl::IsRemoteAttestationEnabledForUser() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(profile_); PrefService* prefs = profile_->GetPrefs(); if (prefs && prefs->IsManagedPreference(prefs::kAttestationEnabled)) { return prefs->GetBoolean(prefs::kAttestationEnabled); } return false; } std::string TpmChallengeKeySubtleImpl::GetEmail() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); switch (key_type_) { case KEY_DEVICE: return InstallAttributes::Get()->GetDomain(); case KEY_USER: return GetAccountId().GetUserEmail(); } NOTREACHED(); } AttestationCertificateProfile TpmChallengeKeySubtleImpl::GetCertificateProfile() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); switch (key_type_) { case KEY_DEVICE: return PROFILE_ENTERPRISE_MACHINE_CERTIFICATE; case KEY_USER: return PROFILE_ENTERPRISE_USER_CERTIFICATE; } NOTREACHED(); } const user_manager::User* TpmChallengeKeySubtleImpl::GetUser() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!profile_) return nullptr; return ProfileHelper::Get()->GetUserByProfile(profile_); } AccountId TpmChallengeKeySubtleImpl::GetAccountId() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); const user_manager::User* user = GetUser(); if (user) { return user->GetAccountId(); } // Signin profile doesn't have associated user. return EmptyAccountId(); } void TpmChallengeKeySubtleImpl::GetDeviceAttestationEnabled( const base::RepeatingCallback<void(bool)>& callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); CrosSettings* settings = CrosSettings::Get(); CrosSettingsProvider::TrustedStatus status = settings->PrepareTrustedValues( base::BindOnce(&TpmChallengeKeySubtleImpl::GetDeviceAttestationEnabled, weak_factory_.GetWeakPtr(), callback)); bool value = false; switch (status) { case CrosSettingsProvider::TRUSTED: if (!settings->GetBoolean(kDeviceAttestationEnabled, &value)) { value = false; } break; case CrosSettingsProvider::TEMPORARILY_UNTRUSTED: // Do nothing. This function will be called again when the values are // ready. return; case CrosSettingsProvider::PERMANENTLY_UNTRUSTED: // If the value cannot be trusted, we assume that the device attestation // is false to be on the safe side. break; } callback.Run(value); } void TpmChallengeKeySubtleImpl::GetDeviceAttestationEnabledCallback( bool enabled) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!enabled) { std::move(callback_).Run( Result::MakeError(ResultCode::kDevicePolicyDisabledError)); return; } PrepareKey(); } void TpmChallengeKeySubtleImpl::PrepareKey() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); CryptohomeClient::Get()->TpmAttestationIsPrepared( base::BindOnce(&TpmChallengeKeySubtleImpl::IsAttestationPreparedCallback, weak_factory_.GetWeakPtr())); } void TpmChallengeKeySubtleImpl::IsAttestationPreparedCallback( base::Optional<bool> result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!result.has_value()) { std::move(callback_).Run(Result::MakeError(ResultCode::kDbusError)); return; } if (!result.value()) { CryptohomeClient::Get()->TpmIsEnabled(base::BindOnce( &TpmChallengeKeySubtleImpl::PrepareKeyErrorHandlerCallback, weak_factory_.GetWeakPtr())); return; } // Attestation is available, see if the key we need already exists. CryptohomeClient::Get()->TpmAttestationDoesKeyExist( key_type_, cryptohome::CreateAccountIdentifierFromAccountId(GetAccountId()), key_name_, base::BindOnce(&TpmChallengeKeySubtleImpl::DoesKeyExistCallback, weak_factory_.GetWeakPtr())); } void TpmChallengeKeySubtleImpl::PrepareKeyErrorHandlerCallback( base::Optional<bool> is_tpm_enabled) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!is_tpm_enabled.has_value()) { std::move(callback_).Run(Result::MakeError(ResultCode::kDbusError)); return; } if (is_tpm_enabled.value()) { std::move(callback_).Run( Result::MakeError(ResultCode::kResetRequiredError)); } else { std::move(callback_).Run( Result::MakeError(ResultCode::kAttestationUnsupportedError)); } } void TpmChallengeKeySubtleImpl::DoesKeyExistCallback( base::Optional<bool> result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!result.has_value()) { std::move(callback_).Run(Result::MakeError(ResultCode::kDbusError)); return; } if (result.value()) { // The key exists. Do nothing more. GetPublicKey(); return; } // The key does not exist. Create a new key and have it signed by PCA. if (IsUserConsentRequired()) { // We should ask the user explicitly before sending any private // information to PCA. AskForUserConsent( base::BindOnce(&TpmChallengeKeySubtleImpl::AskForUserConsentCallback, weak_factory_.GetWeakPtr())); } else { // User consent is not required. Skip to the next step. AskForUserConsentCallback(true); } } void TpmChallengeKeySubtleImpl::AskForUserConsent( base::OnceCallback<void(bool)> callback) const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // TODO(davidyu): right now we just simply reject the request before we have // a way to ask for user consent. std::move(callback).Run(false); } void TpmChallengeKeySubtleImpl::AskForUserConsentCallback(bool result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!result) { // The user rejects the request. std::move(callback_).Run(Result::MakeError(ResultCode::kUserRejectedError)); return; } // Generate a new key and have it signed by PCA. attestation_flow_->GetCertificate( GetCertificateProfile(), GetAccountId(), /*request_origin=*/std::string(), // Not used. /*force_new_key=*/true, key_name_, base::BindOnce(&TpmChallengeKeySubtleImpl::GetCertificateCallback, weak_factory_.GetWeakPtr())); } void TpmChallengeKeySubtleImpl::GetCertificateCallback( AttestationStatus status, const std::string& pem_certificate_chain) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (status != ATTESTATION_SUCCESS) { std::move(callback_).Run( Result::MakeError(ResultCode::kGetCertificateFailedError)); return; } GetPublicKey(); } void TpmChallengeKeySubtleImpl::GetPublicKey() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); CryptohomeClient::Get()->TpmAttestationGetPublicKey( key_type_, cryptohome::CreateAccountIdentifierFromAccountId(GetAccountId()), key_name_, base::BindOnce(&TpmChallengeKeySubtleImpl::PrepareKeyFinished, weak_factory_.GetWeakPtr())); } void TpmChallengeKeySubtleImpl::PrepareKeyFinished( base::Optional<CryptohomeClient::TpmAttestationDataResult> prepare_key_result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!prepare_key_result.has_value() || !prepare_key_result->success) { std::move(callback_).Run( Result::MakeError(ResultCode::kGetPublicKeyFailedError)); return; } std::move(callback_).Run(Result::MakePublicKey(prepare_key_result->data)); } void TpmChallengeKeySubtleImpl::StartSignChallengeStep( const std::string& challenge, TpmChallengeKeyCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(callback_.is_null()); callback_ = std::move(callback); // See http://go/chromeos-va-registering-device-wide-keys-support for details // about both key names. // Name of the key that will be used to sign challenge. // Device key challenges are signed using a stable key. std::string key_name_for_challenge = (key_type_ == KEY_DEVICE) ? GetDefaultKeyName(key_type_) : key_name_; // Name of the key that will be included in SPKAC, it is used only when SPKAC // should be included for device key. std::string key_name_for_spkac = (will_register_key_ && key_type_ == KEY_DEVICE) ? key_name_ : std::string(); // Everything is checked. Sign the challenge. cryptohome::AsyncMethodCaller::GetInstance() ->TpmAttestationSignEnterpriseChallenge( key_type_, cryptohome::Identification(GetAccountId()), key_name_for_challenge, GetEmail(), InstallAttributes::Get()->GetDeviceId(), will_register_key_ ? CHALLENGE_INCLUDE_SIGNED_PUBLIC_KEY : CHALLENGE_OPTION_NONE, challenge, key_name_for_spkac, base::BindOnce(&TpmChallengeKeySubtleImpl::SignChallengeCallback, weak_factory_.GetWeakPtr())); } void TpmChallengeKeySubtleImpl::SignChallengeCallback( bool success, const std::string& response) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!success) { std::move(callback_).Run( Result::MakeError(ResultCode::kSignChallengeFailedError)); return; } std::move(callback_).Run(Result::MakeChallengeResponse(response)); } void TpmChallengeKeySubtleImpl::StartRegisterKeyStep( TpmChallengeKeyCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(callback_.is_null()); DCHECK(will_register_key_); callback_ = std::move(callback); cryptohome::AsyncMethodCaller::GetInstance()->TpmAttestationRegisterKey( key_type_, cryptohome::Identification(GetAccountId()), key_name_, base::BindOnce(&TpmChallengeKeySubtleImpl::RegisterKeyCallback, weak_factory_.GetWeakPtr())); } void TpmChallengeKeySubtleImpl::RegisterKeyCallback( bool success, cryptohome::MountError return_code) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!success || return_code != cryptohome::MOUNT_ERROR_NONE) { std::move(callback_).Run( Result::MakeError(ResultCode::kKeyRegistrationFailedError)); return; } std::move(callback_).Run(Result::MakeSuccess()); } } // namespace attestation } // namespace chromeos
6265a58b43221b4de415f474ced32577b09f5563
1f3bb0c34aac65761c475a304a00751ec1f75fba
/engine.cpp
95173f28f25301b51f7d869383e4c4db7d74f535
[]
no_license
LCZforever/ball_by_opengl
43a259e6c2302e317b7583968e9c3789ed55d16f
3d025b4dd72154d1c409920f5d8dfa7813cf75c3
refs/heads/master
2020-05-07T14:28:13.398136
2019-04-10T14:35:02
2019-04-10T14:35:02
180,596,159
4
0
null
null
null
null
GB18030
C++
false
false
26,162
cpp
/////////////////////////////////////////////////////////////////////////////// // 名称: Mini 3D Engine // 版本: 1.1.2018-06-04.1000 // // 作者: 李峥 // 电邮:lizheng AT gdut.edu.cn // 单位:计算机学院,广东工业大学 // // 本软件按照GNU GPLv3授权。参阅 http://www.gnu.org/copyleft/gpl.html。 // 广东工业大学版权所有,2018年。保留所有权利。 // // 用法:在命令行窗口输入以下命令 // > MiniEngine [filename].obj // /////////////////////////////////////////////////////////////////////////////// // // Project: Mini 3D Engine // Version: 1.1.2018-06-04.1000 // // Author: LI Zheng // E-Mail: lizheng AT gdut.edu.cn // Affiliation: School of Computers, Guangdong University of Technology // // Licensed under the GNU GPLv3. See http://www.gnu.org/copyleft/gpl.html. // Copyright: 2018 Guangdong University of Technology. All rights reserved. // // Usage: In command line window, enter the following command // > MiniEngine [filename].obj // /////////////////////////////////////////////////////////////////////////////// // // Patience is a virtue. // Possess it if you can. // Seldom found in woman. // Never found in man. // /////////////////////////////////////////////////////////////////////////////// #define _CRT_SECURE_NO_WARNINGS // 头文件 ///////////////////////////////////////////////////////////////////// #include <windows.h> // 生成窗口。VS须已安装 Windows SDK(部分VC Express不带) #include <stdio.h> // 标准输入输出 #include<iostream> #include<stdlib.h> #include <vector> // std数组 #include <time.h> // 时间 #include<math.h> #include <gl/freeglut.h> // FreeGLUT(实际使用freeGLUT) //#include <gl/gl.h> // OpenGL //#include <gl/glu.h> // OpenGL utility //#include <gl/glaux.h> // OpenGL auxilary #include"snake1.h" using namespace std; // 使用std命名空间,简化变量声明 // 全局参数 /////////////////////////////////////////////////////////////////// float _camx = 0.0f; // 摄像机位置x float _camy = 0.0f; // 摄像机位置y float _camz = -1.0f; // 摄像机位置z float _tgtx = 0.0f; // 摄像机目标x float _tgty = 0.0f; // 摄像机目标y float _tgtz = 0.0f; // 摄像机目标z bool _fullscreen = false; // 全屏显示 bool _wireframe = true; // 线框渲染 bool _cull_back_faces = true; // 去除背向面,提高渲染速度 bool _lighting = true; // 光照 bool _smooth_shading = true; // 光滑渲染 vector<float> _verts; // 顶点坐标数组:x0, y0, z0, x1, y1, z1, ... vector<unsigned int> _faces; // 三角形顶点序号数组:v0x, v0y, v0z, v1x, v1y, v1z, ... vector<float> _vert_normals; // 顶点法线数组。每个顶点对应一条法线。nx0, ny0, nz0, nx1, ny1, nz1, ... vector<float> _face_normals; // 面法线数组。每个面对应一条法线。n0x, n0y, n0z, n1x, n1y, n1z, ... float _scale = 1.0f; // 物体缩放 float _rot_x; // 绕x轴的旋转角度 float _rot_y; // 绕y轴的旋转角度 int _mouse_state = GLUT_UP; // 鼠标按钮状态 int _mouse_button; // 鼠标按钮 int _mouse_x, _mouse_y; // 上次鼠标的屏幕坐标 clock_t _now, _justnow; // 当前时间、刚才时间 clock_t _msec; // 流逝时间(毫秒),可用于计算动画速度相关变量 clock_t _fps_time; // 帧速测量起始时间 int _fps_interval = 1; // 帧速测量间隔(秒) int _fps_cnt = 0; // 帧/秒 char _title[128]; // 窗口标题 const char _help[] = "三维球球大作战(你没有玩过的全新版本)\n" "School of Computers, Guangdong University of Technology\n" "引擎作者:李峥 (非常感谢李峥老师在这门课上的认真有有趣的教学以及课后的解答)\n" "游戏制作者:罗诚哲 广东工业大学 三维游戏编程入门\n" "Licensed under the GNU GPLv3.\n" "Copyright: 2018 Guangdong University of Technology. All rights reserved.\n\n" "游戏玩法:控制球球吃其他球让它变大\n" "操作说明:\n" "按住鼠标左键并移动鼠标来改变视角\n" "w, s, a, d, q, e: 移动球球\n" "z, x: 改变视野\n" "h: 打印帮助信息\n" "Esc: 退出游戏\n" "F1: 全屏或窗口模式\n" "F2: 是否网状绘图\n" "F3: 是否平滑化\n" "F4: 是否画背面 \n" "F5: 开关灯\n\n"; //三维球球大作战 snake foodBall; NODE *head1=new NODE; double majorBall_x, majorBall_y, majorBall_z; float justx=0.0f, justy=0.0f, justz=0.0f; float velocity = 0.1f; GLdouble Ball_r=0.5f; // 函数 /////////////////////////////////////////////////////////////////////// // 读取Wavefront Object File。 // 只支持有限的格式。 // 仅支持三角面顶点索引,不能处理法线、贴图坐标索引。 // // path: 文件路径 // verts: 顶点数组。 // 按照 x0, y0, z0, x1, y1, z1, x2, y2, z2, ... 每三个坐标值为顺序记录。 // n个点有3*n个记录。 // faces: 三角面的顶点序号数组。 // 按照 f0_0, f0_1, f0_2, f1_0, f1_1, f1_2, f2_0, f2_1, f2_2, ... 每三个顶点序号为顺序记录。 // n个三角形有3*n个记录。 bool load_obj_file(const char *path, vector<float> &verts, vector<unsigned int> &faces){ FILE *file = fopen(path, "r"); if (file == NULL) // 找不到文件 return false; while (true) { char lineHeader[128]; // 读取当前行第一个单词 int res = fscanf(file, "%s", lineHeader); if (res == EOF) // 到文件结尾,退出循环 break; // 解析文档内容 if (strcmp(lineHeader, "v") == 0) { // 顶点坐标 float vx, vy, vz; fscanf(file, "%f %f %f\n", &vx, &vy, &vz); verts.push_back(vx); verts.push_back(vy); verts.push_back(vz); } else if (strcmp(lineHeader, "f") == 0) { // 面索引 <<仅支持三角面顶点索引,不能处理法线、贴图坐标索引!>> std::string vertex1, vertex2, vertex3; unsigned int vertexIndex[3]; int matches = fscanf(file, "%d %d %d\n", &vertexIndex[0], &vertexIndex[1], &vertexIndex[2]); if (matches != 3){ printf("File format error. Please check the file content.\n"); return false; } // 注意:obj文件的顶点序号从1开始,而数组序号从0开始。 faces.push_back(vertexIndex[0] - 1); faces.push_back(vertexIndex[1] - 1); faces.push_back(vertexIndex[2] - 1); } else { // 其它,忽略 char stupidBuffer[1000]; fgets(stupidBuffer, 1000, file); } } return true; } // GLUT框架消息处理函数 /////////////////////////////////////////////////////// // 初始化OpenGL,生成窗口后调用。 void init() { if (_smooth_shading) glShadeModel(GL_SMOOTH); // 使用光滑渲染 else glShadeModel(GL_FLAT); // 使用平坦渲染 glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // 颜色缓存清屏值(RGBA) glClearDepth(1.0f); // 深度缓存清屏值 glEnable(GL_DEPTH_TEST); // 使用深度测试 glDepthFunc(GL_LEQUAL); // 设置深度测试方法 glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // 设置最佳透视投影矫正方法 _wireframe ? glPolygonMode(GL_FRONT_AND_BACK, GL_LINE) // 渲染模式:线框多边形 : glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); // 渲染模式:填充多边形 glCullFace(GL_BACK); // 设定去除模式:去除背向面 _cull_back_faces ? glEnable(GL_CULL_FACE) // 打开去除背向面 : glDisable(GL_CULL_FACE); // 关闭去除背向面 // 设置光照和材质 ///////////////////////////////////// glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); // 设置颜色材质参数 glEnable(GL_COLOR_MATERIAL); // 使用颜色材质 glColor3f(1.0, 1.0, 1.0); // 设置默认的物体颜色 glEnable(GL_LIGHTING); // 使用光照 // 添加0号灯 GLfloat LightAmbient[] = { 0.2f, 0.2f, 0.2f, 1.0f }; // 环境光颜色 GLfloat LightDiffuse[] = { 0.7f, 0.7f, 0.7f, 1.0f }; // 散射光颜色 GLfloat LightSpecular[] = { 1.0f, 1.0f, 1.0f, 1.0f }; // 高光颜色 GLfloat LightPosition[] = { 1.0f, 1.0f, 1.0f, 0.0f }; // 平行光(注意最后参数是0,表示向量) glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient); // 设置环境光 glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse); // 设置散射光 glLightfv(GL_LIGHT0, GL_SPECULAR, LightSpecular); // 设置高光 glLightfv(GL_LIGHT0, GL_POSITION, LightPosition); // 设置平行光 glEnable(GL_LIGHT0); // 打开0号灯 // 其它 /////////////////////////////////////////////// _justnow = _fps_time = clock(); // 初始化时间 for (int i = 0; i < 50; i++) { foodBall.InsertOnein(0, Rand(-10.0f, 10.0f), Rand(-10.0f, 10.0f), Rand(-10.0f, 10.0f), Rand(0.2f,1.0f), Rand(0.2f, 1.0f), Rand(0.2f, 1.0f),Rand(0.8f,2.0f)); } for (int i = 0; i < 400; i++) { foodBall.InsertOnein(0, Rand(-10.0f, 10.0f), Rand(-10.0f, 10.0f), Rand(-10.0f, 10.0f), Rand(0.0f, 1.0f), Rand(0.0f, 1.0f), Rand(0.0f, 1.0f), 0.2f); } //foodBall.PrintInfofsanke(); foodBall.GetNODE(head1); } // 初始化场景,从OBJ文件导入模型 void init_scene_with_obj_file(const char *path) { // 清除场景信息 /////////////////////////////////////// _verts.clear(); _faces.clear(); _vert_normals.clear(); _face_normals.clear(); // 打开模型文件 /////////////////////////////////////// if (!load_obj_file(path, _verts, _faces)) { printf("Error occured when initilizing the scene."); return; } // 计算法线 /////////////////////////////////////////// unsigned int i0, i1, i2; float x0, y0, z0, x1, y1, z1, x2, y2, z2; float ux, uy, uz, vx, vy, vz; float nx, ny, nz; float length; // 初始化顶点法线 _vert_normals.assign(_verts.size(), 0.0f); // 计算面法线 for (unsigned int i = 0; i < _faces.size() / 3; ++i) { // 遍历所有三角形,每3个顶点为一组 // 取得该三角形的3个顶点的序号 i0 = _faces[i * 3] * 3; i1 = _faces[i * 3 + 1] * 3; i2 = _faces[i * 3 + 2] * 3; // 取得该三角形的3个顶点的坐标 x0 = _verts[i0]; y0 = _verts[i0 + 1]; z0 = _verts[i0 + 2]; x1 = _verts[i1]; y1 = _verts[i1 + 1]; z1 = _verts[i1 + 2]; x2 = _verts[i2]; y2 = _verts[i2 + 1]; z2 = _verts[i2 + 2]; // 计算两条边向量 ux = x1 - x0; uy = y1 - y0; uz = z1 - z0; vx = x2 - x0; vy = y2 - y0; vz = z2 - z0; // 计算叉积 nx = uy * vz - uz * vy; ny = uz * vx - ux * vz; nz = ux * vy - uy * vx; // 长度正规化,将面法线缩放为单位长度 length = sqrt(nx*nx + ny*ny + nz*nz); // 计算长度 if (length < 0.00001f) length = 0.00001f; // 要作除数,以防为零 length = (float)(1.0 / length); // 预先计算倒数 nx = nx * length; ny = ny * length; nz = nz * length; // 长度缩放为1 // 保存面法线 _face_normals.push_back(nx); _face_normals.push_back(ny); _face_normals.push_back(nz); // 将面法线累加到顶点法线,权重为1 _vert_normals[i0] += nx; _vert_normals[i0 + 1] += ny; _vert_normals[i0 + 2] += nz; // 累加到第1个顶点法线 _vert_normals[i1] += nx; _vert_normals[i1 + 1] += ny; _vert_normals[i1 + 2] += nz; // 累加到第2个顶点法线 _vert_normals[i2] += nx; _vert_normals[i2 + 1] += ny; _vert_normals[i2 + 2] += nz; // 累加到第3个顶点法线 } // 顶点法线长度正规化,将顶点法线缩放为单位长度 for (unsigned int i = 0; i < _vert_normals.size() / 3; ++i) { // 取得累加结果 nx = _vert_normals[i * 3]; ny = _vert_normals[i * 3 + 1]; nz = _vert_normals[i * 3 + 2]; // 长度正规化 length = sqrt(nx*nx + ny*ny + nz*nz); // 计算长度 if (length < 0.00001f) length = 0.00001f; // 要作除数,以防为零 length = (float)(1.0 / length); // 预先计算倒数 _vert_normals[i * 3] = nx * length; // 长度缩放为1 _vert_normals[i * 3 + 1] = ny * length; _vert_normals[i * 3 + 2] = nz * length; } } // 每当窗口缩放调用;init()后调用一次。 // w:以像素计算的窗口宽度 // h:以像素计算的窗口高度 void reshape(int w, int h) { // 因h要做除数计算投影纵横比例,须预防其为零 if (h == 0) h = 1; // 设置viewport glViewport(0, 0, w, h); // 视区(viewport)占用整个窗口 // 设置Projection矩阵 glMatrixMode(GL_PROJECTION); // 选择设定投影(Projection)矩阵 glLoadIdentity(); // 将之重设为单位矩阵 gluPerspective(45.0f, // 纵向视角 1.0f * w / h, // 画面纵横比 0.01f, // 近截平面 100.0f); // 远截平面 // 设置Model-View矩阵M glMatrixMode(GL_MODELVIEW); // 选择设定Model-View矩阵 glLoadIdentity(); // 将之重设为单位矩阵,M=I } void draw_obj_model() { glBegin(GL_TRIANGLES); // 绘制三角形 unsigned i0, i1, i2; float x0, y0, z0, x1, y1, z1, x2, y2, z2; for (unsigned int i = 0; i < _faces.size() / 3; ++i) { // 遍历所有三角形,每3个顶点为一组 // 取得3个顶点的序号 i0 = _faces[i * 3] * 3; i1 = _faces[i * 3 + 1] * 3; i2 = _faces[i * 3 + 2] * 3; // 取得顶点的坐标 x0 = _verts[i0]; y0 = _verts[i0 + 1]; z0 = _verts[i0 + 2]; // 第1个顶点的坐标 x1 = _verts[i1]; y1 = _verts[i1 + 1]; z1 = _verts[i1 + 2]; // 第2个顶点的坐标 x2 = _verts[i2]; y2 = _verts[i2 + 1]; z2 = _verts[i2 + 2]; // 第3个顶点的坐标 // 注意:为了正确计算光照,法线长度应为单位长度。因此法线都乘了_scale。 if (_smooth_shading) { // 使用光滑渲染 glNormal3f(_vert_normals[i0] * _scale, _vert_normals[i0 + 1] * _scale, _vert_normals[i0 + 2] * _scale); // 顶点0法线 glVertex3f(x0, y0, z0); // 顶点0位置 glNormal3f(_vert_normals[i1] * _scale, _vert_normals[i1 + 1] * _scale, _vert_normals[i1 + 2] * _scale); // 顶点1法线 glVertex3f(x1, y1, z1); // 顶点1位置 glNormal3f(_vert_normals[i2] * _scale, _vert_normals[i2 + 1] * _scale, _vert_normals[i2 + 2] * _scale); // 顶点2法线 glVertex3f(x2, y2, z2); // 顶点2位置 } else { // 使用平坦渲染 glNormal3f(_face_normals[i * 3] * _scale, _face_normals[i * 3 + 1] * _scale, _face_normals[i * 3 + 2] * _scale); // 面法线 glVertex3f(x0, y0, z0); glVertex3f(x1, y1, z1); glVertex3f(x2, y2, z2); // 顶点位置 } } glEnd(); // 绘制结束 } void draw_xmas_tree() { float scale = 1.0f; glLineWidth(10.0f); glColor3f(1.0, 1.0, 0.0); glPushMatrix(); glRotatef(-90, 1, 0, 0); glutSolidCone(0.5, 0.7, 10, 3); glPopMatrix(); glColor3f(0.3, 0.8, 0.0); glPushMatrix(); glRotatef(-90, 1, 0, 0); glTranslatef(0, 0, -0.5); glutSolidCone(0.7, 0.8, 10, 3); glPopMatrix(); glColor3f(0.1, 0.3, 0.2); glPushMatrix(); glRotatef(-90, 1, 0, 0); glTranslatef(0, 0, -1.0); glutSolidCone(0.1, 0.7, 4, 3); glPopMatrix(); } void draw_helicopter() { float scale = 1.0f; glLineWidth(6.0f); // helicopter glPushMatrix(); glScaled( 0.75f * scale, 0.75f * scale, 0.75f * scale ); glPushMatrix(); glRotated( 90.0f, 0.0f, 1.0f, 0.0f ); glScaled( 1.0f, 1.0f, 1.3f ); glutSolidSphere( 0.25f, 5, 5 ); // 机身 glPopMatrix(); glPushMatrix(); glTranslated( 0.0f, -0.24f, 0.0f ); glRotated( 90.0f, 0.0f, 1.0f, 0.0f ); glScaled( 1.0f, 1.0f, 5.0f ); glTranslated( 0.2f, 0.0f, 0.0f ); glutSolidSphere( 0.07f, 3, 3 ); // 脚架 glTranslated( -0.4f, 0.0f, 0.0f ); glutSolidSphere( 0.07f, 3, 3 ); glPopMatrix(); glPushMatrix(); glTranslated( 0.0f, 0.2f, 0.0f ); glRotated( -90.0f, 1.0f, 0.0f, 0.0f ); glutSolidCone( 0.04, 0.16, 4, 1 ); // 旋翼轴 glPopMatrix(); glPushMatrix(); glTranslated( 0.0f, 0.4f, 0.0f ); glRotated( 90.0f, 1.0f, 0.0f, 0.0f ); glutSolidCone( 0.4, 0.05, 16, 1 ); // 旋翼 glPopMatrix(); glPushMatrix(); glRotated( -90.0f, 0.0f, 1.0f, 0.0f ); glTranslated( 0.0f, 0.05f, 0.29f ); glRotated( -15.0f, 1.0f, 0.0f, 0.0f ); glutSolidCone( 0.05, 0.3, 4, 1 ); // 机尾 glTranslated( 0.03f, 0.0f, 0.3f ); glRotated( 90.0f, 0.0f, 1.0f, 0.0f ); glutSolidCone( 0.15, 0.0, 8, 1 ); // 尾旋翼 glPopMatrix(); glPopMatrix(); } void draw_something() { glLineWidth(2.0f); glPushMatrix(); //原点 glColor3f(1.0, 1.0, 1.0); glTranslated(0.0f, 0.0f, 0.0f); glutSolidSphere(0.2f, 3, 3); glPopMatrix(); glPushMatrix(); //z轴 glColor3f(0.0, 0.0, 1.0); glScaled(1.0f, 1.0f, 32.0f); glTranslated(0, 0.0f, 0); glutSolidSphere(0.05f, 10, 10); glPopMatrix(); glPushMatrix(); //y轴 glColor3f(0.0, 1.0, 0.0); glScaled(1.0f, 32.0f, 1.0f); glTranslated(0, 0.0f, 0); glutSolidSphere(0.05f, 10, 10); glPopMatrix(); glPushMatrix(); //x轴 glColor3f(1.0, 0.0, 0.0); glScaled(32.0f, 1.0f, 1.0f); glTranslated(0, 0.0f, 0); glutSolidSphere(0.05f, 10, 10); glPopMatrix(); glPushMatrix(); glColor3f(1.0, 0.8, 0.8); glTranslated(0.0f,0.0f,-50.0f); glutWireCylinder(20.0f, 100.0f, 100, 100); glPopMatrix(); NODE *p = head1; //创建储存其他球球信息的链表 double d,D; while(p->next->next) //依次画出其他球球,如果被吃到,则删掉这个球球,且本球变大 { d = LiangDianJuLi(p->next->x, p->next->y, p->next->z, _tgtx, _tgty, _tgtz); D = sqrt(d); if (D < (p->next->radius + Ball_r + 1.0f)) { if (d < (p->next->radius + Ball_r)* (p->radius + Ball_r)) { if (p->next->radius > Ball_r) Ball_r = 0.5f; else { Ball_r += 0.05f; p->next = p->next->next; continue; } } if (p->next->radius < Ball_r) { p->next->x = p->next->x + 0.01*_msec * velocity*(_tgtx - p->next->x) / D; p->next->y = p->next->y + 0.01*_msec * velocity*(_tgty - p->next->y) / D; p->next->z = p->next->z + 0.01*_msec * velocity*(_tgtz - p->next->z) / D; } } glPushMatrix(); glColor3f(p->next->red,p->next->green,p->next->blue); glTranslated(p->next->x,p->next->y,p->next->z); glutSolidSphere(p->next->radius, 20, 20); glPopMatrix(); p = p->next; } glPushMatrix(); //在相机目标位置画本球 glColor3f(0.9, 0.9, 0.9); glTranslated(_tgtx, _tgty, _tgtz); glutSolidSphere(Ball_r, 50, 50); glPopMatrix(); } void draw_scene() { draw_something(); } // 每当需要重绘时调用;init()和reshape()后调用。 void display(void) { // 计时 /////////////////////////////////////////////// _now = clock(); // 当前时间 _msec = _now - _justnow; // 流逝时间(毫秒) _justnow = _now; // 保存当前时间 float cam_dx, cam_dy, cam_dz; cam_dx = _tgtx - justx; cam_dy = _tgty - justy; cam_dz = _tgtz - justz; // 计算帧速 /////////////////////////////////////////// _fps_cnt += 1; // 帧数+1 // 每 _fps_interval 秒输出一次帧速 if (_now - _fps_time > CLK_TCK * _fps_interval) { // CLK_TCK=1000 _fps_time = _now; sprintf(_title, "Mini 3D Engine - %dfps", _fps_cnt / _fps_interval); glutSetWindowTitle(_title); _fps_cnt = 0; } if (_rot_x > 90.0f) // 限制旋转值以获得良好的观察效果 _rot_x = 90.0f; else if (_rot_x < -90.0f) _rot_x = -90.0f; //将相机位置和目标位置进行与输入信息有关的空间几何变换 _tgtx = justx - cam_dx * cos((double)_rot_y*0.01745) + cam_dz * sin((double)_rot_y*0.01745); _tgtz = justz - cam_dx * sin((double)_rot_y*0.01745) - cam_dz * cos((double)_rot_y*0.01745); _camx = _tgtx + 3* _scale*sin((double)_rot_y*0.01745) *cos((double)_rot_x*0.01745); _camy = _tgty + 3* _scale*sin((double)_rot_x*0.01745); _camz = _tgtz - 3* _scale*cos((double)_rot_x*0.01745)*cos((double)_rot_y*0.01745); // 清屏(颜色缓存、深度缓存) ///////////////////////// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // 设置Model-View矩阵M //////////////////////////////// glLoadIdentity(); // 将之重设为单位矩阵,M=I gluLookAt( // 设置摄像机,使M=C _camx, _camy, _camz, // 摄像机的位置 _tgtx, _tgty, _tgtz, // 观察目标的位置 0.0f, 1.0f, 0.0f); // 摄像机的“上”方 justx = _tgtx; //储存目标位置信息 justy = _tgty; justz = _tgtz; // 绘制场景 /////////////////////////////////////////// glPushMatrix(); // 当前Model-View矩阵(M=C)入栈 draw_scene(); glPopMatrix(); // Model-View矩阵M出栈,使M=C // 切换缓冲区 ///////////////////////////////////////// glutSwapBuffers(); } // 键盘普通字符消息处理函数 void keyboard(unsigned char key, int x, int y) { key = tolower(key); switch (key) { case 27: // ESC: 退出程序 exit(0); break; case 'z': // z: 物体放大 _scale += 0.05f; break; case 'x': // x: 物体缩小 _scale -= 0.05f; break; case 'q': // w: 摄像机平移 _camy -= 0.05f; _tgty -= 0.05f; majorBall_y -= 0.05f; break; case 'e': // s: 摄像机平移 _camy += 0.05f; _tgty += 0.05f; majorBall_y += 0.05f; break; case 'd': // a: 摄像机平移 _camx += 0.05f; _tgtx += 0.05f; majorBall_x += 0.05f; break; case 'a': // d: 摄像机平移 _camx -= 0.05f; _tgtx -= 0.05f; majorBall_x -= 0.05f; break; case 'w': // q: 摄像机平移 _camz -= 0.05f; _tgtz -= 0.05f; majorBall_z -= 0.05f; break; case 's': // e: 摄像机平移 _camz += 0.05f; _tgtz += 0.05f; majorBall_z += 0.05f; break; case 'r': // r: 摄像机复位 _camx = _camy = 0.0f; _camz = 3.0f; _tgtx = _tgty = _tgtz = 0.0f; break; case 'h': // h: 帮助信息 printf(_help); break; default: break; } } // 键盘特殊字符消息处理函数 void arrow_keys(int a_keys, int x, int y) { switch (a_keys) { case GLUT_KEY_UP: // ARROW UP _rot_x += 1.0f; break; case GLUT_KEY_DOWN: // ARROW DOWN _rot_x -= 1.0f; break; case GLUT_KEY_RIGHT: // ARROW RIGHT _rot_y += 1.0f; break; case GLUT_KEY_LEFT: // ARROW LEFT _rot_y -= 1.0f; break; case GLUT_KEY_F1: // F1: 全屏显示 _fullscreen = !_fullscreen; if (_fullscreen) glutFullScreen(); // 全屏显示 else { glutReshapeWindow(800, 600); // 窗口像素尺寸 glutPositionWindow(50, 50); // 窗口位置 } break; case GLUT_KEY_F2: // F2: 线框渲染/面渲染 _wireframe = !_wireframe; _wireframe ? glPolygonMode(GL_FRONT_AND_BACK, GL_LINE) : glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); break; case GLUT_KEY_F3: // F3: 光滑渲染/平坦渲染 _smooth_shading = !_smooth_shading; _smooth_shading ? glShadeModel(GL_SMOOTH) : glShadeModel(GL_FLAT); break; case GLUT_KEY_F4: // F4: 剔除背向面 _cull_back_faces = !_cull_back_faces; _cull_back_faces ? glEnable(GL_CULL_FACE) : glDisable(GL_CULL_FACE); break; case GLUT_KEY_F5: // F5: 打开/关闭光照 _lighting = !_lighting; _lighting ? glEnable(GL_LIGHTING) : glDisable(GL_LIGHTING); break; default: break; } } // 鼠标按键消息处理函数 void mouse_buttons(int button, int state, int x, int y) { switch (button) { case GLUT_LEFT_BUTTON: if (state == GLUT_DOWN) { // LEFT BUTTON DOWN _mouse_state = GLUT_DOWN; _mouse_button = button; _mouse_x = x; _mouse_y = y; } else { // LEFT BUTTON UP _mouse_state = GLUT_UP; } break; case GLUT_MIDDLE_BUTTON: break; case GLUT_RIGHT_BUTTON: break; default: break; } } // 鼠标移动消息处理函数 void mouse_moving(int x, int y) { if (_mouse_state == GLUT_DOWN) { int dx, dy; switch (_mouse_button) { case GLUT_LEFT_BUTTON: // 计算鼠标移动量 dx = x - _mouse_x; dy = y - _mouse_y; // 修改摄像机或场景 _rot_x += dy; _rot_y += dx; // 保存鼠标当前位置,留作后用 _mouse_x = x; _mouse_y = y; break; case GLUT_MIDDLE_BUTTON: break; case GLUT_RIGHT_BUTTON: break; default: break; } } } // 主函数 // argc:参数数目 // argv:参数字符串 int main(int argc, char* argv[]) { if (argc < 2) { printf("Usage: MiniEngine [filename].obj\n"); //return 1; } // 初始化GLUT glutInit(&argc, argv); // 初始化GLUT glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA); // 显示模式:深度测试、双缓冲、RGBA颜色模型 glutInitWindowPosition(50, 50); // 窗口位置 glutInitWindowSize(800, 600); // 窗口像素尺寸 glutCreateWindow("Mini 3D Engine"); // 窗口标题 init(); // 初始化 if (argc >= 2) init_scene_with_obj_file(argv[1]); // 初始化场景,从文件导入模型 if (_fullscreen) glutFullScreen(); // 全屏显示 // 设置各类消息处理函数 glutDisplayFunc(display); // 窗口绘制处理函数 glutReshapeFunc(reshape); // 窗口缩放处理函数 glutKeyboardFunc(keyboard); // 键盘普通字符消息处理函数 glutSpecialFunc(arrow_keys); // 键盘特殊字符消息处理函数 glutMouseFunc(mouse_buttons); // 鼠标按键消息处理函数 glutMotionFunc(mouse_moving); // 鼠标移动消息处理函数 glutIdleFunc(display); // 空闲处理函数 // 打印帮助信息 printf(_help); // 进入消息循环,直至关闭窗口 glutMainLoop(); return 0; }
98a212f5d62047cad31ba8e71dc9458ea9cd8b5b
96eaebd467794284f338a56b123bdfa5b98dd4d1
/core/test/lib/boost/boost/hof/detail/holder.hpp
5b67303781d0b033e1afecbfc04c943903ea4331
[ "MIT" ]
permissive
KhalilBellakrid/lib-ledger-core
d80dc1fe0c4e3843eabe373f53df210307895364
639f89a64958ee642a2fdb0baf22d2f9da091cc3
refs/heads/develop
2021-05-14T07:19:17.424487
2019-05-20T20:33:05
2019-05-20T20:33:05
116,260,592
0
3
MIT
2019-06-26T08:07:16
2018-01-04T13:01:57
C++
UTF-8
C++
false
false
705
hpp
/*============================================================================= Copyright (c) 2014 Paul Fultz II holder.h Distributed under 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) ==============================================================================*/ #ifndef BOOST_HOF_GUARD_HOLDER_H #define BOOST_HOF_GUARD_HOLDER_H namespace boost { namespace hof { namespace detail { template<class... Ts> struct holder { typedef void type; }; template<template<class...> class T> struct template_holder { typedef void type; }; }}} // namespace boost::hof #endif
326b585d2048384ac288788e97ffdde8b739084f
8f33d720272e3758886ecdb41542b7d1be7115f8
/src/operator/Projection.hpp
f85491bb31e790124134c72652493edb68c9bc22
[]
no_license
JigaoLuo/query_optimization
2af5013fcfb37351eb9085d431621c65b16d7500
52ebba7dddbe3c5e62e1b6c297baa21393e76e3d
refs/heads/master
2023-07-10T15:32:41.644985
2021-08-17T03:34:11
2021-08-17T03:34:11
397,081,462
2
1
null
null
null
null
UTF-8
C++
false
false
1,138
hpp
#ifndef H_operator_Projection #define H_operator_Projection //--------------------------------------------------------------------------- #include "operator/Operator.hpp" #include <memory> //--------------------------------------------------------------------------- /// A projection class Projection : public Operator { private: /// The input std::unique_ptr<Operator> input; /// The output std::vector<const Register*> output; public: /// Constructor Projection(std::unique_ptr<Operator>&& input,const std::vector<const Register*>& output); /// Destructor ~Projection() override; /// Open the operator void open() override; /// Get the next tuple bool next() override; /// Close the operator void close() override; void print_type() override {input->print_type(); std::cout << "Projection\n";}; void print_type_tail() override {std::cout << "Projection\n"; input->print_type_tail();}; /// Get all produced values [[nodiscard]] std::vector<const Register*> getOutput() const override; }; //--------------------------------------------------------------------------- #endif
fc1c344f3b3c38d8478af4be1012a31a953e0956
b5a9d42f7ea5e26cd82b3be2b26c324d5da79ba1
/tensorflow/lite/kernels/internal/reference/depthwiseconv_float.h
0e0787fa82965304034b8dcf56a5db0b7e6f50d0
[ "Apache-2.0" ]
permissive
uve/tensorflow
e48cb29f39ed24ee27e81afd1687960682e1fbef
e08079463bf43e5963acc41da1f57e95603f8080
refs/heads/master
2020-11-29T11:30:40.391232
2020-01-11T13:43:10
2020-01-11T13:43:10
230,088,347
0
0
Apache-2.0
2019-12-25T10:49:15
2019-12-25T10:49:14
null
UTF-8
C++
false
false
4,725
h
/* Copyright 2017 The TensorFlow Authors. 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 TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_DEPTHWISECONV_FLOAT_H_ #define TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_DEPTHWISECONV_FLOAT_H_ #include "tensorflow/lite/kernels/internal/common.h" #include "tensorflow/lite/kernels/internal/compatibility.h" #include "tensorflow/lite/kernels/internal/types.h" namespace tflite { namespace reference_ops { inline void DepthwiseConv( const DepthwiseParams& params, const RuntimeShape& input_shape, const float* input_data, const RuntimeShape& filter_shape, const float* filter_data, const RuntimeShape& bias_shape, const float* bias_data, const RuntimeShape& output_shape, float* output_data) { const int stride_width = params.stride_width; const int stride_height = params.stride_height; const int dilation_width_factor = params.dilation_width_factor; const int dilation_height_factor = params.dilation_height_factor; const int pad_width = params.padding_values.width; const int pad_height = params.padding_values.height; const int depth_multiplier = params.depth_multiplier; const float output_activation_min = params.float_activation_min; const float output_activation_max = params.float_activation_max; TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); TFLITE_DCHECK_EQ(filter_shape.DimensionsCount(), 4); TFLITE_DCHECK_EQ(output_shape.DimensionsCount(), 4); const int batches = MatchingDim(input_shape, 0, output_shape, 0); const int output_depth = MatchingDim(filter_shape, 3, output_shape, 3); const int input_height = input_shape.Dims(1); const int input_width = input_shape.Dims(2); const int input_depth = input_shape.Dims(3); const int filter_height = filter_shape.Dims(1); const int filter_width = filter_shape.Dims(2); const int output_height = output_shape.Dims(1); const int output_width = output_shape.Dims(2); TFLITE_DCHECK_EQ(output_depth, input_depth * depth_multiplier); TFLITE_DCHECK_EQ(bias_shape.FlatSize(), output_depth); for (int b = 0; b < batches; ++b) { for (int out_y = 0; out_y < output_height; ++out_y) { for (int out_x = 0; out_x < output_width; ++out_x) { for (int ic = 0; ic < input_depth; ++ic) { for (int m = 0; m < depth_multiplier; m++) { const int oc = m + ic * depth_multiplier; const int in_x_origin = (out_x * stride_width) - pad_width; const int in_y_origin = (out_y * stride_height) - pad_height; float total = 0.f; for (int filter_y = 0; filter_y < filter_height; ++filter_y) { for (int filter_x = 0; filter_x < filter_width; ++filter_x) { const int in_x = in_x_origin + dilation_width_factor * filter_x; const int in_y = in_y_origin + dilation_height_factor * filter_y; // If the location is outside the bounds of the input image, // use zero as a default value. if ((in_x >= 0) && (in_x < input_width) && (in_y >= 0) && (in_y < input_height)) { float input_value = input_data[Offset(input_shape, b, in_y, in_x, ic)]; float filter_value = filter_data[Offset( filter_shape, 0, filter_y, filter_x, oc)]; total += (input_value * filter_value); } } } float bias_value = 0.0f; if (bias_data) { bias_value = bias_data[oc]; } output_data[Offset(output_shape, b, out_y, out_x, oc)] = ActivationFunctionWithMinMax(total + bias_value, output_activation_min, output_activation_max); } } } } } } } // end namespace reference_ops } // end namespace tflite #endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_DEPTHWISECONV_FLOAT_H_
0c131ec1bb88bf0a80454af68ed7e6b973bab03f
f32d05dc32431e44c1805005b98d8b6262ebae9a
/libim/connection.h
ba01f6900fe08f9e15ccbc6758b12d15b3c9179f
[]
no_license
jogger0703/buildim
d19475801acc68125201b87fa768e2d814367a74
f99dfe9c2fee057501364c1eb08accb962b5644f
refs/heads/master
2016-09-05T12:15:34.918832
2014-09-11T09:42:05
2014-09-11T09:42:52
null
0
0
null
null
null
null
GB18030
C++
false
false
3,701
h
#ifndef ___LIBIM_CONNECTION__H__ #define ___LIBIM_CONNECTION__H__ #include "value.h" struct event; struct evbuffer; class im_account; class im_connection; typedef enum { LIBIM_CONNECTION_HTML = 0x0001, /**< Connection sends/receives in 'HTML'. */ LIBIM_CONNECTION_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive background colors. */ LIBIM_CONNECTION_AUTO_RESP = 0x0004, /**< Send auto responses when away. */ LIBIM_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */ LIBIM_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */ LIBIM_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */ LIBIM_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */ LIBIM_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */ LIBIM_CONNECTION_ALLOW_CUSTOM_SMILEY = 0x0100, /**< Connection supports sending and receiving custom smileys */ LIBIM_CONNECTION_SUPPORT_MOODS = 0x0200, /**< Connection supports setting moods */ LIBIM_CONNECTION_SUPPORT_MOOD_MESSAGES = 0x0400 /**< Connection supports setting a message on moods */ } im_connection_flags; typedef enum { LIBIM_DISCONNECTED = 0, LIBIM_CONNECTING, LIBIM_CONNECTED, } im_connection_state; typedef struct { /** * 连接处理步进 * @参考im_connection::update_progress */ void (*connect_progress)(im_connection* conn, const char* text, size_t current_step, size_t step_count); void (*connected)(im_connection* conn); void (*disconnected)(im_connection* conn); void (*notice)(im_connection* conn, const char* text); void (*network_connected)(im_connection* conn); void (*network_disconnected)(im_connection* conn); void (*report_disconnect)(im_connection *conn, const char *text); void (*network_error)(im_connection* conn, int err); } im_connection_ui_ops; class im_connection { public: im_account* _account; im_connection_flags _flags; im_connection_state _state; void* _proto_data; char* _password; std::string _host; std::string _serv; // port or serv name bool _quit; __int32 _fd; // libevent 计时器,可用于发送心跳包 struct event *_timer; // 读事件 struct event *_re; // 写事件 struct event *_we; // 读缓冲区,待读取 struct evbuffer *_in; // 写缓冲区,待发送 struct evbuffer *_out; static void init(void); static void uninit(void); static void set_ui_ops(im_connection_ui_ops* ops); static im_connection_ui_ops* get_ui_ops(void); void set_keep_alive_idle(int second); void set_account(im_account* account); /** * 刷新处理步进 * @text 单步中附带的信息,例如“正在获取权限” “正在同步用户状态” * @current_step 当前步进 * @step_count 总步进 */ void update_progress(const char *text, size_t step, size_t count); /** * 通知上层,连接的信息 */ void notice(const char* text); void error_occured(const char* reason); void connect(const char* host, const char* serv); void disconnect(void); int write(const char* buf, int len); int read(char* buf, int max_len); int peek(char* buf, int max_len); /** * 执行阻塞的libevent事件循环。 * 当libevent中有敏感的事件发生时候,会自动调用设置的回调 * 这个动作会导致另起一个额外的线程执行libevent的dispatch * 而且全部的链接共享这一个线程 */ static void dispatch(void); static void exit_dispatch(void); }; #endif
8a991e7d288f921fe34e168f9c6ea7034a29849e
9e3e89f5b65ba54ce50e95f0ca139737172acd11
/week 2/bai C.2.9.cpp
ab1e53eb4909ab5c40c4920ceace28ba789c1387
[]
no_license
DinhThanh-20021582/All-Labs
88a0a3c06b034c0afc26f52a8511912032c3ad1c
4d9c6b9415a31d61faf1529a4ba8c710ed1982b3
refs/heads/main
2023-05-09T12:15:00.492556
2021-05-29T06:57:58
2021-05-29T06:57:58
371,321,858
0
0
null
null
null
null
UTF-8
C++
false
false
341
cpp
#include<iostream> using namespace std; int main() { int a; cout << "Nhap vao 1 so bat ki: "; cin >> a; int sum=0,d; while(a>0) { d=a%10; a=a/10; sum=sum+d; } cout << "Tong cac chu so cua so ban da nhap la: "; cout << sum; return 0; }
a8d5b324286ebdd49ca516d852c9019a6f96ddd8
b197982a06f9275d3ab21e47a270cc4de83c916e
/generated/FSCTL_PIPE_PEEK_request.cpp
0e0d6b113dfc85d9eb60da16c779d80ce9ad23f9
[]
no_license
shashanksingh/Code-Generator-for-RDP
d0f88e8ad9b7f0da9a17210b9908e8f4b2f20820
3919b20672a68d99cea5b07d159a60fb200efe41
refs/heads/master
2021-03-12T19:35:39.373928
2012-01-22T15:51:11
2012-01-22T15:51:11
3,240,273
5
2
null
null
null
null
UTF-8
C++
false
false
685
cpp
/* * ===================================================================================== * * Filename: FSCTL_PIPE_PEEK_request.cpp * * Version: 1.0 * Created: 25/06/2011 06:54:53 PM * Revision: none * Compiler: gcc * * Author: * Company: Devon IT * * ===================================================================================== */ #include "FSCTL_PIPE_PEEK_request.h" FSCTL_PIPE_PEEK_request::FSCTL_PIPE_PEEK_request() { } FSCTL_PIPE_PEEK_request::~FSCTL_PIPE_PEEK_request() { } void FSCTL_PIPE_PEEK_request::parse(const QByteArray & packet) { } QByteArray FSCTL_PIPE_PEEK_request::getBytes() { }
e0970ecaf1da93061a4752df2b0f6da73f3947d1
23caa38e9d9c9d044d213b3816b5f411c5f8d324
/Scrabble/Scrabble/tile.h
20cc8508bed233629595e08d6f15edd781aab6b8
[]
no_license
keanedawg/ScrabblePlusPlus
f9b937cbef76bd257754fe9c5bcbd7c0c5204bec
e2e7b814f8adec8cc0222f57e696d605b8e57ac1
refs/heads/master
2021-09-24T08:44:16.181905
2018-10-05T23:25:01
2018-10-05T23:25:01
107,488,740
0
0
null
null
null
null
UTF-8
C++
false
false
553
h
#pragma once class Tile { public: Tile() : type(' '), letter(' ') {} Tile(char type) : type(type), letter(' ') {} Tile(char type, char letter) : type(type), letter(letter) {} inline bool isEmpty() { return letter == ' '; } // does it have a letter on it? inline void addLetter(char letter) { this->letter = letter; }; inline char getLetter() { return letter; } inline char getType() { return type; } char print(); private: char type; // Is it a normal tile, 4x word, 3x letter? char letter; // The letter on it, set to ' ' by default. };
7b86f5942b72550bb1044fe0d0e0caa4d0d41545
5885fd1418db54cc4b699c809cd44e625f7e23fc
/codeforces/1506/c.cpp
3d544bfc174f962f5be4eebe6ee0dfff8e17ff90
[]
no_license
ehnryx/acm
c5f294a2e287a6d7003c61ee134696b2a11e9f3b
c706120236a3e55ba2aea10fb5c3daa5c1055118
refs/heads/master
2023-08-31T13:19:49.707328
2023-08-29T01:49:32
2023-08-29T01:49:32
131,941,068
2
0
null
null
null
null
UTF-8
C++
false
false
638
cpp
#include <bits/stdc++.h> using namespace std; constexpr char nl = '\n'; using ll = long long; int T = -1; int main() { if(T < 0) { cin.tie(0)->sync_with_stdio(0); cin >> T; } if(--T) main(); string a, b; cin >> a >> b; unordered_set<string> sub_b; for(int i=0; i<size(b); i++) { for(int j=0; i+j<size(b); j++) { sub_b.insert(b.substr(i, j+1)); } } int ans = size(a) + size(b); for(int i=0; i<size(a); i++) { for(int j=0; i+j<size(a); j++) { if(sub_b.count(a.substr(i, j+1))) { ans = min(ans, (int)(size(a) + size(b)) - 2 * (j+1)); } } } cout << ans << nl; return 0; }
e100e96080030581e9ee3f4a660987790cee073c
b3f6daa5d6c987eb8a61d5fe125bf2a98997e259
/8kyu/Convert a Boolean to a String/test.cpp
731a35b45273699418060487807c3279049425cc
[]
no_license
krnets/codewars-practice
53a0a6c9d2d8c2b94d6799a12f48dd588179a5ce
5f8e1cc1aebd900b9e5a276884419fc3e1ddef24
refs/heads/master
2022-12-20T19:33:43.337581
2022-12-16T05:32:39
2022-12-16T05:32:39
217,464,785
1
0
null
2020-07-20T08:36:31
2019-10-25T06:20:41
JavaScript
UTF-8
C++
false
false
352
cpp
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "../../doctest.h" #include "solve.cpp" TEST_CASE("testing boolean_to_string_method") { SUBCASE("basic_tests") { CHECK(boolean_to_string(true) == "true"); CHECK(boolean_to_string(false) == "false"); CHECK(boolean_to_string(false) == "false"); CHECK(boolean_to_string(true) == "true"); } }
be19939713f9fb6ec3ff3fb41fb55d906b8bd9a0
9bcf60bc15e35962b9e9ef65c25f356daf85319e
/interface/HgcalTupleMaker_PFCandProducer.h
b505fb2875728cf6162d100ee05238bb141a5e92
[]
no_license
edmundaberry/HgcalTupleMaker
6267f12106bf3672b08089be29bb88f3fd5eaee2
17da9b513582f476d88719bfcc2e581ca5b5909e
refs/heads/master
2021-01-01T16:18:57.250471
2015-03-22T15:46:12
2015-03-22T15:46:12
23,188,152
0
0
null
null
null
null
UTF-8
C++
false
false
527
h
#ifndef HgcalTupleMaker_PFCandProducer_h #define HgcalTupleMaker_PFCandProducer_h #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/InputTag.h" class HgcalTupleMaker_PFCandProducer : public edm::EDProducer { public: explicit HgcalTupleMaker_PFCandProducer(const edm::ParameterSet&); private: void produce( edm::Event &, const edm::EventSetup & ); const edm::InputTag rawInputTag; const unsigned int maxSize; }; #endif
a701a096d1138539a1deda971113602d29647abb
29fe10a10c25f0c4396cfee7d285bd1c7a057b59
/src/client.cpp
25318e2c22cd8b0d59aa3d21074766dc8bcda42b
[]
no_license
skyformat99/mongopp
7a00828d3543596fe1257c112d7063caf26f3d3f
3de932eb0461ad16966ea56bdb7aeb25c6f0a6d1
refs/heads/master
2020-12-24T19:27:46.190344
2014-07-16T01:50:00
2014-07-16T01:50:00
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,648
cpp
#include <algorithm> #include <mongoc.h> #include <string> #include "client.hpp" #include "collection.hpp" #include "database.hpp" #include "document.hpp" #include "element.hpp" using namespace std; namespace mongo { Client::Client() : client_(NULL) { } Client::Client(const string &uri) { uri_ = uri; client_ = mongoc_client_new(uri_.c_str()); wc_ = mongoc_write_concern_new(); } Client::Client(const Client &rhs) { client_ = rhs.client_; uri_ = rhs.uri_; wc_ = rhs.wc_; } Client::~Client() { mongoc_write_concern_destroy(wc_); mongoc_client_destroy(client_); } bool Client::setWriteConcern(const Document &wc) { bool isValid = false; for (auto e = wc.elements_.begin(); e != wc.elements_.end(); ++e) { string fieldName = e->first; transform(fieldName.begin(), fieldName.end(), fieldName.begin(), ::tolower); if (fieldName == "w") { if (e->second->isString()) { string val = e->second->str(); transform(val.begin(), val.end(), val.begin(), ::tolower); if (val == "majority") { mongoc_write_concern_set_w(wc_, MONGOC_WRITE_CONCERN_W_MAJORITY); isValid = true; } else return false; } else if (e->second->isInt()) { mongoc_write_concern_set_w(wc_, e->second->int32()); isValid = true; } else return false; } else if (fieldName == "fsync") { mongoc_write_concern_set_fsync(wc_, true); isValid = true; } else if (fieldName == "j" || fieldName == "journal") { mongoc_write_concern_set_journal(wc_, true); isValid = true; } else return false; } if (isValid) { mongoc_client_set_write_concern(client_, wc_); return true; } return false; } // bool Client::setReadPreference(const Document &pref) { // } // Document Client::getReadPreference() { // } // Document Client::getServerStatus() { // } Collection Client::getCollection(const string &db, const string &col) const { return Collection(mongoc_client_get_collection(client_, db.c_str(), col.c_str())); } Database Client::getDatabase(const string &db) const { return Database(mongoc_client_get_database(client_, db.c_str())); } }
6b23083626911dd73013edd00eb5e9a6648ebe3a
39bb755b1a4b46d5a5c65373be2eb02759509229
/src/bind_test.cpp
6ae05cc4cfd0bd914ffbda1153b2c9cbe3ca48b3
[]
no_license
panshengli/cpp_practice
b16b2aca275e53a9902e2f01e4198a11e3df6c8e
3d30ca3121b328f40adb7daaa8d8913fc0fd91d8
refs/heads/master
2023-06-14T02:54:43.933899
2021-07-12T13:59:33
2021-07-12T13:59:33
259,030,078
3
0
null
null
null
null
UTF-8
C++
false
false
455
cpp
#include <iostream> // std::cout #include <functional> // std::bind int fun(int a, int b,int c,int d,int e) { return a + b + c + d - e; } int main() { int x=1,y=2,z=3; auto g1 = std::bind(fun,x,y,std::placeholders::_2,z,std::placeholders::_1); std::cout << "g1: " << g1(2,3)<<std::endl; auto g2 = std::bind(fun,x,y,std::placeholders::_1,z,std::placeholders::_2); std::cout << "g2: " << g2(2,3)<<std::endl; return 0; }
5523c2235a6e3093939c6c4a3806a39d1554ff43
09ff4c9c5d219096bc4b90d23b75636b9d616559
/Practica_3_final/archivos.cpp
f8ab3962a4a5952e5647f5a91ae738347791d4df
[]
no_license
JorgeMountain/Practica3
1aafe89a5ef29a273d39ea8432e68c72a943996a
e02ce42ee23c8c789e196bdab00eb7070b6206db
refs/heads/master
2023-01-06T20:16:21.431544
2020-10-31T10:30:00
2020-10-31T10:30:00
308,856,812
0
0
null
null
null
null
UTF-8
C++
false
false
3,065
cpp
#include "Archivos.h" void escribir_txt(string name, string data){ fstream k(name, fstream::out | fstream::binary); //k<<data k.write(data.c_str(), data.length()); k.close(); } string leer_txt(string name){ long long int tam; string data; fstream k(name, fstream::in | fstream::ate | fstream::binary); if(k.is_open()){ tam=k.tellg(); k.seekg(0); for(long long int i=0;i<tam; i++) data.push_back(k.get()); } else cout<<"El archivo de texto no existe"<<endl; k.close(); return data; } bool verificar_admin(string archivo, string clave_ingresado){ string clave_confirmar; bool valid=false; for (unsigned int i=0; i<archivo.length(); i++){ for (;archivo[i] != '\n';i++){ clave_confirmar.push_back(archivo[i]); } } if (clave_confirmar==clave_ingresado){ cout << "Bienvenido, administrador" << endl; valid=true; } else{ clave_confirmar.clear(); } return valid; } void modificar_archivos(string archivo,string cedula, string clave, string saldo2){ string clave_ori, cedula_ori, archivo_new, saldo; for (unsigned int i=0; i<archivo.length(); i++){ for (;archivo[i]!=',';i++){ cedula_ori.push_back(archivo[i]); } for (i++;archivo[i] !=',';i++){ clave_ori.push_back(archivo[i]); } for (i++;archivo[i] !='\n';i++){ saldo.push_back(archivo[i]); } if (cedula==clave_ori && clave==clave_ori){ archivo_new = archivo_new + cedula + "," + clave + "," + saldo2 + "\n"; clave_ori.clear(); cedula_ori.clear(); saldo.clear(); } else{ archivo_new = archivo_new + cedula_ori + "," + clave_ori + "," + saldo + "\n"; clave_ori.clear(); cedula_ori.clear(); saldo.clear(); } } /* ofstream guardar; guardar.open("InfoUsr.txt",ios::app); guardar <<archivo_new<<endl; */ escribir_txt("InfoUsr.txt", archivo_new); } string verificar_saldo(string saldo){ cout << "Descontamos 1000$ de su saldo activo por la revision"<< endl; long int saldoint; saldoint=atoi(saldo.c_str()); saldoint -= 1000; cout << "Su saldo es de: " << saldoint << endl; saldo = to_string(saldoint); return saldo; } string retirar_saldo(string saldo){ cout << "Descontamos 1000$ de su saldo activo por el retiro"<< endl; ifstream leer; ofstream guardar; guardar.open("InfoUsr.txt",ios::app); long int saldoint, retiro; saldoint=atoi(saldo.c_str()); saldoint = saldoint - 1000; cout << "Su saldo es de: " << saldoint << endl; cout<<"Ingrese la cantidad de dinero que desea retirar"<<endl; cin >>retiro; while (retiro > saldoint){ cout<<"La cantidad ingresada es mayor a su saldo"<<endl; cout<<"Ingrese la cantidad de dinero que desea retirar"<<endl; cin >>retiro; } saldoint = saldoint - retiro; saldo = to_string(saldoint); guardar << saldo; return saldo; }
241674121921fae2b24080bc8206e85461c28051
23e7350754a7e7c00bdbede88082f08f08907f57
/LC_t/knapsck.cpp
3022c74e6645c9f61bcd12cd80c69d4668e952e1
[]
no_license
XA-IT/JianZhi_Offer
9953ab54b6317438075fc3340010437b6232d634
c3448471f87dc13b22f4f711ef4f541841808792
refs/heads/master
2022-09-26T21:59:58.715561
2022-09-18T07:28:09
2022-09-18T07:28:09
162,817,558
0
1
null
2020-06-26T12:56:24
2018-12-22T14:24:44
C++
UTF-8
C++
false
false
1,531
cpp
#include "public_utils/public_utils.h" /* for 状态1 in 状态1的所有取值: for 状态2 in 状态2的所有取值: for ... dp[状态1][状态2][...] = 择优(选择1,选择2...) */ class solution_knapsack { public: int knapsack(vector<int> &weights, vector<int> &val, int n, int w) { vector<vector<int>> dp(n, vector<int> (w + 1, -1)); if (weights[0] < w) { dp[0][weights[0]] = val[0]; } for (int i = 1; i < n; i++) { for (int j = 0; j <= w; j++) { if (dp[i - 1][j] >= 0) { dp[i][j] = dp[i - 1][j]; } } for (int j = 0; j <= w - weights[i]; j++) { int curVal = dp[i - 1][j] + weights[i]; if (curVal > dp[i][j]) { dp[i][j] = curVal; } } } int ret = -1; for (int i = w; i >= 0; i--) { ret = max(ret, dp[n - 1][i]); } return ret; } }; int main() { // weight vector<vector<int>> weights = {{2, 2, 4, 6, 3}}; // value vector<vector<int>> vals = {{3, 4, 8, 9, 6}}; vector<int> ns = {5}; vector<int> weis = {9}; solution_knapsack sol; for (int i = 0; i < weights.size(); i++) { auto ret = sol.knapsack(weights[i], vals[i], ns[i], weis[i]); cout << "test " << i << " " << ret << endl; } return 0; }
90b8bb9e00298c1727c7f18e310d76d89b162a4b
9fa363c042e4f7ba31d75f9535acb6dca69e79cb
/LCBCAdminSystem/projectDataSet.h
9dad8d010e110df6ddd9ddc47497c08820a15e25
[]
no_license
andreboyce/lcbcadminsystem
f30914132fdd100fa1e879b6f2648879a4f02b9f
425af46bc3324289d23135f28f6ef6d8c702ba04
refs/heads/main
2023-03-14T15:34:08.496230
2021-03-11T11:10:49
2021-03-11T11:10:49
346,674,135
0
0
null
null
null
null
UTF-8
C++
false
false
477,920
h
#pragma once #using <mscorlib.dll> #using <System.dll> #using <System.Data.dll> #using <System.Xml.dll> #using <System.Data.dll> using namespace System::Security::Permissions; [assembly:SecurityPermissionAttribute(SecurityAction::RequestMinimum, SkipVerification=false)]; // // This source code was auto-generated by xsd, Version=2.0.50727.42. // namespace LCBCAdminRegistrationSystem { using namespace System; using namespace System; ref class projectDataSet; [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), Serializable, System::ComponentModel::DesignerCategoryAttribute(L"code"), System::ComponentModel::ToolboxItem(true), System::Xml::Serialization::XmlSchemaProviderAttribute(L"GetTypedDataSetSchema"), System::Xml::Serialization::XmlRootAttribute(L"projectDataSet"), System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.DataSet")] public ref class projectDataSet : public System::Data::DataSet { public : ref class ElderDataTable; public : ref class EmployerDataTable; public : ref class Grade_PointDataTable; public : ref class Parent_or_GuardianDataTable; public : ref class StudentDataTable; public : ref class ElderRow; public : ref class EmployerRow; public : ref class Grade_PointRow; public : ref class Parent_or_GuardianRow; public : ref class StudentRow; public : ref class ElderRowChangeEvent; public : ref class EmployerRowChangeEvent; public : ref class Grade_PointRowChangeEvent; public : ref class Parent_or_GuardianRowChangeEvent; public : ref class StudentRowChangeEvent; private: LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ tableElder; private: LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ tableEmployer; private: LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ tableGrade_Point; private: LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ tableParent_or_Guardian; private: LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ tableStudent; private: System::Data::DataRelation^ relationReference; private: System::Data::DataRelation^ relationReference1; private: System::Data::DataRelation^ relationReference2; private: System::Data::SchemaSerializationMode _schemaSerializationMode; public : delegate System::Void ElderRowChangeEventHandler(System::Object^ sender, LCBCAdminRegistrationSystem::projectDataSet::ElderRowChangeEvent^ e); public : delegate System::Void EmployerRowChangeEventHandler(System::Object^ sender, LCBCAdminRegistrationSystem::projectDataSet::EmployerRowChangeEvent^ e); public : delegate System::Void Grade_PointRowChangeEventHandler(System::Object^ sender, LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRowChangeEvent^ e); public : delegate System::Void Parent_or_GuardianRowChangeEventHandler(System::Object^ sender, LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRowChangeEvent^ e); public : delegate System::Void StudentRowChangeEventHandler(System::Object^ sender, LCBCAdminRegistrationSystem::projectDataSet::StudentRowChangeEvent^ e); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] projectDataSet(); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] projectDataSet(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context); public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false), System::ComponentModel::DesignerSerializationVisibility(System::ComponentModel::DesignerSerializationVisibility::Content)] property LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ Elder { LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false), System::ComponentModel::DesignerSerializationVisibility(System::ComponentModel::DesignerSerializationVisibility::Content)] property LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ Employer { LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false), System::ComponentModel::DesignerSerializationVisibility(System::ComponentModel::DesignerSerializationVisibility::Content)] property LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ Grade_Point { LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false), System::ComponentModel::DesignerSerializationVisibility(System::ComponentModel::DesignerSerializationVisibility::Content)] property LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ Parent_or_Guardian { LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false), System::ComponentModel::DesignerSerializationVisibility(System::ComponentModel::DesignerSerializationVisibility::Content)] property LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ Student { LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::BrowsableAttribute(true), System::ComponentModel::DesignerSerializationVisibilityAttribute(System::ComponentModel::DesignerSerializationVisibility::Visible)] virtual property System::Data::SchemaSerializationMode SchemaSerializationMode { System::Data::SchemaSerializationMode get() override; System::Void set(System::Data::SchemaSerializationMode value) override; } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::DesignerSerializationVisibilityAttribute(System::ComponentModel::DesignerSerializationVisibility::Hidden)] property System::Data::DataTableCollection^ Tables { System::Data::DataTableCollection^ get() new; } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::DesignerSerializationVisibilityAttribute(System::ComponentModel::DesignerSerializationVisibility::Hidden)] property System::Data::DataRelationCollection^ Relations { System::Data::DataRelationCollection^ get() new; } protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void InitializeDerivedDataSet() override; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataSet^ Clone() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Boolean ShouldSerializeTables() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Boolean ShouldSerializeRelations() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void ReadXmlSerializable(System::Xml::XmlReader^ reader) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Xml::Schema::XmlSchema^ GetSchemaSerializable() override; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitVars(); internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitVars(System::Boolean initTable); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitClass(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean ShouldSerializeElder(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean ShouldSerializeEmployer(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean ShouldSerializeGrade_Point(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean ShouldSerializeParent_or_Guardian(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean ShouldSerializeStudent(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SchemaChanged(System::Object^ sender, System::ComponentModel::CollectionChangeEventArgs^ e); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] static System::Xml::Schema::XmlSchemaComplexType^ GetTypedDataSetSchema(System::Xml::Schema::XmlSchemaSet^ xs); public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::Serializable, System::Xml::Serialization::XmlSchemaProviderAttribute(L"GetTypedTableSchema")] ref class ElderDataTable : public System::Data::DataTable, public System::Collections::IEnumerable { private: System::Data::DataColumn^ columnID; private: System::Data::DataColumn^ columnName; private: System::Data::DataColumn^ columnAddress; private: System::Data::DataColumn^ columnTelephone_Number; private: System::Data::DataColumn^ columnChurch; private: System::Data::DataColumn^ columnPosition; public: event LCBCAdminRegistrationSystem::projectDataSet::ElderRowChangeEventHandler^ ElderRowChanging; public: event LCBCAdminRegistrationSystem::projectDataSet::ElderRowChangeEventHandler^ ElderRowChanged; public: event LCBCAdminRegistrationSystem::projectDataSet::ElderRowChangeEventHandler^ ElderRowDeleting; public: event LCBCAdminRegistrationSystem::projectDataSet::ElderRowChangeEventHandler^ ElderRowDeleted; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] ElderDataTable(); internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] ElderDataTable(System::Data::DataTable^ table); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] ElderDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ IDColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ NameColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ AddressColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Telephone_NumberColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ ChurchColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ PositionColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false)] property System::Int32 Count { System::Int32 get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ default [System::Int32 ] { LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ get(System::Int32 index); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void AddElderRow(LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ AddElderRow(System::String^ Name, System::String^ Address, System::Int32 Telephone_Number, System::String^ Church, System::String^ Position); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ FindByID(System::Int32 ID); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Collections::IEnumerator^ GetEnumerator(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ Clone() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ CreateInstance() override; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitVars(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitClass(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ NewElderRow(); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataRow^ NewRowFromBuilder(System::Data::DataRowBuilder^ builder) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Type^ GetRowType() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanged(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanging(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) override; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void RemoveElderRow(LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] static System::Xml::Schema::XmlSchemaComplexType^ GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::Serializable, System::Xml::Serialization::XmlSchemaProviderAttribute(L"GetTypedTableSchema")] ref class EmployerDataTable : public System::Data::DataTable, public System::Collections::IEnumerable { private: System::Data::DataColumn^ columnID; private: System::Data::DataColumn^ columnFirst_Name; private: System::Data::DataColumn^ columnLast_Name; private: System::Data::DataColumn^ columnTelephone_Number; private: System::Data::DataColumn^ columnAddress; public: event LCBCAdminRegistrationSystem::projectDataSet::EmployerRowChangeEventHandler^ EmployerRowChanging; public: event LCBCAdminRegistrationSystem::projectDataSet::EmployerRowChangeEventHandler^ EmployerRowChanged; public: event LCBCAdminRegistrationSystem::projectDataSet::EmployerRowChangeEventHandler^ EmployerRowDeleting; public: event LCBCAdminRegistrationSystem::projectDataSet::EmployerRowChangeEventHandler^ EmployerRowDeleted; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] EmployerDataTable(); internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] EmployerDataTable(System::Data::DataTable^ table); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] EmployerDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ IDColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ First_NameColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Last_NameColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Telephone_NumberColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ AddressColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false)] property System::Int32 Count { System::Int32 get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ default [System::Int32 ] { LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ get(System::Int32 index); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void AddEmployerRow(LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ AddEmployerRow(System::String^ First_Name, System::String^ Last_Name, System::Int32 Telephone_Number, System::String^ Address); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ FindByID(System::Int32 ID); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Collections::IEnumerator^ GetEnumerator(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ Clone() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ CreateInstance() override; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitVars(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitClass(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ NewEmployerRow(); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataRow^ NewRowFromBuilder(System::Data::DataRowBuilder^ builder) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Type^ GetRowType() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanged(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanging(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) override; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void RemoveEmployerRow(LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] static System::Xml::Schema::XmlSchemaComplexType^ GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::Serializable, System::Xml::Serialization::XmlSchemaProviderAttribute(L"GetTypedTableSchema")] ref class Grade_PointDataTable : public System::Data::DataTable, public System::Collections::IEnumerable { private: System::Data::DataColumn^ columnID; private: System::Data::DataColumn^ columnGrade; private: System::Data::DataColumn^ columnUpper_Range; private: System::Data::DataColumn^ columnLower_Range; private: System::Data::DataColumn^ columnGrade_Point; public: event LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRowChangeEventHandler^ Grade_PointRowChanging; public: event LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRowChangeEventHandler^ Grade_PointRowChanged; public: event LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRowChangeEventHandler^ Grade_PointRowDeleting; public: event LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRowChangeEventHandler^ Grade_PointRowDeleted; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] Grade_PointDataTable(); internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] Grade_PointDataTable(System::Data::DataTable^ table); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] Grade_PointDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ IDColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ GradeColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Upper_RangeColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Lower_RangeColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Grade_PointColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false)] property System::Int32 Count { System::Int32 get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ default [System::Int32 ] { LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ get(System::Int32 index); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void AddGrade_PointRow(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ AddGrade_PointRow(System::String^ Grade, System::Int32 Upper_Range, System::Int32 Lower_Range, System::Int32 Grade_Point); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ FindByID(System::Int32 ID); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Collections::IEnumerator^ GetEnumerator(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ Clone() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ CreateInstance() override; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitVars(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitClass(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ NewGrade_PointRow(); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataRow^ NewRowFromBuilder(System::Data::DataRowBuilder^ builder) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Type^ GetRowType() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanged(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanging(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) override; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void RemoveGrade_PointRow(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] static System::Xml::Schema::XmlSchemaComplexType^ GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::Serializable, System::Xml::Serialization::XmlSchemaProviderAttribute(L"GetTypedTableSchema")] ref class Parent_or_GuardianDataTable : public System::Data::DataTable, public System::Collections::IEnumerable { private: System::Data::DataColumn^ columnID; private: System::Data::DataColumn^ columnFirst_Name; private: System::Data::DataColumn^ columnLast_Name; private: System::Data::DataColumn^ columnAddress; private: System::Data::DataColumn^ columnOccupation; private: System::Data::DataColumn^ columnTelephone_Number; public: event LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRowChangeEventHandler^ Parent_or_GuardianRowChanging; public: event LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRowChangeEventHandler^ Parent_or_GuardianRowChanged; public: event LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRowChangeEventHandler^ Parent_or_GuardianRowDeleting; public: event LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRowChangeEventHandler^ Parent_or_GuardianRowDeleted; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] Parent_or_GuardianDataTable(); internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] Parent_or_GuardianDataTable(System::Data::DataTable^ table); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] Parent_or_GuardianDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ IDColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ First_NameColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Last_NameColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ AddressColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ OccupationColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Telephone_NumberColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false)] property System::Int32 Count { System::Int32 get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ default [System::Int32 ] { LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ get(System::Int32 index); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void AddParent_or_GuardianRow(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ AddParent_or_GuardianRow(System::String^ First_Name, System::String^ Last_Name, System::String^ Address, System::String^ Occupation, System::Int32 Telephone_Number); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ FindByID(System::Int32 ID); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Collections::IEnumerator^ GetEnumerator(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ Clone() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ CreateInstance() override; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitVars(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitClass(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ NewParent_or_GuardianRow(); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataRow^ NewRowFromBuilder(System::Data::DataRowBuilder^ builder) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Type^ GetRowType() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanged(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanging(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) override; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void RemoveParent_or_GuardianRow(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] static System::Xml::Schema::XmlSchemaComplexType^ GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::Serializable, System::Xml::Serialization::XmlSchemaProviderAttribute(L"GetTypedTableSchema")] ref class StudentDataTable : public System::Data::DataTable, public System::Collections::IEnumerable { private: System::Data::DataColumn^ columnID; private: System::Data::DataColumn^ columnFirst_Name; private: System::Data::DataColumn^ columnMiddle_Names; private: System::Data::DataColumn^ columnLast_Name; private: System::Data::DataColumn^ columnAddress; private: System::Data::DataColumn^ columnSex; private: System::Data::DataColumn^ columnApplication_Date; private: System::Data::DataColumn^ columnDate_of_Birth; private: System::Data::DataColumn^ columnPlace_of_Birth; private: System::Data::DataColumn^ _columnParent_Guardian; private: System::Data::DataColumn^ columnYounger_Siblings; private: System::Data::DataColumn^ columnOlder_Siblings; private: System::Data::DataColumn^ columnBaptised; private: System::Data::DataColumn^ columnDate_of_Baptism; private: System::Data::DataColumn^ columnAttended_High_School; private: System::Data::DataColumn^ columnName_of_High_School; private: System::Data::DataColumn^ columnAddress_of_High_School; private: System::Data::DataColumn^ columnMinisters_Name; private: System::Data::DataColumn^ columnMinisters_Address; private: System::Data::DataColumn^ columnChristian_Work_Performed; private: System::Data::DataColumn^ columnElder_1; private: System::Data::DataColumn^ columnElder_2; private: System::Data::DataColumn^ columnEmployer_1; private: System::Data::DataColumn^ columnEmployer_2; public: event LCBCAdminRegistrationSystem::projectDataSet::StudentRowChangeEventHandler^ StudentRowChanging; public: event LCBCAdminRegistrationSystem::projectDataSet::StudentRowChangeEventHandler^ StudentRowChanged; public: event LCBCAdminRegistrationSystem::projectDataSet::StudentRowChangeEventHandler^ StudentRowDeleting; public: event LCBCAdminRegistrationSystem::projectDataSet::StudentRowChangeEventHandler^ StudentRowDeleted; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] StudentDataTable(); internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] StudentDataTable(System::Data::DataTable^ table); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] StudentDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ IDColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ First_NameColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Middle_NamesColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Last_NameColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ AddressColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ SexColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Application_DateColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Date_of_BirthColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Place_of_BirthColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ _Parent_GuardianColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Younger_SiblingsColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Older_SiblingsColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ BaptisedColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Date_of_BaptismColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Attended_High_SchoolColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Name_of_High_SchoolColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Address_of_High_SchoolColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Ministers_NameColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Ministers_AddressColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Christian_Work_PerformedColumn { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Elder_1Column { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Elder_2Column { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Employer_1Column { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataColumn^ Employer_2Column { System::Data::DataColumn^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute, System::ComponentModel::Browsable(false)] property System::Int32 Count { System::Int32 get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ default [System::Int32 ] { LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ get(System::Int32 index); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void AddStudentRow(LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ AddStudentRow( System::String^ First_Name, System::String^ Middle_Names, System::String^ Last_Name, System::String^ Address, System::String^ Sex, System::DateTime Application_Date, System::DateTime Date_of_Birth, System::String^ Place_of_Birth, LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ parentParent_or_GuardianRowByReference, System::Int32 Younger_Siblings, System::Int32 Older_Siblings, System::Boolean Baptised, System::DateTime Date_of_Baptism, System::Boolean Attended_High_School, System::String^ Name_of_High_School, System::String^ Address_of_High_School, System::String^ Ministers_Name, System::String^ Ministers_Address, System::String^ Christian_Work_Performed, LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ parentElderRowByReference1, System::Int32 Elder_2, System::Int32 Employer_1, LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ parentEmployerRowByReference2); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ FindByID(System::Int32 ID); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Collections::IEnumerator^ GetEnumerator(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ Clone() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataTable^ CreateInstance() override; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitVars(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitClass(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ NewStudentRow(); protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Data::DataRow^ NewRowFromBuilder(System::Data::DataRowBuilder^ builder) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Type^ GetRowType() override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanged(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowChanging(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) override; protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] virtual System::Void OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) override; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void RemoveStudentRow(LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ row); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] static System::Xml::Schema::XmlSchemaComplexType^ GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class ElderRow : public System::Data::DataRow { private: LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ tableElder; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] ElderRow(System::Data::DataRowBuilder^ rb); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 ID { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Name { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Address { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Telephone_Number { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Church { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Position { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsNameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetNameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsAddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetAddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsTelephone_NumberNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetTelephone_NumberNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsChurchNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetChurchNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsPositionNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetPositionNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] cli::array< LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >^ GetStudentRows(); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class EmployerRow : public System::Data::DataRow { private: LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ tableEmployer; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] EmployerRow(System::Data::DataRowBuilder^ rb); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 ID { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ First_Name { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Last_Name { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Telephone_Number { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Address { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsFirst_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetFirst_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsLast_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetLast_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsTelephone_NumberNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetTelephone_NumberNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsAddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetAddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] cli::array< LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >^ GetStudentRows(); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class Grade_PointRow : public System::Data::DataRow { private: LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ tableGrade_Point; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] Grade_PointRow(System::Data::DataRowBuilder^ rb); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 ID { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Grade { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Upper_Range { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Lower_Range { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Grade_Point { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsGradeNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetGradeNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsUpper_RangeNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetUpper_RangeNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsLower_RangeNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetLower_RangeNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsGrade_PointNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetGrade_PointNull(); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class Parent_or_GuardianRow : public System::Data::DataRow { private: LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ tableParent_or_Guardian; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] Parent_or_GuardianRow(System::Data::DataRowBuilder^ rb); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 ID { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ First_Name { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Last_Name { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Address { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Occupation { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Telephone_Number { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsFirst_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetFirst_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsLast_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetLast_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsAddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetAddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsOccupationNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetOccupationNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsTelephone_NumberNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetTelephone_NumberNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] cli::array< LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >^ GetStudentRows(); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class StudentRow : public System::Data::DataRow { private: LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ tableStudent; internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] StudentRow(System::Data::DataRowBuilder^ rb); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 ID { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ First_Name { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Middle_Names { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Last_Name { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Address { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Sex { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::DateTime Application_Date { System::DateTime get(); System::Void set(System::DateTime value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::DateTime Date_of_Birth { System::DateTime get(); System::Void set(System::DateTime value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Place_of_Birth { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 _Parent_Guardian { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Younger_Siblings { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Older_Siblings { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Boolean Baptised { System::Boolean get(); System::Void set(System::Boolean value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::DateTime Date_of_Baptism { System::DateTime get(); System::Void set(System::DateTime value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Boolean Attended_High_School { System::Boolean get(); System::Void set(System::Boolean value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Name_of_High_School { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Address_of_High_School { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Ministers_Name { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Ministers_Address { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::String^ Christian_Work_Performed { System::String^ get(); System::Void set(System::String^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Elder_1 { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Elder_2 { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Employer_1 { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Int32 Employer_2 { System::Int32 get(); System::Void set(System::Int32 value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ Parent_or_GuardianRow { LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ get(); System::Void set(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ ElderRow { LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ get(); System::Void set(LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ EmployerRow { LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ get(); System::Void set(LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ value); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsFirst_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetFirst_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsMiddle_NamesNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetMiddle_NamesNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsLast_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetLast_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsAddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetAddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsSexNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetSexNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsApplication_DateNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetApplication_DateNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsDate_of_BirthNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetDate_of_BirthNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsPlace_of_BirthNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetPlace_of_BirthNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean Is_Parent_GuardianNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void Set_Parent_GuardianNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsYounger_SiblingsNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetYounger_SiblingsNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsOlder_SiblingsNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetOlder_SiblingsNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsBaptisedNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetBaptisedNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsDate_of_BaptismNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetDate_of_BaptismNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsAttended_High_SchoolNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetAttended_High_SchoolNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsName_of_High_SchoolNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetName_of_High_SchoolNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsAddress_of_High_SchoolNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetAddress_of_High_SchoolNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsMinisters_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetMinisters_NameNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsMinisters_AddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetMinisters_AddressNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsChristian_Work_PerformedNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetChristian_Work_PerformedNull(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsElder_1Null(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetElder_1Null(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsElder_2Null(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetElder_2Null(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsEmployer_1Null(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetEmployer_1Null(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Boolean IsEmployer_2Null(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void SetEmployer_2Null(); }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class ElderRowChangeEvent : public System::EventArgs { private: LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ eventRow; private: System::Data::DataRowAction eventAction; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] ElderRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ row, System::Data::DataRowAction action); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ Row { LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataRowAction Action { System::Data::DataRowAction get(); } }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class EmployerRowChangeEvent : public System::EventArgs { private: LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ eventRow; private: System::Data::DataRowAction eventAction; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] EmployerRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ row, System::Data::DataRowAction action); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ Row { LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataRowAction Action { System::Data::DataRowAction get(); } }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class Grade_PointRowChangeEvent : public System::EventArgs { private: LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ eventRow; private: System::Data::DataRowAction eventAction; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] Grade_PointRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ row, System::Data::DataRowAction action); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ Row { LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataRowAction Action { System::Data::DataRowAction get(); } }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class Parent_or_GuardianRowChangeEvent : public System::EventArgs { private: LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ eventRow; private: System::Data::DataRowAction eventAction; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] Parent_or_GuardianRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ row, System::Data::DataRowAction action); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ Row { LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataRowAction Action { System::Data::DataRowAction get(); } }; public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")] ref class StudentRowChangeEvent : public System::EventArgs { private: LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ eventRow; private: System::Data::DataRowAction eventAction; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] StudentRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ row, System::Data::DataRowAction action); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ Row { LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::DataRowAction Action { System::Data::DataRowAction get(); } }; }; } namespace LCBCAdminRegistrationSystem { inline projectDataSet::projectDataSet() { this->BeginInit(); this->InitClass(); System::ComponentModel::CollectionChangeEventHandler^ schemaChangedHandler = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &LCBCAdminRegistrationSystem::projectDataSet::SchemaChanged); __super::Tables->CollectionChanged += schemaChangedHandler; __super::Relations->CollectionChanged += schemaChangedHandler; this->EndInit(); } inline projectDataSet::projectDataSet(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context) : System::Data::DataSet(info, context, false) { if (this->IsBinarySerialized(info, context) == true) { this->InitVars(false); System::ComponentModel::CollectionChangeEventHandler^ schemaChangedHandler1 = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &LCBCAdminRegistrationSystem::projectDataSet::SchemaChanged); this->Tables->CollectionChanged += schemaChangedHandler1; this->Relations->CollectionChanged += schemaChangedHandler1; return; } System::String^ strSchema = (cli::safe_cast<System::String^ >(info->GetValue(L"XmlSchema", System::String::typeid))); if (this->DetermineSchemaSerializationMode(info, context) == System::Data::SchemaSerializationMode::IncludeSchema) { System::Data::DataSet^ ds = (gcnew System::Data::DataSet()); ds->ReadXmlSchema((gcnew System::Xml::XmlTextReader((gcnew System::IO::StringReader(strSchema))))); if (ds->Tables[L"Elder"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable(ds->Tables[L"Elder"]))); } if (ds->Tables[L"Employer"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable(ds->Tables[L"Employer"]))); } if (ds->Tables[L"Grade Point"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable(ds->Tables[L"Grade Point"]))); } if (ds->Tables[L"Parent or Guardian"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable(ds->Tables[L"Parent or Guardian"]))); } if (ds->Tables[L"Student"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable(ds->Tables[L"Student"]))); } this->DataSetName = ds->DataSetName; this->Prefix = ds->Prefix; this->Namespace = ds->Namespace; this->Locale = ds->Locale; this->CaseSensitive = ds->CaseSensitive; this->EnforceConstraints = ds->EnforceConstraints; this->Merge(ds, false, System::Data::MissingSchemaAction::Add); this->InitVars(); } else { this->ReadXmlSchema((gcnew System::Xml::XmlTextReader((gcnew System::IO::StringReader(strSchema))))); } this->GetSerializationData(info, context); System::ComponentModel::CollectionChangeEventHandler^ schemaChangedHandler = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &LCBCAdminRegistrationSystem::projectDataSet::SchemaChanged); __super::Tables->CollectionChanged += schemaChangedHandler; this->Relations->CollectionChanged += schemaChangedHandler; } inline LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ projectDataSet::Elder::get() { return this->tableElder; } inline LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ projectDataSet::Employer::get() { return this->tableEmployer; } inline LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ projectDataSet::Grade_Point::get() { return this->tableGrade_Point; } inline LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ projectDataSet::Parent_or_Guardian::get() { return this->tableParent_or_Guardian; } inline LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ projectDataSet::Student::get() { return this->tableStudent; } inline System::Data::SchemaSerializationMode projectDataSet::SchemaSerializationMode::get() { return this->_schemaSerializationMode; } inline System::Void projectDataSet::SchemaSerializationMode::set(System::Data::SchemaSerializationMode value) { this->_schemaSerializationMode = __identifier(value); } inline System::Data::DataTableCollection^ projectDataSet::Tables::get() { return __super::Tables; } inline System::Data::DataRelationCollection^ projectDataSet::Relations::get() { return __super::Relations; } inline System::Void projectDataSet::InitializeDerivedDataSet() { this->BeginInit(); this->InitClass(); this->EndInit(); } inline System::Data::DataSet^ projectDataSet::Clone() { LCBCAdminRegistrationSystem::projectDataSet^ cln = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet^ >(__super::Clone())); cln->InitVars(); cln->SchemaSerializationMode = this->SchemaSerializationMode; return cln; } inline System::Boolean projectDataSet::ShouldSerializeTables() { return false; } inline System::Boolean projectDataSet::ShouldSerializeRelations() { return false; } inline System::Void projectDataSet::ReadXmlSerializable(System::Xml::XmlReader^ reader) { if (this->DetermineSchemaSerializationMode(reader) == System::Data::SchemaSerializationMode::IncludeSchema) { this->Reset(); System::Data::DataSet^ ds = (gcnew System::Data::DataSet()); ds->ReadXml(reader); if (ds->Tables[L"Elder"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable(ds->Tables[L"Elder"]))); } if (ds->Tables[L"Employer"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable(ds->Tables[L"Employer"]))); } if (ds->Tables[L"Grade Point"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable(ds->Tables[L"Grade Point"]))); } if (ds->Tables[L"Parent or Guardian"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable(ds->Tables[L"Parent or Guardian"]))); } if (ds->Tables[L"Student"] != nullptr) { __super::Tables->Add((gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable(ds->Tables[L"Student"]))); } this->DataSetName = ds->DataSetName; this->Prefix = ds->Prefix; this->Namespace = ds->Namespace; this->Locale = ds->Locale; this->CaseSensitive = ds->CaseSensitive; this->EnforceConstraints = ds->EnforceConstraints; this->Merge(ds, false, System::Data::MissingSchemaAction::Add); this->InitVars(); } else { this->ReadXml(reader); this->InitVars(); } } inline System::Xml::Schema::XmlSchema^ projectDataSet::GetSchemaSerializable() { System::IO::MemoryStream^ stream = (gcnew System::IO::MemoryStream()); this->WriteXmlSchema((gcnew System::Xml::XmlTextWriter(stream, nullptr))); stream->Position = 0; return System::Xml::Schema::XmlSchema::Read((gcnew System::Xml::XmlTextReader(stream)), nullptr); } inline System::Void projectDataSet::InitVars() { this->InitVars(true); } inline System::Void projectDataSet::InitVars(System::Boolean initTable) { this->tableElder = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ >(__super::Tables[L"Elder"])); if (initTable == true) { if (this->tableElder != nullptr) { this->tableElder->InitVars(); } } this->tableEmployer = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ >(__super::Tables[L"Employer"])); if (initTable == true) { if (this->tableEmployer != nullptr) { this->tableEmployer->InitVars(); } } this->tableGrade_Point = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ >(__super::Tables[L"Grade Point"])); if (initTable == true) { if (this->tableGrade_Point != nullptr) { this->tableGrade_Point->InitVars(); } } this->tableParent_or_Guardian = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ >(__super::Tables[L"Parent or Guardian"])); if (initTable == true) { if (this->tableParent_or_Guardian != nullptr) { this->tableParent_or_Guardian->InitVars(); } } this->tableStudent = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ >(__super::Tables[L"Student"])); if (initTable == true) { if (this->tableStudent != nullptr) { this->tableStudent->InitVars(); } } this->relationReference = this->Relations[L"Reference"]; this->relationReference1 = this->Relations[L"Reference1"]; this->relationReference2 = this->Relations[L"Reference2"]; } inline System::Void projectDataSet::InitClass() { this->DataSetName = L"projectDataSet"; this->Prefix = L""; this->Namespace = L"http://tempuri.org/projectDataSet.xsd"; this->EnforceConstraints = true; this->SchemaSerializationMode = System::Data::SchemaSerializationMode::IncludeSchema; this->tableElder = (gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable()); __super::Tables->Add(this->tableElder); this->tableEmployer = (gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable()); __super::Tables->Add(this->tableEmployer); this->tableGrade_Point = (gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable()); __super::Tables->Add(this->tableGrade_Point); this->tableParent_or_Guardian = (gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable()); __super::Tables->Add(this->tableParent_or_Guardian); this->tableStudent = (gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable()); __super::Tables->Add(this->tableStudent); this->relationReference = (gcnew System::Data::DataRelation(L"Reference", gcnew cli::array< System::Data::DataColumn^ >(1) {this->tableParent_or_Guardian->IDColumn}, gcnew cli::array< System::Data::DataColumn^ >(1) {this->tableStudent->_Parent_GuardianColumn}, false)); this->Relations->Add(this->relationReference); this->relationReference1 = (gcnew System::Data::DataRelation(L"Reference1", gcnew cli::array< System::Data::DataColumn^ >(1) {this->tableElder->IDColumn}, gcnew cli::array< System::Data::DataColumn^ >(1) {this->tableStudent->Elder_1Column}, false)); this->Relations->Add(this->relationReference1); this->relationReference2 = (gcnew System::Data::DataRelation(L"Reference2", gcnew cli::array< System::Data::DataColumn^ >(1) {this->tableEmployer->IDColumn}, gcnew cli::array< System::Data::DataColumn^ >(1) {this->tableStudent->Employer_2Column}, false)); this->Relations->Add(this->relationReference2); } inline System::Boolean projectDataSet::ShouldSerializeElder() { return false; } inline System::Boolean projectDataSet::ShouldSerializeEmployer() { return false; } inline System::Boolean projectDataSet::ShouldSerializeGrade_Point() { return false; } inline System::Boolean projectDataSet::ShouldSerializeParent_or_Guardian() { return false; } inline System::Boolean projectDataSet::ShouldSerializeStudent() { return false; } inline System::Void projectDataSet::SchemaChanged(System::Object^ sender, System::ComponentModel::CollectionChangeEventArgs^ e) { if (e->Action == System::ComponentModel::CollectionChangeAction::Remove) { this->InitVars(); } } inline System::Xml::Schema::XmlSchemaComplexType^ projectDataSet::GetTypedDataSetSchema(System::Xml::Schema::XmlSchemaSet^ xs) { LCBCAdminRegistrationSystem::projectDataSet^ ds = (gcnew LCBCAdminRegistrationSystem::projectDataSet()); System::Xml::Schema::XmlSchemaComplexType^ type = (gcnew System::Xml::Schema::XmlSchemaComplexType()); System::Xml::Schema::XmlSchemaSequence^ sequence = (gcnew System::Xml::Schema::XmlSchemaSequence()); xs->Add(ds->GetSchemaSerializable()); System::Xml::Schema::XmlSchemaAny^ any = (gcnew System::Xml::Schema::XmlSchemaAny()); any->Namespace = ds->Namespace; sequence->Items->Add(any); type->Particle = sequence; return type; } inline projectDataSet::ElderDataTable::ElderDataTable() { this->TableName = L"Elder"; this->BeginInit(); this->InitClass(); this->EndInit(); } inline projectDataSet::ElderDataTable::ElderDataTable(System::Data::DataTable^ table) { this->TableName = table->TableName; if (table->CaseSensitive != table->DataSet->CaseSensitive) { this->CaseSensitive = table->CaseSensitive; } if (table->Locale->ToString() != table->DataSet->Locale->ToString()) { this->Locale = table->Locale; } if (table->Namespace != table->DataSet->Namespace) { this->Namespace = table->Namespace; } this->Prefix = table->Prefix; this->MinimumCapacity = table->MinimumCapacity; } inline projectDataSet::ElderDataTable::ElderDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context) : System::Data::DataTable(info, context) { this->InitVars(); } inline System::Data::DataColumn^ projectDataSet::ElderDataTable::IDColumn::get() { return this->columnID; } inline System::Data::DataColumn^ projectDataSet::ElderDataTable::NameColumn::get() { return this->columnName; } inline System::Data::DataColumn^ projectDataSet::ElderDataTable::AddressColumn::get() { return this->columnAddress; } inline System::Data::DataColumn^ projectDataSet::ElderDataTable::Telephone_NumberColumn::get() { return this->columnTelephone_Number; } inline System::Data::DataColumn^ projectDataSet::ElderDataTable::ChurchColumn::get() { return this->columnChurch; } inline System::Data::DataColumn^ projectDataSet::ElderDataTable::PositionColumn::get() { return this->columnPosition; } inline System::Int32 projectDataSet::ElderDataTable::Count::get() { return this->Rows->Count; } inline LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ projectDataSet::ElderDataTable::default::get(System::Int32 index) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ >(this->Rows[index])); } inline System::Void projectDataSet::ElderDataTable::AddElderRow(LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ row) { this->Rows->Add(row); } inline LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ projectDataSet::ElderDataTable::AddElderRow(System::String^ Name, System::String^ Address, System::Int32 Telephone_Number, System::String^ Church, System::String^ Position) { LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ rowElderRow = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ >(this->NewRow())); rowElderRow->ItemArray = gcnew cli::array< System::Object^ >(6) {nullptr, Name, Address, Telephone_Number, Church, Position}; this->Rows->Add(rowElderRow); return rowElderRow; } inline LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ projectDataSet::ElderDataTable::FindByID(System::Int32 ID) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ >(this->Rows->Find(gcnew cli::array< System::Object^ >(1) {ID}))); } inline System::Collections::IEnumerator^ projectDataSet::ElderDataTable::GetEnumerator() { return this->Rows->GetEnumerator(); } inline System::Data::DataTable^ projectDataSet::ElderDataTable::Clone() { LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ cln = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ >(__super::Clone())); cln->InitVars(); return cln; } inline System::Data::DataTable^ projectDataSet::ElderDataTable::CreateInstance() { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable()); } inline System::Void projectDataSet::ElderDataTable::InitVars() { this->columnID = __super::Columns[L"ID"]; this->columnName = __super::Columns[L"Name"]; this->columnAddress = __super::Columns[L"Address"]; this->columnTelephone_Number = __super::Columns[L"Telephone Number"]; this->columnChurch = __super::Columns[L"Church"]; this->columnPosition = __super::Columns[L"Position"]; } inline System::Void projectDataSet::ElderDataTable::InitClass() { this->columnID = (gcnew System::Data::DataColumn(L"ID", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnID); this->columnName = (gcnew System::Data::DataColumn(L"Name", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnName); this->columnAddress = (gcnew System::Data::DataColumn(L"Address", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnAddress); this->columnTelephone_Number = (gcnew System::Data::DataColumn(L"Telephone Number", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Telephone_Number"); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Telephone_NumberColumn"); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnTelephone_Number"); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_UserColumnName", L"Telephone Number"); __super::Columns->Add(this->columnTelephone_Number); this->columnChurch = (gcnew System::Data::DataColumn(L"Church", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnChurch); this->columnPosition = (gcnew System::Data::DataColumn(L"Position", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnPosition); this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^ >(1) {this->columnID}, true))); this->columnID->AutoIncrement = true; this->columnID->AllowDBNull = false; this->columnID->Unique = true; this->columnName->MaxLength = 50; this->columnAddress->MaxLength = 50; this->columnChurch->MaxLength = 50; this->columnPosition->MaxLength = 50; } inline LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ projectDataSet::ElderDataTable::NewElderRow() { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ >(this->NewRow())); } inline System::Data::DataRow^ projectDataSet::ElderDataTable::NewRowFromBuilder(System::Data::DataRowBuilder^ builder) { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderRow(builder)); } inline System::Type^ projectDataSet::ElderDataTable::GetRowType() { return LCBCAdminRegistrationSystem::projectDataSet::ElderRow::typeid; } inline System::Void projectDataSet::ElderDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanged(e); { this->ElderRowChanged(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::ElderDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanging(e); { this->ElderRowChanging(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::ElderDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleted(e); { this->ElderRowDeleted(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::ElderDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleting(e); { this->ElderRowDeleting(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::ElderDataTable::RemoveElderRow(LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ row) { this->Rows->Remove(row); } inline System::Xml::Schema::XmlSchemaComplexType^ projectDataSet::ElderDataTable::GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs) { System::Xml::Schema::XmlSchemaComplexType^ type = (gcnew System::Xml::Schema::XmlSchemaComplexType()); System::Xml::Schema::XmlSchemaSequence^ sequence = (gcnew System::Xml::Schema::XmlSchemaSequence()); LCBCAdminRegistrationSystem::projectDataSet^ ds = (gcnew LCBCAdminRegistrationSystem::projectDataSet()); xs->Add(ds->GetSchemaSerializable()); System::Xml::Schema::XmlSchemaAny^ any1 = (gcnew System::Xml::Schema::XmlSchemaAny()); any1->Namespace = L"http://www.w3.org/2001/XMLSchema"; any1->MinOccurs = System::Decimal(0); any1->MaxOccurs = System::Decimal::MaxValue; any1->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any1); System::Xml::Schema::XmlSchemaAny^ any2 = (gcnew System::Xml::Schema::XmlSchemaAny()); any2->Namespace = L"urn:schemas-microsoft-com:xml-diffgram-v1"; any2->MinOccurs = System::Decimal(1); any2->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any2); System::Xml::Schema::XmlSchemaAttribute^ attribute1 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute1->Name = L"namespace"; attribute1->FixedValue = ds->Namespace; type->Attributes->Add(attribute1); System::Xml::Schema::XmlSchemaAttribute^ attribute2 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute2->Name = L"tableTypeName"; attribute2->FixedValue = L"ElderDataTable"; type->Attributes->Add(attribute2); type->Particle = sequence; return type; } inline projectDataSet::EmployerDataTable::EmployerDataTable() { this->TableName = L"Employer"; this->BeginInit(); this->InitClass(); this->EndInit(); } inline projectDataSet::EmployerDataTable::EmployerDataTable(System::Data::DataTable^ table) { this->TableName = table->TableName; if (table->CaseSensitive != table->DataSet->CaseSensitive) { this->CaseSensitive = table->CaseSensitive; } if (table->Locale->ToString() != table->DataSet->Locale->ToString()) { this->Locale = table->Locale; } if (table->Namespace != table->DataSet->Namespace) { this->Namespace = table->Namespace; } this->Prefix = table->Prefix; this->MinimumCapacity = table->MinimumCapacity; } inline projectDataSet::EmployerDataTable::EmployerDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context) : System::Data::DataTable(info, context) { this->InitVars(); } inline System::Data::DataColumn^ projectDataSet::EmployerDataTable::IDColumn::get() { return this->columnID; } inline System::Data::DataColumn^ projectDataSet::EmployerDataTable::First_NameColumn::get() { return this->columnFirst_Name; } inline System::Data::DataColumn^ projectDataSet::EmployerDataTable::Last_NameColumn::get() { return this->columnLast_Name; } inline System::Data::DataColumn^ projectDataSet::EmployerDataTable::Telephone_NumberColumn::get() { return this->columnTelephone_Number; } inline System::Data::DataColumn^ projectDataSet::EmployerDataTable::AddressColumn::get() { return this->columnAddress; } inline System::Int32 projectDataSet::EmployerDataTable::Count::get() { return this->Rows->Count; } inline LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ projectDataSet::EmployerDataTable::default::get(System::Int32 index) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ >(this->Rows[index])); } inline System::Void projectDataSet::EmployerDataTable::AddEmployerRow(LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ row) { this->Rows->Add(row); } inline LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ projectDataSet::EmployerDataTable::AddEmployerRow(System::String^ First_Name, System::String^ Last_Name, System::Int32 Telephone_Number, System::String^ Address) { LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ rowEmployerRow = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ >(this->NewRow())); rowEmployerRow->ItemArray = gcnew cli::array< System::Object^ >(5) {nullptr, First_Name, Last_Name, Telephone_Number, Address}; this->Rows->Add(rowEmployerRow); return rowEmployerRow; } inline LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ projectDataSet::EmployerDataTable::FindByID(System::Int32 ID) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ >(this->Rows->Find(gcnew cli::array< System::Object^ >(1) {ID}))); } inline System::Collections::IEnumerator^ projectDataSet::EmployerDataTable::GetEnumerator() { return this->Rows->GetEnumerator(); } inline System::Data::DataTable^ projectDataSet::EmployerDataTable::Clone() { LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ cln = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ >(__super::Clone())); cln->InitVars(); return cln; } inline System::Data::DataTable^ projectDataSet::EmployerDataTable::CreateInstance() { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable()); } inline System::Void projectDataSet::EmployerDataTable::InitVars() { this->columnID = __super::Columns[L"ID"]; this->columnFirst_Name = __super::Columns[L"First Name"]; this->columnLast_Name = __super::Columns[L"Last Name"]; this->columnTelephone_Number = __super::Columns[L"Telephone Number"]; this->columnAddress = __super::Columns[L"Address"]; } inline System::Void projectDataSet::EmployerDataTable::InitClass() { this->columnID = (gcnew System::Data::DataColumn(L"ID", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnID); this->columnFirst_Name = (gcnew System::Data::DataColumn(L"First Name", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"First_Name"); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"First_NameColumn"); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnFirst_Name"); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_UserColumnName", L"First Name"); __super::Columns->Add(this->columnFirst_Name); this->columnLast_Name = (gcnew System::Data::DataColumn(L"Last Name", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnLast_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Last_Name"); this->columnLast_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Last_NameColumn"); this->columnLast_Name->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnLast_Name"); this->columnLast_Name->ExtendedProperties->Add(L"Generator_UserColumnName", L"Last Name"); __super::Columns->Add(this->columnLast_Name); this->columnTelephone_Number = (gcnew System::Data::DataColumn(L"Telephone Number", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Telephone_Number"); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Telephone_NumberColumn"); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnTelephone_Number"); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_UserColumnName", L"Telephone Number"); __super::Columns->Add(this->columnTelephone_Number); this->columnAddress = (gcnew System::Data::DataColumn(L"Address", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnAddress); this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^ >(1) {this->columnID}, true))); this->columnID->AutoIncrement = true; this->columnID->AllowDBNull = false; this->columnID->Unique = true; this->columnFirst_Name->MaxLength = 50; this->columnLast_Name->MaxLength = 50; this->columnAddress->MaxLength = 50; } inline LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ projectDataSet::EmployerDataTable::NewEmployerRow() { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ >(this->NewRow())); } inline System::Data::DataRow^ projectDataSet::EmployerDataTable::NewRowFromBuilder(System::Data::DataRowBuilder^ builder) { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerRow(builder)); } inline System::Type^ projectDataSet::EmployerDataTable::GetRowType() { return LCBCAdminRegistrationSystem::projectDataSet::EmployerRow::typeid; } inline System::Void projectDataSet::EmployerDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanged(e); { this->EmployerRowChanged(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::EmployerDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanging(e); { this->EmployerRowChanging(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::EmployerDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleted(e); { this->EmployerRowDeleted(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::EmployerDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleting(e); { this->EmployerRowDeleting(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::EmployerDataTable::RemoveEmployerRow(LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ row) { this->Rows->Remove(row); } inline System::Xml::Schema::XmlSchemaComplexType^ projectDataSet::EmployerDataTable::GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs) { System::Xml::Schema::XmlSchemaComplexType^ type = (gcnew System::Xml::Schema::XmlSchemaComplexType()); System::Xml::Schema::XmlSchemaSequence^ sequence = (gcnew System::Xml::Schema::XmlSchemaSequence()); LCBCAdminRegistrationSystem::projectDataSet^ ds = (gcnew LCBCAdminRegistrationSystem::projectDataSet()); xs->Add(ds->GetSchemaSerializable()); System::Xml::Schema::XmlSchemaAny^ any1 = (gcnew System::Xml::Schema::XmlSchemaAny()); any1->Namespace = L"http://www.w3.org/2001/XMLSchema"; any1->MinOccurs = System::Decimal(0); any1->MaxOccurs = System::Decimal::MaxValue; any1->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any1); System::Xml::Schema::XmlSchemaAny^ any2 = (gcnew System::Xml::Schema::XmlSchemaAny()); any2->Namespace = L"urn:schemas-microsoft-com:xml-diffgram-v1"; any2->MinOccurs = System::Decimal(1); any2->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any2); System::Xml::Schema::XmlSchemaAttribute^ attribute1 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute1->Name = L"namespace"; attribute1->FixedValue = ds->Namespace; type->Attributes->Add(attribute1); System::Xml::Schema::XmlSchemaAttribute^ attribute2 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute2->Name = L"tableTypeName"; attribute2->FixedValue = L"EmployerDataTable"; type->Attributes->Add(attribute2); type->Particle = sequence; return type; } inline projectDataSet::Grade_PointDataTable::Grade_PointDataTable() { this->TableName = L"Grade Point"; this->BeginInit(); this->InitClass(); this->EndInit(); } inline projectDataSet::Grade_PointDataTable::Grade_PointDataTable(System::Data::DataTable^ table) { this->TableName = table->TableName; if (table->CaseSensitive != table->DataSet->CaseSensitive) { this->CaseSensitive = table->CaseSensitive; } if (table->Locale->ToString() != table->DataSet->Locale->ToString()) { this->Locale = table->Locale; } if (table->Namespace != table->DataSet->Namespace) { this->Namespace = table->Namespace; } this->Prefix = table->Prefix; this->MinimumCapacity = table->MinimumCapacity; } inline projectDataSet::Grade_PointDataTable::Grade_PointDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context) : System::Data::DataTable(info, context) { this->InitVars(); } inline System::Data::DataColumn^ projectDataSet::Grade_PointDataTable::IDColumn::get() { return this->columnID; } inline System::Data::DataColumn^ projectDataSet::Grade_PointDataTable::GradeColumn::get() { return this->columnGrade; } inline System::Data::DataColumn^ projectDataSet::Grade_PointDataTable::Upper_RangeColumn::get() { return this->columnUpper_Range; } inline System::Data::DataColumn^ projectDataSet::Grade_PointDataTable::Lower_RangeColumn::get() { return this->columnLower_Range; } inline System::Data::DataColumn^ projectDataSet::Grade_PointDataTable::Grade_PointColumn::get() { return this->columnGrade_Point; } inline System::Int32 projectDataSet::Grade_PointDataTable::Count::get() { return this->Rows->Count; } inline LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ projectDataSet::Grade_PointDataTable::default::get( System::Int32 index) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ >(this->Rows[index])); } inline System::Void projectDataSet::Grade_PointDataTable::AddGrade_PointRow(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ row) { this->Rows->Add(row); } inline LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ projectDataSet::Grade_PointDataTable::AddGrade_PointRow( System::String^ Grade, System::Int32 Upper_Range, System::Int32 Lower_Range, System::Int32 Grade_Point) { LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ rowGrade_PointRow = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ >(this->NewRow())); rowGrade_PointRow->ItemArray = gcnew cli::array< System::Object^ >(5) {nullptr, Grade, Upper_Range, Lower_Range, Grade_Point}; this->Rows->Add(rowGrade_PointRow); return rowGrade_PointRow; } inline LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ projectDataSet::Grade_PointDataTable::FindByID(System::Int32 ID) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ >(this->Rows->Find(gcnew cli::array< System::Object^ >(1) {ID}))); } inline System::Collections::IEnumerator^ projectDataSet::Grade_PointDataTable::GetEnumerator() { return this->Rows->GetEnumerator(); } inline System::Data::DataTable^ projectDataSet::Grade_PointDataTable::Clone() { LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ cln = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ >(__super::Clone())); cln->InitVars(); return cln; } inline System::Data::DataTable^ projectDataSet::Grade_PointDataTable::CreateInstance() { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable()); } inline System::Void projectDataSet::Grade_PointDataTable::InitVars() { this->columnID = __super::Columns[L"ID"]; this->columnGrade = __super::Columns[L"Grade"]; this->columnUpper_Range = __super::Columns[L"Upper Range"]; this->columnLower_Range = __super::Columns[L"Lower Range"]; this->columnGrade_Point = __super::Columns[L"Grade Point"]; } inline System::Void projectDataSet::Grade_PointDataTable::InitClass() { this->columnID = (gcnew System::Data::DataColumn(L"ID", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnID); this->columnGrade = (gcnew System::Data::DataColumn(L"Grade", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnGrade); this->columnUpper_Range = (gcnew System::Data::DataColumn(L"Upper Range", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnUpper_Range->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Upper_Range"); this->columnUpper_Range->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Upper_RangeColumn"); this->columnUpper_Range->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnUpper_Range"); this->columnUpper_Range->ExtendedProperties->Add(L"Generator_UserColumnName", L"Upper Range"); __super::Columns->Add(this->columnUpper_Range); this->columnLower_Range = (gcnew System::Data::DataColumn(L"Lower Range", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnLower_Range->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Lower_Range"); this->columnLower_Range->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Lower_RangeColumn"); this->columnLower_Range->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnLower_Range"); this->columnLower_Range->ExtendedProperties->Add(L"Generator_UserColumnName", L"Lower Range"); __super::Columns->Add(this->columnLower_Range); this->columnGrade_Point = (gcnew System::Data::DataColumn(L"Grade Point", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnGrade_Point->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Grade_Point"); this->columnGrade_Point->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Grade_PointColumn"); this->columnGrade_Point->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnGrade_Point"); this->columnGrade_Point->ExtendedProperties->Add(L"Generator_UserColumnName", L"Grade Point"); __super::Columns->Add(this->columnGrade_Point); this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^ >(1) {this->columnID}, true))); this->columnID->AutoIncrement = true; this->columnID->AllowDBNull = false; this->columnID->Unique = true; this->columnGrade->MaxLength = 50; this->ExtendedProperties->Add(L"Generator_RowClassName", L"Grade_PointRow"); this->ExtendedProperties->Add(L"Generator_RowEvArgName", L"Grade_PointRowChangeEvent"); this->ExtendedProperties->Add(L"Generator_RowEvHandlerName", L"Grade_PointRowChangeEventHandler"); this->ExtendedProperties->Add(L"Generator_TableClassName", L"Grade_PointDataTable"); this->ExtendedProperties->Add(L"Generator_TablePropName", L"Grade_Point"); this->ExtendedProperties->Add(L"Generator_TableVarName", L"tableGrade_Point"); this->ExtendedProperties->Add(L"Generator_UserTableName", L"Grade Point"); } inline LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ projectDataSet::Grade_PointDataTable::NewGrade_PointRow() { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ >(this->NewRow())); } inline System::Data::DataRow^ projectDataSet::Grade_PointDataTable::NewRowFromBuilder(System::Data::DataRowBuilder^ builder) { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow(builder)); } inline System::Type^ projectDataSet::Grade_PointDataTable::GetRowType() { return LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow::typeid; } inline System::Void projectDataSet::Grade_PointDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanged(e); { this->Grade_PointRowChanged(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::Grade_PointDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanging(e); { this->Grade_PointRowChanging(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::Grade_PointDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleted(e); { this->Grade_PointRowDeleted(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::Grade_PointDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleting(e); { this->Grade_PointRowDeleting(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::Grade_PointDataTable::RemoveGrade_PointRow(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ row) { this->Rows->Remove(row); } inline System::Xml::Schema::XmlSchemaComplexType^ projectDataSet::Grade_PointDataTable::GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs) { System::Xml::Schema::XmlSchemaComplexType^ type = (gcnew System::Xml::Schema::XmlSchemaComplexType()); System::Xml::Schema::XmlSchemaSequence^ sequence = (gcnew System::Xml::Schema::XmlSchemaSequence()); LCBCAdminRegistrationSystem::projectDataSet^ ds = (gcnew LCBCAdminRegistrationSystem::projectDataSet()); xs->Add(ds->GetSchemaSerializable()); System::Xml::Schema::XmlSchemaAny^ any1 = (gcnew System::Xml::Schema::XmlSchemaAny()); any1->Namespace = L"http://www.w3.org/2001/XMLSchema"; any1->MinOccurs = System::Decimal(0); any1->MaxOccurs = System::Decimal::MaxValue; any1->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any1); System::Xml::Schema::XmlSchemaAny^ any2 = (gcnew System::Xml::Schema::XmlSchemaAny()); any2->Namespace = L"urn:schemas-microsoft-com:xml-diffgram-v1"; any2->MinOccurs = System::Decimal(1); any2->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any2); System::Xml::Schema::XmlSchemaAttribute^ attribute1 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute1->Name = L"namespace"; attribute1->FixedValue = ds->Namespace; type->Attributes->Add(attribute1); System::Xml::Schema::XmlSchemaAttribute^ attribute2 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute2->Name = L"tableTypeName"; attribute2->FixedValue = L"Grade_PointDataTable"; type->Attributes->Add(attribute2); type->Particle = sequence; return type; } inline projectDataSet::Parent_or_GuardianDataTable::Parent_or_GuardianDataTable() { this->TableName = L"Parent or Guardian"; this->BeginInit(); this->InitClass(); this->EndInit(); } inline projectDataSet::Parent_or_GuardianDataTable::Parent_or_GuardianDataTable(System::Data::DataTable^ table) { this->TableName = table->TableName; if (table->CaseSensitive != table->DataSet->CaseSensitive) { this->CaseSensitive = table->CaseSensitive; } if (table->Locale->ToString() != table->DataSet->Locale->ToString()) { this->Locale = table->Locale; } if (table->Namespace != table->DataSet->Namespace) { this->Namespace = table->Namespace; } this->Prefix = table->Prefix; this->MinimumCapacity = table->MinimumCapacity; } inline projectDataSet::Parent_or_GuardianDataTable::Parent_or_GuardianDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context) : System::Data::DataTable(info, context) { this->InitVars(); } inline System::Data::DataColumn^ projectDataSet::Parent_or_GuardianDataTable::IDColumn::get() { return this->columnID; } inline System::Data::DataColumn^ projectDataSet::Parent_or_GuardianDataTable::First_NameColumn::get() { return this->columnFirst_Name; } inline System::Data::DataColumn^ projectDataSet::Parent_or_GuardianDataTable::Last_NameColumn::get() { return this->columnLast_Name; } inline System::Data::DataColumn^ projectDataSet::Parent_or_GuardianDataTable::AddressColumn::get() { return this->columnAddress; } inline System::Data::DataColumn^ projectDataSet::Parent_or_GuardianDataTable::OccupationColumn::get() { return this->columnOccupation; } inline System::Data::DataColumn^ projectDataSet::Parent_or_GuardianDataTable::Telephone_NumberColumn::get() { return this->columnTelephone_Number; } inline System::Int32 projectDataSet::Parent_or_GuardianDataTable::Count::get() { return this->Rows->Count; } inline LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ projectDataSet::Parent_or_GuardianDataTable::default::get( System::Int32 index) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ >(this->Rows[index])); } inline System::Void projectDataSet::Parent_or_GuardianDataTable::AddParent_or_GuardianRow(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ row) { this->Rows->Add(row); } inline LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ projectDataSet::Parent_or_GuardianDataTable::AddParent_or_GuardianRow( System::String^ First_Name, System::String^ Last_Name, System::String^ Address, System::String^ Occupation, System::Int32 Telephone_Number) { LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ rowParent_or_GuardianRow = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ >(this->NewRow())); rowParent_or_GuardianRow->ItemArray = gcnew cli::array< System::Object^ >(6) {nullptr, First_Name, Last_Name, Address, Occupation, Telephone_Number}; this->Rows->Add(rowParent_or_GuardianRow); return rowParent_or_GuardianRow; } inline LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ projectDataSet::Parent_or_GuardianDataTable::FindByID( System::Int32 ID) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ >(this->Rows->Find(gcnew cli::array< System::Object^ >(1) {ID}))); } inline System::Collections::IEnumerator^ projectDataSet::Parent_or_GuardianDataTable::GetEnumerator() { return this->Rows->GetEnumerator(); } inline System::Data::DataTable^ projectDataSet::Parent_or_GuardianDataTable::Clone() { LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ cln = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ >(__super::Clone())); cln->InitVars(); return cln; } inline System::Data::DataTable^ projectDataSet::Parent_or_GuardianDataTable::CreateInstance() { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable()); } inline System::Void projectDataSet::Parent_or_GuardianDataTable::InitVars() { this->columnID = __super::Columns[L"ID"]; this->columnFirst_Name = __super::Columns[L"First Name"]; this->columnLast_Name = __super::Columns[L"Last Name"]; this->columnAddress = __super::Columns[L"Address"]; this->columnOccupation = __super::Columns[L"Occupation"]; this->columnTelephone_Number = __super::Columns[L"Telephone Number"]; } inline System::Void projectDataSet::Parent_or_GuardianDataTable::InitClass() { this->columnID = (gcnew System::Data::DataColumn(L"ID", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnID); this->columnFirst_Name = (gcnew System::Data::DataColumn(L"First Name", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"First_Name"); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"First_NameColumn"); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnFirst_Name"); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_UserColumnName", L"First Name"); __super::Columns->Add(this->columnFirst_Name); this->columnLast_Name = (gcnew System::Data::DataColumn(L"Last Name", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnLast_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Last_Name"); this->columnLast_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Last_NameColumn"); this->columnLast_Name->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnLast_Name"); this->columnLast_Name->ExtendedProperties->Add(L"Generator_UserColumnName", L"Last Name"); __super::Columns->Add(this->columnLast_Name); this->columnAddress = (gcnew System::Data::DataColumn(L"Address", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnAddress); this->columnOccupation = (gcnew System::Data::DataColumn(L"Occupation", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnOccupation); this->columnTelephone_Number = (gcnew System::Data::DataColumn(L"Telephone Number", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Telephone_Number"); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Telephone_NumberColumn"); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnTelephone_Number"); this->columnTelephone_Number->ExtendedProperties->Add(L"Generator_UserColumnName", L"Telephone Number"); __super::Columns->Add(this->columnTelephone_Number); this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^ >(1) {this->columnID}, true))); this->columnID->AutoIncrement = true; this->columnID->AllowDBNull = false; this->columnID->Unique = true; this->columnFirst_Name->MaxLength = 50; this->columnLast_Name->MaxLength = 50; this->columnAddress->MaxLength = 50; this->columnOccupation->MaxLength = 50; this->ExtendedProperties->Add(L"Generator_RowClassName", L"Parent_or_GuardianRow"); this->ExtendedProperties->Add(L"Generator_RowEvArgName", L"Parent_or_GuardianRowChangeEvent"); this->ExtendedProperties->Add(L"Generator_RowEvHandlerName", L"Parent_or_GuardianRowChangeEventHandler"); this->ExtendedProperties->Add(L"Generator_TableClassName", L"Parent_or_GuardianDataTable"); this->ExtendedProperties->Add(L"Generator_TablePropName", L"Parent_or_Guardian"); this->ExtendedProperties->Add(L"Generator_TableVarName", L"tableParent_or_Guardian"); this->ExtendedProperties->Add(L"Generator_UserTableName", L"Parent or Guardian"); } inline LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ projectDataSet::Parent_or_GuardianDataTable::NewParent_or_GuardianRow() { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ >(this->NewRow())); } inline System::Data::DataRow^ projectDataSet::Parent_or_GuardianDataTable::NewRowFromBuilder(System::Data::DataRowBuilder^ builder) { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow(builder)); } inline System::Type^ projectDataSet::Parent_or_GuardianDataTable::GetRowType() { return LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow::typeid; } inline System::Void projectDataSet::Parent_or_GuardianDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanged(e); { this->Parent_or_GuardianRowChanged(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::Parent_or_GuardianDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanging(e); { this->Parent_or_GuardianRowChanging(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::Parent_or_GuardianDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleted(e); { this->Parent_or_GuardianRowDeleted(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::Parent_or_GuardianDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleting(e); { this->Parent_or_GuardianRowDeleting(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::Parent_or_GuardianDataTable::RemoveParent_or_GuardianRow(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ row) { this->Rows->Remove(row); } inline System::Xml::Schema::XmlSchemaComplexType^ projectDataSet::Parent_or_GuardianDataTable::GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs) { System::Xml::Schema::XmlSchemaComplexType^ type = (gcnew System::Xml::Schema::XmlSchemaComplexType()); System::Xml::Schema::XmlSchemaSequence^ sequence = (gcnew System::Xml::Schema::XmlSchemaSequence()); LCBCAdminRegistrationSystem::projectDataSet^ ds = (gcnew LCBCAdminRegistrationSystem::projectDataSet()); xs->Add(ds->GetSchemaSerializable()); System::Xml::Schema::XmlSchemaAny^ any1 = (gcnew System::Xml::Schema::XmlSchemaAny()); any1->Namespace = L"http://www.w3.org/2001/XMLSchema"; any1->MinOccurs = System::Decimal(0); any1->MaxOccurs = System::Decimal::MaxValue; any1->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any1); System::Xml::Schema::XmlSchemaAny^ any2 = (gcnew System::Xml::Schema::XmlSchemaAny()); any2->Namespace = L"urn:schemas-microsoft-com:xml-diffgram-v1"; any2->MinOccurs = System::Decimal(1); any2->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any2); System::Xml::Schema::XmlSchemaAttribute^ attribute1 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute1->Name = L"namespace"; attribute1->FixedValue = ds->Namespace; type->Attributes->Add(attribute1); System::Xml::Schema::XmlSchemaAttribute^ attribute2 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute2->Name = L"tableTypeName"; attribute2->FixedValue = L"Parent_or_GuardianDataTable"; type->Attributes->Add(attribute2); type->Particle = sequence; return type; } inline projectDataSet::StudentDataTable::StudentDataTable() { this->TableName = L"Student"; this->BeginInit(); this->InitClass(); this->EndInit(); } inline projectDataSet::StudentDataTable::StudentDataTable(System::Data::DataTable^ table) { this->TableName = table->TableName; if (table->CaseSensitive != table->DataSet->CaseSensitive) { this->CaseSensitive = table->CaseSensitive; } if (table->Locale->ToString() != table->DataSet->Locale->ToString()) { this->Locale = table->Locale; } if (table->Namespace != table->DataSet->Namespace) { this->Namespace = table->Namespace; } this->Prefix = table->Prefix; this->MinimumCapacity = table->MinimumCapacity; } inline projectDataSet::StudentDataTable::StudentDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context) : System::Data::DataTable(info, context) { this->InitVars(); } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::IDColumn::get() { return this->columnID; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::First_NameColumn::get() { return this->columnFirst_Name; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Middle_NamesColumn::get() { return this->columnMiddle_Names; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Last_NameColumn::get() { return this->columnLast_Name; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::AddressColumn::get() { return this->columnAddress; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::SexColumn::get() { return this->columnSex; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Application_DateColumn::get() { return this->columnApplication_Date; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Date_of_BirthColumn::get() { return this->columnDate_of_Birth; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Place_of_BirthColumn::get() { return this->columnPlace_of_Birth; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::_Parent_GuardianColumn::get() { return this->_columnParent_Guardian; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Younger_SiblingsColumn::get() { return this->columnYounger_Siblings; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Older_SiblingsColumn::get() { return this->columnOlder_Siblings; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::BaptisedColumn::get() { return this->columnBaptised; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Date_of_BaptismColumn::get() { return this->columnDate_of_Baptism; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Attended_High_SchoolColumn::get() { return this->columnAttended_High_School; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Name_of_High_SchoolColumn::get() { return this->columnName_of_High_School; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Address_of_High_SchoolColumn::get() { return this->columnAddress_of_High_School; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Ministers_NameColumn::get() { return this->columnMinisters_Name; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Ministers_AddressColumn::get() { return this->columnMinisters_Address; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Christian_Work_PerformedColumn::get() { return this->columnChristian_Work_Performed; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Elder_1Column::get() { return this->columnElder_1; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Elder_2Column::get() { return this->columnElder_2; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Employer_1Column::get() { return this->columnEmployer_1; } inline System::Data::DataColumn^ projectDataSet::StudentDataTable::Employer_2Column::get() { return this->columnEmployer_2; } inline System::Int32 projectDataSet::StudentDataTable::Count::get() { return this->Rows->Count; } inline LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ projectDataSet::StudentDataTable::default::get(System::Int32 index) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >(this->Rows[index])); } inline System::Void projectDataSet::StudentDataTable::AddStudentRow(LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ row) { this->Rows->Add(row); } inline LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ projectDataSet::StudentDataTable::AddStudentRow( System::String^ First_Name, System::String^ Middle_Names, System::String^ Last_Name, System::String^ Address, System::String^ Sex, System::DateTime Application_Date, System::DateTime Date_of_Birth, System::String^ Place_of_Birth, LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ parentParent_or_GuardianRowByReference, System::Int32 Younger_Siblings, System::Int32 Older_Siblings, System::Boolean Baptised, System::DateTime Date_of_Baptism, System::Boolean Attended_High_School, System::String^ Name_of_High_School, System::String^ Address_of_High_School, System::String^ Ministers_Name, System::String^ Ministers_Address, System::String^ Christian_Work_Performed, LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ parentElderRowByReference1, System::Int32 Elder_2, System::Int32 Employer_1, LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ parentEmployerRowByReference2) { LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ rowStudentRow = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >(this->NewRow())); rowStudentRow->ItemArray = gcnew cli::array< System::Object^ >(24) {nullptr, First_Name, Middle_Names, Last_Name, Address, Sex, Application_Date, Date_of_Birth, Place_of_Birth, parentParent_or_GuardianRowByReference[0], Younger_Siblings, Older_Siblings, Baptised, Date_of_Baptism, Attended_High_School, Name_of_High_School, Address_of_High_School, Ministers_Name, Ministers_Address, Christian_Work_Performed, parentElderRowByReference1[0], Elder_2, Employer_1, parentEmployerRowByReference2[0]}; this->Rows->Add(rowStudentRow); return rowStudentRow; } inline LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ projectDataSet::StudentDataTable::FindByID(System::Int32 ID) { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >(this->Rows->Find(gcnew cli::array< System::Object^ >(1) {ID}))); } inline System::Collections::IEnumerator^ projectDataSet::StudentDataTable::GetEnumerator() { return this->Rows->GetEnumerator(); } inline System::Data::DataTable^ projectDataSet::StudentDataTable::Clone() { LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ cln = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ >(__super::Clone())); cln->InitVars(); return cln; } inline System::Data::DataTable^ projectDataSet::StudentDataTable::CreateInstance() { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable()); } inline System::Void projectDataSet::StudentDataTable::InitVars() { this->columnID = __super::Columns[L"ID"]; this->columnFirst_Name = __super::Columns[L"First Name"]; this->columnMiddle_Names = __super::Columns[L"Middle Names"]; this->columnLast_Name = __super::Columns[L"Last Name"]; this->columnAddress = __super::Columns[L"Address"]; this->columnSex = __super::Columns[L"Sex"]; this->columnApplication_Date = __super::Columns[L"Application Date"]; this->columnDate_of_Birth = __super::Columns[L"Date of Birth"]; this->columnPlace_of_Birth = __super::Columns[L"Place of Birth"]; this->_columnParent_Guardian = __super::Columns[L"Parent/Guardian"]; this->columnYounger_Siblings = __super::Columns[L"Younger Siblings"]; this->columnOlder_Siblings = __super::Columns[L"Older Siblings"]; this->columnBaptised = __super::Columns[L"Baptised"]; this->columnDate_of_Baptism = __super::Columns[L"Date of Baptism"]; this->columnAttended_High_School = __super::Columns[L"Attended High School"]; this->columnName_of_High_School = __super::Columns[L"Name of High School"]; this->columnAddress_of_High_School = __super::Columns[L"Address of High School"]; this->columnMinisters_Name = __super::Columns[L"Ministers Name"]; this->columnMinisters_Address = __super::Columns[L"Ministers Address"]; this->columnChristian_Work_Performed = __super::Columns[L"Christian Work Performed"]; this->columnElder_1 = __super::Columns[L"Elder 1"]; this->columnElder_2 = __super::Columns[L"Elder 2"]; this->columnEmployer_1 = __super::Columns[L"Employer 1"]; this->columnEmployer_2 = __super::Columns[L"Employer 2"]; } inline System::Void projectDataSet::StudentDataTable::InitClass() { this->columnID = (gcnew System::Data::DataColumn(L"ID", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnID); this->columnFirst_Name = (gcnew System::Data::DataColumn(L"First Name", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"First_Name"); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"First_NameColumn"); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnFirst_Name"); this->columnFirst_Name->ExtendedProperties->Add(L"Generator_UserColumnName", L"First Name"); __super::Columns->Add(this->columnFirst_Name); this->columnMiddle_Names = (gcnew System::Data::DataColumn(L"Middle Names", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnMiddle_Names->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Middle_Names"); this->columnMiddle_Names->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Middle_NamesColumn"); this->columnMiddle_Names->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnMiddle_Names"); this->columnMiddle_Names->ExtendedProperties->Add(L"Generator_UserColumnName", L"Middle Names"); __super::Columns->Add(this->columnMiddle_Names); this->columnLast_Name = (gcnew System::Data::DataColumn(L"Last Name", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnLast_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Last_Name"); this->columnLast_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Last_NameColumn"); this->columnLast_Name->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnLast_Name"); this->columnLast_Name->ExtendedProperties->Add(L"Generator_UserColumnName", L"Last Name"); __super::Columns->Add(this->columnLast_Name); this->columnAddress = (gcnew System::Data::DataColumn(L"Address", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnAddress); this->columnSex = (gcnew System::Data::DataColumn(L"Sex", System::String::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnSex); this->columnApplication_Date = (gcnew System::Data::DataColumn(L"Application Date", System::DateTime::typeid, nullptr, System::Data::MappingType::Element)); this->columnApplication_Date->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Application_Date"); this->columnApplication_Date->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Application_DateColumn"); this->columnApplication_Date->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnApplication_Date"); this->columnApplication_Date->ExtendedProperties->Add(L"Generator_UserColumnName", L"Application Date"); __super::Columns->Add(this->columnApplication_Date); this->columnDate_of_Birth = (gcnew System::Data::DataColumn(L"Date of Birth", System::DateTime::typeid, nullptr, System::Data::MappingType::Element)); this->columnDate_of_Birth->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Date_of_Birth"); this->columnDate_of_Birth->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Date_of_BirthColumn"); this->columnDate_of_Birth->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnDate_of_Birth"); this->columnDate_of_Birth->ExtendedProperties->Add(L"Generator_UserColumnName", L"Date of Birth"); __super::Columns->Add(this->columnDate_of_Birth); this->columnPlace_of_Birth = (gcnew System::Data::DataColumn(L"Place of Birth", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnPlace_of_Birth->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Place_of_Birth"); this->columnPlace_of_Birth->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Place_of_BirthColumn"); this->columnPlace_of_Birth->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnPlace_of_Birth"); this->columnPlace_of_Birth->ExtendedProperties->Add(L"Generator_UserColumnName", L"Place of Birth"); __super::Columns->Add(this->columnPlace_of_Birth); this->_columnParent_Guardian = (gcnew System::Data::DataColumn(L"Parent/Guardian", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->_columnParent_Guardian->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"_Parent_Guardian"); this->_columnParent_Guardian->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"_Parent_GuardianColumn"); this->_columnParent_Guardian->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"_columnParent_Guardian"); this->_columnParent_Guardian->ExtendedProperties->Add(L"Generator_UserColumnName", L"Parent/Guardian"); __super::Columns->Add(this->_columnParent_Guardian); this->columnYounger_Siblings = (gcnew System::Data::DataColumn(L"Younger Siblings", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnYounger_Siblings->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Younger_Siblings"); this->columnYounger_Siblings->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Younger_SiblingsColumn"); this->columnYounger_Siblings->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnYounger_Siblings"); this->columnYounger_Siblings->ExtendedProperties->Add(L"Generator_UserColumnName", L"Younger Siblings"); __super::Columns->Add(this->columnYounger_Siblings); this->columnOlder_Siblings = (gcnew System::Data::DataColumn(L"Older Siblings", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnOlder_Siblings->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Older_Siblings"); this->columnOlder_Siblings->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Older_SiblingsColumn"); this->columnOlder_Siblings->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnOlder_Siblings"); this->columnOlder_Siblings->ExtendedProperties->Add(L"Generator_UserColumnName", L"Older Siblings"); __super::Columns->Add(this->columnOlder_Siblings); this->columnBaptised = (gcnew System::Data::DataColumn(L"Baptised", System::Boolean::typeid, nullptr, System::Data::MappingType::Element)); __super::Columns->Add(this->columnBaptised); this->columnDate_of_Baptism = (gcnew System::Data::DataColumn(L"Date of Baptism", System::DateTime::typeid, nullptr, System::Data::MappingType::Element)); this->columnDate_of_Baptism->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Date_of_Baptism"); this->columnDate_of_Baptism->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Date_of_BaptismColumn"); this->columnDate_of_Baptism->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnDate_of_Baptism"); this->columnDate_of_Baptism->ExtendedProperties->Add(L"Generator_UserColumnName", L"Date of Baptism"); __super::Columns->Add(this->columnDate_of_Baptism); this->columnAttended_High_School = (gcnew System::Data::DataColumn(L"Attended High School", System::Boolean::typeid, nullptr, System::Data::MappingType::Element)); this->columnAttended_High_School->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Attended_High_School"); this->columnAttended_High_School->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Attended_High_SchoolColumn"); this->columnAttended_High_School->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnAttended_High_School"); this->columnAttended_High_School->ExtendedProperties->Add(L"Generator_UserColumnName", L"Attended High School"); __super::Columns->Add(this->columnAttended_High_School); this->columnName_of_High_School = (gcnew System::Data::DataColumn(L"Name of High School", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnName_of_High_School->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Name_of_High_School"); this->columnName_of_High_School->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Name_of_High_SchoolColumn"); this->columnName_of_High_School->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnName_of_High_School"); this->columnName_of_High_School->ExtendedProperties->Add(L"Generator_UserColumnName", L"Name of High School"); __super::Columns->Add(this->columnName_of_High_School); this->columnAddress_of_High_School = (gcnew System::Data::DataColumn(L"Address of High School", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnAddress_of_High_School->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Address_of_High_School"); this->columnAddress_of_High_School->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Address_of_High_SchoolColumn"); this->columnAddress_of_High_School->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnAddress_of_High_School"); this->columnAddress_of_High_School->ExtendedProperties->Add(L"Generator_UserColumnName", L"Address of High School"); __super::Columns->Add(this->columnAddress_of_High_School); this->columnMinisters_Name = (gcnew System::Data::DataColumn(L"Ministers Name", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnMinisters_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Ministers_Name"); this->columnMinisters_Name->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Ministers_NameColumn"); this->columnMinisters_Name->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnMinisters_Name"); this->columnMinisters_Name->ExtendedProperties->Add(L"Generator_UserColumnName", L"Ministers Name"); __super::Columns->Add(this->columnMinisters_Name); this->columnMinisters_Address = (gcnew System::Data::DataColumn(L"Ministers Address", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnMinisters_Address->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Ministers_Address"); this->columnMinisters_Address->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Ministers_AddressColumn"); this->columnMinisters_Address->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnMinisters_Address"); this->columnMinisters_Address->ExtendedProperties->Add(L"Generator_UserColumnName", L"Ministers Address"); __super::Columns->Add(this->columnMinisters_Address); this->columnChristian_Work_Performed = (gcnew System::Data::DataColumn(L"Christian Work Performed", System::String::typeid, nullptr, System::Data::MappingType::Element)); this->columnChristian_Work_Performed->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Christian_Work_Performed"); this->columnChristian_Work_Performed->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Christian_Work_PerformedColumn"); this->columnChristian_Work_Performed->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnChristian_Work_Performed"); this->columnChristian_Work_Performed->ExtendedProperties->Add(L"Generator_UserColumnName", L"Christian Work Performed"); __super::Columns->Add(this->columnChristian_Work_Performed); this->columnElder_1 = (gcnew System::Data::DataColumn(L"Elder 1", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnElder_1->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Elder_1"); this->columnElder_1->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Elder_1Column"); this->columnElder_1->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnElder_1"); this->columnElder_1->ExtendedProperties->Add(L"Generator_UserColumnName", L"Elder 1"); __super::Columns->Add(this->columnElder_1); this->columnElder_2 = (gcnew System::Data::DataColumn(L"Elder 2", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnElder_2->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Elder_2"); this->columnElder_2->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Elder_2Column"); this->columnElder_2->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnElder_2"); this->columnElder_2->ExtendedProperties->Add(L"Generator_UserColumnName", L"Elder 2"); __super::Columns->Add(this->columnElder_2); this->columnEmployer_1 = (gcnew System::Data::DataColumn(L"Employer 1", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnEmployer_1->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Employer_1"); this->columnEmployer_1->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Employer_1Column"); this->columnEmployer_1->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnEmployer_1"); this->columnEmployer_1->ExtendedProperties->Add(L"Generator_UserColumnName", L"Employer 1"); __super::Columns->Add(this->columnEmployer_1); this->columnEmployer_2 = (gcnew System::Data::DataColumn(L"Employer 2", System::Int32::typeid, nullptr, System::Data::MappingType::Element)); this->columnEmployer_2->ExtendedProperties->Add(L"Generator_ColumnPropNameInRow", L"Employer_2"); this->columnEmployer_2->ExtendedProperties->Add(L"Generator_ColumnPropNameInTable", L"Employer_2Column"); this->columnEmployer_2->ExtendedProperties->Add(L"Generator_ColumnVarNameInTable", L"columnEmployer_2"); this->columnEmployer_2->ExtendedProperties->Add(L"Generator_UserColumnName", L"Employer 2"); __super::Columns->Add(this->columnEmployer_2); this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^ >(1) {this->columnID}, true))); this->columnID->AutoIncrement = true; this->columnID->AllowDBNull = false; this->columnID->Unique = true; this->columnFirst_Name->MaxLength = 50; this->columnMiddle_Names->MaxLength = 50; this->columnLast_Name->MaxLength = 50; this->columnAddress->MaxLength = 50; this->columnSex->MaxLength = 50; this->columnPlace_of_Birth->MaxLength = 50; this->columnName_of_High_School->MaxLength = 50; this->columnAddress_of_High_School->MaxLength = 50; this->columnMinisters_Name->MaxLength = 50; this->columnMinisters_Address->MaxLength = 50; this->columnChristian_Work_Performed->MaxLength = 50; } inline LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ projectDataSet::StudentDataTable::NewStudentRow() { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >(this->NewRow())); } inline System::Data::DataRow^ projectDataSet::StudentDataTable::NewRowFromBuilder(System::Data::DataRowBuilder^ builder) { return (gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentRow(builder)); } inline System::Type^ projectDataSet::StudentDataTable::GetRowType() { return LCBCAdminRegistrationSystem::projectDataSet::StudentRow::typeid; } inline System::Void projectDataSet::StudentDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanged(e); { this->StudentRowChanged(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::StudentDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowChanging(e); { this->StudentRowChanging(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::StudentDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleted(e); { this->StudentRowDeleted(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::StudentDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) { __super::OnRowDeleting(e); { this->StudentRowDeleting(this, (gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentRowChangeEvent((cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >(e->Row)), e->Action))); } } inline System::Void projectDataSet::StudentDataTable::RemoveStudentRow(LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ row) { this->Rows->Remove(row); } inline System::Xml::Schema::XmlSchemaComplexType^ projectDataSet::StudentDataTable::GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^ xs) { System::Xml::Schema::XmlSchemaComplexType^ type = (gcnew System::Xml::Schema::XmlSchemaComplexType()); System::Xml::Schema::XmlSchemaSequence^ sequence = (gcnew System::Xml::Schema::XmlSchemaSequence()); LCBCAdminRegistrationSystem::projectDataSet^ ds = (gcnew LCBCAdminRegistrationSystem::projectDataSet()); xs->Add(ds->GetSchemaSerializable()); System::Xml::Schema::XmlSchemaAny^ any1 = (gcnew System::Xml::Schema::XmlSchemaAny()); any1->Namespace = L"http://www.w3.org/2001/XMLSchema"; any1->MinOccurs = System::Decimal(0); any1->MaxOccurs = System::Decimal::MaxValue; any1->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any1); System::Xml::Schema::XmlSchemaAny^ any2 = (gcnew System::Xml::Schema::XmlSchemaAny()); any2->Namespace = L"urn:schemas-microsoft-com:xml-diffgram-v1"; any2->MinOccurs = System::Decimal(1); any2->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax; sequence->Items->Add(any2); System::Xml::Schema::XmlSchemaAttribute^ attribute1 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute1->Name = L"namespace"; attribute1->FixedValue = ds->Namespace; type->Attributes->Add(attribute1); System::Xml::Schema::XmlSchemaAttribute^ attribute2 = (gcnew System::Xml::Schema::XmlSchemaAttribute()); attribute2->Name = L"tableTypeName"; attribute2->FixedValue = L"StudentDataTable"; type->Attributes->Add(attribute2); type->Particle = sequence; return type; } inline projectDataSet::ElderRow::ElderRow(System::Data::DataRowBuilder^ rb) : System::Data::DataRow(rb) { this->tableElder = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ >(this->Table)); } inline System::Int32 projectDataSet::ElderRow::ID::get() { return (*cli::safe_cast<System::Int32^>(this[this->tableElder->IDColumn])); } inline System::Void projectDataSet::ElderRow::ID::set(System::Int32 value) { this[this->tableElder->IDColumn] = value; } inline System::String^ projectDataSet::ElderRow::Name::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableElder->NameColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Name\' in table \'Elder\' is DBNull.", e)); } } inline System::Void projectDataSet::ElderRow::Name::set(System::String^ value) { this[this->tableElder->NameColumn] = value; } inline System::String^ projectDataSet::ElderRow::Address::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableElder->AddressColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Address\' in table \'Elder\' is DBNull.", e)); } } inline System::Void projectDataSet::ElderRow::Address::set(System::String^ value) { this[this->tableElder->AddressColumn] = value; } inline System::Int32 projectDataSet::ElderRow::Telephone_Number::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableElder->Telephone_NumberColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Telephone Number\' in table \'Elder\' is DBNull.", e)); } } inline System::Void projectDataSet::ElderRow::Telephone_Number::set(System::Int32 value) { this[this->tableElder->Telephone_NumberColumn] = value; } inline System::String^ projectDataSet::ElderRow::Church::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableElder->ChurchColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Church\' in table \'Elder\' is DBNull.", e)); } } inline System::Void projectDataSet::ElderRow::Church::set(System::String^ value) { this[this->tableElder->ChurchColumn] = value; } inline System::String^ projectDataSet::ElderRow::Position::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableElder->PositionColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Position\' in table \'Elder\' is DBNull.", e)); } } inline System::Void projectDataSet::ElderRow::Position::set(System::String^ value) { this[this->tableElder->PositionColumn] = value; } inline System::Boolean projectDataSet::ElderRow::IsNameNull() { return this->IsNull(this->tableElder->NameColumn); } inline System::Void projectDataSet::ElderRow::SetNameNull() { this[this->tableElder->NameColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::ElderRow::IsAddressNull() { return this->IsNull(this->tableElder->AddressColumn); } inline System::Void projectDataSet::ElderRow::SetAddressNull() { this[this->tableElder->AddressColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::ElderRow::IsTelephone_NumberNull() { return this->IsNull(this->tableElder->Telephone_NumberColumn); } inline System::Void projectDataSet::ElderRow::SetTelephone_NumberNull() { this[this->tableElder->Telephone_NumberColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::ElderRow::IsChurchNull() { return this->IsNull(this->tableElder->ChurchColumn); } inline System::Void projectDataSet::ElderRow::SetChurchNull() { this[this->tableElder->ChurchColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::ElderRow::IsPositionNull() { return this->IsNull(this->tableElder->PositionColumn); } inline System::Void projectDataSet::ElderRow::SetPositionNull() { this[this->tableElder->PositionColumn] = System::Convert::DBNull; } inline cli::array< LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >^ projectDataSet::ElderRow::GetStudentRows() { return (cli::safe_cast<cli::array< LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >^ >(__super::GetChildRows(this->Table->ChildRelations[L"Reference1"]))); } inline projectDataSet::EmployerRow::EmployerRow(System::Data::DataRowBuilder^ rb) : System::Data::DataRow(rb) { this->tableEmployer = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ >(this->Table)); } inline System::Int32 projectDataSet::EmployerRow::ID::get() { return (*cli::safe_cast<System::Int32^>(this[this->tableEmployer->IDColumn])); } inline System::Void projectDataSet::EmployerRow::ID::set(System::Int32 value) { this[this->tableEmployer->IDColumn] = value; } inline System::String^ projectDataSet::EmployerRow::First_Name::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableEmployer->First_NameColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'First Name\' in table \'Employer\' is DBNull.", e)); } } inline System::Void projectDataSet::EmployerRow::First_Name::set(System::String^ value) { this[this->tableEmployer->First_NameColumn] = value; } inline System::String^ projectDataSet::EmployerRow::Last_Name::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableEmployer->Last_NameColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Last Name\' in table \'Employer\' is DBNull.", e)); } } inline System::Void projectDataSet::EmployerRow::Last_Name::set(System::String^ value) { this[this->tableEmployer->Last_NameColumn] = value; } inline System::Int32 projectDataSet::EmployerRow::Telephone_Number::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableEmployer->Telephone_NumberColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Telephone Number\' in table \'Employer\' is DBNull.", e)); } } inline System::Void projectDataSet::EmployerRow::Telephone_Number::set(System::Int32 value) { this[this->tableEmployer->Telephone_NumberColumn] = value; } inline System::String^ projectDataSet::EmployerRow::Address::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableEmployer->AddressColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Address\' in table \'Employer\' is DBNull.", e)); } } inline System::Void projectDataSet::EmployerRow::Address::set(System::String^ value) { this[this->tableEmployer->AddressColumn] = value; } inline System::Boolean projectDataSet::EmployerRow::IsFirst_NameNull() { return this->IsNull(this->tableEmployer->First_NameColumn); } inline System::Void projectDataSet::EmployerRow::SetFirst_NameNull() { this[this->tableEmployer->First_NameColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::EmployerRow::IsLast_NameNull() { return this->IsNull(this->tableEmployer->Last_NameColumn); } inline System::Void projectDataSet::EmployerRow::SetLast_NameNull() { this[this->tableEmployer->Last_NameColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::EmployerRow::IsTelephone_NumberNull() { return this->IsNull(this->tableEmployer->Telephone_NumberColumn); } inline System::Void projectDataSet::EmployerRow::SetTelephone_NumberNull() { this[this->tableEmployer->Telephone_NumberColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::EmployerRow::IsAddressNull() { return this->IsNull(this->tableEmployer->AddressColumn); } inline System::Void projectDataSet::EmployerRow::SetAddressNull() { this[this->tableEmployer->AddressColumn] = System::Convert::DBNull; } inline cli::array< LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >^ projectDataSet::EmployerRow::GetStudentRows() { return (cli::safe_cast<cli::array< LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >^ >(__super::GetChildRows(this->Table->ChildRelations[L"Reference2"]))); } inline projectDataSet::Grade_PointRow::Grade_PointRow(System::Data::DataRowBuilder^ rb) : System::Data::DataRow(rb) { this->tableGrade_Point = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ >(this->Table)); } inline System::Int32 projectDataSet::Grade_PointRow::ID::get() { return (*cli::safe_cast<System::Int32^>(this[this->tableGrade_Point->IDColumn])); } inline System::Void projectDataSet::Grade_PointRow::ID::set(System::Int32 value) { this[this->tableGrade_Point->IDColumn] = value; } inline System::String^ projectDataSet::Grade_PointRow::Grade::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableGrade_Point->GradeColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Grade\' in table \'Grade Point\' is DBNull.", e)); } } inline System::Void projectDataSet::Grade_PointRow::Grade::set(System::String^ value) { this[this->tableGrade_Point->GradeColumn] = value; } inline System::Int32 projectDataSet::Grade_PointRow::Upper_Range::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableGrade_Point->Upper_RangeColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Upper Range\' in table \'Grade Point\' is DBNull.", e)); } } inline System::Void projectDataSet::Grade_PointRow::Upper_Range::set(System::Int32 value) { this[this->tableGrade_Point->Upper_RangeColumn] = value; } inline System::Int32 projectDataSet::Grade_PointRow::Lower_Range::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableGrade_Point->Lower_RangeColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Lower Range\' in table \'Grade Point\' is DBNull.", e)); } } inline System::Void projectDataSet::Grade_PointRow::Lower_Range::set(System::Int32 value) { this[this->tableGrade_Point->Lower_RangeColumn] = value; } inline System::Int32 projectDataSet::Grade_PointRow::Grade_Point::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableGrade_Point->Grade_PointColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Grade Point\' in table \'Grade Point\' is DBNull.", e)); } } inline System::Void projectDataSet::Grade_PointRow::Grade_Point::set(System::Int32 value) { this[this->tableGrade_Point->Grade_PointColumn] = value; } inline System::Boolean projectDataSet::Grade_PointRow::IsGradeNull() { return this->IsNull(this->tableGrade_Point->GradeColumn); } inline System::Void projectDataSet::Grade_PointRow::SetGradeNull() { this[this->tableGrade_Point->GradeColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::Grade_PointRow::IsUpper_RangeNull() { return this->IsNull(this->tableGrade_Point->Upper_RangeColumn); } inline System::Void projectDataSet::Grade_PointRow::SetUpper_RangeNull() { this[this->tableGrade_Point->Upper_RangeColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::Grade_PointRow::IsLower_RangeNull() { return this->IsNull(this->tableGrade_Point->Lower_RangeColumn); } inline System::Void projectDataSet::Grade_PointRow::SetLower_RangeNull() { this[this->tableGrade_Point->Lower_RangeColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::Grade_PointRow::IsGrade_PointNull() { return this->IsNull(this->tableGrade_Point->Grade_PointColumn); } inline System::Void projectDataSet::Grade_PointRow::SetGrade_PointNull() { this[this->tableGrade_Point->Grade_PointColumn] = System::Convert::DBNull; } inline projectDataSet::Parent_or_GuardianRow::Parent_or_GuardianRow(System::Data::DataRowBuilder^ rb) : System::Data::DataRow(rb) { this->tableParent_or_Guardian = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ >(this->Table)); } inline System::Int32 projectDataSet::Parent_or_GuardianRow::ID::get() { return (*cli::safe_cast<System::Int32^>(this[this->tableParent_or_Guardian->IDColumn])); } inline System::Void projectDataSet::Parent_or_GuardianRow::ID::set(System::Int32 value) { this[this->tableParent_or_Guardian->IDColumn] = value; } inline System::String^ projectDataSet::Parent_or_GuardianRow::First_Name::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableParent_or_Guardian->First_NameColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'First Name\' in table \'Parent or Guardian\' is DBNull.", e)); } } inline System::Void projectDataSet::Parent_or_GuardianRow::First_Name::set(System::String^ value) { this[this->tableParent_or_Guardian->First_NameColumn] = value; } inline System::String^ projectDataSet::Parent_or_GuardianRow::Last_Name::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableParent_or_Guardian->Last_NameColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Last Name\' in table \'Parent or Guardian\' is DBNull.", e)); } } inline System::Void projectDataSet::Parent_or_GuardianRow::Last_Name::set(System::String^ value) { this[this->tableParent_or_Guardian->Last_NameColumn] = value; } inline System::String^ projectDataSet::Parent_or_GuardianRow::Address::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableParent_or_Guardian->AddressColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Address\' in table \'Parent or Guardian\' is DBNull.", e)); } } inline System::Void projectDataSet::Parent_or_GuardianRow::Address::set(System::String^ value) { this[this->tableParent_or_Guardian->AddressColumn] = value; } inline System::String^ projectDataSet::Parent_or_GuardianRow::Occupation::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableParent_or_Guardian->OccupationColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Occupation\' in table \'Parent or Guardian\' is DBNull.", e)); } } inline System::Void projectDataSet::Parent_or_GuardianRow::Occupation::set(System::String^ value) { this[this->tableParent_or_Guardian->OccupationColumn] = value; } inline System::Int32 projectDataSet::Parent_or_GuardianRow::Telephone_Number::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableParent_or_Guardian->Telephone_NumberColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Telephone Number\' in table \'Parent or Guardian\' is DBNull.", e)); } } inline System::Void projectDataSet::Parent_or_GuardianRow::Telephone_Number::set(System::Int32 value) { this[this->tableParent_or_Guardian->Telephone_NumberColumn] = value; } inline System::Boolean projectDataSet::Parent_or_GuardianRow::IsFirst_NameNull() { return this->IsNull(this->tableParent_or_Guardian->First_NameColumn); } inline System::Void projectDataSet::Parent_or_GuardianRow::SetFirst_NameNull() { this[this->tableParent_or_Guardian->First_NameColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::Parent_or_GuardianRow::IsLast_NameNull() { return this->IsNull(this->tableParent_or_Guardian->Last_NameColumn); } inline System::Void projectDataSet::Parent_or_GuardianRow::SetLast_NameNull() { this[this->tableParent_or_Guardian->Last_NameColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::Parent_or_GuardianRow::IsAddressNull() { return this->IsNull(this->tableParent_or_Guardian->AddressColumn); } inline System::Void projectDataSet::Parent_or_GuardianRow::SetAddressNull() { this[this->tableParent_or_Guardian->AddressColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::Parent_or_GuardianRow::IsOccupationNull() { return this->IsNull(this->tableParent_or_Guardian->OccupationColumn); } inline System::Void projectDataSet::Parent_or_GuardianRow::SetOccupationNull() { this[this->tableParent_or_Guardian->OccupationColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::Parent_or_GuardianRow::IsTelephone_NumberNull() { return this->IsNull(this->tableParent_or_Guardian->Telephone_NumberColumn); } inline System::Void projectDataSet::Parent_or_GuardianRow::SetTelephone_NumberNull() { this[this->tableParent_or_Guardian->Telephone_NumberColumn] = System::Convert::DBNull; } inline cli::array< LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >^ projectDataSet::Parent_or_GuardianRow::GetStudentRows() { return (cli::safe_cast<cli::array< LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ >^ >(__super::GetChildRows(this->Table->ChildRelations[L"Reference"]))); } inline projectDataSet::StudentRow::StudentRow(System::Data::DataRowBuilder^ rb) : System::Data::DataRow(rb) { this->tableStudent = (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ >(this->Table)); } inline System::Int32 projectDataSet::StudentRow::ID::get() { return (*cli::safe_cast<System::Int32^>(this[this->tableStudent->IDColumn])); } inline System::Void projectDataSet::StudentRow::ID::set(System::Int32 value) { this[this->tableStudent->IDColumn] = value; } inline System::String^ projectDataSet::StudentRow::First_Name::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->First_NameColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'First Name\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::First_Name::set(System::String^ value) { this[this->tableStudent->First_NameColumn] = value; } inline System::String^ projectDataSet::StudentRow::Middle_Names::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->Middle_NamesColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Middle Names\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Middle_Names::set(System::String^ value) { this[this->tableStudent->Middle_NamesColumn] = value; } inline System::String^ projectDataSet::StudentRow::Last_Name::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->Last_NameColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Last Name\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Last_Name::set(System::String^ value) { this[this->tableStudent->Last_NameColumn] = value; } inline System::String^ projectDataSet::StudentRow::Address::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->AddressColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Address\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Address::set(System::String^ value) { this[this->tableStudent->AddressColumn] = value; } inline System::String^ projectDataSet::StudentRow::Sex::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->SexColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Sex\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Sex::set(System::String^ value) { this[this->tableStudent->SexColumn] = value; } inline System::DateTime projectDataSet::StudentRow::Application_Date::get() { try { return (*cli::safe_cast<System::DateTime^>(this[this->tableStudent->Application_DateColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Application Date\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Application_Date::set(System::DateTime value) { this[this->tableStudent->Application_DateColumn] = value; } inline System::DateTime projectDataSet::StudentRow::Date_of_Birth::get() { try { return (*cli::safe_cast<System::DateTime^>(this[this->tableStudent->Date_of_BirthColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Date of Birth\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Date_of_Birth::set(System::DateTime value) { this[this->tableStudent->Date_of_BirthColumn] = value; } inline System::String^ projectDataSet::StudentRow::Place_of_Birth::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->Place_of_BirthColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Place of Birth\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Place_of_Birth::set(System::String^ value) { this[this->tableStudent->Place_of_BirthColumn] = value; } inline System::Int32 projectDataSet::StudentRow::_Parent_Guardian::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableStudent->_Parent_GuardianColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Parent/Guardian\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::_Parent_Guardian::set(System::Int32 value) { this[this->tableStudent->_Parent_GuardianColumn] = value; } inline System::Int32 projectDataSet::StudentRow::Younger_Siblings::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableStudent->Younger_SiblingsColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Younger Siblings\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Younger_Siblings::set(System::Int32 value) { this[this->tableStudent->Younger_SiblingsColumn] = value; } inline System::Int32 projectDataSet::StudentRow::Older_Siblings::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableStudent->Older_SiblingsColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Older Siblings\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Older_Siblings::set(System::Int32 value) { this[this->tableStudent->Older_SiblingsColumn] = value; } inline System::Boolean projectDataSet::StudentRow::Baptised::get() { try { return (*cli::safe_cast<System::Boolean^>(this[this->tableStudent->BaptisedColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Baptised\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Baptised::set(System::Boolean value) { this[this->tableStudent->BaptisedColumn] = value; } inline System::DateTime projectDataSet::StudentRow::Date_of_Baptism::get() { try { return (*cli::safe_cast<System::DateTime^>(this[this->tableStudent->Date_of_BaptismColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Date of Baptism\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Date_of_Baptism::set(System::DateTime value) { this[this->tableStudent->Date_of_BaptismColumn] = value; } inline System::Boolean projectDataSet::StudentRow::Attended_High_School::get() { try { return (*cli::safe_cast<System::Boolean^>(this[this->tableStudent->Attended_High_SchoolColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Attended High School\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Attended_High_School::set(System::Boolean value) { this[this->tableStudent->Attended_High_SchoolColumn] = value; } inline System::String^ projectDataSet::StudentRow::Name_of_High_School::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->Name_of_High_SchoolColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Name of High School\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Name_of_High_School::set(System::String^ value) { this[this->tableStudent->Name_of_High_SchoolColumn] = value; } inline System::String^ projectDataSet::StudentRow::Address_of_High_School::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->Address_of_High_SchoolColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Address of High School\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Address_of_High_School::set(System::String^ value) { this[this->tableStudent->Address_of_High_SchoolColumn] = value; } inline System::String^ projectDataSet::StudentRow::Ministers_Name::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->Ministers_NameColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Ministers Name\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Ministers_Name::set(System::String^ value) { this[this->tableStudent->Ministers_NameColumn] = value; } inline System::String^ projectDataSet::StudentRow::Ministers_Address::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->Ministers_AddressColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Ministers Address\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Ministers_Address::set(System::String^ value) { this[this->tableStudent->Ministers_AddressColumn] = value; } inline System::String^ projectDataSet::StudentRow::Christian_Work_Performed::get() { try { return (cli::safe_cast<System::String^ >(this[this->tableStudent->Christian_Work_PerformedColumn])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Christian Work Performed\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Christian_Work_Performed::set(System::String^ value) { this[this->tableStudent->Christian_Work_PerformedColumn] = value; } inline System::Int32 projectDataSet::StudentRow::Elder_1::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableStudent->Elder_1Column])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Elder 1\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Elder_1::set(System::Int32 value) { this[this->tableStudent->Elder_1Column] = value; } inline System::Int32 projectDataSet::StudentRow::Elder_2::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableStudent->Elder_2Column])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Elder 2\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Elder_2::set(System::Int32 value) { this[this->tableStudent->Elder_2Column] = value; } inline System::Int32 projectDataSet::StudentRow::Employer_1::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableStudent->Employer_1Column])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Employer 1\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Employer_1::set(System::Int32 value) { this[this->tableStudent->Employer_1Column] = value; } inline System::Int32 projectDataSet::StudentRow::Employer_2::get() { try { return (*cli::safe_cast<System::Int32^>(this[this->tableStudent->Employer_2Column])); } catch (System::InvalidCastException^ e) { throw (gcnew System::Data::StrongTypingException(L"The value for column \'Employer 2\' in table \'Student\' is DBNull.", e)); } } inline System::Void projectDataSet::StudentRow::Employer_2::set(System::Int32 value) { this[this->tableStudent->Employer_2Column] = value; } inline LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ projectDataSet::StudentRow::Parent_or_GuardianRow::get() { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ >(this->GetParentRow(this->Table->ParentRelations[L"Reference"]))); } inline System::Void projectDataSet::StudentRow::Parent_or_GuardianRow::set(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ value) { this->SetParentRow(value, this->Table->ParentRelations[L"Reference"]); } inline LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ projectDataSet::StudentRow::ElderRow::get() { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ >(this->GetParentRow(this->Table->ParentRelations[L"Reference1"]))); } inline System::Void projectDataSet::StudentRow::ElderRow::set(LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ value) { this->SetParentRow(value, this->Table->ParentRelations[L"Reference1"]); } inline LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ projectDataSet::StudentRow::EmployerRow::get() { return (cli::safe_cast<LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ >(this->GetParentRow(this->Table->ParentRelations[L"Reference2"]))); } inline System::Void projectDataSet::StudentRow::EmployerRow::set(LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ value) { this->SetParentRow(value, this->Table->ParentRelations[L"Reference2"]); } inline System::Boolean projectDataSet::StudentRow::IsFirst_NameNull() { return this->IsNull(this->tableStudent->First_NameColumn); } inline System::Void projectDataSet::StudentRow::SetFirst_NameNull() { this[this->tableStudent->First_NameColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsMiddle_NamesNull() { return this->IsNull(this->tableStudent->Middle_NamesColumn); } inline System::Void projectDataSet::StudentRow::SetMiddle_NamesNull() { this[this->tableStudent->Middle_NamesColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsLast_NameNull() { return this->IsNull(this->tableStudent->Last_NameColumn); } inline System::Void projectDataSet::StudentRow::SetLast_NameNull() { this[this->tableStudent->Last_NameColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsAddressNull() { return this->IsNull(this->tableStudent->AddressColumn); } inline System::Void projectDataSet::StudentRow::SetAddressNull() { this[this->tableStudent->AddressColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsSexNull() { return this->IsNull(this->tableStudent->SexColumn); } inline System::Void projectDataSet::StudentRow::SetSexNull() { this[this->tableStudent->SexColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsApplication_DateNull() { return this->IsNull(this->tableStudent->Application_DateColumn); } inline System::Void projectDataSet::StudentRow::SetApplication_DateNull() { this[this->tableStudent->Application_DateColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsDate_of_BirthNull() { return this->IsNull(this->tableStudent->Date_of_BirthColumn); } inline System::Void projectDataSet::StudentRow::SetDate_of_BirthNull() { this[this->tableStudent->Date_of_BirthColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsPlace_of_BirthNull() { return this->IsNull(this->tableStudent->Place_of_BirthColumn); } inline System::Void projectDataSet::StudentRow::SetPlace_of_BirthNull() { this[this->tableStudent->Place_of_BirthColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::Is_Parent_GuardianNull() { return this->IsNull(this->tableStudent->_Parent_GuardianColumn); } inline System::Void projectDataSet::StudentRow::Set_Parent_GuardianNull() { this[this->tableStudent->_Parent_GuardianColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsYounger_SiblingsNull() { return this->IsNull(this->tableStudent->Younger_SiblingsColumn); } inline System::Void projectDataSet::StudentRow::SetYounger_SiblingsNull() { this[this->tableStudent->Younger_SiblingsColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsOlder_SiblingsNull() { return this->IsNull(this->tableStudent->Older_SiblingsColumn); } inline System::Void projectDataSet::StudentRow::SetOlder_SiblingsNull() { this[this->tableStudent->Older_SiblingsColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsBaptisedNull() { return this->IsNull(this->tableStudent->BaptisedColumn); } inline System::Void projectDataSet::StudentRow::SetBaptisedNull() { this[this->tableStudent->BaptisedColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsDate_of_BaptismNull() { return this->IsNull(this->tableStudent->Date_of_BaptismColumn); } inline System::Void projectDataSet::StudentRow::SetDate_of_BaptismNull() { this[this->tableStudent->Date_of_BaptismColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsAttended_High_SchoolNull() { return this->IsNull(this->tableStudent->Attended_High_SchoolColumn); } inline System::Void projectDataSet::StudentRow::SetAttended_High_SchoolNull() { this[this->tableStudent->Attended_High_SchoolColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsName_of_High_SchoolNull() { return this->IsNull(this->tableStudent->Name_of_High_SchoolColumn); } inline System::Void projectDataSet::StudentRow::SetName_of_High_SchoolNull() { this[this->tableStudent->Name_of_High_SchoolColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsAddress_of_High_SchoolNull() { return this->IsNull(this->tableStudent->Address_of_High_SchoolColumn); } inline System::Void projectDataSet::StudentRow::SetAddress_of_High_SchoolNull() { this[this->tableStudent->Address_of_High_SchoolColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsMinisters_NameNull() { return this->IsNull(this->tableStudent->Ministers_NameColumn); } inline System::Void projectDataSet::StudentRow::SetMinisters_NameNull() { this[this->tableStudent->Ministers_NameColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsMinisters_AddressNull() { return this->IsNull(this->tableStudent->Ministers_AddressColumn); } inline System::Void projectDataSet::StudentRow::SetMinisters_AddressNull() { this[this->tableStudent->Ministers_AddressColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsChristian_Work_PerformedNull() { return this->IsNull(this->tableStudent->Christian_Work_PerformedColumn); } inline System::Void projectDataSet::StudentRow::SetChristian_Work_PerformedNull() { this[this->tableStudent->Christian_Work_PerformedColumn] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsElder_1Null() { return this->IsNull(this->tableStudent->Elder_1Column); } inline System::Void projectDataSet::StudentRow::SetElder_1Null() { this[this->tableStudent->Elder_1Column] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsElder_2Null() { return this->IsNull(this->tableStudent->Elder_2Column); } inline System::Void projectDataSet::StudentRow::SetElder_2Null() { this[this->tableStudent->Elder_2Column] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsEmployer_1Null() { return this->IsNull(this->tableStudent->Employer_1Column); } inline System::Void projectDataSet::StudentRow::SetEmployer_1Null() { this[this->tableStudent->Employer_1Column] = System::Convert::DBNull; } inline System::Boolean projectDataSet::StudentRow::IsEmployer_2Null() { return this->IsNull(this->tableStudent->Employer_2Column); } inline System::Void projectDataSet::StudentRow::SetEmployer_2Null() { this[this->tableStudent->Employer_2Column] = System::Convert::DBNull; } inline projectDataSet::ElderRowChangeEvent::ElderRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ row, System::Data::DataRowAction action) { this->eventRow = row; this->eventAction = action; } inline LCBCAdminRegistrationSystem::projectDataSet::ElderRow^ projectDataSet::ElderRowChangeEvent::Row::get() { return this->eventRow; } inline System::Data::DataRowAction projectDataSet::ElderRowChangeEvent::Action::get() { return this->eventAction; } inline projectDataSet::EmployerRowChangeEvent::EmployerRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ row, System::Data::DataRowAction action) { this->eventRow = row; this->eventAction = action; } inline LCBCAdminRegistrationSystem::projectDataSet::EmployerRow^ projectDataSet::EmployerRowChangeEvent::Row::get() { return this->eventRow; } inline System::Data::DataRowAction projectDataSet::EmployerRowChangeEvent::Action::get() { return this->eventAction; } inline projectDataSet::Grade_PointRowChangeEvent::Grade_PointRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ row, System::Data::DataRowAction action) { this->eventRow = row; this->eventAction = action; } inline LCBCAdminRegistrationSystem::projectDataSet::Grade_PointRow^ projectDataSet::Grade_PointRowChangeEvent::Row::get() { return this->eventRow; } inline System::Data::DataRowAction projectDataSet::Grade_PointRowChangeEvent::Action::get() { return this->eventAction; } inline projectDataSet::Parent_or_GuardianRowChangeEvent::Parent_or_GuardianRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ row, System::Data::DataRowAction action) { this->eventRow = row; this->eventAction = action; } inline LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianRow^ projectDataSet::Parent_or_GuardianRowChangeEvent::Row::get() { return this->eventRow; } inline System::Data::DataRowAction projectDataSet::Parent_or_GuardianRowChangeEvent::Action::get() { return this->eventAction; } inline projectDataSet::StudentRowChangeEvent::StudentRowChangeEvent(LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ row, System::Data::DataRowAction action) { this->eventRow = row; this->eventAction = action; } inline LCBCAdminRegistrationSystem::projectDataSet::StudentRow^ projectDataSet::StudentRowChangeEvent::Row::get() { return this->eventRow; } inline System::Data::DataRowAction projectDataSet::StudentRowChangeEvent::Action::get() { return this->eventAction; } } namespace LCBCAdminRegistrationSystem { namespace projectDataSetTableAdapters { using namespace System; ref class ElderTableAdapter; ref class EmployerTableAdapter; ref class Grade_PointTableAdapter; ref class Parent_or_GuardianTableAdapter; ref class StudentTableAdapter; [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::ComponentModel::DesignerCategoryAttribute(L"code"), System::ComponentModel::ToolboxItem(true), System::ComponentModel::DataObjectAttribute(true), System::ComponentModel::DesignerAttribute(L"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" L", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] public ref class ElderTableAdapter : public System::ComponentModel::Component { private: System::Data::OleDb::OleDbDataAdapter^ _adapter; private: System::Data::OleDb::OleDbConnection^ _connection; private: cli::array< System::Data::OleDb::OleDbCommand^ >^ _commandCollection; private: System::Boolean _clearBeforeFill; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] ElderTableAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbDataAdapter^ Adapter { System::Data::OleDb::OleDbDataAdapter^ get(); } internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbConnection^ Connection { System::Data::OleDb::OleDbConnection^ get(); System::Void set(System::Data::OleDb::OleDbConnection^ value); } protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] property cli::array< System::Data::OleDb::OleDbCommand^ >^ CommandCollection { cli::array< System::Data::OleDb::OleDbCommand^ >^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Boolean ClearBeforeFill { System::Boolean get(); System::Void set(System::Boolean value); } private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitConnection(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitCommandCollection(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Fill, true)] virtual System::Int32 Fill(LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Select, true)] virtual LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ GetData(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(System::Data::DataRow^ dataRow); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(cli::array< System::Data::DataRow^ >^ dataRows); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Delete, true)] virtual System::Int32 Delete( System::Int32 Original_ID, System::String^ Original_Name, System::String^ Original_Address, System::Nullable<System::Int32 > Original_Telephone_Number, System::String^ Original_Church, System::String^ Original_Position); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Insert, true)] virtual System::Int32 Insert(System::String^ Name, System::String^ Address, System::Nullable<System::Int32 > Telephone_Number, System::String^ Church, System::String^ Position); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Update, true)] virtual System::Int32 Update( System::String^ Name, System::String^ Address, System::Nullable<System::Int32 > Telephone_Number, System::String^ Church, System::String^ Position, System::Int32 Original_ID, System::String^ Original_Name, System::String^ Original_Address, System::Nullable<System::Int32 > Original_Telephone_Number, System::String^ Original_Church, System::String^ Original_Position); }; [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::ComponentModel::DesignerCategoryAttribute(L"code"), System::ComponentModel::ToolboxItem(true), System::ComponentModel::DataObjectAttribute(true), System::ComponentModel::DesignerAttribute(L"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" L", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] public ref class EmployerTableAdapter : public System::ComponentModel::Component { private: System::Data::OleDb::OleDbDataAdapter^ _adapter; private: System::Data::OleDb::OleDbConnection^ _connection; private: cli::array< System::Data::OleDb::OleDbCommand^ >^ _commandCollection; private: System::Boolean _clearBeforeFill; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] EmployerTableAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbDataAdapter^ Adapter { System::Data::OleDb::OleDbDataAdapter^ get(); } internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbConnection^ Connection { System::Data::OleDb::OleDbConnection^ get(); System::Void set(System::Data::OleDb::OleDbConnection^ value); } protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] property cli::array< System::Data::OleDb::OleDbCommand^ >^ CommandCollection { cli::array< System::Data::OleDb::OleDbCommand^ >^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Boolean ClearBeforeFill { System::Boolean get(); System::Void set(System::Boolean value); } private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitConnection(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitCommandCollection(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Fill, true)] virtual System::Int32 Fill(LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Select, true)] virtual LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ GetData(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(System::Data::DataRow^ dataRow); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(cli::array< System::Data::DataRow^ >^ dataRows); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Delete, true)] virtual System::Int32 Delete(System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Last_Name, System::Nullable<System::Int32 > Original_Telephone_Number, System::String^ Original_Address); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Insert, true)] virtual System::Int32 Insert(System::String^ First_Name, System::String^ Last_Name, System::Nullable<System::Int32 > Telephone_Number, System::String^ Address); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Update, true)] virtual System::Int32 Update( System::String^ First_Name, System::String^ Last_Name, System::Nullable<System::Int32 > Telephone_Number, System::String^ Address, System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Last_Name, System::Nullable<System::Int32 > Original_Telephone_Number, System::String^ Original_Address); }; [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::ComponentModel::DesignerCategoryAttribute(L"code"), System::ComponentModel::ToolboxItem(true), System::ComponentModel::DataObjectAttribute(true), System::ComponentModel::DesignerAttribute(L"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" L", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] public ref class Grade_PointTableAdapter : public System::ComponentModel::Component { private: System::Data::OleDb::OleDbDataAdapter^ _adapter; private: System::Data::OleDb::OleDbConnection^ _connection; private: cli::array< System::Data::OleDb::OleDbCommand^ >^ _commandCollection; private: System::Boolean _clearBeforeFill; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] Grade_PointTableAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbDataAdapter^ Adapter { System::Data::OleDb::OleDbDataAdapter^ get(); } internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbConnection^ Connection { System::Data::OleDb::OleDbConnection^ get(); System::Void set(System::Data::OleDb::OleDbConnection^ value); } protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] property cli::array< System::Data::OleDb::OleDbCommand^ >^ CommandCollection { cli::array< System::Data::OleDb::OleDbCommand^ >^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Boolean ClearBeforeFill { System::Boolean get(); System::Void set(System::Boolean value); } private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitConnection(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitCommandCollection(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Fill, true)] virtual System::Int32 Fill(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Select, true)] virtual LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ GetData(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(System::Data::DataRow^ dataRow); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(cli::array< System::Data::DataRow^ >^ dataRows); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Delete, true)] virtual System::Int32 Delete(System::Int32 Original_ID, System::String^ Original_Grade, System::Nullable<System::Int32 > Original_Upper_Range, System::Nullable<System::Int32 > Original_Lower_Range, System::Nullable<System::Int32 > Original_Grade_Point); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Insert, true)] virtual System::Int32 Insert(System::String^ Grade, System::Nullable<System::Int32 > Upper_Range, System::Nullable<System::Int32 > Lower_Range, System::Nullable<System::Int32 > Grade_Point); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Update, true)] virtual System::Int32 Update( System::String^ Grade, System::Nullable<System::Int32 > Upper_Range, System::Nullable<System::Int32 > Lower_Range, System::Nullable<System::Int32 > Grade_Point, System::Int32 Original_ID, System::String^ Original_Grade, System::Nullable<System::Int32 > Original_Upper_Range, System::Nullable<System::Int32 > Original_Lower_Range, System::Nullable<System::Int32 > Original_Grade_Point); }; [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::ComponentModel::DesignerCategoryAttribute(L"code"), System::ComponentModel::ToolboxItem(true), System::ComponentModel::DataObjectAttribute(true), System::ComponentModel::DesignerAttribute(L"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" L", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] public ref class Parent_or_GuardianTableAdapter : public System::ComponentModel::Component { private: System::Data::OleDb::OleDbDataAdapter^ _adapter; private: System::Data::OleDb::OleDbConnection^ _connection; private: cli::array< System::Data::OleDb::OleDbCommand^ >^ _commandCollection; private: System::Boolean _clearBeforeFill; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] Parent_or_GuardianTableAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbDataAdapter^ Adapter { System::Data::OleDb::OleDbDataAdapter^ get(); } internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbConnection^ Connection { System::Data::OleDb::OleDbConnection^ get(); System::Void set(System::Data::OleDb::OleDbConnection^ value); } protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] property cli::array< System::Data::OleDb::OleDbCommand^ >^ CommandCollection { cli::array< System::Data::OleDb::OleDbCommand^ >^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Boolean ClearBeforeFill { System::Boolean get(); System::Void set(System::Boolean value); } private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitConnection(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitCommandCollection(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Fill, true)] virtual System::Int32 Fill(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Select, true)] virtual LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ GetData(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(System::Data::DataRow^ dataRow); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(cli::array< System::Data::DataRow^ >^ dataRows); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Delete, true)] virtual System::Int32 Delete( System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Last_Name, System::String^ Original_Address, System::String^ Original_Occupation, System::Nullable<System::Int32 > Original_Telephone_Number); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Insert, true)] virtual System::Int32 Insert(System::String^ First_Name, System::String^ Last_Name, System::String^ Address, System::String^ Occupation, System::Nullable<System::Int32 > Telephone_Number); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Update, true)] virtual System::Int32 Update( System::String^ First_Name, System::String^ Last_Name, System::String^ Address, System::String^ Occupation, System::Nullable<System::Int32 > Telephone_Number, System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Last_Name, System::String^ Original_Address, System::String^ Original_Occupation, System::Nullable<System::Int32 > Original_Telephone_Number); }; [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), System::ComponentModel::DesignerCategoryAttribute(L"code"), System::ComponentModel::ToolboxItem(true), System::ComponentModel::DataObjectAttribute(true), System::ComponentModel::DesignerAttribute(L"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" L", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] public ref class StudentTableAdapter : public System::ComponentModel::Component { private: System::Data::OleDb::OleDbDataAdapter^ _adapter; private: System::Data::OleDb::OleDbConnection^ _connection; private: cli::array< System::Data::OleDb::OleDbCommand^ >^ _commandCollection; private: System::Boolean _clearBeforeFill; public: [System::Diagnostics::DebuggerNonUserCodeAttribute] StudentTableAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbDataAdapter^ Adapter { System::Data::OleDb::OleDbDataAdapter^ get(); } internal: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Data::OleDb::OleDbConnection^ Connection { System::Data::OleDb::OleDbConnection^ get(); System::Void set(System::Data::OleDb::OleDbConnection^ value); } protected: [System::Diagnostics::DebuggerNonUserCodeAttribute] property cli::array< System::Data::OleDb::OleDbCommand^ >^ CommandCollection { cli::array< System::Data::OleDb::OleDbCommand^ >^ get(); } public: [System::Diagnostics::DebuggerNonUserCodeAttribute] property System::Boolean ClearBeforeFill { System::Boolean get(); System::Void set(System::Boolean value); } private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitAdapter(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitConnection(); private: [System::Diagnostics::DebuggerNonUserCodeAttribute] System::Void InitCommandCollection(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Fill, true)] virtual System::Int32 Fill(LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Select, true)] virtual LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ GetData(); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ dataTable); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(System::Data::DataRow^ dataRow); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] virtual System::Int32 Update(cli::array< System::Data::DataRow^ >^ dataRows); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Delete, true)] virtual System::Int32 Delete( System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Middle_Names, System::String^ Original_Last_Name, System::String^ Original_Address, System::String^ Original_Sex, System::Nullable<System::DateTime > Original_Application_Date, System::Nullable<System::DateTime > Original_Date_of_Birth, System::String^ Original_Place_of_Birth, System::Nullable<System::Int32 > _Original_Parent_Guardian, System::Nullable<System::Int32 > Original_Younger_Siblings, System::Nullable<System::Int32 > Original_Older_Siblings, System::Boolean Original_Baptised, System::Nullable<System::DateTime > Original_Date_of_Baptism, System::Boolean Original_Attended_High_School, System::String^ Original_Name_of_High_School, System::String^ Original_Address_of_High_School, System::String^ Original_Ministers_Name, System::String^ Original_Ministers_Address, System::String^ Original_Christian_Work_Performed, System::Nullable<System::Int32 > Original_Elder_1, System::Nullable<System::Int32 > Original_Elder_2, System::Nullable<System::Int32 > Original_Employer_1, System::Nullable<System::Int32 > Original_Employer_2); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Insert, true)] virtual System::Int32 Insert( System::String^ First_Name, System::String^ Middle_Names, System::String^ Last_Name, System::String^ Address, System::String^ Sex, System::Nullable<System::DateTime > Application_Date, System::Nullable<System::DateTime > Date_of_Birth, System::String^ Place_of_Birth, System::Nullable<System::Int32 > _Parent_Guardian, System::Nullable<System::Int32 > Younger_Siblings, System::Nullable<System::Int32 > Older_Siblings, System::Boolean Baptised, System::Nullable<System::DateTime > Date_of_Baptism, System::Boolean Attended_High_School, System::String^ Name_of_High_School, System::String^ Address_of_High_School, System::String^ Ministers_Name, System::String^ Ministers_Address, System::String^ Christian_Work_Performed, System::Nullable<System::Int32 > Elder_1, System::Nullable<System::Int32 > Elder_2, System::Nullable<System::Int32 > Employer_1, System::Nullable<System::Int32 > Employer_2); public: [System::Diagnostics::DebuggerNonUserCodeAttribute] [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")] [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Update, true)] virtual System::Int32 Update( System::String^ First_Name, System::String^ Middle_Names, System::String^ Last_Name, System::String^ Address, System::String^ Sex, System::Nullable<System::DateTime > Application_Date, System::Nullable<System::DateTime > Date_of_Birth, System::String^ Place_of_Birth, System::Nullable<System::Int32 > _Parent_Guardian, System::Nullable<System::Int32 > Younger_Siblings, System::Nullable<System::Int32 > Older_Siblings, System::Boolean Baptised, System::Nullable<System::DateTime > Date_of_Baptism, System::Boolean Attended_High_School, System::String^ Name_of_High_School, System::String^ Address_of_High_School, System::String^ Ministers_Name, System::String^ Ministers_Address, System::String^ Christian_Work_Performed, System::Nullable<System::Int32 > Elder_1, System::Nullable<System::Int32 > Elder_2, System::Nullable<System::Int32 > Employer_1, System::Nullable<System::Int32 > Employer_2, System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Middle_Names, System::String^ Original_Last_Name, System::String^ Original_Address, System::String^ Original_Sex, System::Nullable<System::DateTime > Original_Application_Date, System::Nullable<System::DateTime > Original_Date_of_Birth, System::String^ Original_Place_of_Birth, System::Nullable<System::Int32 > _Original_Parent_Guardian, System::Nullable<System::Int32 > Original_Younger_Siblings, System::Nullable<System::Int32 > Original_Older_Siblings, System::Boolean Original_Baptised, System::Nullable<System::DateTime > Original_Date_of_Baptism, System::Boolean Original_Attended_High_School, System::String^ Original_Name_of_High_School, System::String^ Original_Address_of_High_School, System::String^ Original_Ministers_Name, System::String^ Original_Ministers_Address, System::String^ Original_Christian_Work_Performed, System::Nullable<System::Int32 > Original_Elder_1, System::Nullable<System::Int32 > Original_Elder_2, System::Nullable<System::Int32 > Original_Employer_1, System::Nullable<System::Int32 > Original_Employer_2); }; } } namespace LCBCAdminRegistrationSystem { namespace projectDataSetTableAdapters { inline ElderTableAdapter::ElderTableAdapter() { this->ClearBeforeFill = true; } inline System::Data::OleDb::OleDbDataAdapter^ ElderTableAdapter::Adapter::get() { if (this->_adapter == nullptr) { this->InitAdapter(); } return this->_adapter; } inline System::Data::OleDb::OleDbConnection^ ElderTableAdapter::Connection::get() { if (this->_connection == nullptr) { this->InitConnection(); } return this->_connection; } inline System::Void ElderTableAdapter::Connection::set(System::Data::OleDb::OleDbConnection^ value) { this->_connection = __identifier(value); if (this->Adapter->InsertCommand != nullptr) { this->Adapter->InsertCommand->Connection = __identifier(value); } if (this->Adapter->DeleteCommand != nullptr) { this->Adapter->DeleteCommand->Connection = __identifier(value); } if (this->Adapter->UpdateCommand != nullptr) { this->Adapter->UpdateCommand->Connection = __identifier(value); } for ( System::Int32 i = 0; (i < this->CommandCollection->Length); i = (i + 1)) { if (this->CommandCollection[i] != nullptr) { (cli::safe_cast<System::Data::OleDb::OleDbCommand^ >(this->CommandCollection[i]))->Connection = __identifier(value); } } } inline cli::array< System::Data::OleDb::OleDbCommand^ >^ ElderTableAdapter::CommandCollection::get() { if (this->_commandCollection == nullptr) { this->InitCommandCollection(); } return this->_commandCollection; } inline System::Boolean ElderTableAdapter::ClearBeforeFill::get() { return this->_clearBeforeFill; } inline System::Void ElderTableAdapter::ClearBeforeFill::set(System::Boolean value) { this->_clearBeforeFill = __identifier(value); } inline System::Void ElderTableAdapter::InitAdapter() { this->_adapter = (gcnew System::Data::OleDb::OleDbDataAdapter()); System::Data::Common::DataTableMapping^ tableMapping = (gcnew System::Data::Common::DataTableMapping()); tableMapping->SourceTable = L"Table"; tableMapping->DataSetTable = L"Elder"; tableMapping->ColumnMappings->Add(L"ID", L"ID"); tableMapping->ColumnMappings->Add(L"Name", L"Name"); tableMapping->ColumnMappings->Add(L"Address", L"Address"); tableMapping->ColumnMappings->Add(L"Telephone Number", L"Telephone Number"); tableMapping->ColumnMappings->Add(L"Church", L"Church"); tableMapping->ColumnMappings->Add(L"Position", L"Position"); this->_adapter->TableMappings->Add(tableMapping); this->_adapter->DeleteCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->DeleteCommand->Connection = this->Connection; this->_adapter->DeleteCommand->CommandText = L"DELETE FROM `Elder` WHERE ((`ID` = \?) AND ((\? = 1 AND `Name` IS NULL) OR (`Name` " L"= \?)) AND ((\? = 1 AND `Address` IS NULL) OR (`Address` = \?)) AND ((\? = 1 AND `Te" L"lephone Number` IS NULL) OR (`Telephone Number` = \?)) AND ((\? = 1 AND `Church` I" L"S NULL) OR (`Church` = \?)) AND ((\? = 1 AND `Position` IS NULL) OR (`Position` = " L"\?)))"; this->_adapter->DeleteCommand->CommandType = System::Data::CommandType::Text; this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Church", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Church", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Church", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Church", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Position", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Position", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Position", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Position", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->InsertCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->InsertCommand->Connection = this->Connection; this->_adapter->InsertCommand->CommandText = L"INSERT INTO `Elder` (`Name`, `Address`, `Telephone Number`, `Church`, `Position`)" L" VALUES (\?, \?, \?, \?, \?)"; this->_adapter->InsertCommand->CommandType = System::Data::CommandType::Text; this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Church", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Church", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Position", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Position", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->UpdateCommand->Connection = this->Connection; this->_adapter->UpdateCommand->CommandText = L"UPDATE `Elder` SET `Name` = \?, `Address` = \?, `Telephone Number` = \?, `Church` = " L"\?, `Position` = \? WHERE ((`ID` = \?) AND ((\? = 1 AND `Name` IS NULL) OR (`Name` =" L" \?)) AND ((\? = 1 AND `Address` IS NULL) OR (`Address` = \?)) AND ((\? = 1 AND `Tel" L"ephone Number` IS NULL) OR (`Telephone Number` = \?)) AND ((\? = 1 AND `Church` IS" L" NULL) OR (`Church` = \?)) AND ((\? = 1 AND `Position` IS NULL) OR (`Position` = \?" L")))"; this->_adapter->UpdateCommand->CommandType = System::Data::CommandType::Text; this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Church", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Church", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Position", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Position", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Church", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Church", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Church", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Church", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Position", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Position", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Position", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Position", System::Data::DataRowVersion::Original, false, nullptr))); } inline System::Void ElderTableAdapter::InitConnection() { this->_connection = (gcnew System::Data::OleDb::OleDbConnection()); this->_connection->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\LCBC-AdminRegistrationSystem\\LCBC" L"-AdminRegistrationSystem\\release\\project.mdb"; } inline System::Void ElderTableAdapter::InitCommandCollection() { this->_commandCollection = gcnew cli::array< System::Data::OleDb::OleDbCommand^ >(1); this->_commandCollection[0] = (gcnew System::Data::OleDb::OleDbCommand()); this->_commandCollection[0]->Connection = this->Connection; this->_commandCollection[0]->CommandText = L"SELECT ID, Name, Address, [Telephone Number], Church, [Position] FROM Elder"; this->_commandCollection[0]->CommandType = System::Data::CommandType::Text; } inline System::Int32 ElderTableAdapter::Fill(LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ dataTable) { this->Adapter->SelectCommand = this->CommandCollection[0]; if (this->ClearBeforeFill == true) { dataTable->Clear(); } System::Int32 returnValue = this->Adapter->Fill(dataTable); return returnValue; } inline LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ ElderTableAdapter::GetData() { this->Adapter->SelectCommand = this->CommandCollection[0]; LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ dataTable = (gcnew LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable()); this->Adapter->Fill(dataTable); return dataTable; } inline System::Int32 ElderTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet::ElderDataTable^ dataTable) { return this->Adapter->Update(dataTable); } inline System::Int32 ElderTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet) { return this->Adapter->Update(dataSet, L"Elder"); } inline System::Int32 ElderTableAdapter::Update(System::Data::DataRow^ dataRow) { return this->Adapter->Update(gcnew cli::array< System::Data::DataRow^ >(1) {dataRow}); } inline System::Int32 ElderTableAdapter::Update(cli::array< System::Data::DataRow^ >^ dataRows) { return this->Adapter->Update(dataRows); } inline System::Int32 ElderTableAdapter::Delete( System::Int32 Original_ID, System::String^ Original_Name, System::String^ Original_Address, System::Nullable<System::Int32 > Original_Telephone_Number, System::String^ Original_Church, System::String^ Original_Position) { this->Adapter->DeleteCommand->Parameters[0]->Value = static_cast<System::Int32>(Original_ID); if (Original_Name == nullptr) { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[2]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[2]->Value = (cli::safe_cast<System::String^ >(Original_Name)); } if (Original_Address == nullptr) { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[4]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[4]->Value = (cli::safe_cast<System::String^ >(Original_Address)); } if (Original_Telephone_Number.HasValue == true) { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[6]->Value = static_cast<System::Int32>(Original_Telephone_Number.Value); } else { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[6]->Value = System::DBNull::Value; } if (Original_Church == nullptr) { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[8]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[8]->Value = (cli::safe_cast<System::String^ >(Original_Church)); } if (Original_Position == nullptr) { this->Adapter->DeleteCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[10]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[10]->Value = (cli::safe_cast<System::String^ >(Original_Position)); } System::Data::ConnectionState previousConnectionState = this->Adapter->DeleteCommand->Connection->State; if ((this->Adapter->DeleteCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->DeleteCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->DeleteCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->DeleteCommand->Connection->Close(); } } } inline System::Int32 ElderTableAdapter::Insert(System::String^ Name, System::String^ Address, System::Nullable<System::Int32 > Telephone_Number, System::String^ Church, System::String^ Position) { if (Name == nullptr) { this->Adapter->InsertCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(Name)); } if (Address == nullptr) { this->Adapter->InsertCommand->Parameters[1]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[1]->Value = (cli::safe_cast<System::String^ >(Address)); } if (Telephone_Number.HasValue == true) { this->Adapter->InsertCommand->Parameters[2]->Value = static_cast<System::Int32>(Telephone_Number.Value); } else { this->Adapter->InsertCommand->Parameters[2]->Value = System::DBNull::Value; } if (Church == nullptr) { this->Adapter->InsertCommand->Parameters[3]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[3]->Value = (cli::safe_cast<System::String^ >(Church)); } if (Position == nullptr) { this->Adapter->InsertCommand->Parameters[4]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[4]->Value = (cli::safe_cast<System::String^ >(Position)); } System::Data::ConnectionState previousConnectionState = this->Adapter->InsertCommand->Connection->State; if ((this->Adapter->InsertCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->InsertCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->InsertCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->InsertCommand->Connection->Close(); } } } inline System::Int32 ElderTableAdapter::Update( System::String^ Name, System::String^ Address, System::Nullable<System::Int32 > Telephone_Number, System::String^ Church, System::String^ Position, System::Int32 Original_ID, System::String^ Original_Name, System::String^ Original_Address, System::Nullable<System::Int32 > Original_Telephone_Number, System::String^ Original_Church, System::String^ Original_Position) { if (Name == nullptr) { this->Adapter->UpdateCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(Name)); } if (Address == nullptr) { this->Adapter->UpdateCommand->Parameters[1]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[1]->Value = (cli::safe_cast<System::String^ >(Address)); } if (Telephone_Number.HasValue == true) { this->Adapter->UpdateCommand->Parameters[2]->Value = static_cast<System::Int32>(Telephone_Number.Value); } else { this->Adapter->UpdateCommand->Parameters[2]->Value = System::DBNull::Value; } if (Church == nullptr) { this->Adapter->UpdateCommand->Parameters[3]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[3]->Value = (cli::safe_cast<System::String^ >(Church)); } if (Position == nullptr) { this->Adapter->UpdateCommand->Parameters[4]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[4]->Value = (cli::safe_cast<System::String^ >(Position)); } this->Adapter->UpdateCommand->Parameters[5]->Value = static_cast<System::Int32>(Original_ID); if (Original_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[6]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[7]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[6]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[7]->Value = (cli::safe_cast<System::String^ >(Original_Name)); } if (Original_Address == nullptr) { this->Adapter->UpdateCommand->Parameters[8]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[9]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[8]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[9]->Value = (cli::safe_cast<System::String^ >(Original_Address)); } if (Original_Telephone_Number.HasValue == true) { this->Adapter->UpdateCommand->Parameters[10]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[11]->Value = static_cast<System::Int32>(Original_Telephone_Number.Value); } else { this->Adapter->UpdateCommand->Parameters[10]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[11]->Value = System::DBNull::Value; } if (Original_Church == nullptr) { this->Adapter->UpdateCommand->Parameters[12]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[13]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[12]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[13]->Value = (cli::safe_cast<System::String^ >(Original_Church)); } if (Original_Position == nullptr) { this->Adapter->UpdateCommand->Parameters[14]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[15]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[14]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[15]->Value = (cli::safe_cast<System::String^ >(Original_Position)); } System::Data::ConnectionState previousConnectionState = this->Adapter->UpdateCommand->Connection->State; if ((this->Adapter->UpdateCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->UpdateCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->UpdateCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->UpdateCommand->Connection->Close(); } } } inline EmployerTableAdapter::EmployerTableAdapter() { this->ClearBeforeFill = true; } inline System::Data::OleDb::OleDbDataAdapter^ EmployerTableAdapter::Adapter::get() { if (this->_adapter == nullptr) { this->InitAdapter(); } return this->_adapter; } inline System::Data::OleDb::OleDbConnection^ EmployerTableAdapter::Connection::get() { if (this->_connection == nullptr) { this->InitConnection(); } return this->_connection; } inline System::Void EmployerTableAdapter::Connection::set(System::Data::OleDb::OleDbConnection^ value) { this->_connection = __identifier(value); if (this->Adapter->InsertCommand != nullptr) { this->Adapter->InsertCommand->Connection = __identifier(value); } if (this->Adapter->DeleteCommand != nullptr) { this->Adapter->DeleteCommand->Connection = __identifier(value); } if (this->Adapter->UpdateCommand != nullptr) { this->Adapter->UpdateCommand->Connection = __identifier(value); } for ( System::Int32 i = 0; (i < this->CommandCollection->Length); i = (i + 1)) { if (this->CommandCollection[i] != nullptr) { (cli::safe_cast<System::Data::OleDb::OleDbCommand^ >(this->CommandCollection[i]))->Connection = __identifier(value); } } } inline cli::array< System::Data::OleDb::OleDbCommand^ >^ EmployerTableAdapter::CommandCollection::get() { if (this->_commandCollection == nullptr) { this->InitCommandCollection(); } return this->_commandCollection; } inline System::Boolean EmployerTableAdapter::ClearBeforeFill::get() { return this->_clearBeforeFill; } inline System::Void EmployerTableAdapter::ClearBeforeFill::set(System::Boolean value) { this->_clearBeforeFill = __identifier(value); } inline System::Void EmployerTableAdapter::InitAdapter() { this->_adapter = (gcnew System::Data::OleDb::OleDbDataAdapter()); System::Data::Common::DataTableMapping^ tableMapping = (gcnew System::Data::Common::DataTableMapping()); tableMapping->SourceTable = L"Table"; tableMapping->DataSetTable = L"Employer"; tableMapping->ColumnMappings->Add(L"ID", L"ID"); tableMapping->ColumnMappings->Add(L"First Name", L"First Name"); tableMapping->ColumnMappings->Add(L"Last Name", L"Last Name"); tableMapping->ColumnMappings->Add(L"Telephone Number", L"Telephone Number"); tableMapping->ColumnMappings->Add(L"Address", L"Address"); this->_adapter->TableMappings->Add(tableMapping); this->_adapter->DeleteCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->DeleteCommand->Connection = this->Connection; this->_adapter->DeleteCommand->CommandText = L"DELETE FROM `Employer` WHERE ((`ID` = \?) AND ((\? = 1 AND `First Name` IS NULL) OR" L" (`First Name` = \?)) AND ((\? = 1 AND `Last Name` IS NULL) OR (`Last Name` = \?)) " L"AND ((\? = 1 AND `Telephone Number` IS NULL) OR (`Telephone Number` = \?)) AND ((\?" L" = 1 AND `Address` IS NULL) OR (`Address` = \?)))"; this->_adapter->DeleteCommand->CommandType = System::Data::CommandType::Text; this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_First_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Last_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->InsertCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->InsertCommand->Connection = this->Connection; this->_adapter->InsertCommand->CommandText = L"INSERT INTO `Employer` (`First Name`, `Last Name`, `Telephone Number`, `Address`)" L" VALUES (\?, \?, \?, \?)"; this->_adapter->InsertCommand->CommandType = System::Data::CommandType::Text; this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->UpdateCommand->Connection = this->Connection; this->_adapter->UpdateCommand->CommandText = L"UPDATE `Employer` SET `First Name` = \?, `Last Name` = \?, `Telephone Number` = \?, " L"`Address` = \? WHERE ((`ID` = \?) AND ((\? = 1 AND `First Name` IS NULL) OR (`First" L" Name` = \?)) AND ((\? = 1 AND `Last Name` IS NULL) OR (`Last Name` = \?)) AND ((\? " L"= 1 AND `Telephone Number` IS NULL) OR (`Telephone Number` = \?)) AND ((\? = 1 AND" L" `Address` IS NULL) OR (`Address` = \?)))"; this->_adapter->UpdateCommand->CommandType = System::Data::CommandType::Text; this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_First_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Last_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, false, nullptr))); } inline System::Void EmployerTableAdapter::InitConnection() { this->_connection = (gcnew System::Data::OleDb::OleDbConnection()); this->_connection->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\LCBC-AdminRegistrationSystem\\LCBC" L"-AdminRegistrationSystem\\release\\project.mdb"; } inline System::Void EmployerTableAdapter::InitCommandCollection() { this->_commandCollection = gcnew cli::array< System::Data::OleDb::OleDbCommand^ >(1); this->_commandCollection[0] = (gcnew System::Data::OleDb::OleDbCommand()); this->_commandCollection[0]->Connection = this->Connection; this->_commandCollection[0]->CommandText = L"SELECT ID, [First Name], [Last Name], [Telephone Number], Address FROM Employer"; this->_commandCollection[0]->CommandType = System::Data::CommandType::Text; } inline System::Int32 EmployerTableAdapter::Fill(LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ dataTable) { this->Adapter->SelectCommand = this->CommandCollection[0]; if (this->ClearBeforeFill == true) { dataTable->Clear(); } System::Int32 returnValue = this->Adapter->Fill(dataTable); return returnValue; } inline LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ EmployerTableAdapter::GetData() { this->Adapter->SelectCommand = this->CommandCollection[0]; LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ dataTable = (gcnew LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable()); this->Adapter->Fill(dataTable); return dataTable; } inline System::Int32 EmployerTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet::EmployerDataTable^ dataTable) { return this->Adapter->Update(dataTable); } inline System::Int32 EmployerTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet) { return this->Adapter->Update(dataSet, L"Employer"); } inline System::Int32 EmployerTableAdapter::Update(System::Data::DataRow^ dataRow) { return this->Adapter->Update(gcnew cli::array< System::Data::DataRow^ >(1) {dataRow}); } inline System::Int32 EmployerTableAdapter::Update(cli::array< System::Data::DataRow^ >^ dataRows) { return this->Adapter->Update(dataRows); } inline System::Int32 EmployerTableAdapter::Delete(System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Last_Name, System::Nullable<System::Int32 > Original_Telephone_Number, System::String^ Original_Address) { this->Adapter->DeleteCommand->Parameters[0]->Value = static_cast<System::Int32>(Original_ID); if (Original_First_Name == nullptr) { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[2]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[2]->Value = (cli::safe_cast<System::String^ >(Original_First_Name)); } if (Original_Last_Name == nullptr) { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[4]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[4]->Value = (cli::safe_cast<System::String^ >(Original_Last_Name)); } if (Original_Telephone_Number.HasValue == true) { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[6]->Value = static_cast<System::Int32>(Original_Telephone_Number.Value); } else { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[6]->Value = System::DBNull::Value; } if (Original_Address == nullptr) { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[8]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[8]->Value = (cli::safe_cast<System::String^ >(Original_Address)); } System::Data::ConnectionState previousConnectionState = this->Adapter->DeleteCommand->Connection->State; if ((this->Adapter->DeleteCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->DeleteCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->DeleteCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->DeleteCommand->Connection->Close(); } } } inline System::Int32 EmployerTableAdapter::Insert(System::String^ First_Name, System::String^ Last_Name, System::Nullable<System::Int32 > Telephone_Number, System::String^ Address) { if (First_Name == nullptr) { this->Adapter->InsertCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(First_Name)); } if (Last_Name == nullptr) { this->Adapter->InsertCommand->Parameters[1]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[1]->Value = (cli::safe_cast<System::String^ >(Last_Name)); } if (Telephone_Number.HasValue == true) { this->Adapter->InsertCommand->Parameters[2]->Value = static_cast<System::Int32>(Telephone_Number.Value); } else { this->Adapter->InsertCommand->Parameters[2]->Value = System::DBNull::Value; } if (Address == nullptr) { this->Adapter->InsertCommand->Parameters[3]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[3]->Value = (cli::safe_cast<System::String^ >(Address)); } System::Data::ConnectionState previousConnectionState = this->Adapter->InsertCommand->Connection->State; if ((this->Adapter->InsertCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->InsertCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->InsertCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->InsertCommand->Connection->Close(); } } } inline System::Int32 EmployerTableAdapter::Update( System::String^ First_Name, System::String^ Last_Name, System::Nullable<System::Int32 > Telephone_Number, System::String^ Address, System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Last_Name, System::Nullable<System::Int32 > Original_Telephone_Number, System::String^ Original_Address) { if (First_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(First_Name)); } if (Last_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[1]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[1]->Value = (cli::safe_cast<System::String^ >(Last_Name)); } if (Telephone_Number.HasValue == true) { this->Adapter->UpdateCommand->Parameters[2]->Value = static_cast<System::Int32>(Telephone_Number.Value); } else { this->Adapter->UpdateCommand->Parameters[2]->Value = System::DBNull::Value; } if (Address == nullptr) { this->Adapter->UpdateCommand->Parameters[3]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[3]->Value = (cli::safe_cast<System::String^ >(Address)); } this->Adapter->UpdateCommand->Parameters[4]->Value = static_cast<System::Int32>(Original_ID); if (Original_First_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[6]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[6]->Value = (cli::safe_cast<System::String^ >(Original_First_Name)); } if (Original_Last_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[8]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[8]->Value = (cli::safe_cast<System::String^ >(Original_Last_Name)); } if (Original_Telephone_Number.HasValue == true) { this->Adapter->UpdateCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[10]->Value = static_cast<System::Int32>(Original_Telephone_Number.Value); } else { this->Adapter->UpdateCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[10]->Value = System::DBNull::Value; } if (Original_Address == nullptr) { this->Adapter->UpdateCommand->Parameters[11]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[12]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[11]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[12]->Value = (cli::safe_cast<System::String^ >(Original_Address)); } System::Data::ConnectionState previousConnectionState = this->Adapter->UpdateCommand->Connection->State; if ((this->Adapter->UpdateCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->UpdateCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->UpdateCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->UpdateCommand->Connection->Close(); } } } inline Grade_PointTableAdapter::Grade_PointTableAdapter() { this->ClearBeforeFill = true; } inline System::Data::OleDb::OleDbDataAdapter^ Grade_PointTableAdapter::Adapter::get() { if (this->_adapter == nullptr) { this->InitAdapter(); } return this->_adapter; } inline System::Data::OleDb::OleDbConnection^ Grade_PointTableAdapter::Connection::get() { if (this->_connection == nullptr) { this->InitConnection(); } return this->_connection; } inline System::Void Grade_PointTableAdapter::Connection::set(System::Data::OleDb::OleDbConnection^ value) { this->_connection = __identifier(value); if (this->Adapter->InsertCommand != nullptr) { this->Adapter->InsertCommand->Connection = __identifier(value); } if (this->Adapter->DeleteCommand != nullptr) { this->Adapter->DeleteCommand->Connection = __identifier(value); } if (this->Adapter->UpdateCommand != nullptr) { this->Adapter->UpdateCommand->Connection = __identifier(value); } for ( System::Int32 i = 0; (i < this->CommandCollection->Length); i = (i + 1)) { if (this->CommandCollection[i] != nullptr) { (cli::safe_cast<System::Data::OleDb::OleDbCommand^ >(this->CommandCollection[i]))->Connection = __identifier(value); } } } inline cli::array< System::Data::OleDb::OleDbCommand^ >^ Grade_PointTableAdapter::CommandCollection::get() { if (this->_commandCollection == nullptr) { this->InitCommandCollection(); } return this->_commandCollection; } inline System::Boolean Grade_PointTableAdapter::ClearBeforeFill::get() { return this->_clearBeforeFill; } inline System::Void Grade_PointTableAdapter::ClearBeforeFill::set(System::Boolean value) { this->_clearBeforeFill = __identifier(value); } inline System::Void Grade_PointTableAdapter::InitAdapter() { this->_adapter = (gcnew System::Data::OleDb::OleDbDataAdapter()); System::Data::Common::DataTableMapping^ tableMapping = (gcnew System::Data::Common::DataTableMapping()); tableMapping->SourceTable = L"Table"; tableMapping->DataSetTable = L"Grade Point"; tableMapping->ColumnMappings->Add(L"ID", L"ID"); tableMapping->ColumnMappings->Add(L"Grade", L"Grade"); tableMapping->ColumnMappings->Add(L"Upper Range", L"Upper Range"); tableMapping->ColumnMappings->Add(L"Lower Range", L"Lower Range"); tableMapping->ColumnMappings->Add(L"Grade Point", L"Grade Point"); this->_adapter->TableMappings->Add(tableMapping); this->_adapter->DeleteCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->DeleteCommand->Connection = this->Connection; this->_adapter->DeleteCommand->CommandText = L"DELETE FROM `Grade Point` WHERE ((`ID` = \?) AND ((\? = 1 AND `Grade` IS NULL) OR (" L"`Grade` = \?)) AND ((\? = 1 AND `Upper Range` IS NULL) OR (`Upper Range` = \?)) AND" L" ((\? = 1 AND `Lower Range` IS NULL) OR (`Lower Range` = \?)) AND ((\? = 1 AND `Gra" L"de Point` IS NULL) OR (`Grade Point` = \?)))"; this->_adapter->DeleteCommand->CommandType = System::Data::CommandType::Text; this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Grade", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Grade", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Upper_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Upper Range", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Upper_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Upper Range", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Lower_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Lower Range", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Lower_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Lower Range", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Grade_Point", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade Point", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Grade_Point", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade Point", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->InsertCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->InsertCommand->Connection = this->Connection; this->_adapter->InsertCommand->CommandText = L"INSERT INTO `Grade Point` (`Grade`, `Upper Range`, `Lower Range`, `Grade Point`) " L"VALUES (\?, \?, \?, \?)"; this->_adapter->InsertCommand->CommandType = System::Data::CommandType::Text; this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Grade", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Upper_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Upper Range", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Lower_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Lower Range", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Grade_Point", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade Point", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->UpdateCommand->Connection = this->Connection; this->_adapter->UpdateCommand->CommandText = L"UPDATE `Grade Point` SET `Grade` = \?, `Upper Range` = \?, `Lower Range` = \?, `Grad" L"e Point` = \? WHERE ((`ID` = \?) AND ((\? = 1 AND `Grade` IS NULL) OR (`Grade` = \?)" L") AND ((\? = 1 AND `Upper Range` IS NULL) OR (`Upper Range` = \?)) AND ((\? = 1 AND" L" `Lower Range` IS NULL) OR (`Lower Range` = \?)) AND ((\? = 1 AND `Grade Point` IS" L" NULL) OR (`Grade Point` = \?)))"; this->_adapter->UpdateCommand->CommandType = System::Data::CommandType::Text; this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Grade", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Upper_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Upper Range", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Lower_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Lower Range", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Grade_Point", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade Point", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Grade", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Grade", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Upper_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Upper Range", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Upper_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Upper Range", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Lower_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Lower Range", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Lower_Range", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Lower Range", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Grade_Point", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade Point", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Grade_Point", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Grade Point", System::Data::DataRowVersion::Original, false, nullptr))); } inline System::Void Grade_PointTableAdapter::InitConnection() { this->_connection = (gcnew System::Data::OleDb::OleDbConnection()); this->_connection->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\LCBC-AdminRegistrationSystem\\LCBC" L"-AdminRegistrationSystem\\release\\project.mdb"; } inline System::Void Grade_PointTableAdapter::InitCommandCollection() { this->_commandCollection = gcnew cli::array< System::Data::OleDb::OleDbCommand^ >(1); this->_commandCollection[0] = (gcnew System::Data::OleDb::OleDbCommand()); this->_commandCollection[0]->Connection = this->Connection; this->_commandCollection[0]->CommandText = L"SELECT ID, Grade, [Upper Range], [Lower Range], [Grade Point] FROM [Grade Point]"; this->_commandCollection[0]->CommandType = System::Data::CommandType::Text; } inline System::Int32 Grade_PointTableAdapter::Fill(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ dataTable) { this->Adapter->SelectCommand = this->CommandCollection[0]; if (this->ClearBeforeFill == true) { dataTable->Clear(); } System::Int32 returnValue = this->Adapter->Fill(dataTable); return returnValue; } inline LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ Grade_PointTableAdapter::GetData() { this->Adapter->SelectCommand = this->CommandCollection[0]; LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ dataTable = (gcnew LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable()); this->Adapter->Fill(dataTable); return dataTable; } inline System::Int32 Grade_PointTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet::Grade_PointDataTable^ dataTable) { return this->Adapter->Update(dataTable); } inline System::Int32 Grade_PointTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet) { return this->Adapter->Update(dataSet, L"Grade Point"); } inline System::Int32 Grade_PointTableAdapter::Update(System::Data::DataRow^ dataRow) { return this->Adapter->Update(gcnew cli::array< System::Data::DataRow^ >(1) {dataRow}); } inline System::Int32 Grade_PointTableAdapter::Update(cli::array< System::Data::DataRow^ >^ dataRows) { return this->Adapter->Update(dataRows); } inline System::Int32 Grade_PointTableAdapter::Delete(System::Int32 Original_ID, System::String^ Original_Grade, System::Nullable<System::Int32 > Original_Upper_Range, System::Nullable<System::Int32 > Original_Lower_Range, System::Nullable<System::Int32 > Original_Grade_Point) { this->Adapter->DeleteCommand->Parameters[0]->Value = static_cast<System::Int32>(Original_ID); if (Original_Grade == nullptr) { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[2]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[2]->Value = (cli::safe_cast<System::String^ >(Original_Grade)); } if (Original_Upper_Range.HasValue == true) { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[4]->Value = static_cast<System::Int32>(Original_Upper_Range.Value); } else { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[4]->Value = System::DBNull::Value; } if (Original_Lower_Range.HasValue == true) { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[6]->Value = static_cast<System::Int32>(Original_Lower_Range.Value); } else { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[6]->Value = System::DBNull::Value; } if (Original_Grade_Point.HasValue == true) { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[8]->Value = static_cast<System::Int32>(Original_Grade_Point.Value); } else { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[8]->Value = System::DBNull::Value; } System::Data::ConnectionState previousConnectionState = this->Adapter->DeleteCommand->Connection->State; if ((this->Adapter->DeleteCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->DeleteCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->DeleteCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->DeleteCommand->Connection->Close(); } } } inline System::Int32 Grade_PointTableAdapter::Insert(System::String^ Grade, System::Nullable<System::Int32 > Upper_Range, System::Nullable<System::Int32 > Lower_Range, System::Nullable<System::Int32 > Grade_Point) { if (Grade == nullptr) { this->Adapter->InsertCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(Grade)); } if (Upper_Range.HasValue == true) { this->Adapter->InsertCommand->Parameters[1]->Value = static_cast<System::Int32>(Upper_Range.Value); } else { this->Adapter->InsertCommand->Parameters[1]->Value = System::DBNull::Value; } if (Lower_Range.HasValue == true) { this->Adapter->InsertCommand->Parameters[2]->Value = static_cast<System::Int32>(Lower_Range.Value); } else { this->Adapter->InsertCommand->Parameters[2]->Value = System::DBNull::Value; } if (Grade_Point.HasValue == true) { this->Adapter->InsertCommand->Parameters[3]->Value = static_cast<System::Int32>(Grade_Point.Value); } else { this->Adapter->InsertCommand->Parameters[3]->Value = System::DBNull::Value; } System::Data::ConnectionState previousConnectionState = this->Adapter->InsertCommand->Connection->State; if ((this->Adapter->InsertCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->InsertCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->InsertCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->InsertCommand->Connection->Close(); } } } inline System::Int32 Grade_PointTableAdapter::Update( System::String^ Grade, System::Nullable<System::Int32 > Upper_Range, System::Nullable<System::Int32 > Lower_Range, System::Nullable<System::Int32 > Grade_Point, System::Int32 Original_ID, System::String^ Original_Grade, System::Nullable<System::Int32 > Original_Upper_Range, System::Nullable<System::Int32 > Original_Lower_Range, System::Nullable<System::Int32 > Original_Grade_Point) { if (Grade == nullptr) { this->Adapter->UpdateCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(Grade)); } if (Upper_Range.HasValue == true) { this->Adapter->UpdateCommand->Parameters[1]->Value = static_cast<System::Int32>(Upper_Range.Value); } else { this->Adapter->UpdateCommand->Parameters[1]->Value = System::DBNull::Value; } if (Lower_Range.HasValue == true) { this->Adapter->UpdateCommand->Parameters[2]->Value = static_cast<System::Int32>(Lower_Range.Value); } else { this->Adapter->UpdateCommand->Parameters[2]->Value = System::DBNull::Value; } if (Grade_Point.HasValue == true) { this->Adapter->UpdateCommand->Parameters[3]->Value = static_cast<System::Int32>(Grade_Point.Value); } else { this->Adapter->UpdateCommand->Parameters[3]->Value = System::DBNull::Value; } this->Adapter->UpdateCommand->Parameters[4]->Value = static_cast<System::Int32>(Original_ID); if (Original_Grade == nullptr) { this->Adapter->UpdateCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[6]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[6]->Value = (cli::safe_cast<System::String^ >(Original_Grade)); } if (Original_Upper_Range.HasValue == true) { this->Adapter->UpdateCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[8]->Value = static_cast<System::Int32>(Original_Upper_Range.Value); } else { this->Adapter->UpdateCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[8]->Value = System::DBNull::Value; } if (Original_Lower_Range.HasValue == true) { this->Adapter->UpdateCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[10]->Value = static_cast<System::Int32>(Original_Lower_Range.Value); } else { this->Adapter->UpdateCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[10]->Value = System::DBNull::Value; } if (Original_Grade_Point.HasValue == true) { this->Adapter->UpdateCommand->Parameters[11]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[12]->Value = static_cast<System::Int32>(Original_Grade_Point.Value); } else { this->Adapter->UpdateCommand->Parameters[11]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[12]->Value = System::DBNull::Value; } System::Data::ConnectionState previousConnectionState = this->Adapter->UpdateCommand->Connection->State; if ((this->Adapter->UpdateCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->UpdateCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->UpdateCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->UpdateCommand->Connection->Close(); } } } inline Parent_or_GuardianTableAdapter::Parent_or_GuardianTableAdapter() { this->ClearBeforeFill = true; } inline System::Data::OleDb::OleDbDataAdapter^ Parent_or_GuardianTableAdapter::Adapter::get() { if (this->_adapter == nullptr) { this->InitAdapter(); } return this->_adapter; } inline System::Data::OleDb::OleDbConnection^ Parent_or_GuardianTableAdapter::Connection::get() { if (this->_connection == nullptr) { this->InitConnection(); } return this->_connection; } inline System::Void Parent_or_GuardianTableAdapter::Connection::set(System::Data::OleDb::OleDbConnection^ value) { this->_connection = __identifier(value); if (this->Adapter->InsertCommand != nullptr) { this->Adapter->InsertCommand->Connection = __identifier(value); } if (this->Adapter->DeleteCommand != nullptr) { this->Adapter->DeleteCommand->Connection = __identifier(value); } if (this->Adapter->UpdateCommand != nullptr) { this->Adapter->UpdateCommand->Connection = __identifier(value); } for ( System::Int32 i = 0; (i < this->CommandCollection->Length); i = (i + 1)) { if (this->CommandCollection[i] != nullptr) { (cli::safe_cast<System::Data::OleDb::OleDbCommand^ >(this->CommandCollection[i]))->Connection = __identifier(value); } } } inline cli::array< System::Data::OleDb::OleDbCommand^ >^ Parent_or_GuardianTableAdapter::CommandCollection::get() { if (this->_commandCollection == nullptr) { this->InitCommandCollection(); } return this->_commandCollection; } inline System::Boolean Parent_or_GuardianTableAdapter::ClearBeforeFill::get() { return this->_clearBeforeFill; } inline System::Void Parent_or_GuardianTableAdapter::ClearBeforeFill::set(System::Boolean value) { this->_clearBeforeFill = __identifier(value); } inline System::Void Parent_or_GuardianTableAdapter::InitAdapter() { this->_adapter = (gcnew System::Data::OleDb::OleDbDataAdapter()); System::Data::Common::DataTableMapping^ tableMapping = (gcnew System::Data::Common::DataTableMapping()); tableMapping->SourceTable = L"Table"; tableMapping->DataSetTable = L"Parent or Guardian"; tableMapping->ColumnMappings->Add(L"ID", L"ID"); tableMapping->ColumnMappings->Add(L"First Name", L"First Name"); tableMapping->ColumnMappings->Add(L"Last Name", L"Last Name"); tableMapping->ColumnMappings->Add(L"Address", L"Address"); tableMapping->ColumnMappings->Add(L"Occupation", L"Occupation"); tableMapping->ColumnMappings->Add(L"Telephone Number", L"Telephone Number"); this->_adapter->TableMappings->Add(tableMapping); this->_adapter->DeleteCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->DeleteCommand->Connection = this->Connection; this->_adapter->DeleteCommand->CommandText = L"DELETE FROM `Parent or Guardian` WHERE ((`ID` = \?) AND ((\? = 1 AND `First Name` I" L"S NULL) OR (`First Name` = \?)) AND ((\? = 1 AND `Last Name` IS NULL) OR (`Last Na" L"me` = \?)) AND ((\? = 1 AND `Address` IS NULL) OR (`Address` = \?)) AND ((\? = 1 AND" L" `Occupation` IS NULL) OR (`Occupation` = \?)) AND ((\? = 1 AND `Telephone Number`" L" IS NULL) OR (`Telephone Number` = \?)))"; this->_adapter->DeleteCommand->CommandType = System::Data::CommandType::Text; this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_First_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Last_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Occupation", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Occupation", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Occupation", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Occupation", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->InsertCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->InsertCommand->Connection = this->Connection; this->_adapter->InsertCommand->CommandText = L"INSERT INTO `Parent or Guardian` (`First Name`, `Last Name`, `Address`, `Occupati" L"on`, `Telephone Number`) VALUES (\?, \?, \?, \?, \?)"; this->_adapter->InsertCommand->CommandType = System::Data::CommandType::Text; this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Occupation", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Occupation", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->UpdateCommand->Connection = this->Connection; this->_adapter->UpdateCommand->CommandText = L"UPDATE `Parent or Guardian` SET `First Name` = \?, `Last Name` = \?, `Address` = \?," L" `Occupation` = \?, `Telephone Number` = \? WHERE ((`ID` = \?) AND ((\? = 1 AND `Fir" L"st Name` IS NULL) OR (`First Name` = \?)) AND ((\? = 1 AND `Last Name` IS NULL) OR" L" (`Last Name` = \?)) AND ((\? = 1 AND `Address` IS NULL) OR (`Address` = \?)) AND (" L"(\? = 1 AND `Occupation` IS NULL) OR (`Occupation` = \?)) AND ((\? = 1 AND `Telepho" L"ne Number` IS NULL) OR (`Telephone Number` = \?)))"; this->_adapter->UpdateCommand->CommandType = System::Data::CommandType::Text; this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Occupation", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Occupation", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_First_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Last_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Occupation", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Occupation", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Occupation", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Occupation", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Telephone_Number", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Telephone Number", System::Data::DataRowVersion::Original, false, nullptr))); } inline System::Void Parent_or_GuardianTableAdapter::InitConnection() { this->_connection = (gcnew System::Data::OleDb::OleDbConnection()); this->_connection->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\LCBC-AdminRegistrationSystem\\LCBC" L"-AdminRegistrationSystem\\release\\project.mdb"; } inline System::Void Parent_or_GuardianTableAdapter::InitCommandCollection() { this->_commandCollection = gcnew cli::array< System::Data::OleDb::OleDbCommand^ >(1); this->_commandCollection[0] = (gcnew System::Data::OleDb::OleDbCommand()); this->_commandCollection[0]->Connection = this->Connection; this->_commandCollection[0]->CommandText = L"SELECT ID, [First Name], [Last Name], Address, Occupation, [Telephone Number] FRO" L"M [Parent or Guardian]"; this->_commandCollection[0]->CommandType = System::Data::CommandType::Text; } inline System::Int32 Parent_or_GuardianTableAdapter::Fill(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ dataTable) { this->Adapter->SelectCommand = this->CommandCollection[0]; if (this->ClearBeforeFill == true) { dataTable->Clear(); } System::Int32 returnValue = this->Adapter->Fill(dataTable); return returnValue; } inline LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ Parent_or_GuardianTableAdapter::GetData() { this->Adapter->SelectCommand = this->CommandCollection[0]; LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ dataTable = (gcnew LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable()); this->Adapter->Fill(dataTable); return dataTable; } inline System::Int32 Parent_or_GuardianTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet::Parent_or_GuardianDataTable^ dataTable) { return this->Adapter->Update(dataTable); } inline System::Int32 Parent_or_GuardianTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet) { return this->Adapter->Update(dataSet, L"Parent or Guardian"); } inline System::Int32 Parent_or_GuardianTableAdapter::Update(System::Data::DataRow^ dataRow) { return this->Adapter->Update(gcnew cli::array< System::Data::DataRow^ >(1) {dataRow}); } inline System::Int32 Parent_or_GuardianTableAdapter::Update(cli::array< System::Data::DataRow^ >^ dataRows) { return this->Adapter->Update(dataRows); } inline System::Int32 Parent_or_GuardianTableAdapter::Delete( System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Last_Name, System::String^ Original_Address, System::String^ Original_Occupation, System::Nullable<System::Int32 > Original_Telephone_Number) { this->Adapter->DeleteCommand->Parameters[0]->Value = static_cast<System::Int32>(Original_ID); if (Original_First_Name == nullptr) { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[2]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[2]->Value = (cli::safe_cast<System::String^ >(Original_First_Name)); } if (Original_Last_Name == nullptr) { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[4]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[4]->Value = (cli::safe_cast<System::String^ >(Original_Last_Name)); } if (Original_Address == nullptr) { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[6]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[6]->Value = (cli::safe_cast<System::String^ >(Original_Address)); } if (Original_Occupation == nullptr) { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[8]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[8]->Value = (cli::safe_cast<System::String^ >(Original_Occupation)); } if (Original_Telephone_Number.HasValue == true) { this->Adapter->DeleteCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[10]->Value = static_cast<System::Int32>(Original_Telephone_Number.Value); } else { this->Adapter->DeleteCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[10]->Value = System::DBNull::Value; } System::Data::ConnectionState previousConnectionState = this->Adapter->DeleteCommand->Connection->State; if ((this->Adapter->DeleteCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->DeleteCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->DeleteCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->DeleteCommand->Connection->Close(); } } } inline System::Int32 Parent_or_GuardianTableAdapter::Insert(System::String^ First_Name, System::String^ Last_Name, System::String^ Address, System::String^ Occupation, System::Nullable<System::Int32 > Telephone_Number) { if (First_Name == nullptr) { this->Adapter->InsertCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(First_Name)); } if (Last_Name == nullptr) { this->Adapter->InsertCommand->Parameters[1]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[1]->Value = (cli::safe_cast<System::String^ >(Last_Name)); } if (Address == nullptr) { this->Adapter->InsertCommand->Parameters[2]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[2]->Value = (cli::safe_cast<System::String^ >(Address)); } if (Occupation == nullptr) { this->Adapter->InsertCommand->Parameters[3]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[3]->Value = (cli::safe_cast<System::String^ >(Occupation)); } if (Telephone_Number.HasValue == true) { this->Adapter->InsertCommand->Parameters[4]->Value = static_cast<System::Int32>(Telephone_Number.Value); } else { this->Adapter->InsertCommand->Parameters[4]->Value = System::DBNull::Value; } System::Data::ConnectionState previousConnectionState = this->Adapter->InsertCommand->Connection->State; if ((this->Adapter->InsertCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->InsertCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->InsertCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->InsertCommand->Connection->Close(); } } } inline System::Int32 Parent_or_GuardianTableAdapter::Update( System::String^ First_Name, System::String^ Last_Name, System::String^ Address, System::String^ Occupation, System::Nullable<System::Int32 > Telephone_Number, System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Last_Name, System::String^ Original_Address, System::String^ Original_Occupation, System::Nullable<System::Int32 > Original_Telephone_Number) { if (First_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(First_Name)); } if (Last_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[1]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[1]->Value = (cli::safe_cast<System::String^ >(Last_Name)); } if (Address == nullptr) { this->Adapter->UpdateCommand->Parameters[2]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[2]->Value = (cli::safe_cast<System::String^ >(Address)); } if (Occupation == nullptr) { this->Adapter->UpdateCommand->Parameters[3]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[3]->Value = (cli::safe_cast<System::String^ >(Occupation)); } if (Telephone_Number.HasValue == true) { this->Adapter->UpdateCommand->Parameters[4]->Value = static_cast<System::Int32>(Telephone_Number.Value); } else { this->Adapter->UpdateCommand->Parameters[4]->Value = System::DBNull::Value; } this->Adapter->UpdateCommand->Parameters[5]->Value = static_cast<System::Int32>(Original_ID); if (Original_First_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[6]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[7]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[6]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[7]->Value = (cli::safe_cast<System::String^ >(Original_First_Name)); } if (Original_Last_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[8]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[9]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[8]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[9]->Value = (cli::safe_cast<System::String^ >(Original_Last_Name)); } if (Original_Address == nullptr) { this->Adapter->UpdateCommand->Parameters[10]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[11]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[10]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[11]->Value = (cli::safe_cast<System::String^ >(Original_Address)); } if (Original_Occupation == nullptr) { this->Adapter->UpdateCommand->Parameters[12]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[13]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[12]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[13]->Value = (cli::safe_cast<System::String^ >(Original_Occupation)); } if (Original_Telephone_Number.HasValue == true) { this->Adapter->UpdateCommand->Parameters[14]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[15]->Value = static_cast<System::Int32>(Original_Telephone_Number.Value); } else { this->Adapter->UpdateCommand->Parameters[14]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[15]->Value = System::DBNull::Value; } System::Data::ConnectionState previousConnectionState = this->Adapter->UpdateCommand->Connection->State; if ((this->Adapter->UpdateCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->UpdateCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->UpdateCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->UpdateCommand->Connection->Close(); } } } inline StudentTableAdapter::StudentTableAdapter() { this->ClearBeforeFill = true; } inline System::Data::OleDb::OleDbDataAdapter^ StudentTableAdapter::Adapter::get() { if (this->_adapter == nullptr) { this->InitAdapter(); } return this->_adapter; } inline System::Data::OleDb::OleDbConnection^ StudentTableAdapter::Connection::get() { if (this->_connection == nullptr) { this->InitConnection(); } return this->_connection; } inline System::Void StudentTableAdapter::Connection::set(System::Data::OleDb::OleDbConnection^ value) { this->_connection = __identifier(value); if (this->Adapter->InsertCommand != nullptr) { this->Adapter->InsertCommand->Connection = __identifier(value); } if (this->Adapter->DeleteCommand != nullptr) { this->Adapter->DeleteCommand->Connection = __identifier(value); } if (this->Adapter->UpdateCommand != nullptr) { this->Adapter->UpdateCommand->Connection = __identifier(value); } for ( System::Int32 i = 0; (i < this->CommandCollection->Length); i = (i + 1)) { if (this->CommandCollection[i] != nullptr) { (cli::safe_cast<System::Data::OleDb::OleDbCommand^ >(this->CommandCollection[i]))->Connection = __identifier(value); } } } inline cli::array< System::Data::OleDb::OleDbCommand^ >^ StudentTableAdapter::CommandCollection::get() { if (this->_commandCollection == nullptr) { this->InitCommandCollection(); } return this->_commandCollection; } inline System::Boolean StudentTableAdapter::ClearBeforeFill::get() { return this->_clearBeforeFill; } inline System::Void StudentTableAdapter::ClearBeforeFill::set(System::Boolean value) { this->_clearBeforeFill = __identifier(value); } inline System::Void StudentTableAdapter::InitAdapter() { this->_adapter = (gcnew System::Data::OleDb::OleDbDataAdapter()); System::Data::Common::DataTableMapping^ tableMapping = (gcnew System::Data::Common::DataTableMapping()); tableMapping->SourceTable = L"Table"; tableMapping->DataSetTable = L"Student"; tableMapping->ColumnMappings->Add(L"ID", L"ID"); tableMapping->ColumnMappings->Add(L"First Name", L"First Name"); tableMapping->ColumnMappings->Add(L"Middle Names", L"Middle Names"); tableMapping->ColumnMappings->Add(L"Last Name", L"Last Name"); tableMapping->ColumnMappings->Add(L"Address", L"Address"); tableMapping->ColumnMappings->Add(L"Sex", L"Sex"); tableMapping->ColumnMappings->Add(L"Application Date", L"Application Date"); tableMapping->ColumnMappings->Add(L"Date of Birth", L"Date of Birth"); tableMapping->ColumnMappings->Add(L"Place of Birth", L"Place of Birth"); tableMapping->ColumnMappings->Add(L"Parent/Guardian", L"Parent/Guardian"); tableMapping->ColumnMappings->Add(L"Younger Siblings", L"Younger Siblings"); tableMapping->ColumnMappings->Add(L"Older Siblings", L"Older Siblings"); tableMapping->ColumnMappings->Add(L"Baptised", L"Baptised"); tableMapping->ColumnMappings->Add(L"Date of Baptism", L"Date of Baptism"); tableMapping->ColumnMappings->Add(L"Attended High School", L"Attended High School"); tableMapping->ColumnMappings->Add(L"Name of High School", L"Name of High School"); tableMapping->ColumnMappings->Add(L"Address of High School", L"Address of High School"); tableMapping->ColumnMappings->Add(L"Ministers Name", L"Ministers Name"); tableMapping->ColumnMappings->Add(L"Ministers Address", L"Ministers Address"); tableMapping->ColumnMappings->Add(L"Christian Work Performed", L"Christian Work Performed"); tableMapping->ColumnMappings->Add(L"Elder 1", L"Elder 1"); tableMapping->ColumnMappings->Add(L"Elder 2", L"Elder 2"); tableMapping->ColumnMappings->Add(L"Employer 1", L"Employer 1"); tableMapping->ColumnMappings->Add(L"Employer 2", L"Employer 2"); this->_adapter->TableMappings->Add(tableMapping); this->_adapter->DeleteCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->DeleteCommand->Connection = this->Connection; this->_adapter->DeleteCommand->CommandText = L"DELETE FROM `Student` WHERE ((`ID` = \?) AND ((\? = 1 AND `First Name` IS NULL) OR " L"(`First Name` = \?)) AND ((\? = 1 AND `Middle Names` IS NULL) OR (`Middle Names` =" L" \?)) AND ((\? = 1 AND `Last Name` IS NULL) OR (`Last Name` = \?)) AND ((\? = 1 AND " L"`Address` IS NULL) OR (`Address` = \?)) AND ((\? = 1 AND `Sex` IS NULL) OR (`Sex` " L"= \?)) AND ((\? = 1 AND `Application Date` IS NULL) OR (`Application Date` = \?)) A" L"ND ((\? = 1 AND `Date of Birth` IS NULL) OR (`Date of Birth` = \?)) AND ((\? = 1 AN" L"D `Place of Birth` IS NULL) OR (`Place of Birth` = \?)) AND ((\? = 1 AND `Parent/G" L"uardian` IS NULL) OR (`Parent/Guardian` = \?)) AND ((\? = 1 AND `Younger Siblings`" L" IS NULL) OR (`Younger Siblings` = \?)) AND ((\? = 1 AND `Older Siblings` IS NULL)" L" OR (`Older Siblings` = \?)) AND ((\? = 1 AND `Baptised` IS NULL) OR (`Baptised` =" L" \?)) AND ((\? = 1 AND `Date of Baptism` IS NULL) OR (`Date of Baptism` = \?)) AND " L"((\? = 1 AND `Attended High School` IS NULL) OR (`Attended High School` = \?)) AND" L" ((\? = 1 AND `Name of High School` IS NULL) OR (`Name of High School` = \?)) AND " L"((\? = 1 AND `Address of High School` IS NULL) OR (`Address of High School` = \?))" L" AND ((\? = 1 AND `Ministers Name` IS NULL) OR (`Ministers Name` = \?)) AND ((\? = " L"1 AND `Ministers Address` IS NULL) OR (`Ministers Address` = \?)) AND ((\? = 1 AND" L" `Christian Work Performed` IS NULL) OR (`Christian Work Performed` = \?)) AND ((" L"\? = 1 AND `Elder 1` IS NULL) OR (`Elder 1` = \?)) AND ((\? = 1 AND `Elder 2` IS NU" L"LL) OR (`Elder 2` = \?)) AND ((\? = 1 AND `Employer 1` IS NULL) OR (`Employer 1` =" L" \?)) AND ((\? = 1 AND `Employer 2` IS NULL) OR (`Employer 2` = \?)))"; this->_adapter->DeleteCommand->CommandType = System::Data::CommandType::Text; this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_First_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Middle_Names", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Middle Names", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Middle_Names", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Middle Names", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Last_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Sex", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Sex", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Sex", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Sex", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Application_Date", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Application Date", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Application_Date", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Application Date", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Date_of_Birth", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Birth", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Date_of_Birth", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Birth", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Place_of_Birth", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Place of Birth", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Place_of_Birth", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Place of Birth", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Parent/Guardian", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Parent/Guardian", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Parent/Guardian", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Parent/Guardian", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Younger_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Younger Siblings", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Younger_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Younger Siblings", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Older_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Older Siblings", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Older_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Older Siblings", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Baptised", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Baptised", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Baptised", System::Data::OleDb::OleDbType::Boolean, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Baptised", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Date_of_Baptism", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Baptism", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Date_of_Baptism", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Baptism", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Attended_High_School", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Attended High School", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Attended_High_School", System::Data::OleDb::OleDbType::Boolean, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Attended High School", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Name_of_High_School", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name of High School", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Name_of_High_School", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name of High School", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address_of_High_School", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address of High School", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address_of_High_School", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address of High School", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Ministers_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Ministers_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Ministers_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Ministers_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Address", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Christian_Work_Performed", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Christian Work Performed", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Christian_Work_Performed", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Christian Work Performed", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Elder_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 1", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Elder_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 1", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Elder_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 2", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Elder_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 2", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Employer_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 1", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Employer_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 1", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Employer_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 2", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Employer_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 2", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->InsertCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->InsertCommand->Connection = this->Connection; this->_adapter->InsertCommand->CommandText = L"INSERT INTO `Student` (`First Name`, `Middle Names`, `Last Name`, `Address`, `Sex" L"`, `Application Date`, `Date of Birth`, `Place of Birth`, `Parent/Guardian`, `Yo" L"unger Siblings`, `Older Siblings`, `Baptised`, `Date of Baptism`, `Attended High" L" School`, `Name of High School`, `Address of High School`, `Ministers Name`, `Mi" L"nisters Address`, `Christian Work Performed`, `Elder 1`, `Elder 2`, `Employer 1`" L", `Employer 2`) VALUES (\?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?," L" \?, \?, \?, \?)"; this->_adapter->InsertCommand->CommandType = System::Data::CommandType::Text; this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Middle_Names", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Middle Names", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Sex", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Sex", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Application_Date", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Application Date", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Date_of_Birth", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Birth", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Place_of_Birth", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Place of Birth", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Parent/Guardian", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Parent/Guardian", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Younger_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Younger Siblings", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Older_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Older Siblings", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Baptised", System::Data::OleDb::OleDbType::Boolean, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Baptised", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Date_of_Baptism", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Baptism", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Attended_High_School", System::Data::OleDb::OleDbType::Boolean, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Attended High School", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Name_of_High_School", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name of High School", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address_of_High_School", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address of High School", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Ministers_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Ministers_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Christian_Work_Performed", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Christian Work Performed", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Elder_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 1", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Elder_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 2", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Employer_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 1", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Employer_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 2", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand = (gcnew System::Data::OleDb::OleDbCommand()); this->_adapter->UpdateCommand->Connection = this->Connection; this->_adapter->UpdateCommand->CommandText = L"UPDATE `Student` SET `First Name` = \?, `Middle Names` = \?, `Last Name` = \?, `Addr" L"ess` = \?, `Sex` = \?, `Application Date` = \?, `Date of Birth` = \?, `Place of Birt" L"h` = \?, `Parent/Guardian` = \?, `Younger Siblings` = \?, `Older Siblings` = \?, `Ba" L"ptised` = \?, `Date of Baptism` = \?, `Attended High School` = \?, `Name of High Sc" L"hool` = \?, `Address of High School` = \?, `Ministers Name` = \?, `Ministers Addres" L"s` = \?, `Christian Work Performed` = \?, `Elder 1` = \?, `Elder 2` = \?, `Employer " L"1` = \?, `Employer 2` = \? WHERE ((`ID` = \?) AND ((\? = 1 AND `First Name` IS NULL)" L" OR (`First Name` = \?)) AND ((\? = 1 AND `Middle Names` IS NULL) OR (`Middle Name" L"s` = \?)) AND ((\? = 1 AND `Last Name` IS NULL) OR (`Last Name` = \?)) AND ((\? = 1 " L"AND `Address` IS NULL) OR (`Address` = \?)) AND ((\? = 1 AND `Sex` IS NULL) OR (`S" L"ex` = \?)) AND ((\? = 1 AND `Application Date` IS NULL) OR (`Application Date` = \?" L")) AND ((\? = 1 AND `Date of Birth` IS NULL) OR (`Date of Birth` = \?)) AND ((\? = " L"1 AND `Place of Birth` IS NULL) OR (`Place of Birth` = \?)) AND ((\? = 1 AND `Pare" L"nt/Guardian` IS NULL) OR (`Parent/Guardian` = \?)) AND ((\? = 1 AND `Younger Sibli" L"ngs` IS NULL) OR (`Younger Siblings` = \?)) AND ((\? = 1 AND `Older Siblings` IS N" L"ULL) OR (`Older Siblings` = \?)) AND ((\? = 1 AND `Baptised` IS NULL) OR (`Baptise" L"d` = \?)) AND ((\? = 1 AND `Date of Baptism` IS NULL) OR (`Date of Baptism` = \?)) " L"AND ((\? = 1 AND `Attended High School` IS NULL) OR (`Attended High School` = \?))" L" AND ((\? = 1 AND `Name of High School` IS NULL) OR (`Name of High School` = \?)) " L"AND ((\? = 1 AND `Address of High School` IS NULL) OR (`Address of High School` =" L" \?)) AND ((\? = 1 AND `Ministers Name` IS NULL) OR (`Ministers Name` = \?)) AND ((" L"\? = 1 AND `Ministers Address` IS NULL) OR (`Ministers Address` = \?)) AND ((\? = 1" L" AND `Christian Work Performed` IS NULL) OR (`Christian Work Performed` = \?)) AN" L"D ((\? = 1 AND `Elder 1` IS NULL) OR (`Elder 1` = \?)) AND ((\? = 1 AND `Elder 2` I" L"S NULL) OR (`Elder 2` = \?)) AND ((\? = 1 AND `Employer 1` IS NULL) OR (`Employer " L"1` = \?)) AND ((\? = 1 AND `Employer 2` IS NULL) OR (`Employer 2` = \?)))"; this->_adapter->UpdateCommand->CommandType = System::Data::CommandType::Text; this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Middle_Names", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Middle Names", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Sex", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Sex", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Application_Date", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Application Date", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Date_of_Birth", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Birth", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Place_of_Birth", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Place of Birth", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Parent/Guardian", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Parent/Guardian", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Younger_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Younger Siblings", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Older_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Older Siblings", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Baptised", System::Data::OleDb::OleDbType::Boolean, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Baptised", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Date_of_Baptism", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Baptism", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Attended_High_School", System::Data::OleDb::OleDbType::Boolean, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Attended High School", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Name_of_High_School", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name of High School", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Address_of_High_School", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address of High School", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Ministers_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Name", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Ministers_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Address", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Christian_Work_Performed", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Christian Work Performed", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Elder_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 1", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Elder_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 2", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Employer_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 1", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Employer_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 2", System::Data::DataRowVersion::Current, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ID", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ID", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_First_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_First_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"First Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Middle_Names", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Middle Names", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Middle_Names", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Middle Names", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Last_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Last_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Last Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Sex", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Sex", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Sex", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Sex", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Application_Date", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Application Date", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Application_Date", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Application Date", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Date_of_Birth", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Birth", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Date_of_Birth", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Birth", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Place_of_Birth", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Place of Birth", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Place_of_Birth", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Place of Birth", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Parent/Guardian", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Parent/Guardian", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Parent/Guardian", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Parent/Guardian", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Younger_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Younger Siblings", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Younger_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Younger Siblings", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Older_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Older Siblings", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Older_Siblings", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Older Siblings", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Baptised", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Baptised", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Baptised", System::Data::OleDb::OleDbType::Boolean, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Baptised", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Date_of_Baptism", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Baptism", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Date_of_Baptism", System::Data::OleDb::OleDbType::Date, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Date of Baptism", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Attended_High_School", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Attended High School", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Attended_High_School", System::Data::OleDb::OleDbType::Boolean, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Attended High School", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Name_of_High_School", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name of High School", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Name_of_High_School", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Name of High School", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Address_of_High_School", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address of High School", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Address_of_High_School", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Address of High School", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Ministers_Name", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Name", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Ministers_Name", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Name", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Ministers_Address", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Address", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Ministers_Address", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Ministers Address", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Christian_Work_Performed", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Christian Work Performed", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Christian_Work_Performed", System::Data::OleDb::OleDbType::VarWChar, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Christian Work Performed", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Elder_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 1", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Elder_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 1", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Elder_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 2", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Elder_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Elder 2", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Employer_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 1", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Employer_1", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 1", System::Data::DataRowVersion::Original, false, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_Employer_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 2", System::Data::DataRowVersion::Original, true, nullptr))); this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_Employer_2", System::Data::OleDb::OleDbType::Integer, 0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"Employer 2", System::Data::DataRowVersion::Original, false, nullptr))); } inline System::Void StudentTableAdapter::InitConnection() { this->_connection = (gcnew System::Data::OleDb::OleDbConnection()); this->_connection->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\LCBC-AdminRegistrationSystem\\LCBC" L"-AdminRegistrationSystem\\release\\project.mdb"; } inline System::Void StudentTableAdapter::InitCommandCollection() { this->_commandCollection = gcnew cli::array< System::Data::OleDb::OleDbCommand^ >(1); this->_commandCollection[0] = (gcnew System::Data::OleDb::OleDbCommand()); this->_commandCollection[0]->Connection = this->Connection; this->_commandCollection[0]->CommandText = L"SELECT ID, [First Name], [Middle Names], [Last Name], Address, Sex, [Application " L"Date], [Date of Birth], [Place of Birth], [Parent/Guardian], [Younger Siblings]," L" [Older Siblings], Baptised, [Date of Baptism], [Attended High School], [Name of" L" High School], [Address of High School], [Ministers Name], [Ministers Address], " L"[Christian Work Performed], [Elder 1], [Elder 2], [Employer 1], [Employer 2] FRO" L"M Student"; this->_commandCollection[0]->CommandType = System::Data::CommandType::Text; } inline System::Int32 StudentTableAdapter::Fill(LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ dataTable) { this->Adapter->SelectCommand = this->CommandCollection[0]; if (this->ClearBeforeFill == true) { dataTable->Clear(); } System::Int32 returnValue = this->Adapter->Fill(dataTable); return returnValue; } inline LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ StudentTableAdapter::GetData() { this->Adapter->SelectCommand = this->CommandCollection[0]; LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ dataTable = (gcnew LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable()); this->Adapter->Fill(dataTable); return dataTable; } inline System::Int32 StudentTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet::StudentDataTable^ dataTable) { return this->Adapter->Update(dataTable); } inline System::Int32 StudentTableAdapter::Update(LCBCAdminRegistrationSystem::projectDataSet^ dataSet) { return this->Adapter->Update(dataSet, L"Student"); } inline System::Int32 StudentTableAdapter::Update(System::Data::DataRow^ dataRow) { return this->Adapter->Update(gcnew cli::array< System::Data::DataRow^ >(1) {dataRow}); } inline System::Int32 StudentTableAdapter::Update(cli::array< System::Data::DataRow^ >^ dataRows) { return this->Adapter->Update(dataRows); } inline System::Int32 StudentTableAdapter::Delete( System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Middle_Names, System::String^ Original_Last_Name, System::String^ Original_Address, System::String^ Original_Sex, System::Nullable<System::DateTime > Original_Application_Date, System::Nullable<System::DateTime > Original_Date_of_Birth, System::String^ Original_Place_of_Birth, System::Nullable<System::Int32 > _Original_Parent_Guardian, System::Nullable<System::Int32 > Original_Younger_Siblings, System::Nullable<System::Int32 > Original_Older_Siblings, System::Boolean Original_Baptised, System::Nullable<System::DateTime > Original_Date_of_Baptism, System::Boolean Original_Attended_High_School, System::String^ Original_Name_of_High_School, System::String^ Original_Address_of_High_School, System::String^ Original_Ministers_Name, System::String^ Original_Ministers_Address, System::String^ Original_Christian_Work_Performed, System::Nullable<System::Int32 > Original_Elder_1, System::Nullable<System::Int32 > Original_Elder_2, System::Nullable<System::Int32 > Original_Employer_1, System::Nullable<System::Int32 > Original_Employer_2) { this->Adapter->DeleteCommand->Parameters[0]->Value = static_cast<System::Int32>(Original_ID); if (Original_First_Name == nullptr) { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[2]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[2]->Value = (cli::safe_cast<System::String^ >(Original_First_Name)); } if (Original_Middle_Names == nullptr) { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[4]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[4]->Value = (cli::safe_cast<System::String^ >(Original_Middle_Names)); } if (Original_Last_Name == nullptr) { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[6]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[6]->Value = (cli::safe_cast<System::String^ >(Original_Last_Name)); } if (Original_Address == nullptr) { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[8]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[8]->Value = (cli::safe_cast<System::String^ >(Original_Address)); } if (Original_Sex == nullptr) { this->Adapter->DeleteCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[10]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[9]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[10]->Value = (cli::safe_cast<System::String^ >(Original_Sex)); } if (Original_Application_Date.HasValue == true) { this->Adapter->DeleteCommand->Parameters[11]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[12]->Value = static_cast<System::DateTime>(Original_Application_Date.Value); } else { this->Adapter->DeleteCommand->Parameters[11]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[12]->Value = System::DBNull::Value; } if (Original_Date_of_Birth.HasValue == true) { this->Adapter->DeleteCommand->Parameters[13]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[14]->Value = static_cast<System::DateTime>(Original_Date_of_Birth.Value); } else { this->Adapter->DeleteCommand->Parameters[13]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[14]->Value = System::DBNull::Value; } if (Original_Place_of_Birth == nullptr) { this->Adapter->DeleteCommand->Parameters[15]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[16]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[15]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[16]->Value = (cli::safe_cast<System::String^ >(Original_Place_of_Birth)); } if (_Original_Parent_Guardian.HasValue == true) { this->Adapter->DeleteCommand->Parameters[17]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[18]->Value = static_cast<System::Int32>(_Original_Parent_Guardian.Value); } else { this->Adapter->DeleteCommand->Parameters[17]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[18]->Value = System::DBNull::Value; } if (Original_Younger_Siblings.HasValue == true) { this->Adapter->DeleteCommand->Parameters[19]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[20]->Value = static_cast<System::Int32>(Original_Younger_Siblings.Value); } else { this->Adapter->DeleteCommand->Parameters[19]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[20]->Value = System::DBNull::Value; } if (Original_Older_Siblings.HasValue == true) { this->Adapter->DeleteCommand->Parameters[21]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[22]->Value = static_cast<System::Int32>(Original_Older_Siblings.Value); } else { this->Adapter->DeleteCommand->Parameters[21]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[22]->Value = System::DBNull::Value; } this->Adapter->DeleteCommand->Parameters[23]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[24]->Value = static_cast<System::Boolean>(Original_Baptised); if (Original_Date_of_Baptism.HasValue == true) { this->Adapter->DeleteCommand->Parameters[25]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[26]->Value = static_cast<System::DateTime>(Original_Date_of_Baptism.Value); } else { this->Adapter->DeleteCommand->Parameters[25]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[26]->Value = System::DBNull::Value; } this->Adapter->DeleteCommand->Parameters[27]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[28]->Value = static_cast<System::Boolean>(Original_Attended_High_School); if (Original_Name_of_High_School == nullptr) { this->Adapter->DeleteCommand->Parameters[29]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[30]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[29]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[30]->Value = (cli::safe_cast<System::String^ >(Original_Name_of_High_School)); } if (Original_Address_of_High_School == nullptr) { this->Adapter->DeleteCommand->Parameters[31]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[32]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[31]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[32]->Value = (cli::safe_cast<System::String^ >(Original_Address_of_High_School)); } if (Original_Ministers_Name == nullptr) { this->Adapter->DeleteCommand->Parameters[33]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[34]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[33]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[34]->Value = (cli::safe_cast<System::String^ >(Original_Ministers_Name)); } if (Original_Ministers_Address == nullptr) { this->Adapter->DeleteCommand->Parameters[35]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[36]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[35]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[36]->Value = (cli::safe_cast<System::String^ >(Original_Ministers_Address)); } if (Original_Christian_Work_Performed == nullptr) { this->Adapter->DeleteCommand->Parameters[37]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[38]->Value = System::DBNull::Value; } else { this->Adapter->DeleteCommand->Parameters[37]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[38]->Value = (cli::safe_cast<System::String^ >(Original_Christian_Work_Performed)); } if (Original_Elder_1.HasValue == true) { this->Adapter->DeleteCommand->Parameters[39]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[40]->Value = static_cast<System::Int32>(Original_Elder_1.Value); } else { this->Adapter->DeleteCommand->Parameters[39]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[40]->Value = System::DBNull::Value; } if (Original_Elder_2.HasValue == true) { this->Adapter->DeleteCommand->Parameters[41]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[42]->Value = static_cast<System::Int32>(Original_Elder_2.Value); } else { this->Adapter->DeleteCommand->Parameters[41]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[42]->Value = System::DBNull::Value; } if (Original_Employer_1.HasValue == true) { this->Adapter->DeleteCommand->Parameters[43]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[44]->Value = static_cast<System::Int32>(Original_Employer_1.Value); } else { this->Adapter->DeleteCommand->Parameters[43]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[44]->Value = System::DBNull::Value; } if (Original_Employer_2.HasValue == true) { this->Adapter->DeleteCommand->Parameters[45]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->DeleteCommand->Parameters[46]->Value = static_cast<System::Int32>(Original_Employer_2.Value); } else { this->Adapter->DeleteCommand->Parameters[45]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->DeleteCommand->Parameters[46]->Value = System::DBNull::Value; } System::Data::ConnectionState previousConnectionState = this->Adapter->DeleteCommand->Connection->State; if ((this->Adapter->DeleteCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->DeleteCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->DeleteCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->DeleteCommand->Connection->Close(); } } } inline System::Int32 StudentTableAdapter::Insert( System::String^ First_Name, System::String^ Middle_Names, System::String^ Last_Name, System::String^ Address, System::String^ Sex, System::Nullable<System::DateTime > Application_Date, System::Nullable<System::DateTime > Date_of_Birth, System::String^ Place_of_Birth, System::Nullable<System::Int32 > _Parent_Guardian, System::Nullable<System::Int32 > Younger_Siblings, System::Nullable<System::Int32 > Older_Siblings, System::Boolean Baptised, System::Nullable<System::DateTime > Date_of_Baptism, System::Boolean Attended_High_School, System::String^ Name_of_High_School, System::String^ Address_of_High_School, System::String^ Ministers_Name, System::String^ Ministers_Address, System::String^ Christian_Work_Performed, System::Nullable<System::Int32 > Elder_1, System::Nullable<System::Int32 > Elder_2, System::Nullable<System::Int32 > Employer_1, System::Nullable<System::Int32 > Employer_2) { if (First_Name == nullptr) { this->Adapter->InsertCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(First_Name)); } if (Middle_Names == nullptr) { this->Adapter->InsertCommand->Parameters[1]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[1]->Value = (cli::safe_cast<System::String^ >(Middle_Names)); } if (Last_Name == nullptr) { this->Adapter->InsertCommand->Parameters[2]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[2]->Value = (cli::safe_cast<System::String^ >(Last_Name)); } if (Address == nullptr) { this->Adapter->InsertCommand->Parameters[3]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[3]->Value = (cli::safe_cast<System::String^ >(Address)); } if (Sex == nullptr) { this->Adapter->InsertCommand->Parameters[4]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[4]->Value = (cli::safe_cast<System::String^ >(Sex)); } if (Application_Date.HasValue == true) { this->Adapter->InsertCommand->Parameters[5]->Value = static_cast<System::DateTime>(Application_Date.Value); } else { this->Adapter->InsertCommand->Parameters[5]->Value = System::DBNull::Value; } if (Date_of_Birth.HasValue == true) { this->Adapter->InsertCommand->Parameters[6]->Value = static_cast<System::DateTime>(Date_of_Birth.Value); } else { this->Adapter->InsertCommand->Parameters[6]->Value = System::DBNull::Value; } if (Place_of_Birth == nullptr) { this->Adapter->InsertCommand->Parameters[7]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[7]->Value = (cli::safe_cast<System::String^ >(Place_of_Birth)); } if (_Parent_Guardian.HasValue == true) { this->Adapter->InsertCommand->Parameters[8]->Value = static_cast<System::Int32>(_Parent_Guardian.Value); } else { this->Adapter->InsertCommand->Parameters[8]->Value = System::DBNull::Value; } if (Younger_Siblings.HasValue == true) { this->Adapter->InsertCommand->Parameters[9]->Value = static_cast<System::Int32>(Younger_Siblings.Value); } else { this->Adapter->InsertCommand->Parameters[9]->Value = System::DBNull::Value; } if (Older_Siblings.HasValue == true) { this->Adapter->InsertCommand->Parameters[10]->Value = static_cast<System::Int32>(Older_Siblings.Value); } else { this->Adapter->InsertCommand->Parameters[10]->Value = System::DBNull::Value; } this->Adapter->InsertCommand->Parameters[11]->Value = static_cast<System::Boolean>(Baptised); if (Date_of_Baptism.HasValue == true) { this->Adapter->InsertCommand->Parameters[12]->Value = static_cast<System::DateTime>(Date_of_Baptism.Value); } else { this->Adapter->InsertCommand->Parameters[12]->Value = System::DBNull::Value; } this->Adapter->InsertCommand->Parameters[13]->Value = static_cast<System::Boolean>(Attended_High_School); if (Name_of_High_School == nullptr) { this->Adapter->InsertCommand->Parameters[14]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[14]->Value = (cli::safe_cast<System::String^ >(Name_of_High_School)); } if (Address_of_High_School == nullptr) { this->Adapter->InsertCommand->Parameters[15]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[15]->Value = (cli::safe_cast<System::String^ >(Address_of_High_School)); } if (Ministers_Name == nullptr) { this->Adapter->InsertCommand->Parameters[16]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[16]->Value = (cli::safe_cast<System::String^ >(Ministers_Name)); } if (Ministers_Address == nullptr) { this->Adapter->InsertCommand->Parameters[17]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[17]->Value = (cli::safe_cast<System::String^ >(Ministers_Address)); } if (Christian_Work_Performed == nullptr) { this->Adapter->InsertCommand->Parameters[18]->Value = System::DBNull::Value; } else { this->Adapter->InsertCommand->Parameters[18]->Value = (cli::safe_cast<System::String^ >(Christian_Work_Performed)); } if (Elder_1.HasValue == true) { this->Adapter->InsertCommand->Parameters[19]->Value = static_cast<System::Int32>(Elder_1.Value); } else { this->Adapter->InsertCommand->Parameters[19]->Value = System::DBNull::Value; } if (Elder_2.HasValue == true) { this->Adapter->InsertCommand->Parameters[20]->Value = static_cast<System::Int32>(Elder_2.Value); } else { this->Adapter->InsertCommand->Parameters[20]->Value = System::DBNull::Value; } if (Employer_1.HasValue == true) { this->Adapter->InsertCommand->Parameters[21]->Value = static_cast<System::Int32>(Employer_1.Value); } else { this->Adapter->InsertCommand->Parameters[21]->Value = System::DBNull::Value; } if (Employer_2.HasValue == true) { this->Adapter->InsertCommand->Parameters[22]->Value = static_cast<System::Int32>(Employer_2.Value); } else { this->Adapter->InsertCommand->Parameters[22]->Value = System::DBNull::Value; } System::Data::ConnectionState previousConnectionState = this->Adapter->InsertCommand->Connection->State; if ((this->Adapter->InsertCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->InsertCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->InsertCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->InsertCommand->Connection->Close(); } } } inline System::Int32 StudentTableAdapter::Update( System::String^ First_Name, System::String^ Middle_Names, System::String^ Last_Name, System::String^ Address, System::String^ Sex, System::Nullable<System::DateTime > Application_Date, System::Nullable<System::DateTime > Date_of_Birth, System::String^ Place_of_Birth, System::Nullable<System::Int32 > _Parent_Guardian, System::Nullable<System::Int32 > Younger_Siblings, System::Nullable<System::Int32 > Older_Siblings, System::Boolean Baptised, System::Nullable<System::DateTime > Date_of_Baptism, System::Boolean Attended_High_School, System::String^ Name_of_High_School, System::String^ Address_of_High_School, System::String^ Ministers_Name, System::String^ Ministers_Address, System::String^ Christian_Work_Performed, System::Nullable<System::Int32 > Elder_1, System::Nullable<System::Int32 > Elder_2, System::Nullable<System::Int32 > Employer_1, System::Nullable<System::Int32 > Employer_2, System::Int32 Original_ID, System::String^ Original_First_Name, System::String^ Original_Middle_Names, System::String^ Original_Last_Name, System::String^ Original_Address, System::String^ Original_Sex, System::Nullable<System::DateTime > Original_Application_Date, System::Nullable<System::DateTime > Original_Date_of_Birth, System::String^ Original_Place_of_Birth, System::Nullable<System::Int32 > _Original_Parent_Guardian, System::Nullable<System::Int32 > Original_Younger_Siblings, System::Nullable<System::Int32 > Original_Older_Siblings, System::Boolean Original_Baptised, System::Nullable<System::DateTime > Original_Date_of_Baptism, System::Boolean Original_Attended_High_School, System::String^ Original_Name_of_High_School, System::String^ Original_Address_of_High_School, System::String^ Original_Ministers_Name, System::String^ Original_Ministers_Address, System::String^ Original_Christian_Work_Performed, System::Nullable<System::Int32 > Original_Elder_1, System::Nullable<System::Int32 > Original_Elder_2, System::Nullable<System::Int32 > Original_Employer_1, System::Nullable<System::Int32 > Original_Employer_2) { if (First_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[0]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[0]->Value = (cli::safe_cast<System::String^ >(First_Name)); } if (Middle_Names == nullptr) { this->Adapter->UpdateCommand->Parameters[1]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[1]->Value = (cli::safe_cast<System::String^ >(Middle_Names)); } if (Last_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[2]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[2]->Value = (cli::safe_cast<System::String^ >(Last_Name)); } if (Address == nullptr) { this->Adapter->UpdateCommand->Parameters[3]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[3]->Value = (cli::safe_cast<System::String^ >(Address)); } if (Sex == nullptr) { this->Adapter->UpdateCommand->Parameters[4]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[4]->Value = (cli::safe_cast<System::String^ >(Sex)); } if (Application_Date.HasValue == true) { this->Adapter->UpdateCommand->Parameters[5]->Value = static_cast<System::DateTime>(Application_Date.Value); } else { this->Adapter->UpdateCommand->Parameters[5]->Value = System::DBNull::Value; } if (Date_of_Birth.HasValue == true) { this->Adapter->UpdateCommand->Parameters[6]->Value = static_cast<System::DateTime>(Date_of_Birth.Value); } else { this->Adapter->UpdateCommand->Parameters[6]->Value = System::DBNull::Value; } if (Place_of_Birth == nullptr) { this->Adapter->UpdateCommand->Parameters[7]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[7]->Value = (cli::safe_cast<System::String^ >(Place_of_Birth)); } if (_Parent_Guardian.HasValue == true) { this->Adapter->UpdateCommand->Parameters[8]->Value = static_cast<System::Int32>(_Parent_Guardian.Value); } else { this->Adapter->UpdateCommand->Parameters[8]->Value = System::DBNull::Value; } if (Younger_Siblings.HasValue == true) { this->Adapter->UpdateCommand->Parameters[9]->Value = static_cast<System::Int32>(Younger_Siblings.Value); } else { this->Adapter->UpdateCommand->Parameters[9]->Value = System::DBNull::Value; } if (Older_Siblings.HasValue == true) { this->Adapter->UpdateCommand->Parameters[10]->Value = static_cast<System::Int32>(Older_Siblings.Value); } else { this->Adapter->UpdateCommand->Parameters[10]->Value = System::DBNull::Value; } this->Adapter->UpdateCommand->Parameters[11]->Value = static_cast<System::Boolean>(Baptised); if (Date_of_Baptism.HasValue == true) { this->Adapter->UpdateCommand->Parameters[12]->Value = static_cast<System::DateTime>(Date_of_Baptism.Value); } else { this->Adapter->UpdateCommand->Parameters[12]->Value = System::DBNull::Value; } this->Adapter->UpdateCommand->Parameters[13]->Value = static_cast<System::Boolean>(Attended_High_School); if (Name_of_High_School == nullptr) { this->Adapter->UpdateCommand->Parameters[14]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[14]->Value = (cli::safe_cast<System::String^ >(Name_of_High_School)); } if (Address_of_High_School == nullptr) { this->Adapter->UpdateCommand->Parameters[15]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[15]->Value = (cli::safe_cast<System::String^ >(Address_of_High_School)); } if (Ministers_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[16]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[16]->Value = (cli::safe_cast<System::String^ >(Ministers_Name)); } if (Ministers_Address == nullptr) { this->Adapter->UpdateCommand->Parameters[17]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[17]->Value = (cli::safe_cast<System::String^ >(Ministers_Address)); } if (Christian_Work_Performed == nullptr) { this->Adapter->UpdateCommand->Parameters[18]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[18]->Value = (cli::safe_cast<System::String^ >(Christian_Work_Performed)); } if (Elder_1.HasValue == true) { this->Adapter->UpdateCommand->Parameters[19]->Value = static_cast<System::Int32>(Elder_1.Value); } else { this->Adapter->UpdateCommand->Parameters[19]->Value = System::DBNull::Value; } if (Elder_2.HasValue == true) { this->Adapter->UpdateCommand->Parameters[20]->Value = static_cast<System::Int32>(Elder_2.Value); } else { this->Adapter->UpdateCommand->Parameters[20]->Value = System::DBNull::Value; } if (Employer_1.HasValue == true) { this->Adapter->UpdateCommand->Parameters[21]->Value = static_cast<System::Int32>(Employer_1.Value); } else { this->Adapter->UpdateCommand->Parameters[21]->Value = System::DBNull::Value; } if (Employer_2.HasValue == true) { this->Adapter->UpdateCommand->Parameters[22]->Value = static_cast<System::Int32>(Employer_2.Value); } else { this->Adapter->UpdateCommand->Parameters[22]->Value = System::DBNull::Value; } this->Adapter->UpdateCommand->Parameters[23]->Value = static_cast<System::Int32>(Original_ID); if (Original_First_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[24]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[25]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[24]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[25]->Value = (cli::safe_cast<System::String^ >(Original_First_Name)); } if (Original_Middle_Names == nullptr) { this->Adapter->UpdateCommand->Parameters[26]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[27]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[26]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[27]->Value = (cli::safe_cast<System::String^ >(Original_Middle_Names)); } if (Original_Last_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[28]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[29]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[28]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[29]->Value = (cli::safe_cast<System::String^ >(Original_Last_Name)); } if (Original_Address == nullptr) { this->Adapter->UpdateCommand->Parameters[30]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[31]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[30]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[31]->Value = (cli::safe_cast<System::String^ >(Original_Address)); } if (Original_Sex == nullptr) { this->Adapter->UpdateCommand->Parameters[32]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[33]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[32]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[33]->Value = (cli::safe_cast<System::String^ >(Original_Sex)); } if (Original_Application_Date.HasValue == true) { this->Adapter->UpdateCommand->Parameters[34]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[35]->Value = static_cast<System::DateTime>(Original_Application_Date.Value); } else { this->Adapter->UpdateCommand->Parameters[34]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[35]->Value = System::DBNull::Value; } if (Original_Date_of_Birth.HasValue == true) { this->Adapter->UpdateCommand->Parameters[36]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[37]->Value = static_cast<System::DateTime>(Original_Date_of_Birth.Value); } else { this->Adapter->UpdateCommand->Parameters[36]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[37]->Value = System::DBNull::Value; } if (Original_Place_of_Birth == nullptr) { this->Adapter->UpdateCommand->Parameters[38]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[39]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[38]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[39]->Value = (cli::safe_cast<System::String^ >(Original_Place_of_Birth)); } if (_Original_Parent_Guardian.HasValue == true) { this->Adapter->UpdateCommand->Parameters[40]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[41]->Value = static_cast<System::Int32>(_Original_Parent_Guardian.Value); } else { this->Adapter->UpdateCommand->Parameters[40]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[41]->Value = System::DBNull::Value; } if (Original_Younger_Siblings.HasValue == true) { this->Adapter->UpdateCommand->Parameters[42]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[43]->Value = static_cast<System::Int32>(Original_Younger_Siblings.Value); } else { this->Adapter->UpdateCommand->Parameters[42]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[43]->Value = System::DBNull::Value; } if (Original_Older_Siblings.HasValue == true) { this->Adapter->UpdateCommand->Parameters[44]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[45]->Value = static_cast<System::Int32>(Original_Older_Siblings.Value); } else { this->Adapter->UpdateCommand->Parameters[44]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[45]->Value = System::DBNull::Value; } this->Adapter->UpdateCommand->Parameters[46]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[47]->Value = static_cast<System::Boolean>(Original_Baptised); if (Original_Date_of_Baptism.HasValue == true) { this->Adapter->UpdateCommand->Parameters[48]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[49]->Value = static_cast<System::DateTime>(Original_Date_of_Baptism.Value); } else { this->Adapter->UpdateCommand->Parameters[48]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[49]->Value = System::DBNull::Value; } this->Adapter->UpdateCommand->Parameters[50]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[51]->Value = static_cast<System::Boolean>(Original_Attended_High_School); if (Original_Name_of_High_School == nullptr) { this->Adapter->UpdateCommand->Parameters[52]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[53]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[52]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[53]->Value = (cli::safe_cast<System::String^ >(Original_Name_of_High_School)); } if (Original_Address_of_High_School == nullptr) { this->Adapter->UpdateCommand->Parameters[54]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[55]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[54]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[55]->Value = (cli::safe_cast<System::String^ >(Original_Address_of_High_School)); } if (Original_Ministers_Name == nullptr) { this->Adapter->UpdateCommand->Parameters[56]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[57]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[56]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[57]->Value = (cli::safe_cast<System::String^ >(Original_Ministers_Name)); } if (Original_Ministers_Address == nullptr) { this->Adapter->UpdateCommand->Parameters[58]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[59]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[58]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[59]->Value = (cli::safe_cast<System::String^ >(Original_Ministers_Address)); } if (Original_Christian_Work_Performed == nullptr) { this->Adapter->UpdateCommand->Parameters[60]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[61]->Value = System::DBNull::Value; } else { this->Adapter->UpdateCommand->Parameters[60]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[61]->Value = (cli::safe_cast<System::String^ >(Original_Christian_Work_Performed)); } if (Original_Elder_1.HasValue == true) { this->Adapter->UpdateCommand->Parameters[62]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[63]->Value = static_cast<System::Int32>(Original_Elder_1.Value); } else { this->Adapter->UpdateCommand->Parameters[62]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[63]->Value = System::DBNull::Value; } if (Original_Elder_2.HasValue == true) { this->Adapter->UpdateCommand->Parameters[64]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[65]->Value = static_cast<System::Int32>(Original_Elder_2.Value); } else { this->Adapter->UpdateCommand->Parameters[64]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[65]->Value = System::DBNull::Value; } if (Original_Employer_1.HasValue == true) { this->Adapter->UpdateCommand->Parameters[66]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[67]->Value = static_cast<System::Int32>(Original_Employer_1.Value); } else { this->Adapter->UpdateCommand->Parameters[66]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[67]->Value = System::DBNull::Value; } if (Original_Employer_2.HasValue == true) { this->Adapter->UpdateCommand->Parameters[68]->Value = cli::safe_cast<System::Object^>(0); this->Adapter->UpdateCommand->Parameters[69]->Value = static_cast<System::Int32>(Original_Employer_2.Value); } else { this->Adapter->UpdateCommand->Parameters[68]->Value = cli::safe_cast<System::Object^>(1); this->Adapter->UpdateCommand->Parameters[69]->Value = System::DBNull::Value; } System::Data::ConnectionState previousConnectionState = this->Adapter->UpdateCommand->Connection->State; if ((this->Adapter->UpdateCommand->Connection->State & System::Data::ConnectionState::Open) != System::Data::ConnectionState::Open) { this->Adapter->UpdateCommand->Connection->Open(); } try { System::Int32 returnValue = this->Adapter->UpdateCommand->ExecuteNonQuery(); return returnValue; } finally { if (previousConnectionState == System::Data::ConnectionState::Closed) { this->Adapter->UpdateCommand->Connection->Close(); } } } } }
b26901787cc9735358569b3c1933ad7ca9ca1c9f
eb192dfea075a36502882c19f566255562c99126
/OpenFoamandPreCICE/Solid_convection/7.1/gradTy
aa49cf3b162b7577328bc7013a78bbce74a76560
[]
no_license
moritzhof/CFD-Solver
e8dfc5714107039e9b02d297d4c62a6a187cafa8
35fc2d02a8f7366ecc68a8ae275c6aec03132418
refs/heads/master
2020-06-23T17:06:09.203977
2019-08-07T21:04:01
2019-08-07T21:04:01
198,681,196
2
0
null
null
null
null
UTF-8
C++
false
false
61,809
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "7.1"; object gradTy; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 -1 0 1 0 0 0]; internalField nonuniform List<scalar> 6300 ( 1046.75 1140.53 1235.19 1331.28 1429.34 1529.85 1633.24 1739.83 1849.86 1963.43 2080.48 2200.76 2323.87 2449.21 2576.02 -0.439478 -1.30984 -2.15367 -2.95102 -3.67879 -4.30993 -4.81326 -5.15428 -5.29711 -5.20802 -4.8604 -4.24073 -3.35452 -2.23042 -0.920501 -0.742039 -2.21255 -3.64112 -4.99577 -6.23881 -7.32531 -8.20248 -8.81057 -9.08594 -8.96686 -8.40234 -7.36333 -5.8545 -3.92326 -1.66173 -1.05818 -3.1572 -5.20246 -7.15203 -8.95525 -10.5499 -11.8606 -12.7994 -13.269 -13.1709 -12.4185 -10.9555 -8.77669 -5.94621 -2.6044 -1.3916 -4.15559 -6.85942 -9.4546 -11.8802 -14.0583 -15.8906 -17.2573 -18.0196 -18.0291 -17.1452 -15.2633 -12.3504 -8.48048 -3.85397 -1.74421 -5.21405 -8.62491 -11.9266 -15.0524 -17.9121 -20.3859 -22.3192 -23.5228 -23.7803 -22.8696 -20.6018 -16.8808 -11.7709 -5.54705 -2.11539 -6.33145 -10.4995 -14.5744 -18.4905 -22.1518 -25.4213 -28.1105 -29.9717 -30.6995 -29.9505 -27.3933 -22.7999 -16.175 -7.87762 -2.50128 -7.49679 -12.467 -17.3807 -22.183 -26.7829 -31.0368 -34.7294 -37.5534 -39.095 -38.8393 -36.2202 -30.7503 -22.2515 -11.1435 -2.89415 -8.68729 -14.4909 -20.298 -26.0776 -31.7596 -37.2131 -42.2162 -46.4167 -49.2872 -50.0908 -47.8975 -41.729 -30.9369 -15.8489 -3.28214 -9.86714 -16.5112 -23.2425 -30.0693 -36.9642 -43.8391 -50.505 -56.6094 -61.5455 -64.3383 -63.5494 -57.331 -43.9182 -22.9524 -3.64938 -10.9878 -18.4439 -26.0912 -33.9926 -42.1883 -50.6735 -59.3546 -67.9696 -75.9462 -82.1668 -84.6302 -80.1268 -64.4522 -34.5648 -3.9769 -11.9906 -20.1852 -28.6856 -37.6209 -47.1223 -57.3111 -68.2693 -79.9671 -92.1018 -103.751 -112.677 -114.093 -99.1984 -56.2721 -4.2445 -12.8122 -21.6205 -30.8444 -40.6826 -51.368 -63.1786 -76.4433 -91.5264 -108.741 -128.059 -148.23 -164.369 -161.975 -106.213 -4.43332 -13.3932 -22.6397 -32.3885 -42.8966 -54.4877 -67.5908 -82.7979 -100.952 -123.277 -151.51 -187.814 -233.176 -278.115 -255.693 -4.52886 -13.6872 -23.1561 -33.1729 -44.0268 -56.0946 -69.8981 -86.2037 -106.207 -131.902 -166.889 -218.338 -302.403 -461.612 -830.534 2692.8 2798.76 2903.95 3007.8 3109.78 3209.4 3306.22 3399.86 3490.01 3576.38 3658.78 3737.02 3810.99 3880.57 3945.71 4006.36 4062.49 4114.09 4161.18 4203.76 4241.89 4275.61 4304.97 4330.05 4350.92 4367.67 4380.39 4389.17 4394.12 4395.32 4392.89 4386.93 4377.53 4364.8 4348.82 4329.7 4307.52 4282.37 4254.33 4223.49 4189.94 4153.75 4115 4073.77 4030.14 3984.19 3935.97 3885.57 3833.04 3778.44 3721.82 3663.24 3602.73 3540.36 3476.17 3410.2 3342.51 3273.15 3202.18 3129.67 3055.67 2980.26 2903.5 2825.47 2746.24 2665.88 2584.48 2502.13 2418.92 2334.96 2250.38 2165.32 2079.92 1994.36 1908.83 1823.52 1738.66 1654.46 1571.14 1488.94 1408.07 1328.76 1251.22 1175.64 1102.2 1031.06 962.356 896.181 832.611 771.682 0.385627 1.60177 2.80093 3.94257 4.99464 5.93539 6.75339 7.44646 8.01963 8.48282 8.84862 9.13034 9.34064 9.49063 9.58947 9.64436 9.66076 9.64277 9.5936 9.51591 9.41216 9.28479 9.13634 8.96948 8.78698 8.5917 8.38653 8.17431 7.95777 7.73951 7.52187 7.30683 7.09597 6.89035 6.69052 6.49649 6.30782 6.12382 5.94365 5.76662 5.59232 5.42083 5.2527 5.08899 4.93103 4.78028 4.63798 4.50495 4.38129 4.2663 4.15845 4.05549 3.9547 3.85321 3.74837 3.63803 3.52084 3.39629 3.26466 3.12676 2.9836 2.83595 2.68391 2.52662 2.362 2.18678 1.99665 1.78667 1.55178 1.28738 0.989952 0.657508 0.289915 -0.111004 -0.541575 -0.996546 -1.46947 -1.9531 -2.43977 -2.92163 -3.39077 -3.83918 -4.25869 -4.64089 -4.97717 -5.25899 -5.4784 -5.62874 -5.70552 -5.70706 0.596322 2.69591 4.75904 6.71284 8.5011 10.0873 11.4542 12.6014 13.5409 14.2929 14.8813 15.3306 15.6633 15.8986 16.0518 16.1346 16.1553 16.1201 16.0339 15.9004 15.7236 15.5073 15.2556 14.973 14.6643 14.3342 13.9878 13.6297 13.2647 12.8972 12.5312 12.1704 11.8172 11.4737 11.1406 10.8179 10.5046 10.1993 9.90011 9.60569 9.31511 9.02839 8.74655 8.47156 8.20602 7.95279 7.71439 7.4925 7.28754 7.09835 6.92219 6.75494 6.59155 6.42666 6.25531 6.0736 5.87912 5.67114 5.45049 5.2191 4.97931 4.73307 4.48112 4.2223 3.95319 3.66802 3.35903 3.01714 2.63297 2.19794 1.70539 1.15155 0.536003 -0.138034 -0.864009 -1.63256 -2.4323 -3.25058 -4.07423 -4.88998 -5.68466 -6.44507 -7.15769 -7.80842 -8.3825 -8.86486 -9.24108 -9.49882 -9.62945 -9.62956 0.740182 3.84322 6.87535 9.7223 12.2994 14.5559 16.4725 18.0565 19.3334 20.3396 21.1155 21.7 22.1276 22.4261 22.617 22.7153 22.7315 22.6724 22.5434 22.3489 22.0934 21.7821 21.4207 21.0157 20.5738 20.1019 19.6072 19.0964 18.5766 18.0541 17.5349 17.0242 16.5261 16.0434 15.5773 15.1272 14.6915 14.2672 13.8512 13.4406 13.0338 12.6303 12.2319 11.8419 11.4646 11.1053 10.7683 10.457 10.1723 9.91288 9.67433 9.45004 9.23173 9.01055 8.77832 8.52868 8.25792 7.96529 7.65283 7.32454 6.98531 6.6394 6.28915 5.93371 5.56837 5.18442 4.76961 4.30932 3.78819 3.19206 2.50986 1.73514 0.867016 -0.0896033 -1.12448 -2.22306 -3.36783 -4.53976 -5.7195 -6.88815 -8.0274 -9.11928 -10.1453 -11.0859 -11.9195 -12.6232 -13.174 -13.5515 -13.741 -13.736 0.793907 5.09253 9.25822 13.1202 16.5596 19.5137 21.9699 23.9538 25.5159 26.7184 27.6255 28.2957 28.7777 29.109 29.3156 29.4147 29.4162 29.3259 29.1477 28.8854 28.5439 28.1293 27.6491 27.1119 26.5268 25.903 25.25 24.5769 23.8928 23.2067 22.5267 21.8604 21.2134 20.5899 19.9912 19.4165 18.8623 18.3237 17.795 17.2709 16.748 16.2255 15.7059 15.1942 14.6981 14.226 13.7859 13.3835 13.0215 12.6978 12.4064 12.137 11.8765 11.6108 11.3269 11.0147 10.6687 10.2885 9.8784 9.44622 9.00135 8.55244 8.10509 7.65979 7.21078 6.74566 6.24608 5.68949 5.05179 4.3105 3.44792 2.4536 1.32583 0.0718841 -1.29286 -2.74667 -4.26388 -5.81733 -7.38041 -8.92828 -10.438 -11.8879 -13.2558 -14.5171 -15.6432 -16.6013 -17.3562 -17.8749 -18.1322 -18.1166 0.742587 6.53369 12.079 17.1269 21.5189 25.1891 28.148 30.4594 32.2168 33.5234 34.4775 35.1633 35.6461 35.9722 36.1703 36.2557 36.2342 36.107 35.8741 35.5372 35.1008 34.5721 33.9609 33.2785 32.5368 31.7477 30.9231 30.0745 29.2135 28.3517 27.5005 26.6699 25.8686 25.102 24.3723 23.6775 23.0122 22.3675 21.7335 21.1008 20.463 19.8181 19.1696 18.5256 17.8984 17.3022 16.7504 16.2535 15.8165 15.4377 15.1082 14.8125 14.5301 14.2386 13.9173 13.5504 13.1298 12.6559 12.1369 11.5872 11.0242 10.4643 9.91904 9.39219 8.87735 8.35743 7.80551 7.18732 6.4654 5.60442 4.57646 3.365 1.96711 0.393649 -1.33225 -3.17828 -5.10704 -7.08034 -9.06256 -11.0227 -12.9342 -14.7741 -16.5192 -18.1424 -19.6083 -20.8714 -21.8781 -22.5742 -22.916 -22.8821 0.585793 8.32878 15.6156 22.0779 27.5171 31.888 35.2579 37.7622 39.5662 40.8355 41.7158 42.323 42.7401 43.0194 43.1872 43.2504 43.2044 43.04 42.7501 42.3323 41.7904 41.1336 40.3752 39.5305 38.615 37.6437 36.6308 35.59 34.5354 33.4819 32.4445 31.4378 30.4739 29.5614 28.7033 27.8967 27.1326 26.3963 25.6705 24.9385 24.1885 23.4166 22.6271 21.8333 21.0547 20.3147 19.6363 19.0376 18.5281 18.107 17.7618 17.4691 17.1971 16.9099 16.5738 16.164 15.6682 15.0884 14.4399 13.7479 13.0431 12.3553 11.7069 11.1077 10.5516 10.0157 9.46076 8.83489 8.07962 7.13914 5.96958 4.5452 2.86154 0.93527 -1.19829 -3.49038 -5.88569 -8.33007 -10.7762 -13.1865 -15.5332 -17.7962 -19.9576 -21.9936 -23.8651 -25.5101 -26.8467 -27.7831 -28.2404 -28.1775 0.35832 10.7803 20.3391 28.5011 35.0525 40.0269 43.6123 46.0712 47.6835 48.7056 49.3452 49.7542 50.0303 50.2251 50.3525 50.4005 50.3427 50.1519 49.8082 49.3041 48.6433 47.8394 46.9119 45.8823 44.7715 43.5978 42.3767 41.1235 39.8542 38.5872 37.3429 36.1423 35.0039 33.9408 32.9585 32.0535 31.2116 30.4089 29.6151 28.8007 27.9447 27.039 26.09 25.1178 24.1542 23.2376 22.4066 21.6921 21.1117 20.6662 20.3389 20.0951 19.8853 19.6507 19.3357 18.9005 18.3267 17.6194 16.8047 15.9263 15.0368 14.189 13.4233 12.7604 12.1962 11.7007 11.2176 10.6683 9.95997 9.00322 7.72913 6.09829 4.10489 1.77497 -0.836421 -3.65417 -6.59392 -9.57754 -12.5415 -15.4419 -18.2528 -20.9647 -23.5763 -26.0819 -28.4476 -30.593 -32.3911 -33.6818 -34.3133 -34.205 0.179568 14.4739 27.0726 37.2422 44.8573 50.1638 53.5861 55.5959 56.6472 57.1228 57.3029 57.3729 57.4338 57.5239 57.6283 57.6989 57.6685 57.4796 57.0934 56.4972 55.6982 54.7193 53.5912 52.3468 51.0148 49.6158 48.1651 46.6764 45.1658 43.6559 42.1746 40.7539 39.4219 38.2004 37.0993 36.1161 35.2308 34.4055 33.5864 32.7197 31.7695 30.7208 29.5834 28.3872 27.1835 26.0343 25.0066 24.1511 23.4986 23.0527 22.7932 22.67 22.6071 22.5049 22.2685 21.8345 21.1752 20.3028 19.2594 18.1186 16.9684 15.9025 14.9898 14.2694 13.7402 13.3661 13.0681 12.7289 12.1966 11.3228 10.001 8.1721 5.83154 3.01875 -0.178549 -3.64337 -7.23996 -10.8542 -14.3992 -17.8268 -21.1156 -24.278 -27.3481 -30.3717 -33.3475 -36.1762 -38.666 -40.5297 -41.4513 -41.2663 0.398931 20.608 37.3022 49.6599 57.9852 63.0128 65.5927 66.4995 66.4381 65.9633 65.4168 65.0024 64.7929 64.7997 64.9502 65.1402 65.2203 65.089 64.6786 63.9801 63.0096 61.8116 60.4357 58.9354 57.3521 55.7063 54.0062 52.2586 50.4745 48.6814 46.9171 45.2358 43.6792 42.2849 41.0685 40.0363 39.1619 38.3918 37.6247 36.7576 35.7348 34.529 33.1602 31.6664 30.133 28.6552 27.3575 26.3167 25.587 25.17 25.05 25.1572 25.3843 25.5517 25.4848 25.0919 24.33 23.2314 21.8538 20.3236 18.7781 17.3944 16.2787 15.5023 15.06 14.9211 14.9775 15.067 14.9243 14.2868 13.0025 10.9822 8.23773 4.8158 0.864197 -3.44312 -7.86084 -12.2307 -16.4261 -20.4118 -24.1602 -27.7242 -31.1868 -34.7301 -38.4592 -42.2469 -45.8423 -48.7335 -50.1824 -49.8441 2.08567 31.8026 53.7756 67.8823 75.8607 79.3867 80.0097 78.7987 76.8259 74.909 73.3423 72.339 71.8424 71.8707 72.2174 72.742 73.0787 73.1028 72.6814 71.8572 70.6516 69.1628 67.4625 65.6465 63.7827 61.8781 59.9189 57.8967 55.7994 53.6693 51.5436 49.5417 47.7062 46.1171 44.7758 43.733 42.9461 42.3774 41.8106 41.023 39.9672 38.5751 36.9207 35.0058 33.0057 31.0203 29.3416 28.0376 27.2285 26.8626 26.9828 27.4749 28.2503 28.9388 29.1733 28.8834 27.9723 26.5647 24.6705 22.5531 20.3574 18.5029 17.0817 16.2567 15.9452 16.1971 16.8414 17.7415 18.3666 18.1841 17.0656 14.8372 11.6214 7.37753 2.4211 -3.08199 -8.54865 -13.8568 -18.7532 -23.3365 -27.469 -31.3145 -34.9079 -38.8191 -43.485 -48.5929 -54.031 -59.013 -61.4858 -60.7644 8.95842 54.1487 81.577 94.9286 100.145 99.9375 97.0644 92.1915 87.1304 83.3475 80.4536 78.9428 78.133 78.4802 79.2255 80.6112 81.384 81.7552 81.2609 80.2804 78.6981 76.8156 74.653 72.4232 70.2693 68.1256 65.9195 63.6406 61.1688 58.6481 55.9896 53.6056 51.3763 49.5902 48.0513 47.0591 46.4142 46.3585 46.3126 45.6727 44.6824 42.997 41.0547 38.4663 35.8558 32.9422 30.7847 29.0445 28.2303 27.8541 28.3789 29.3832 31.2401 32.9788 33.6156 33.5683 32.3284 30.5976 27.8076 24.8943 21.4442 18.9866 17.0251 16.2705 16.018 16.9074 18.3359 20.8113 22.9709 23.4284 22.7264 20.113 16.4847 10.9647 4.76456 -2.77383 -9.4652 -16.0761 -21.5313 -26.9105 -31.1909 -35.2679 -38.1711 -41.8214 -47.8739 -54.463 -62.8759 -72.9054 -77.3879 -75.5212 36.1492 102.071 129.648 133.689 132.239 124.325 116.997 105.853 95.5918 90.5034 85.5707 84.5348 82.7551 84.5139 85.3087 89.3605 90.2652 91.6511 90.5378 89.5677 87.1744 84.8692 81.9375 79.0885 76.7387 74.4609 72.0228 69.6599 66.6066 63.8238 60.0383 57.445 54.4068 52.7055 50.5382 49.8838 49.0324 50.324 51.6685 50.8259 50.3972 47.7876 46.118 41.9576 39.1413 33.7743 31.6263 28.717 28.6005 27.5474 29.0838 30.063 34.3994 38.6045 39.0423 39.9696 37.3904 36.1552 31.1213 28.0076 21.1014 18.755 15.2298 15.5608 14.446 16.8408 18.3221 24.3352 30.0256 30.3418 31.1392 26.8495 24.0717 15.5306 9.03473 -3.68565 -10.4978 -19.9598 -24.4187 -32.067 -35.2055 -40.9115 -40.3581 -41.3643 -51.4894 -57.7066 -69.3921 -94.7846 -102.432 -96.8801 154.777 205.205 211.605 180.353 173.639 147.867 142.421 118.243 96.6031 97.4343 85.0758 91.1969 82.2814 91.9348 86.701 102.641 98.4526 105.145 99.6077 100.904 95.5237 93.8244 89.1028 85.0349 83.1043 81.027 78.0181 76.6735 71.6556 70.4436 62.371 61.926 55.5131 56.4927 50.8476 52.9934 48.5655 54.2142 60.1748 55.384 59.2535 51.2254 54.7693 43.5143 46.101 29.9724 33.5652 24.3693 30.3207 23.5133 30.592 25.9096 37.749 49.6559 43.7651 51.4209 40.5181 47.1839 31.6707 36.5832 14.1935 20.222 7.88271 16.9341 7.82115 18.0905 11.7834 28.3243 44.8196 36.5628 46.8776 31.4096 39.9584 17.1522 22.2689 -13.1044 -7.71372 -31.047 -22.7123 -43.7166 -35.5218 -55.5675 -40.2983 -27.7748 -60.7311 -53.0748 -56.169 -142.215 -146.481 -129.924 738.128 371.735 347.777 191.677 242.477 142.137 194.812 126.975 65.252 123.355 57.9666 119.508 55.0646 120.79 57.5989 144.901 90.9674 136.245 98.833 121.849 98.5683 107.128 95.3229 87.8995 89.6773 88.9307 81.6131 88.9732 71.2208 86.9395 53.7171 74.9978 45.9715 69.8168 39.9359 65.5665 33.5861 57.6529 84.1606 47.4687 85.2401 37.9971 84.7288 25.1371 80.0088 -2.23024 53.9184 -1.79204 50.4122 -0.518523 49.035 -2.03673 40.9998 86.3342 28.979 89.5951 18.3452 90.1489 2.80551 84.4725 -33.6376 48.1373 -30.268 44.4627 -26.7152 43.2092 -27.6574 32.3778 95.2553 16.0395 99.7417 1.38433 100.995 -21.436 93.8075 -81.2237 36.4325 -87.7365 21.2419 -97.4127 4.82825 -121.077 -36.2844 51.3053 -128.455 -32.9616 76.5054 -307.407 -220.513 -185.028 707.566 641.373 578.807 519.689 463.789 410.849 360.584 312.701 266.9 222.885 180.362 139.047 98.6617 58.9351 19.6015 -5.62764 -5.44221 -5.17147 -4.83235 -4.44285 -4.02009 -3.57885 -3.13091 -2.68477 -2.24591 -1.8172 -1.39936 -0.991501 -0.591535 -0.196603 -9.48899 -9.16495 -8.69501 -8.10987 -7.44175 -6.72073 -5.97229 -5.21624 -4.46657 -3.73196 -3.01662 -2.32122 -1.64374 -0.980304 -0.325755 -13.5208 -13.0334 -12.3336 -11.4702 -10.4934 -9.44867 -8.37324 -7.29512 -6.23325 -5.19869 -4.19606 -3.2251 -2.28192 -1.36017 -0.451865 -17.805 -17.1141 -16.1354 -14.9438 -13.6129 -12.2071 -10.7768 -9.35764 -7.97254 -6.63339 -5.34378 -4.10115 -2.89865 -1.72657 -0.57339 -22.4398 -21.4823 -20.15 -18.5562 -16.8072 -14.99 -13.1688 -11.386 -9.66576 -8.01847 -6.44444 -4.937 -3.48492 -2.07405 -0.688505 -27.549 -26.2251 -24.4256 -22.3235 -20.0693 -17.7767 -15.5224 -13.3516 -11.2859 -9.33019 -7.47841 -5.71743 -4.02993 -2.39618 -0.795075 -33.296 -31.4431 -29.0034 -26.2426 -23.3694 -20.5248 -17.7921 -15.2119 -12.7958 -10.5379 -8.42146 -6.42428 -4.52115 -2.68561 -0.890686 -39.9039 -37.2475 -33.9019 -30.2739 -26.6404 -23.1606 -19.9091 -16.9077 -14.1474 -11.6039 -9.24515 -7.03699 -4.94473 -2.93437 -0.972734 -47.6815 -43.7406 -39.0825 -34.3104 -29.7575 -25.5677 -21.7759 -18.3621 -15.2822 -12.4848 -9.91817 -7.53369 -5.28633 -3.13436 -1.0386 -57.0398 -50.9501 -44.3762 -38.1274 -32.5109 -27.5763 -23.2644 -19.4822 -16.1343 -13.1347 -10.4089 -7.89317 -5.53246 -3.27811 -1.08589 -68.4239 -58.6428 -49.3441 -41.3113 -34.5821 -28.9618 -24.223 -20.1677 -16.638 -13.5106 -10.6894 -8.09753 -5.67213 -3.35968 -1.11274 -81.8458 -65.8525 -53.0457 -43.1908 -35.5439 -29.4653 -24.4976 -20.3274 -16.7389 -13.5802 -10.7403 -8.13531 -5.69878 -3.3757 -1.11809 -94.8585 -69.8747 -53.7943 -42.8619 -34.9369 -28.8574 -23.9744 -19.905 -16.41 -13.3307 -10.5562 -8.0045 -5.61192 -3.32617 -1.10201 -94.6003 -64.9924 -49.3941 -39.525 -32.4837 -27.0528 -22.6372 -18.908 -15.665 -12.7762 -10.1491 -7.71448 -5.41813 -3.21501 -1.06579 -4.53195 -13.6961 -23.1697 -33.1896 -44.0447 -56.1126 -69.9178 -86.2339 -106.276 -132.093 -167.442 -219.958 -307.143 -474.605 -855.658 -4.45797 -13.4672 -22.7637 -32.5648 -43.1317 -54.7974 -68.0099 -83.401 -101.899 -124.915 -154.614 -194.132 -246.455 -304.419 -289.719 -4.31915 -13.0386 -22.0069 -31.4079 -41.4552 -52.4074 -64.5884 -78.4095 -94.3837 -113.093 -134.967 -159.412 -181.847 -184.691 -115.953 -4.12393 -12.4372 -20.9493 -29.802 -39.1498 -49.1635 -60.0274 -71.922 -84.968 -99.0718 -113.531 -126.087 -130.843 -114.671 -55.4982 -3.88326 -11.6975 -19.6551 -27.8519 -36.3816 -45.3287 -54.7498 -64.6342 -74.8171 -84.8028 -93.4163 -98.1748 -94.37 -74.5117 -31.0309 -3.60942 -10.8581 -18.1945 -25.6702 -33.3233 -41.164 -49.1499 -57.1383 -64.8022 -71.4863 -75.9782 -76.2087 -69.044 -50.7566 -19.4665 -3.31483 -9.95768 -16.6369 -23.3652 -30.1342 -36.8982 -43.5478 -49.8669 -55.4669 -59.6912 -61.4988 -59.3776 -51.4411 -36.0306 -13.2096 -3.01103 -9.03188 -15.0452 -21.0317 -26.9483 -32.7116 -38.1747 -43.0943 -47.0861 -49.5734 -49.7469 -46.5844 -39.0278 -26.4502 -9.45131 -2.70802 -8.11123 -13.4718 -18.7466 -23.8687 -28.7331 -33.1787 -36.9656 -39.7496 -41.0618 -40.3111 -36.8422 -30.1008 -19.9399 -7.01493 -2.4139 -7.22014 -11.9577 -16.5673 -20.9677 -25.0451 -28.6399 -31.533 -33.4347 -33.9824 -32.7623 -29.3723 -23.548 -15.349 -5.34575 -2.13473 -6.37664 -10.5324 -14.533 -18.2908 -21.692 -24.5881 -26.7887 -28.0597 -28.1303 -26.7199 -23.5925 -18.644 -12.0108 -4.15447 -1.87465 -5.59286 -9.21489 -12.6671 -15.8613 -18.6895 -21.019 -22.6898 -23.518 -23.3064 -21.8698 -19.0772 -14.9097 -9.52192 -3.27747 -1.63616 -4.87579 -8.01516 -10.9801 -13.6858 -16.0332 -17.9069 -19.1759 -19.6982 -19.3329 -17.961 -15.5164 -12.0228 -7.62782 -2.61603 -1.42034 -4.22829 -6.93647 -9.47309 -11.759 -13.7056 -15.2146 -16.1803 -16.4945 -16.0581 -14.797 -12.6839 -9.76176 -6.16197 -2.10752 -1.22723 -3.65003 -5.97682 -8.14008 -10.0676 -11.6816 -12.8996 -13.6368 -13.8119 -13.3559 -12.2246 -10.4131 -7.97116 -5.01178 -1.71051 -1.05607 -3.13841 -5.13067 -6.9707 -8.59376 -9.93251 -10.9182 -11.4835 -11.5675 -11.1226 -10.1242 -8.5801 -6.53979 -4.09895 -1.39665 -0.905607 -2.68931 -4.39016 -5.95191 -7.31729 -8.42849 -9.2286 -9.66431 -9.69007 -9.27364 -8.4027 -7.09156 -5.38648 -3.36765 -1.14596 -0.774235 -2.29772 -3.74619 -5.06941 -6.21725 -7.14041 -7.79195 -8.1297 -8.11965 -7.74018 -6.98678 -5.87649 -4.451 -2.77717 -0.944034 -0.660198 -1.95821 -3.18915 -4.30865 -5.27317 -6.04088 -6.57313 -6.83653 -6.80567 -6.46629 -5.81861 -4.88025 -3.68793 -2.29729 -0.780245 -0.561699 -1.66525 -2.70946 -3.65547 -4.46569 -5.10478 -5.54092 -5.74763 -5.70586 -5.40641 -4.85224 -4.06031 -3.06253 -1.90516 -0.646616 -0.476974 -1.41348 -2.29793 -3.09653 -3.77701 -4.30955 -4.66798 -4.8312 -4.78493 -4.52337 -4.05092 -3.38328 -2.54791 -1.58329 -0.537065 -0.404355 -1.19785 -1.946 -2.61959 -3.19102 -3.63519 -3.93054 -4.06022 -4.01343 -3.78673 -3.38509 -2.8227 -2.12301 -1.31806 -0.44689 -0.342294 -1.01369 -1.64583 -2.21356 -2.69336 -3.06414 -3.30809 -3.41173 -3.36684 -3.17152 -2.83086 -2.35742 -1.77118 -1.09881 -0.372409 -0.289389 -0.856792 -1.39036 -1.86856 -2.27139 -2.58112 -2.78306 -2.86633 -2.82469 -2.65721 -2.3688 -1.97047 -1.47914 -0.917065 -0.310713 -0.244381 -0.723373 -1.17334 -1.57588 -1.91404 -2.17293 -2.3404 -2.40765 -2.36989 -2.22684 -1.98304 -1.64806 -1.23622 -0.766059 -0.259481 -0.206153 -0.610102 -0.989238 -1.32789 -1.61171 -1.8282 -1.9673 -2.02187 -1.9882 -1.86639 -1.66059 -1.37902 -1.03377 -0.640334 -0.216848 -0.173727 -0.514055 -0.833238 -1.11797 -1.35611 -1.5372 -1.65288 -1.69733 -1.66768 -1.56426 -1.39074 -1.15419 -0.864783 -0.535468 -0.181302 -0.146248 -0.432686 -0.701156 -0.94038 -1.14012 -1.29161 -1.3879 -1.42424 -1.39839 -1.31078 -1.16466 -0.966036 -0.7235 -0.447852 -0.151613 -0.122976 -0.363789 -0.589375 -0.790198 -0.957636 -1.08434 -1.16453 -1.19433 -1.17196 -1.09791 -0.975014 -0.808371 -0.605202 -0.374532 -0.126776 -0.103269 -0.305463 -0.494785 -0.66319 -0.803429 -0.909343 -0.976142 -1.00063 -0.981405 -0.918961 -0.815738 -0.676063 -0.505995 -0.313072 -0.105961 -0.0865788 -0.256073 -0.414715 -0.555735 -0.673048 -0.761505 -0.817124 -0.83728 -0.820853 -0.768318 -0.681767 -0.564853 -0.422655 -0.261462 -0.0884851 -0.0724316 -0.214215 -0.346877 -0.464737 -0.562697 -0.636462 -0.682725 -0.699324 -0.685365 -0.641287 -0.568872 -0.471194 -0.352501 -0.218031 -0.0737817 -0.0604227 -0.178688 -0.289315 -0.387552 -0.469143 -0.530512 -0.568916 -0.58258 -0.570786 -0.533928 -0.473516 -0.392125 -0.293297 -0.181391 -0.0613787 -0.0502048 -0.148463 -0.240355 -0.321922 -0.389627 -0.440502 -0.472282 -0.483509 -0.473606 -0.442921 -0.392722 -0.325159 -0.243174 -0.150376 -0.0508815 -0.0414802 -0.122658 -0.198562 -0.265915 -0.321793 -0.363748 -0.389917 -0.399105 -0.390853 -0.365459 -0.323982 -0.268204 -0.200555 -0.124011 -0.0419588 -0.0339928 -0.100514 -0.162704 -0.217873 -0.263624 -0.297952 -0.319338 -0.326809 -0.319999 -0.299161 -0.26517 -0.21949 -0.164112 -0.10147 -0.0343309 -0.0275217 -0.0813776 -0.13172 -0.176369 -0.213384 -0.241142 -0.258417 -0.264428 -0.258883 -0.241993 -0.214473 -0.177509 -0.132712 -0.082051 -0.0277599 -0.0218751 -0.0646799 -0.104688 -0.140166 -0.169568 -0.19161 -0.205315 -0.210069 -0.205641 -0.192206 -0.170332 -0.140964 -0.105383 -0.0651516 -0.0220419 -0.0168847 -0.0499235 -0.0808013 -0.108179 -0.130864 -0.147863 -0.158428 -0.162082 -0.158654 -0.148276 -0.131392 -0.108731 -0.0812826 -0.0502501 -0.0170002 -0.0124014 -0.0366671 -0.0593445 -0.0794492 -0.0961056 -0.108585 -0.116336 -0.119013 -0.116489 -0.108864 -0.0964628 -0.0798228 -0.0596698 -0.0368879 -0.0124795 -0.00829084 -0.0245134 -0.0396737 -0.0531134 -0.0642473 -0.072588 -0.0777678 -0.0795552 -0.0778657 -0.0727668 -0.0644761 -0.0533527 -0.0398821 -0.0246548 -0.00834087 -0.00442961 -0.013097 -0.0211971 -0.0283783 -0.0343279 -0.0387854 -0.0415542 -0.0425106 -0.041609 -0.0388854 -0.0344559 -0.0285122 -0.0213137 -0.0131761 -0.00445759 -0.000701523 -0.0020745 -0.00335851 -0.00449822 -0.0054442 -0.00615499 -0.00659893 -0.00675565 -0.00661712 -0.00618823 -0.00548674 -0.0045427 -0.00339723 -0.00210079 -0.000710818 0.00300569 0.00888625 0.0143799 0.0192474 0.0232762 0.0262901 0.028157 0.0287943 0.0281731 0.0263197 0.023314 0.0192869 0.0144144 0.00890963 0.00301397 0.00680372 0.0201155 0.0325531 0.0435751 0.052701 0.0595315 0.0637663 0.0652177 0.0638188 0.0596274 0.0528237 0.0437035 0.0326649 0.0201914 0.00683056 0.010807 0.0319517 0.0517089 0.0692191 0.0837191 0.0945746 0.101308 0.10362 0.101403 0.0947483 0.0839415 0.0694516 0.0519113 0.0320892 0.0108556 0.0151359 0.0447511 0.0724243 0.0969527 0.117267 0.132479 0.141919 0.145165 0.142068 0.132752 0.117616 0.0973173 0.0727419 0.0449666 0.0152121 0.0199207 0.0588986 0.0953229 0.127611 0.154357 0.174391 0.186828 0.191115 0.187049 0.174795 0.154874 0.128152 0.0957935 0.059218 0.0200337 0.0253047 0.0748187 0.121092 0.162117 0.196108 0.221575 0.237396 0.242863 0.237716 0.222159 0.196855 0.162899 0.121773 0.0752804 0.025468 0.0314492 0.0929881 0.150505 0.201507 0.243774 0.275455 0.295152 0.301979 0.295608 0.276289 0.244841 0.202623 0.151477 0.0936476 0.0316825 0.0385375 0.113949 0.184441 0.24696 0.298788 0.337655 0.361841 0.370256 0.362489 0.338838 0.300303 0.248544 0.185821 0.114886 0.0388687 0.0467802 0.138326 0.223911 0.299835 0.362799 0.410045 0.439479 0.449765 0.440396 0.411721 0.364944 0.302078 0.225864 0.139652 0.0472491 0.0564214 0.16684 0.270087 0.361707 0.437721 0.4948 0.530408 0.542919 0.531705 0.497169 0.440753 0.364877 0.272849 0.168714 0.0570843 0.0677449 0.200334 0.324335 0.434411 0.525787 0.59446 0.63737 0.652544 0.639201 0.597807 0.530071 0.43889 0.328236 0.202981 0.0686814 0.0810825 0.239788 0.38825 0.520095 0.629614 0.712005 0.763584 0.781963 0.766171 0.716731 0.635663 0.526421 0.393759 0.243526 0.082405 0.0968217 0.286351 0.4637 0.621277 0.752272 0.850937 0.912846 0.935102 0.916499 0.857611 0.760812 0.630209 0.471478 0.29163 0.098689 0.115416 0.341371 0.552876 0.740913 0.897371 1.01538 1.08963 1.11661 1.09479 1.02481 0.909429 0.753522 0.563857 0.348824 0.118053 0.137397 0.406421 0.658342 0.882469 1.06916 1.21021 1.29924 1.33197 1.30652 1.22351 1.08618 0.90027 0.673845 0.416943 0.14112 0.163385 0.483342 0.783102 1.05001 1.27262 1.44115 1.54792 1.58774 1.5582 1.45993 1.29665 1.07514 0.804988 0.498197 0.16864 0.194102 0.574282 0.930666 1.24831 1.51363 1.71497 1.84309 1.89164 1.85759 1.74147 1.54755 1.28378 0.961564 0.595255 0.201521 0.230389 0.681741 1.10512 1.48292 1.79905 2.03961 2.19348 2.25289 2.21395 2.07702 1.84694 1.533 1.14875 0.711351 0.240863 0.273218 0.808615 1.31123 1.76033 2.13693 2.42443 2.60944 2.68242 2.63834 2.47724 2.20453 1.83104 1.37281 0.850421 0.288007 0.323711 0.958245 1.55447 2.08809 2.53664 2.8804 3.10317 3.19319 3.14396 2.95494 2.63207 2.1879 1.64142 1.01727 0.344594 0.383151 1.13446 1.84119 2.47488 3.00911 3.42035 3.68905 3.80064 3.74662 3.52556 3.1438 2.61579 1.96395 1.21781 0.412639 0.452997 1.34164 2.17859 2.93072 3.56693 4.05926 4.384 4.52303 4.46523 4.20774 3.75706 3.12966 2.35193 1.45934 0.494641 0.534889 1.58468 2.57488 3.46701 4.22464 4.8145 5.20784 5.38207 5.32247 5.02403 4.49299 3.74787 2.81965 1.75092 0.593711 0.630654 1.86909 3.03924 4.09667 4.99881 5.70615 6.1838 6.40341 6.3455 6.00179 5.37754 4.49318 3.38492 2.10392 0.713756 0.74229 2.20091 3.58185 4.83411 5.90819 6.75724 7.33887 7.61742 7.56691 7.17429 6.44267 5.39393 4.0701 2.5327 0.85973 0.871947 2.58664 4.21377 5.69524 6.97376 7.99397 8.70432 9.05984 9.02581 8.58213 7.72793 6.48565 4.90354 3.05559 1.03798 1.02187 3.03314 4.9468 6.69724 8.21864 9.44578 10.3161 10.7727 10.7691 10.275 9.28261 7.81328 5.92153 3.69627 1.25674 1.19434 3.5474 5.7931 7.85823 9.66775 11.1453 12.215 12.8049 12.8529 12.3136 11.1684 9.43416 7.17106 4.48569 1.52682 1.39152 4.13618 6.76472 9.19662 11.3473 13.1279 14.4469 15.2135 15.3442 14.773 13.4632 11.4222 8.71376 5.46499 1.86272 1.61533 4.80554 7.87283 10.7302 13.2837 15.431 17.0623 18.0633 18.323 17.745 16.2655 13.8735 10.6316 6.68972 2.28412 1.8672 5.56019 9.12664 12.4747 15.5019 18.0922 20.1151 21.4279 21.8832 21.3429 19.7014 16.915 13.0354 8.23638 2.81845 2.14782 6.40266 10.532 14.4419 18.0233 21.1472 23.6608 25.3877 26.1344 25.7054 23.9321 20.7153 16.0777 10.2127 3.5048 2.45676 7.33222 12.0896 16.6369 20.8624 24.6259 27.7524 30.028 31.2018 31.0011 29.165 25.502 19.9721 12.7744 4.40059 2.79209 8.34369 13.7929 19.0554 24.0219 28.5465 32.4348 35.433 37.2232 37.4323 35.6663 31.5849 25.0245 16.1527 5.59312 3.14999 9.42618 15.6257 21.6792 27.488 32.9088 37.7349 41.6764 44.3423 45.2347 43.7751 39.3891 31.6816 20.703 7.22077 3.52439 10.5618 17.5597 24.4726 31.2233 37.6836 43.6489 48.8054 52.6924 54.6701 53.9156 49.4993 40.6101 26.9916 9.51452 3.90663 11.7248 19.5525 27.3784 35.1599 42.8018 50.1241 56.8153 62.368 66.002 66.5986 62.7153 52.8222 35.9595 12.8859 4.28545 12.8809 21.5465 30.3148 39.1931 48.1414 57.037 65.6152 73.3754 79.4427 82.3918 80.104 69.8738 49.2401 18.1309 4.64712 13.9883 23.4687 33.1745 43.1772 53.5172 64.1698 74.9824 85.5577 95.0478 101.821 103.007 94.1493 69.7946 26.9537 4.97615 14.9989 25.2342 35.8275 46.9268 58.6753 71.1907 84.5137 98.4928 112.539 125.128 132.884 129.185 103.186 43.4614 5.25622 15.8616 26.7508 38.1289 50.225 63.3003 77.6502 93.5884 111.38 131.04 151.791 170.714 179.706 159.996 78.8565 5.47166 16.5272 27.9276 39.9312 52.8427 67.0394 83.0057 101.375 122.969 148.782 179.72 215.439 250.158 259.464 167.427 5.6091 16.9531 28.6852 41.1027 54.5673 69.549 86.6917 106.921 131.626 162.963 204.328 260.855 338.255 429.305 424.617 5.65916 17.1092 28.9667 41.5465 55.2379 70.5571 88.2329 109.358 135.678 170.176 218.404 291.774 416.868 665.627 1268.29 5.61767 16.9822 28.7462 41.2179 54.7775 69.928 87.3778 108.187 134.047 167.854 215.019 286.768 409.6 656.171 1260.59 5.48641 16.5777 28.034 40.1334 53.2118 67.7015 84.1887 103.507 126.895 156.253 194.558 246.287 316.396 398.205 392.012 5.27285 15.9194 26.875 38.3686 50.6656 64.087 79.0322 96.0009 115.595 138.438 164.774 193.039 215.062 201.347 63.5928 -59.9971 -48.8469 -40.5032 -34.0528 -28.859 -24.532 -20.8265 -17.5804 -14.6809 -12.0458 -9.61248 -7.33135 -5.16143 -3.06742 -1.01763 -22.4972 -31.1534 -30.7461 -28.0421 -24.87 -21.7498 -18.8207 -16.1034 -13.581 -11.2253 -9.00684 -6.89706 -4.86942 -2.8991 -0.962635 -10.2318 -19.7538 -22.5837 -22.3563 -20.8448 -18.8345 -16.6675 -14.491 -12.365 -10.3095 -8.32562 -6.40566 -4.53754 -2.70723 -0.899854 -5.56475 -13.0013 -16.5442 -17.562 -17.1657 -16.0279 -14.5208 -12.8433 -11.0999 -9.34372 -7.59996 -5.8782 -4.17935 -2.49942 -0.831735 -3.46221 -8.95247 -12.2581 -13.7494 -14.0012 -13.4777 -12.4923 -11.2413 -9.84355 -8.36928 -6.85893 -5.33476 -3.80798 -2.28308 -0.760681 -2.35556 -6.42069 -9.2318 -10.7975 -11.375 -11.2482 -10.6481 -9.74107 -8.64025 -7.41981 -6.12743 -4.79309 -3.43525 -2.06499 -0.688896 -1.69749 -4.75968 -7.07026 -8.53185 -9.2378 -9.34721 -9.0168 -8.37536 -7.51993 -6.52023 -5.425 -4.26768 -3.07111 -1.85094 -0.61828 -1.2705 -3.62057 -5.49822 -6.79083 -7.51474 -7.75158 -7.60145 -7.15815 -6.4997 -5.68694 -4.76562 -3.76949 -2.72333 -1.64554 -0.550363 -0.976099 -2.80951 -4.33239 -5.44467 -6.12985 -6.42459 -6.3896 -6.09029 -5.58658 -4.92897 -4.15814 -3.30601 -2.39748 -1.45221 -0.486291 -0.764178 -2.21406 -3.45166 -4.39504 -5.01604 -5.3265 -5.36125 -5.16432 -4.78026 -4.24959 -3.60708 -2.88165 -2.09711 -1.27321 -0.426839 -0.606746 -1.766 -2.77522 -3.56925 -4.11782 -4.41984 -4.49373 -4.36824 -4.0757 -3.64783 -3.11357 -2.49832 -1.82405 -1.10981 -0.372454 -0.486975 -1.4221 -2.2482 -2.91387 -3.39077 -3.67157 -3.76462 -3.68812 -3.46508 -3.11992 -2.67626 -2.15595 -1.57874 -0.962436 -0.323311 -0.394159 -1.15391 -1.83256 -2.38956 -2.79988 -3.05362 -3.15322 -3.10971 -2.93924 -2.66037 -2.29214 -1.85307 -1.36056 -0.830901 -0.279372 -0.321174 -0.942033 -1.50137 -1.96708 -2.31768 -2.5427 -2.64117 -2.61943 -2.48866 -2.26284 -1.95721 -1.58727 -1.16818 -0.714542 -0.24044 -0.26311 -0.772865 -1.2352 -1.62451 -1.92268 -2.11961 -2.21258 -2.20485 -2.10406 -1.92071 -1.66692 -1.35559 -0.99976 -0.612389 -0.206212 -0.216476 -0.636623 -1.01971 -1.34522 -1.59797 -1.76871 -1.85389 -1.85486 -1.77676 -1.62746 -1.41659 -1.15479 -0.85324 -0.523289 -0.176319 -0.178731 -0.526111 -0.844199 -1.11645 -1.33019 -1.47719 -1.55366 -1.55976 -1.4989 -1.37696 -1.20159 -0.981586 -0.726432 -0.446004 -0.150361 -0.147985 -0.435935 -0.70051 -0.928293 -1.10873 -1.23464 -1.30229 -1.31115 -1.26343 -1.16355 -1.01759 -0.83278 -0.617168 -0.379279 -0.127927 -0.122807 -0.361986 -0.582364 -0.773007 -0.925134 -1.03254 -1.09173 -1.10181 -1.06417 -0.982135 -0.860541 -0.705358 -0.523369 -0.321899 -0.108618 -0.102097 -0.30109 -0.48486 -0.64446 -0.772582 -0.86391 -0.915271 -0.925594 -0.895728 -0.82818 -0.726811 -0.596545 -0.443091 -0.272717 -0.0920561 -0.0849969 -0.250764 -0.404135 -0.537767 -0.645572 -0.723024 -0.767298 -0.777278 -0.753445 -0.697702 -0.613142 -0.503828 -0.374558 -0.230677 -0.0778895 -0.0708313 -0.209042 -0.337115 -0.449002 -0.539634 -0.605171 -0.643133 -0.652434 -0.633315 -0.587227 -0.516658 -0.424962 -0.316169 -0.194819 -0.0657993 -0.0590624 -0.174357 -0.281332 -0.374993 -0.451118 -0.506459 -0.538865 -0.547318 -0.531908 -0.493745 -0.434841 -0.357964 -0.266497 -0.164285 -0.0554992 -0.0492583 -0.145448 -0.234791 -0.313158 -0.377031 -0.423671 -0.451224 -0.458767 -0.446295 -0.414663 -0.365499 -0.301096 -0.224284 -0.138315 -0.046735 -0.0410696 -0.121292 -0.195869 -0.261384 -0.314906 -0.354132 -0.377475 -0.384112 -0.373983 -0.34775 -0.306738 -0.25284 -0.188427 -0.11624 -0.0392826 -0.0342119 -0.101055 -0.163239 -0.217936 -0.262707 -0.295619 -0.315323 -0.321097 -0.312849 -0.291098 -0.25692 -0.211884 -0.157968 -0.0974766 -0.0329462 -0.0284516 -0.0840511 -0.135807 -0.181379 -0.218741 -0.246275 -0.262842 -0.267814 -0.261089 -0.243072 -0.214641 -0.177092 -0.132074 -0.0815168 -0.0275552 -0.0235965 -0.0697156 -0.112668 -0.150521 -0.181596 -0.204545 -0.21841 -0.222652 -0.217168 -0.202276 -0.178692 -0.147485 -0.110024 -0.0679207 -0.0229615 -0.0194867 -0.0575785 -0.0930695 -0.124369 -0.150092 -0.169122 -0.180657 -0.184242 -0.179777 -0.167515 -0.148036 -0.122218 -0.0911965 -0.0563072 -0.019037 -0.0159889 -0.0472469 -0.0763804 -0.102088 -0.123235 -0.138901 -0.148423 -0.15142 -0.147801 -0.137763 -0.121778 -0.100565 -0.075054 -0.0463466 -0.0156705 -0.0129909 -0.03839 -0.0620693 -0.0829743 -0.100182 -0.112945 -0.12072 -0.123191 -0.120279 -0.112139 -0.0991512 -0.0818959 -0.0611303 -0.0377526 -0.0127654 -0.0103973 -0.0307271 -0.0496843 -0.0664265 -0.0802158 -0.090452 -0.0966983 -0.0986988 -0.0963863 -0.0898818 -0.0794861 -0.0656634 -0.0490197 -0.030276 -0.0102378 -0.0081265 -0.0240169 -0.0388368 -0.0519287 -0.0627159 -0.0707286 -0.0756242 -0.0772008 -0.0754036 -0.0703255 -0.0622 -0.0513892 -0.0383671 -0.0236981 -0.00801372 -0.00610738 -0.01805 -0.029189 -0.0390308 -0.0471419 -0.0531691 -0.0568543 -0.0580448 -0.0566986 -0.0528847 -0.0467779 -0.0386502 -0.0288576 -0.017825 -0.00602781 -0.00427716 -0.0126409 -0.0204419 -0.0273342 -0.0330146 -0.0372355 -0.0398162 -0.0406497 -0.0397068 -0.0370357 -0.0327589 -0.0270668 -0.020209 -0.0124828 -0.00422125 -0.00257925 -0.0076225 -0.0123254 -0.0164791 -0.0199005 -0.0224405 -0.0239909 -0.0244879 -0.0239147 -0.0223013 -0.0197223 -0.0162927 -0.0121631 -0.00751235 -0.00254029 -0.000961365 -0.00284034 -0.00459026 -0.00613234 -0.00739813 -0.00833268 -0.0088969 -0.00906895 -0.00884469 -0.00823729 -0.00727605 -0.00600468 -0.00447909 -0.00276488 -0.000934674 0.000626149 0.00185223 0.0030006 0.0040226 0.00487426 0.0055181 0.00592484 0.00607484 0.00595931 0.00558108 0.00495486 0.00410689 0.003074 0.00190205 0.000643772 0.00223186 0.00659874 0.0106792 0.0142958 0.0172909 0.0195335 0.0209248 0.0214029 0.0209457 0.0195716 0.0173397 0.0143468 0.0107236 0.0066289 0.00224253 0.00390481 0.0115441 0.0186798 0.0250004 0.0302299 0.0341398 0.0365587 0.0373804 0.0365684 0.0341576 0.0302528 0.0250243 0.0187006 0.0115582 0.00390981 0.00569599 0.016839 0.0272461 0.0364624 0.0440851 0.049781 0.0533013 0.054492 0.0533011 0.0497808 0.0440847 0.0364621 0.0272458 0.0168388 0.00569592 0.00766 0.0226449 0.0366391 0.0490307 0.0592778 0.0669326 0.071661 0.0732568 0.0716509 0.0669142 0.0592542 0.049006 0.0366177 0.0226303 0.00765484 0.00985664 0.0291384 0.0471447 0.0630877 0.07627 0.0861158 0.0921954 0.0942442 0.0921741 0.086077 0.0762203 0.0630357 0.0470995 0.0291077 0.00984578 0.0123528 0.0365174 0.0590827 0.079061 0.0955785 0.107913 0.115528 0.118091 0.115493 0.10785 0.0954967 0.0789756 0.0590083 0.0364669 0.0123349 0.0152246 0.0450065 0.0728166 0.0974369 0.11779 0.132988 0.142367 0.14552 0.142314 0.132891 0.117667 0.0973076 0.072704 0.0449302 0.0151975 0.0185594 0.0548646 0.0887647 0.118775 0.143582 0.162102 0.173528 0.177365 0.173451 0.161961 0.143401 0.118586 0.0886005 0.0547532 0.01852 0.0224592 0.0663923 0.107413 0.143725 0.173737 0.19614 0.209957 0.214591 0.209846 0.195937 0.173478 0.143454 0.107178 0.0662324 0.0224026 0.0270429 0.0799414 0.129331 0.173047 0.209175 0.236138 0.252761 0.258327 0.252603 0.23585 0.208807 0.172662 0.128996 0.0797139 0.0269624 0.0324506 0.0959262 0.155189 0.207637 0.250976 0.283313 0.30324 0.309901 0.303017 0.282905 0.250455 0.207092 0.154713 0.0956037 0.0323366 0.0388481 0.114836 0.185775 0.248552 0.300415 0.339102 0.36293 0.370877 0.362615 0.338525 0.299677 0.24778 0.185103 0.11438 0.0386867 0.0464315 0.13725 0.222029 0.297042 0.359002 0.405205 0.433645 0.443105 0.433199 0.40439 0.357959 0.295951 0.221079 0.136606 0.0462034 0.0554338 0.163858 0.265061 0.354593 0.428528 0.483638 0.517537 0.528777 0.516907 0.482487 0.427054 0.353052 0.26372 0.162947 0.0551117 0.0661326 0.195478 0.316196 0.422972 0.511121 0.576796 0.617158 0.630491 0.616268 0.57517 0.50904 0.420796 0.314302 0.194192 0.0656778 0.0788584 0.233087 0.37701 0.504282 0.609314 0.687527 0.735543 0.751333 0.734287 0.685232 0.606377 0.50121 0.374335 0.231271 0.0782162 0.0940058 0.27785 0.449383 0.60103 0.726127 0.81922 0.8763 0.89497 0.874527 0.815979 0.721979 0.596693 0.445606 0.275286 0.0930991 0.112046 0.331159 0.535561 0.716208 0.865156 0.975912 1.04372 1.06576 1.04122 0.971337 0.859301 0.710086 0.530229 0.32754 0.110766 0.133545 0.394679 0.638229 0.853393 1.0307 1.16242 1.24292 1.26888 1.23939 1.15596 1.02243 0.844749 0.630702 0.38957 0.131738 0.159177 0.470407 0.760603 1.01686 1.22788 1.38448 1.47998 1.51049 1.47499 1.37536 1.21621 1.00466 0.749977 0.463194 0.156626 0.189756 0.560736 0.906537 1.21173 1.46284 1.64895 1.76217 1.79793 1.75512 1.63608 1.44637 1.19451 0.891536 0.550554 0.186154 0.226256 0.668543 1.08066 1.44415 1.74293 1.96403 2.09812 2.1399 2.08818 1.94586 1.71968 1.41983 1.05948 0.654169 0.221172 0.269856 0.797295 1.28854 1.72149 2.07695 2.3395 2.49816 2.54677 2.48412 2.31385 2.04412 1.68716 1.25864 0.777002 0.262677 0.321975 0.951173 1.53689 2.05263 2.47546 2.78709 2.9746 3.03088 2.95478 2.75088 2.42912 2.00416 1.49468 0.922523 0.31184 0.384334 1.13524 1.83381 2.44825 2.95117 3.32085 3.54213 3.6069 3.51415 3.26974 2.88575 2.37983 1.77422 1.09479 0.370026 0.459023 1.35564 2.18913 2.9213 3.51939 3.95763 4.21831 4.29225 4.17882 3.88547 3.42703 2.82471 2.10501 1.29853 0.438823 0.548593 1.61985 2.6148 3.48744 4.19856 4.71766 5.02412 5.10769 4.96838 4.61581 4.06819 3.35108 2.49603 1.53922 0.520071 0.656165 1.93703 3.12538 4.1657 5.01104 5.62532 5.98466 6.07784 5.90599 5.48156 4.82701 3.97319 2.95769 1.82319 0.615893 0.785584 2.31842 3.73872 4.97931 5.98393 6.70995 7.12996 7.23199 7.01893 6.50705 5.72416 4.70755 3.50197 2.15768 0.728715 0.94161 2.77795 4.47683 5.95675 7.15021 8.00703 8.49599 8.60487 8.33931 7.72067 6.78354 5.57308 4.14253 2.55095 0.861296 1.13018 3.33291 5.36693 7.13304 8.5502 9.55949 10.1259 10.2377 9.9048 9.15539 8.03266 6.59139 4.89487 3.01231 1.01674 1.35875 4.005 6.44301 8.55159 10.2333 11.4194 12.0713 12.1792 11.7594 10.8493 9.5029 7.78688 5.77635 3.55212 1.19848 1.6368 4.82166 7.7478 10.2665 12.2605 13.6502 14.3942 14.4872 13.9544 12.8459 11.2297 9.18681 6.80615 4.18177 1.4103 1.97645 5.81793 9.33545 12.3455 14.7073 16.3292 17.1692 17.2294 16.5491 15.1949 13.2528 10.8212 8.00515 4.9135 1.65624 2.39347 7.03911 11.2754 14.8747 17.6678 19.5512 20.4853 20.4858 19.6116 17.952 15.6158 12.7223 9.39547 5.76018 1.9405 2.90859 8.5445 13.6575 17.9636 21.2597 23.432 24.4495 24.3495 23.2193 21.1788 18.3655 14.9242 10.9999 6.73485 2.26733 3.54954 10.4129 16.5999 21.7535 25.6319 28.1146 29.1895 28.9282 27.4589 24.942 21.5512 17.4613 12.8409 7.85005 2.64074 4.35416 12.7509 20.2597 26.4289 30.973 33.7746 34.8571 34.3455 32.4258 29.3117 25.2221 20.3665 14.9389 9.11689 3.06424 5.37508 15.7054 24.8496 32.2325 37.5239 40.6279 41.6313 40.7404 38.2216 34.3586 29.4248 23.6688 17.3107 10.5438 3.54037 6.68747 19.4835 30.6623 39.4882 45.5936 48.9394 49.7207 48.2652 44.9504 40.1488 34.198 27.3889 19.9662 12.1348 4.07016 8.40182 24.3845 38.1086 48.6327 55.5792 59.0313 59.363 57.0807 52.7112 46.7366 39.5668 31.5349 22.9052 13.8875 4.65249 10.6862 30.8537 47.7769 60.2611 67.9908 71.2896 70.8199 67.3452 61.5861 54.1539 45.5339 36.0955 26.1135 15.7911 5.28331 13.8072 39.5756 60.5273 75.1906 83.4788 86.1644 84.3629 79.1954 71.6223 62.3955 52.0688 41.0334 29.5577 17.8234 5.95488 18.21 51.6419 77.644 94.5464 102.857 104.154 100.243 92.7153 82.8064 71.4004 59.0952 46.2765 33.1814 19.9485 6.65507 24.6878 68.8673 101.079 119.868 127.104 125.76 118.633 107.888 95.0295 81.029 66.4778 51.7111 36.9003 22.1155 7.36676 34.7738 94.4029 133.835 153.211 157.308 151.38 139.534 124.528 108.045 91.0395 74.0093 57.1757 40.6009 24.2572 8.0678 51.7473 133.963 180.517 197.162 194.474 181.107 162.629 142.191 121.421 101.067 81.4036 62.46 44.1407 26.2915 8.73138 83.4969 198.288 247.966 254.538 239.053 214.383 187.082 160.085 134.507 110.613 88.2976 67.3102 47.3536 28.1247 9.32729 151.498 307.827 345.347 327.228 290.007 249.484 211.321 176.991 146.422 119.062 94.2684 71.4438 50.0607 29.658 9.82391 321.349 499.87 481.363 413.181 343.251 282.944 232.897 191.283 156.108 125.726 98.8713 74.5758 52.0864 30.7961 10.1911 813.541 828.733 651.871 500.343 389.81 309.274 248.615 201.103 162.463 129.94 101.696 76.4526 53.2789 31.4581 10.4034 2425.09 1290.96 804.778 559.031 415.533 321.797 255.2 204.759 164.569 131.181 102.435 76.8916 53.5312 31.5879 10.4433 4.95392 14.9378 25.1524 35.7596 46.9318 58.8502 71.6929 85.5952 100.542 116.101 130.761 140.364 134.553 89.6454 -41.9148 4.53741 13.6591 22.92 32.4065 42.1916 52.3167 62.7572 73.3515 83.6618 92.7061 98.4663 97.0752 81.8278 43.4302 -22.3892 4.07397 12.2411 20.4614 28.7545 37.1107 45.4671 53.6667 61.3906 68.046 72.5943 73.3224 67.6409 52.2532 24.6359 -12.4902 3.59127 10.7697 17.9298 25.039 32.0293 38.7736 45.0512 50.4973 54.5359 56.3017 54.5874 47.9108 34.9069 15.3497 -8.14754 3.11266 9.31629 15.4488 21.442 27.1933 32.5464 37.2665 41.0109 43.2977 43.4884 40.8149 34.5091 24.1137 10.005 -6.07182 2.65568 7.93384 13.107 18.0866 22.7551 26.9517 30.4576 32.9819 34.1546 33.5377 30.6735 25.198 17.0343 6.62909 -4.90968 2.23183 6.65623 10.9584 15.042 18.7884 22.0474 24.6301 26.3046 26.8013 25.8332 23.1412 18.5736 12.1947 4.3846 -4.14227 1.84722 5.50072 9.02808 12.3343 15.3086 17.8191 19.7105 20.8055 20.9139 19.8533 17.4844 13.7607 8.7866 2.85728 -3.55325 1.50354 4.47128 7.31872 9.95827 12.292 14.2093 15.5869 16.2927 16.1958 15.1828 13.1832 10.1991 6.33521 1.81296 -3.04504 1.19917 3.56207 5.81713 7.88785 9.69155 11.1387 12.1343 12.5822 12.3935 11.4992 9.86677 7.51784 4.54291 1.10541 -2.5716 0.930258 2.76066 4.49984 6.08434 7.44743 8.51927 9.22878 9.5075 9.29607 8.55327 7.26654 5.46232 3.21306 0.637297 -2.11019 0.69146 2.05045 3.33721 4.5022 5.49444 6.26201 6.75377 6.92248 6.72948 6.1507 5.18326 3.85127 2.20914 0.340323 -1.64948 0.47659 1.41249 2.29633 3.0928 3.76609 4.28048 4.60165 4.69891 4.54831 4.13639 3.46408 2.5499 1.43139 0.16378 -1.18437 0.279004 0.826588 1.34281 1.80657 2.19664 2.49215 2.67339 2.72311 2.62831 2.38225 1.98653 1.45262 0.802438 0.0674673 -0.713712 -1067.94 -1204 -1340.61 -1478.12 -1616.83 -1756.99 -1898.82 -2042.42 -2187.82 -2334.97 -2483.69 -2633.72 -2784.69 -2936.16 -3087.64 -187.12 -2.20545 -217.023 -66.2254 -192.534 -79.309 -164.572 -85.8406 -13.7747 -86.8326 -8.40575 -80.17 -0.683941 -76.2049 5.98288 -101.21 -23.5731 -90.6389 -25.0601 -77.381 -22.0439 -64.6062 -21.341 20.9809 -19.3904 31.3941 -13.8546 43.5897 -12.7788 53.8187 -40.4218 29.1724 -40.8724 23.6379 -36.8368 21.9277 -31.5987 17.3163 67.3676 13.4691 78.6565 11.8248 91.0808 0.34275 97.1949 -56.7876 46.5946 -69.5366 26.6278 -75.949 11.2778 -81.4952 -10.7392 60.9607 -33.9272 58.5168 -55.4554 51.8243 -87.9032 33.7891 -168.539 -49.7579 -184.902 -85.8725 -193.556 -113.736 -202.128 -145.88 -93.458 -179.053 -118.927 -209.356 -149.195 -246.228 -188.299 -307.228 -260.207 -344.109 -314.412 -395.776 -381.201 -491.346 -500.257 -516.154 -808.9 -893.682 -1063.91 -1361.25 -1905.93 -3013.67 -73.8977 -64.6421 -105.585 -93.2295 -111.566 -94.6873 -99.6739 -76.3206 -53.4864 -56.441 -41.9478 -48.3198 -35.9039 -45.0479 -35.7821 -53.0703 -44.4546 -52.5786 -42.017 -45.8659 -34.6643 -34.796 -20.0809 -5.45889 -5.33554 5.28986 2.45706 12.0453 5.37872 12.4384 -3.5676 2.87374 -7.46849 0.924659 -6.06917 3.68667 0.602522 15.5673 30.7875 28.0255 38.9102 31.0812 40.5332 25.3162 30.7447 0.0184703 4.5465 -17.3411 -9.7918 -26.9105 -17.594 -29.1618 -12.2282 4.63146 -7.73169 1.05467 -19.6247 -13.8014 -43.306 -42.796 -88.0449 -88.3486 -118.157 -114.964 -137.099 -133.169 -149.054 -140.523 -133.114 -150.798 -152.519 -176.125 -181.953 -210.57 -221.665 -258.471 -273.611 -306.08 -325.665 -363.071 -393.218 -445.831 -490.361 -552.875 -673.305 -770.803 -881.007 -1005.24 -1095.27 -933.459 -41.4299 -54.7915 -70.8923 -76.0356 -81.3042 -78.5773 -75.5829 -66.0513 -56.0605 -51.1727 -45.4425 -43.5229 -40.0763 -40.3999 -39.3084 -42.2308 -41.2296 -41.4245 -38.2218 -36.0223 -30.9638 -26.3643 -18.6861 -11.0201 -6.40317 -1.4343 0.882859 3.90781 3.77077 4.27297 0.962774 0.743792 -1.04312 0.369005 0.57929 3.93548 6.81352 13.4507 20.1018 22.9306 26.1115 25.4527 25.5088 20.5602 16.3571 6.05855 0.536935 -7.53433 -10.6893 -15.9385 -16.392 -17.8701 -13.6104 -9.617 -11.9914 -13.9768 -21.9573 -28.5547 -41.9291 -53.4875 -72.2704 -84.4509 -98.9336 -107.579 -118.177 -124.064 -131.135 -133.547 -136.635 -145.526 -154.594 -168.491 -181.893 -200.141 -218.003 -240.908 -262.056 -286.6 -311.251 -340.812 -372.878 -411.948 -454.561 -506.189 -570.721 -629.617 -677.888 -698.482 -647.25 -439.528 -27.606 -40.996 -51.9778 -58.6602 -62.5552 -62.8517 -60.9049 -56.4426 -51.2862 -47.1175 -43.4501 -40.925 -38.8198 -37.7902 -37.055 -37.0419 -36.2827 -35.1632 -32.9826 -30.2963 -26.6028 -22.3667 -17.2746 -12.1916 -7.9787 -4.34122 -1.71181 0.322283 1.24098 1.59597 1.04047 0.870304 0.774288 1.54263 2.69628 4.87135 7.60988 11.3123 14.9184 17.3271 18.8399 18.793 17.6889 14.7289 10.7449 5.21802 0.197062 -4.80884 -8.5727 -11.8739 -13.7163 -14.8427 -14.6108 -14.6978 -16.813 -20.3771 -26.2836 -33.5509 -43.1689 -53.777 -66.0047 -77.2393 -88.1168 -97.383 -106.037 -113.257 -119.925 -125.599 -131.799 -140.002 -149.713 -161.568 -174.856 -190.266 -207.077 -225.877 -245.607 -266.966 -289.764 -314.941 -342.453 -372.957 -405.775 -440.917 -476.244 -503.724 -514.612 -495.138 -424.562 -282.339 -19.9704 -30.6651 -39.2512 -45.2953 -48.9843 -50.3532 -49.8456 -47.8299 -45.0863 -42.337 -39.8097 -37.7192 -36.0115 -34.7531 -33.7589 -32.9242 -31.8514 -30.4269 -28.4685 -26.0174 -23.0204 -19.5989 -15.8472 -12.1075 -8.72282 -5.79383 -3.44654 -1.65442 -0.474396 0.232765 0.565994 0.89275 1.34976 2.16415 3.34514 4.99857 7.02089 9.31539 11.4617 13.0162 13.817 13.6582 12.5444 10.3746 7.35747 3.65177 -0.161595 -3.86892 -7.11935 -9.90683 -12.0683 -13.7683 -15.1489 -16.8547 -19.545 -23.4011 -28.6468 -35.1584 -42.9788 -51.7306 -61.1645 -70.5373 -79.6155 -88.0633 -95.9596 -103.237 -110.144 -116.886 -124.073 -132.302 -141.74 -152.577 -164.756 -178.367 -193.279 -209.498 -226.803 -245.254 -264.844 -285.699 -307.71 -330.624 -353.633 -375.371 -393.057 -401.713 -395.047 -365.373 -305.04 -211.76 -15.1273 -23.3691 -30.1831 -35.32 -38.7526 -40.5548 -40.9564 -40.2637 -38.8927 -37.2355 -35.5386 -33.9606 -32.5546 -31.3343 -30.2316 -29.1477 -27.9255 -26.4579 -24.6626 -22.5235 -20.0481 -17.3053 -14.4016 -11.5112 -8.80971 -6.40785 -4.38089 -2.74882 -1.50797 -0.591124 0.101692 0.728472 1.41142 2.25858 3.31445 4.59534 6.04069 7.53253 8.85808 9.79118 10.1765 9.89946 8.92096 7.24123 4.96226 2.24133 -0.672163 -3.5861 -6.33183 -8.84034 -11.0842 -13.1526 -15.218 -17.5928 -20.597 -24.4229 -29.186 -34.8797 -41.4461 -48.7002 -56.4109 -64.2575 -72.0202 -79.5355 -86.771 -93.7474 -100.599 -107.528 -114.845 -122.856 -131.75 -141.649 -152.591 -164.589 -177.597 -191.552 -206.345 -221.897 -238.096 -254.789 -271.658 -288.151 -303.313 -315.65 -322.867 -321.761 -308.608 -279.754 -232.958 -169.806 -11.7946 -18.1314 -23.5323 -27.8014 -30.871 -32.7757 -33.6452 -33.6767 -33.1138 -32.1934 -31.0992 -29.957 -28.8334 -27.7491 -26.6804 -25.5738 -24.356 -22.9642 -21.3553 -19.517 -17.4647 -15.2468 -12.9403 -10.6468 -8.46889 -6.48595 -4.75061 -3.28395 -2.07912 -1.09661 -0.271772 0.479017 1.23228 2.04809 2.95533 3.95079 4.98902 5.98454 6.81487 7.35023 7.48501 7.14589 6.30238 4.96575 3.19843 1.10312 -1.18718 -3.55062 -5.891 -8.16011 -10.3578 -12.5466 -14.8467 -17.4298 -20.4713 -24.1003 -28.3907 -33.3497 -38.9287 -45.0176 -51.4668 -58.1038 -64.7861 -71.416 -77.9603 -84.4424 -90.9486 -97.6158 -104.622 -112.144 -120.316 -129.224 -138.907 -149.364 -160.554 -172.402 -184.8 -197.609 -210.642 -223.627 -236.151 -247.597 -257.065 -263.303 -264.659 -259.155 -244.775 -219.967 -184.424 -140.01 -9.35345 -14.2406 -18.51 -22.0086 -24.6656 -26.4859 -27.5392 -27.9443 -27.8482 -27.4001 -26.7275 -25.9255 -25.054 -24.1401 -23.1824 -22.1587 -21.0357 -19.7821 -18.3772 -16.8176 -15.1184 -13.3149 -11.4592 -9.61496 -7.84631 -6.20657 -4.73252 -3.44113 -2.32927 -1.3742 -0.537772 0.226816 0.963907 1.70677 2.46997 3.24546 3.99965 4.67522 5.19721 5.4869 5.47669 5.11939 4.39465 3.31123 1.90767 0.246504 -1.59607 -3.54747 -5.55191 -7.58183 -9.64319 -11.7792 -14.0667 -16.6058 -19.4983 -22.8244 -26.6311 -30.9255 -35.6757 -40.8146 -46.2506 -51.8834 -57.6257 -63.4177 -69.237 -75.1006 -81.0636 -87.2128 -93.6545 -100.494 -107.818 -115.682 -124.107 -133.081 -142.559 -152.457 -162.657 -172.996 -183.253 -193.124 -202.191 -209.888 -215.465 -217.982 -216.328 -209.328 -195.953 -175.636 -148.659 -116.484 -7.46515 -11.2363 -14.5949 -17.4244 -19.6621 -21.297 -22.3634 -22.9299 -23.0861 -22.9268 -22.5384 -21.9906 -21.3322 -20.5908 -19.776 -18.883 -17.8999 -16.8142 -15.6186 -14.3155 -12.919 -11.4546 -9.95804 -8.47085 -7.03463 -5.68512 -4.44796 -3.3363 -2.35017 -1.47746 -0.696831 0.0177082 0.690713 1.33969 1.97045 2.57431 3.12705 3.59061 3.91767 4.05904 3.97181 3.62567 3.00716 2.12145 0.991666 -0.345042 -1.84437 -3.46401 -5.17212 -6.95421 -8.81699 -10.7895 -12.92 -15.2687 -17.8962 -20.8518 -24.1647 -27.84 -31.8583 -36.1786 -40.7458 -45.4999 -50.3882 -55.3744 -60.4445 -65.6097 -70.9045 -76.3825 -82.1072 -88.1417 -94.5368 -101.323 -108.507 -116.067 -123.95 -132.071 -140.307 -148.494 -156.411 -163.77 -170.198 -175.221 -178.265 -178.66 -175.688 -168.675 -157.121 -140.889 -120.378 -96.6313 -5.93117 -8.82463 -11.44 -13.6906 -15.5246 -16.9249 -17.9055 -18.5047 -18.7765 -18.7813 -18.577 -18.2132 -17.7278 -17.1456 -16.48 -15.7353 -14.9102 -14.0027 -13.0129 -11.9464 -10.8154 -9.63891 -8.4417 -7.25161 -6.09638 -5.00018 -3.98101 -3.04901 -2.20604 -1.44646 -0.759034 -0.129911 0.453789 1.00049 1.51134 1.97843 2.3845 2.70422 2.90715 2.96202 2.84144 2.52585 2.00615 1.28487 0.375402 -0.700623 -1.9176 -3.25129 -4.68395 -6.2085 -7.83087 -9.5703 -11.4571 -13.528 -15.8198 -18.3624 -21.1741 -24.2583 -27.6034 -31.1847 -34.969 -38.9204 -43.0072 -47.2072 -51.5122 -55.9289 -60.4786 -65.1933 -70.1105 -75.2662 -80.688 -86.3891 -92.3636 -98.5832 -104.994 -111.513 -118.025 -124.376 -130.368 -135.752 -140.219 -143.401 -144.873 -144.178 -140.866 -134.555 -125.024 -112.302 -96.7543 -79.1076 -4.62868 -6.81332 -8.81049 -10.5568 -12.0116 -13.157 -13.9966 -14.5507 -14.8515 -14.9369 -14.8452 -14.6111 -14.2627 -13.8206 -13.2982 -12.7032 -12.0395 -11.3098 -10.5179 -9.67038 -8.77749 -7.85342 -6.91545 -5.98256 -5.07349 -4.20475 -3.38898 -2.63395 -1.94231 -1.31204 -0.737782 -0.212643 0.269601 0.712386 1.11465 1.46982 1.7657 1.98539 2.10916 2.11697 1.99124 1.71924 1.29475 0.718618 -0.00170201 -0.853904 -1.82344 -2.89671 -4.06412 -5.32258 -6.67684 -8.13955 -9.72972 -11.4699 -13.3826 -15.4861 -17.7916 -20.3014 -23.0088 -25.8989 -28.9519 -32.1464 -35.4632 -38.889 -42.4189 -46.0568 -49.8152 -53.7125 -57.7701 -62.0073 -66.4368 -71.0607 -75.8665 -80.8237 -85.8814 -90.9648 -95.9726 -100.773 -105.201 -109.053 -112.091 -114.039 -114.598 -113.464 -110.358 -105.072 -97.5184 -87.7814 -76.1523 -63.1307 -3.47808 -5.0728 -6.54301 -7.84385 -8.94488 -9.8307 -10.4999 -10.9627 -11.2378 -11.3485 -11.3197 -11.1747 -10.9337 -10.6125 -10.2224 -9.77149 -9.26518 -8.70794 -8.10455 -7.4612 -6.78609 -6.08953 -5.38351 -4.6809 -3.99427 -3.33479 -2.71126 -2.12946 -1.59205 -1.09886 -0.647709 -0.235542 0.140268 0.480638 0.78376 1.04453 1.25452 1.40259 1.47603 1.46206 1.34947 1.13003 0.799458 0.357753 -0.191158 -0.840491 -1.5822 -2.40887 -3.31551 -4.30103 -5.369 -6.52759 -7.78864 -9.16595 -10.6731 -12.3212 -14.1172 -16.0625 -18.1533 -20.3809 -22.7335 -25.1984 -27.7644 -30.4234 -33.1724 -36.0135 -38.9536 -42.0032 -45.1733 -48.4733 -51.9076 -55.4724 -59.1531 -62.9214 -66.7336 -70.5274 -74.2207 -77.7087 -80.8627 -83.5296 -85.5331 -86.6786 -86.7629 -85.5893 -82.9902 -78.8544 -73.157 -65.9857 -57.5555 -48.2033 -2.42563 -3.51228 -4.5201 -5.41928 -6.18881 -6.81704 -7.30114 -7.64584 -7.86147 -7.96186 -7.96229 -7.87766 -7.72131 -7.50429 -7.2352 -6.92053 -6.56523 -6.17357 -5.7498 -5.29886 -4.82671 -4.3404 -3.84786 -3.35742 -2.87717 -2.41434 -1.97473 -1.56236 -1.17943 -0.826478 -0.502866 -0.207471 0.060567 0.301107 0.512425 0.690898 0.831019 0.925762 0.967251 0.947638 0.860029 0.699294 0.462617 0.149673 -0.237609 -0.695669 -1.22025 -1.80749 -2.45494 -3.16239 -3.93231 -4.76976 -5.68182 -6.67666 -7.76224 -8.94512 -10.2293 -11.6159 -13.1026 -14.6845 -16.3549 -18.1067 -19.9331 -21.8298 -23.7947 -25.829 -27.9362 -30.1216 -32.3908 -34.7475 -37.1919 -39.7187 -42.3147 -44.9574 -47.6133 -50.2361 -52.7656 -55.1263 -57.2273 -58.9622 -60.2117 -60.8474 -60.7395 -59.7678 -57.8354 -54.8854 -50.918 -46.0031 -40.2862 -33.9837 -1.43386 -2.06584 -2.65422 -3.18196 -3.63678 -4.01147 -4.30373 -4.51544 -4.65173 -4.71985 -4.72803 -4.68453 -4.59697 -4.47183 -4.31439 -4.12881 -3.91845 -3.68622 -3.43499 -3.1679 -2.88857 -2.60113 -2.3101 -2.02019 -1.73593 -1.46141 -1.19993 -0.953877 -0.724671 -0.512871 -0.318436 -0.141068 0.0193889 0.162568 0.287285 0.391382 0.471742 0.524481 0.545306 0.529961 0.474703 0.376718 0.234397 0.0474223 -0.183363 -0.456286 -0.769321 -1.12065 -1.50921 -1.93507 -2.39965 -2.90573 -3.45707 -4.05796 -4.71258 -5.42435 -6.19542 -7.02632 -7.91597 -8.86187 -9.86061 -10.9085 -12.0021 -13.1391 -14.3185 -15.5406 -16.8072 -18.1207 -19.4833 -20.8964 -22.3588 -23.8663 -25.41 -26.9755 -28.5417 -30.0802 -31.5544 -32.9189 -34.1198 -35.0947 -35.7749 -36.0876 -35.9611 -35.3306 -34.1463 -32.3821 -30.0439 -27.1753 -23.8605 -20.2202 -3226.02 -3351.11 -3475.21 -3598.04 -3719.34 -3838.91 -3956.57 -4072.18 -4185.64 -4296.9 -4405.91 -4512.68 -4617.22 -4719.57 -4819.79 -4917.96 -5014.15 -5108.47 -5201.01 -5291.91 -5381.27 -5469.23 -5555.92 -5641.47 -5726.02 -5809.7 -5892.64 -5974.95 -6056.75 -6138.15 -6219.24 -6300.11 -6380.84 -6461.51 -6542.17 -6622.9 -6703.73 -6784.71 -6865.85 -6947.17 -7028.66 -7110.29 -7192.01 -7273.77 -7355.47 -7437.01 -7518.25 -7599.05 -7679.26 -7758.68 -7837.12 -7914.36 -7990.18 -8064.31 -8136.48 -8206.38 -8273.68 -8338.03 -8399.03 -8456.29 -8509.35 -8557.76 -8601.03 -8638.65 -8670.1 -8694.83 -8712.27 -8721.84 -8722.92 -8714.9 -8697.12 -8668.89 -8629.52 -8578.29 -8514.48 -8437.36 -8346.21 -8240.35 -8119.14 -7982.02 -7828.53 -7658.36 -7471.34 -7267.55 -7047.25 -6811.01 -6559.64 -6294.23 -6016.13 -5726.88 2225.18 1194.49 759.384 535.204 401.402 312.587 248.805 200.139 161.156 128.639 100.555 75.5375 52.6168 31.059 10.2701 456.291 613.575 531.566 430.029 345.801 279.956 228.124 186.295 151.543 121.825 95.7042 72.146 50.3742 29.7794 9.85402 46.2061 271.947 323.267 307.539 271.814 233.307 197.435 165.371 136.894 111.41 88.2897 66.9668 46.954 27.8299 9.22046 -59.7297 104.736 182.01 205.04 200.604 184.022 162.937 140.856 119.25 98.6305 79.0763 60.4767 42.6444 25.3653 8.41825 -87.2852 24.7158 94.9933 130.006 141.537 139.236 129.431 115.865 100.617 84.7842 68.9072 53.2182 37.781 22.5683 7.50538 -91.0494 -13.5813 43.2409 78.4505 96.3014 101.952 99.6849 92.554 82.5675 70.9809 58.549 45.7072 32.6924 19.6212 6.54024 -86.3634 -31.2316 13.1009 44.2535 63.2648 72.584 74.8009 72.0971 66.1167 58.0218 48.5999 38.3684 27.6596 16.6836 5.57454 -78.2831 -38.0815 -3.85907 22.197 39.9195 50.317 54.8365 54.9154 51.7792 46.3888 39.4595 31.5064 22.8937 13.8788 4.64874 -68.7293 -38.9514 -12.6527 8.47359 23.8981 33.927 39.3116 40.9476 39.6949 36.2939 31.3422 25.3033 18.5295 11.2887 3.7903 -58.5142 -36.3416 -16.2742 0.451473 13.2716 22.1805 27.5345 29.8677 29.7582 27.7491 24.3115 19.8346 14.6321 8.95615 3.01396 -48.0054 -31.6265 -16.5541 -3.66536 6.556 13.9884 18.7778 21.2299 21.7205 20.6324 18.3197 15.0912 11.2081 6.88972 2.32338 -37.3751 -25.605 -14.6505 -5.11515 2.62888 8.43893 12.3577 14.5532 15.261 14.74 13.2434 11.002 8.21911 5.07113 1.7132 -26.7023 -18.7681 -11.328 -4.77385 0.635467 4.78035 7.66078 9.36387 10.0298 9.82307 8.91158 7.45423 5.59506 3.46239 1.17139 -16.0203 -11.4371 -7.11943 -3.28777 -0.0935926 2.38613 4.14103 5.21157 5.67128 5.61075 5.1255 4.30818 3.24446 2.01198 0.681371 -5398.32 -5029.12 -4652.25 -4270.62 -3886.79 -3502.92 -3120.67 -2741.2 -2365.23 -1993.07 -1624.66 -1259.68 -897.583 -537.652 -179.066 ) ; boundaryField { hot { type calculated; value nonuniform List<scalar> 120 ( 1046.75 -0.439478 -0.742039 -1.05818 -1.3916 -1.74421 -2.11539 -2.50128 -2.89415 -3.28214 -3.64938 -3.9769 -4.2445 -4.43332 -4.52886 -4.53195 -4.45797 -4.31915 -4.12393 -3.88326 -3.60942 -3.31483 -3.01103 -2.70802 -2.4139 -2.13473 -1.87465 -1.63616 -1.42034 -1.22723 -1.05607 -0.905607 -0.774235 -0.660198 -0.561699 -0.476974 -0.404355 -0.342294 -0.289389 -0.244381 -0.206153 -0.173727 -0.146248 -0.122976 -0.103269 -0.0865788 -0.0724316 -0.0604227 -0.0502048 -0.0414802 -0.0339928 -0.0275217 -0.0218751 -0.0168847 -0.0124014 -0.00829084 -0.00442961 -0.000701523 0.00300569 0.00680372 0.010807 0.0151359 0.0199207 0.0253047 0.0314492 0.0385375 0.0467802 0.0564214 0.0677449 0.0810825 0.0968217 0.115416 0.137397 0.163385 0.194102 0.230389 0.273218 0.323711 0.383151 0.452997 0.534889 0.630654 0.74229 0.871947 1.02187 1.19434 1.39152 1.61533 1.8672 2.14782 2.45676 2.79209 3.14999 3.52439 3.90663 4.28545 4.64712 4.97615 5.25622 5.47166 5.6091 5.65916 5.61767 5.48641 5.27285 4.95392 4.53741 4.07397 3.59127 3.11266 2.65568 2.23183 1.84722 1.50354 1.19917 0.930258 0.69146 0.47659 0.279004 -1067.94 ) ; } cold { type calculated; value nonuniform List<scalar> 120 ( 19.6015 -0.196603 -0.325755 -0.451865 -0.57339 -0.688505 -0.795075 -0.890686 -0.972734 -1.0386 -1.08589 -1.11274 -1.11809 -1.10201 -1.06579 -1.01763 -0.962635 -0.899854 -0.831735 -0.760681 -0.688896 -0.61828 -0.550363 -0.486291 -0.426839 -0.372454 -0.323311 -0.279372 -0.24044 -0.206212 -0.176319 -0.150361 -0.127927 -0.108618 -0.0920561 -0.0778895 -0.0657993 -0.0554992 -0.046735 -0.0392826 -0.0329462 -0.0275552 -0.0229615 -0.019037 -0.0156705 -0.0127654 -0.0102378 -0.00801372 -0.00602781 -0.00422125 -0.00254029 -0.000934674 0.000643772 0.00224253 0.00390981 0.00569592 0.00765484 0.00984578 0.0123349 0.0151975 0.01852 0.0224026 0.0269624 0.0323366 0.0386867 0.0462034 0.0551117 0.0656778 0.0782162 0.0930991 0.110766 0.131738 0.156626 0.186154 0.221172 0.262677 0.31184 0.370026 0.438823 0.520071 0.615893 0.728715 0.861296 1.01674 1.19848 1.4103 1.65624 1.9405 2.26733 2.64074 3.06424 3.54037 4.07016 4.65249 5.28331 5.95488 6.65507 7.36676 8.0678 8.73138 9.32729 9.82391 10.1911 10.4034 10.4433 10.2701 9.85402 9.22046 8.41825 7.50538 6.54024 5.57454 4.64874 3.7903 3.01396 2.32338 1.7132 1.17139 0.681371 -179.066 ) ; } interface_left { type calculated; value nonuniform List<scalar> 90 ( -855.658 -289.719 -115.953 -55.4982 -31.0309 -19.4665 -13.2096 -9.45131 -7.01493 -5.34575 -4.15447 -3.27747 -2.61603 -2.10752 -1.71051 -1.39665 -1.14596 -0.944034 -0.780245 -0.646616 -0.537065 -0.44689 -0.372409 -0.310713 -0.259481 -0.216848 -0.181302 -0.151613 -0.126776 -0.105961 -0.0884851 -0.0737817 -0.0613787 -0.0508815 -0.0419588 -0.0343309 -0.0277599 -0.0220419 -0.0170002 -0.0124795 -0.00834087 -0.00445759 -0.000710818 0.00301397 0.00683056 0.0108556 0.0152121 0.0200337 0.025468 0.0316825 0.0388687 0.0472491 0.0570843 0.0686814 0.082405 0.098689 0.118053 0.14112 0.16864 0.201521 0.240863 0.288007 0.344594 0.412639 0.494641 0.593711 0.713756 0.85973 1.03798 1.25674 1.52682 1.86272 2.28412 2.81845 3.5048 4.40059 5.59312 7.22077 9.51452 12.8859 18.1309 26.9537 43.4614 78.8565 167.427 424.617 1268.29 1260.59 392.012 63.5928 ) ; } interface_right { type calculated; value nonuniform List<scalar> 90 ( -59.9971 -22.4972 -10.2318 -5.56475 -3.46221 -2.35556 -1.69749 -1.2705 -0.976099 -0.764178 -0.606746 -0.486975 -0.394159 -0.321174 -0.26311 -0.216476 -0.178731 -0.147985 -0.122807 -0.102097 -0.0849969 -0.0708313 -0.0590624 -0.0492583 -0.0410696 -0.0342119 -0.0284516 -0.0235965 -0.0194867 -0.0159889 -0.0129909 -0.0103973 -0.0081265 -0.00610738 -0.00427716 -0.00257925 -0.000961365 0.000626149 0.00223186 0.00390481 0.00569599 0.00766 0.00985664 0.0123528 0.0152246 0.0185594 0.0224592 0.0270429 0.0324506 0.0388481 0.0464315 0.0554338 0.0661326 0.0788584 0.0940058 0.112046 0.133545 0.159177 0.189756 0.226256 0.269856 0.321975 0.384334 0.459023 0.548593 0.656165 0.785584 0.94161 1.13018 1.35875 1.6368 1.97645 2.39347 2.90859 3.54954 4.35416 5.37508 6.68747 8.40182 10.6862 13.8072 18.21 24.6878 34.7738 51.7473 83.4969 151.498 321.349 813.541 2425.09 ) ; } interface_top { type calculated; value nonuniform List<scalar> 90 ( -276.963 62.3472 -305.214 -31.7457 -254.22 -56.528 -213.891 -90.1291 21.6103 -113.763 21.2353 -108.4 30.2861 -103.932 43.5199 -141.528 -2.05106 -121.199 -7.08596 -102.396 -8.10814 -88.4379 -21.9098 42.9009 -33.5084 52.697 -30.2459 69.3207 -31.0757 88.8537 -73.0463 53.2852 -69.2078 45.0936 -62.5228 39.7213 -58.5251 18.0387 96.452 -3.04995 109.95 -9.3632 131.387 -26.0923 152.863 -107.509 84.8509 -113.949 60.9687 -116.788 39.7272 -124.831 -10.022 106.598 -61.4217 105.231 -90.9977 106.314 -130.176 100.688 -237.03 -10.9818 -238.673 -54.6828 -237.887 -90.8135 -243.482 -148.029 -58.7593 -204.218 -88.8953 -237.922 -118.961 -275.907 -155.845 -345.695 -242.784 -371.94 -298.393 -418.099 -362.518 -521.179 -497.031 -464.152 -891.531 -944.195 -1137.41 -1535.01 -2415.49 -4711.62 ) ; } interface_bottom { type calculated; value nonuniform List<scalar> 90 ( 1224.58 468.022 432.506 178.936 288.051 125.873 232.51 130.072 36.3431 145.505 33.2175 143.692 30.0591 145.104 29.784 178.607 79.89 159.223 93.8094 136.376 97.6074 115.623 98.0319 88.0907 93.1049 93.4632 82.2926 97.3723 68.4752 99.4983 44.6135 85.4664 36.6295 80.8375 29.7002 76.308 20.0687 59.1797 102.637 37.7054 105.573 23.7992 108.909 6.92679 108.811 -30.6149 72.6136 -24.214 68.8388 -21.0983 66.1437 -25.9563 42.5305 115.35 12.4461 120.096 -4.27898 125.403 -24.9557 125.682 -75.2763 74.304 -62.5627 70.1217 -55.9709 66.8423 -61.1666 34.3256 135.283 -6.8102 141.967 -29.5066 150.85 -59.164 154.965 -140.931 77.3018 -135.904 62.1215 -142.612 43.4674 -175.456 -33.0546 118.338 -188.602 -18.0507 193.932 -438.931 -266.094 -219.867 ) ; } defaultFaces { type empty; } } // ************************************************************************* //
b600614ae297eb77f58984d68a69d29c2bc80b1b
e51d009c6c6a1633c2c11ea4e89f289ea294ec7e
/xr2-dsgn/sources/xray/ai/sources/animation_filter.cpp
2dbfbd3ae0211f5d374c4afab535f9704fb93a16
[]
no_license
avmal0-Cor/xr2-dsgn
a0c726a4d54a2ac8147a36549bc79620fead0090
14e9203ee26be7a3cb5ca5da7056ecb53c558c72
refs/heads/master
2023-07-03T02:05:00.566892
2021-08-06T03:10:53
2021-08-06T03:10:53
389,939,196
3
2
null
null
null
null
UTF-8
C++
false
false
1,539
cpp
//////////////////////////////////////////////////////////////////////////// // Created : 27.09.2011 // Author : Tetyana Meleshchenko // Copyright (C) GSC Game World - 2011 //////////////////////////////////////////////////////////////////////////// #include "pch.h" #include "animation_filter.h" #include <xray/ai/animation_item.h> namespace xray { namespace ai { namespace planning { animation_filter::animation_filter ( bool need_to_be_inverted ) : base_filter ( need_to_be_inverted ) { } animation_filter::~animation_filter ( ) { } void animation_filter::add_filtered_item( pcstr item ) { m_filtered_items.push_back ( item ); } bool animation_filter::contains_item ( fs_new::virtual_path_string const& item ) const { for ( filtered_items_type::const_iterator iter = m_filtered_items.begin(); iter != m_filtered_items.end(); ++iter ) if ( item == *iter ) return true; return false; } bool animation_filter::is_passing_filter ( object_instance_type const& object ) const { animation_item const* const collection = static_cast_checked< animation_item const* >( object ); R_ASSERT ( collection, "invalid object" ); if ( !contains_item( collection->name ) ) return false; for ( intrusive_filters_list* it_filter = m_subfilters.front(); it_filter; it_filter = m_subfilters.get_next_of_object( it_filter ) ) if ( !it_filter->list->is_object_available( object ) ) return false; return true; } } // namespace planning } // namespace ai } // namespace xray
97345c20bff199cab1414be11c8870eeaa476040
488706ddcd860941510ddd5c8f35bbd065de9ca1
/visualtext3/cj/Calendar/XTPCalendarControlView.h
29f5a989bc7af291244de43a377a2610a09e8f74
[]
no_license
VisualText/legacy
8fabbf1da142dfac1a47f4759103671c84ee64fe
73d3dee26ab988e61507713ca37c4e9c0416aee5
refs/heads/main
2023-08-14T08:14:25.178165
2021-09-27T22:41:00
2021-09-27T22:41:00
411,052,445
0
0
null
2021-09-27T22:40:55
2021-09-27T21:48:09
C++
UTF-8
C++
false
false
24,176
h
// XTPCalendarControlView.h: interface for the CXTPCalendarControlView class. // // This file is a part of the XTREME CALENDAR MFC class library. // (c)1998-2013 Codejock Software, All Rights Reserved. // // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN // CONSENT OF CODEJOCK SOFTWARE. // // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A // SINGLE COMPUTER. // // CONTACT INFORMATION: // [email protected] // http://www.codejock.com // ///////////////////////////////////////////////////////////////////////////// //{{AFX_CODEJOCK_PRIVATE #if !defined(__XTPCALENDARCONTROLVIEW_H__) #define __XTPCALENDARCONTROLVIEW_H__ //}}AFX_CODEJOCK_PRIVATE #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include <afxdtctl.h> class CXTPCalendarControlViewPrintOptions; class CXTPCalendarPageSetupDialog; class CXTPNotifySink; //=========================================================================== // Summary: // Identifier of Calendar control child window of CXTPCalendarControlView. //=========================================================================== const UINT XTP_ID_CALENDAR_CONTROL = 100; const UINT XTP_ID_CALENDARCAPTIONBAR_CONTROL = 101; //=========================================================================== // Summary: // Describes printing options for the Calendar Control. // Remarks: // Use this class when you want to programmatically customize printing // options for the Calendar control. // // See each property description to examine which customization options // are available. // See Also: // CXTPPrintOptions, CXTPCalendarPageSetupDialog overview //=========================================================================== class _XTP_EXT_CLASS CXTPCalendarControlViewPrintOptions : public CXTPPrintOptions { //{{AFX_CODEJOCK_PRIVATE DECLARE_DYNAMIC(CXTPCalendarControlViewPrintOptions) //}}AFX_CODEJOCK_PRIVATE public: //----------------------------------------------------------------------- // Summary: // Default constructor. //----------------------------------------------------------------------- CXTPCalendarControlViewPrintOptions(); COleDateTime m_dtPrintFrom; // Top bound of the printing area for a day view. COleDateTime m_dtPrintTo; // Bottom bound of the printing area for a day view. BOOL m_bPrintFromToExactly; // Defines whether to cut printing // area by showing only area between // m_dtPrintFrom and m_dtPrintTo COleDateTime m_dtMonthViewPrintBeginDate; // Begin date to print for multi month print option COleDateTime m_dtMonthViewPrintEndDate; // End date to print for multi month print option BOOL m_bPrintDateHeader; // Defines whether to print a date header or not. LOGFONT m_lfDateHeaderFont; // Font for day header caption (Day 1 - Day 2) LOGFONT m_lfDateHeaderWeekDayFont; // Font for day header week day(Monday, ...) LOGFONT m_lfDateHeaderCalendarFont; // Font for day header small calendar. BOOL m_b3SmallCal; // Print 3 small calendars in header instead of 1. //BOOL m_bNoBackGround; //BOOL m_bGrayBackGround; //BOOL m_bGrayEventBackGround; //----------------------------------------------------------------------- // Summary: // Copies all print options from a specified PrintOptions object. // Parameters: // pSrc - A pointer to the object to copy options from. //----------------------------------------------------------------------- void Set(const CXTPCalendarControlViewPrintOptions* pSrc); //----------------------------------------------------------------------- // Summary: // Override this member function in derived class to specify active // locale ID. // Returns: // Locale ID. Base implementation returns LOCALE_USER_DEFAULT; //----------------------------------------------------------------------- virtual LCID GetActiveLCID(); protected: #ifdef _XTP_ACTIVEX //{{AFX_CODEJOCK_PRIVATE DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPCalendarControlViewPrintOptions); afx_msg LPFONTDISP OleGetDateHeaderFont(); afx_msg void OleSetDateHeaderFont(LPFONTDISP pFontDisp); afx_msg LPFONTDISP OleGetDateHeaderCalendarFont(); afx_msg void OleSetDateHeaderCalendarFont(LPFONTDISP pFontDisp); //}}AFX_CODEJOCK_PRIVATE #endif }; //=========================================================================== // Summary: // Customized Calendar control page setup dialog. // Remarks: // Use this class when you want to allow user to customize printing // options for the Calendar control. // // This class enhances standard MFC page setup dialog, which encapsulates // the services provided by the Windows common OLE Page Setup dialog box // with additional support for setting and modifying print margins. // This class is designed to take the place of the Print Setup dialog box. // // See Also: // CXTPCalendarControlViewPrintOptions overview, // CPageSetupDialog overview //=========================================================================== class _XTP_EXT_CLASS CXTPCalendarPageSetupDialog : public CPageSetupDialog { public: //{{AFX_CODEJOCK_PRIVATE enum {IDD = XTP_IDD_CALENDAR_PRINT_PAGE_SETUP}; //}}AFX_CODEJOCK_PRIVATE //----------------------------------------------------------------------- // Summary: // Class constructor. // Parameters: // pOptions - A pointer to an associated CXTPCalendarControlViewPrintOptions // object for storing user's interaction results. // dwFlags - One or more flags you can use to customize the settings // of the dialog box. The values can be combined using the // bitwise-OR operator. For more details see CPageSetupDialog::CPageSetupDialog // pParentWnd - Pointer to the dialog box's parent or owner. // Remarks: // Use the DoModal function to display the dialog box. // See also: // CPageSetupDialog::CPageSetupDialog() //----------------------------------------------------------------------- CXTPCalendarPageSetupDialog(CXTPCalendarControlViewPrintOptions* pOptions, DWORD dwFlags = PSD_MARGINS | PSD_INWININIINTLMEASURE, CWnd* pParentWnd = NULL); //----------------------------------------------------------------------- // Summary: // Default class constructor, handles members cleanup. //----------------------------------------------------------------------- virtual ~CXTPCalendarPageSetupDialog(); protected: CXTPCalendarControlViewPrintOptions* m_pOptions; // Pointer to associated print options object. CComboBox m_ctrlPrintFromCmb; // A combo for choosing CXTPCalendarControlViewPrintOptions::m_dtPrintFrom value CComboBox m_ctrlPrintToCmb; // A combo for choosing CXTPCalendarControlViewPrintOptions::m_dtPrintTo value CButton m_ctrlPrintFromTo; // A check box for editing CXTPCalendarControlViewPrintOptions::m_bPrintFromToExactly value CButton m_ctrlPrintDateHeader; // A check box for editing CXTPCalendarControlViewPrintOptions::m_bPrintDateHeader value CStatic m_ctrlDateHeaderFontLabel; // A label for displaying CXTPCalendarControlViewPrintOptions::m_lfDateHeaderFont caption CEdit m_ctrlDateHeaderFont; // A label for displaying CXTPCalendarControlViewPrintOptions::m_lfDateHeaderFont value CButton m_ctrlDateHeaderFontButton; // A button for choosing CXTPCalendarControlViewPrintOptions::m_lfDateHeaderFont value CButton m_ctrlBlackWhitePrinting; // A check box for editing CXTPCalendarControlViewPrintOptions::m_bBlackWhitePrinting value CButton m_ctrl3SmallCal; // A check box for setting CXTPCalendarControlViewPrintOptions::m_b3SmallCal value LOGFONT m_lfDateHeader; // a date time picker for begin date in month view printing CDateTimeCtrl m_ctrlMonthViewPrintFrom; // a date time picker for end date in month view printing CDateTimeCtrl m_ctrlMonthViewPrintTo; // a check box which swithes between use or not multimonth printing option CButton m_ctrlMonthViewPrintRange; // Date header font temporary storage CEdit m_ctrlHeaderFormat; // An edit for header format string CEdit m_ctrlFooterFormat; // An edit for footer format string CButton m_ctrlHeaderFormatBtn; // A button to show header specifiers menu CButton m_ctrlFooterFormatBtn; // A button to show footer specifiers menu //----------------------------------------------------------------------- // Summary: // Converts font name to a human readable string. // Parameters: // lfFont - A reference to a font. // Returns: // A string describing a provided font. //----------------------------------------------------------------------- CString FormatFontName(const LOGFONT& lfFont); //----------------------------------------------------------------------- // Summary: // Dialog-box initialization. // Returns: // FALSE because it has explicitly set the input focus to one of the // controls in the dialog box. // See also: // CPageSetupDialog::OnInitDialog(). //----------------------------------------------------------------------- virtual BOOL OnInitDialog(); //----------------------------------------------------------------------- // Summary: // Called when the user clicks the OK button (the button with an ID of IDOK). // Remarks: // Saves all values into m_pOptions structure. // See also: // CPageSetupDialog::OnOK(). //----------------------------------------------------------------------- virtual void OnOK(); //----------------------------------------------------------------------- // Summary: // Called when the user clicks the Print Date Header check box. // Remarks: // Enables/disables all controls related to configuring a Date Header. //----------------------------------------------------------------------- afx_msg void OnBnClickedPrintDateHeader(); //----------------------------------------------------------------------- // Summary: // Called when the user clicks the Date Header font button. // Remarks: // Shows standard Font dialog in order to customize a Date Header font. //----------------------------------------------------------------------- afx_msg void OnBnClickedDateHeaderFont(); //{{AFX_CODEJOCK_PRIVATE afx_msg void OnBnClickedHeaderFormat(); afx_msg void OnBnClickedFooterFormat(); afx_msg void OnBnClickedMonthViewPrintRange(); DECLARE_MESSAGE_MAP() //}}AFX_CODEJOCK_PRIVATE void UpdateMonthViewDateControls(); }; //=========================================================================== // Summary: // The CXTPCalendarControlView class provides an implementation of // the Calendar control as view class. Use GetCalendarCtrl() method // to access methods of CXTPCalendarControl // See Also: CXTPCalendarControl //=========================================================================== class _XTP_EXT_CLASS CXTPCalendarControlView : public CView { //{{AFX_CODEJOCK_PRIVATE DECLARE_DYNCREATE(CXTPCalendarControlView) //}}AFX_CODEJOCK_PRIVATE protected: //------------------------------------------------------------------------- // Summary: // Protected constructor used by dynamic creation //------------------------------------------------------------------------- CXTPCalendarControlView(); public: //----------------------------------------------------------------------- // Summary: // Call this method to access Calendar control object. // Returns: // Reference to child CXTPCalendarControl window //----------------------------------------------------------------------- virtual CXTPCalendarControl& GetCalendarCtrl(); //----------------------------------------------------------------------- // Summary: // Call this method to access CaptionBar control object. // Returns: // Reference to child GetCalendarCaptionBarCtrl window //----------------------------------------------------------------------- virtual CXTPCalendarCaptionBarControl& GetCalendarCaptionBarCtrl(); //----------------------------------------------------------------------- // Summary: // Call this method to set custom Calendar control object. // Parameters: // pCalendar - Pointer to custom report object. // bReleaseWhenDestroy - Set this parameter as TRUE to call InternalRelease // for pCalendar object on destroy of // CXTPCalendarControlView. //----------------------------------------------------------------------- virtual void SetCalendarCtrl(CXTPCalendarControl* pCalendar, BOOL bReleaseWhenDestroy = TRUE); //----------------------------------------------------------------------- // Summary: // Call this method to access print options for this view. // Returns: // Pointer to an object describing print options of this view. //----------------------------------------------------------------------- CXTPCalendarControlViewPrintOptions* GetPrintOptions() const; //----------------------------------------------------------------------- // Summary: // Use this member function to set external scroll bar control. // Parameters: // pScrollBar - Pointer to a scrollbar object. // See Also: CScrollBar //----------------------------------------------------------------------- void SetScrollBarCtrl(CScrollBar* pScrollBar); //----------------------------------------------------------------------- // Summary: // Call this method to retrieve is Caption Bar control visible. // Returns: // TRUE if Caption Bar is visible, FALSE otherwise. // See Also: // ShowCaptionBar, CXTPCalendarCaptionBarControl //----------------------------------------------------------------------- virtual BOOL IsShowCaptionBar() const; //----------------------------------------------------------------------- // Summary: // Call this method to show or hide Caption Bar control. // Parameters: // bShow - Set this parameter as TRUE to show Caption Bar and as FALSE to hide it. // See Also: // IsShowCaptionBar, CXTPCalendarCaptionBarControl //----------------------------------------------------------------------- virtual void ShowCaptionBar(BOOL bShow); //move to public area virtual void _ResizeControls(); protected: //------------------------------------------------------------------------- // Summary: // Destroys a CXTPCalendarControlView object, handles cleanup and deallocation. //------------------------------------------------------------------------- virtual ~CXTPCalendarControlView(); protected: //----------------------------------------------------------------------- // Summary: // Draws main (central) date header area. // Parameters: // bCalculate - If TRUE, then only calculate rectangles and do not // performs drawing itself. // pDC - Pointer to a valid device context. // rrcHeader - [out] Drawn rectangle area. //----------------------------------------------------------------------- virtual void DrawDateHeader(BOOL bCalculate, CDC* pDC, CRect& rrcHeader); //----------------------------------------------------------------------- // Summary: // Draws month calendar in the right part of the central date header // area. // Parameters: // bCalculate - If TRUE, then only calculate rectangles and do not // performs drawing itself. // pDC - Pointer to a valid device context. // pOptions - Pointer to calendar Print Options object. // dtYearMonth- Which month's calendar to draw. // rrcHeaderCalendar - [out] Drawn rectangle area. //----------------------------------------------------------------------- virtual void _DrawDateHeaderCalendar(BOOL bCalculate, CDC* pDC, COleDateTime dtYearMonth, CRect& rrcHeaderCalendar); //----------------------------------------------------------------------- // Summary: // Calculates a number of shown months and captions for them to be // drawn on the date header. // Parameters: // dtYearMonth1 - Bottom boundary of the date period. // dtYearMonth2 - Top boundary of the date period. // strHeader1 - [out] Bottom boundary caption. // strHeader2 - [out] Top boundary caption. // strHeaderWeekDay - [out] Week day name (for a single day view only). // Returns: // A number of months between bottom and top boundaries, including them. //----------------------------------------------------------------------- virtual int _GetDateHeaderMonths(COleDateTime& dtYearMonth1, COleDateTime& dtYearMonth2, CString& strHeader1, CString& strHeader2, CString& strHeaderWeekDay); // --------------------------------------------------------------------- // Summary: // Adjusts calendar printing rectangle by adding space for a header, // footer and similar areas. // Parameters: // pDC : Pointer to a valid device context. // rcCalendar : Calendar printing rectangle. // pInfo : Pointer to calendar Print Options object. // Returns: // Adjusted calendar printing rectangle. // --------------------------------------------------------------------- virtual CRect AdjustCalendarForPrint(CDC* pDC, CRect rcCalendar, CPrintInfo* pInfo); //----------------------------------------------------------------------- // Summary: // Converts a rectangle of HIMETRIC units into logical units. // Parameters: // pDC - Pointer to a valid device context. // rcHimetric - A rectangle to convert in HIMETRIC units. // Remarks: // Use this function when you get HIMETRIC sizes from OLE and wish to // convert them to your application's natural mapping mode. // The conversion is accomplished by first converting the HIMETRIC // units into pixels and then converting these units into logical // units using the device context's current mapping units. Note that // the extents of the device's window and viewport will affect the result. // Returns: // Converted rectangle in logical units. // See also: // CDC::HIMETRICtoLP() //----------------------------------------------------------------------- static CRect _HimetricToLP(CDC* pDC, const CRect rcHimetric); protected: COleDateTime m_dtPrintFrom; // Top bound of the printing area for a day view. COleDateTime m_dtPrintTo; // Bottom bound of the printing area for a day view. //{{AFX_CODEJOCK_PRIVATE #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif DECLARE_MESSAGE_MAP() //{{AFX_VIRTUAL(CXTPCalendarControlView) virtual void OnDraw(CDC* pDC); CScrollBar* GetScrollBarCtrl(int nBar) const; virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo); 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); virtual void _OnPrint2(CDC* pDC, CPrintInfo* pInfo, CRect rcPrint); //}}AFX_VIRTUAL void DoPrintPage(CDC* pDC, CPrintInfo* pInfo); void SetupCurrentPrintPage(CDC* pDC, CPrintInfo* pInfo); void SetupCurrentDayViewPrintPage(CDC* pDC, CPrintInfo* pInfo); void SetupCurrentMonthViewPrintPage(CPrintInfo* pInfo); void SelectNextPrintPage(CPrintInfo* pInfo); void SelectNextDayViewPrintPage(CPrintInfo* pInfo); CRect ExcludeMarginsFromDrawRect(CDC* pDC, CPrintInfo* pInfo); UINT CalculateMonthViewPrintPagesCount(); //{{AFX_MSG(CXTPCalendarControlView) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnSetFocus(CWnd* pOldWnd); afx_msg void OnPaint(); afx_msg void OnUndo(); afx_msg void OnCut(); afx_msg void OnCopy(); afx_msg void OnPaste(); afx_msg void OnSelectAll(); afx_msg void OnUpdateCommand(CCmdUI* pCmdUI); afx_msg void OnFilePageSetup(); //}}AFX_MSG //}}AFX_CODEJOCK_PRIVATE protected: //{{AFX_CODEJOCK_PRIVATE class CPritAdjustContext { public: CPritAdjustContext() { Reset(); } void Reset() { m_bAdjust = TRUE; m_rcCalendar.SetRectEmpty(); m_rectDraw_prev.SetRectEmpty(); m_rcDateHeader.SetRectEmpty(); m_rcFooter.SetRectEmpty(); m_rcHeader.SetRectEmpty(); } BOOL m_bAdjust; CRect m_rcHeader; CRect m_rcDateHeader; CRect m_rcCalendar; CRect m_rcFooter; CRect m_rectDraw_prev; }; class CBeforePrintState { public: CBeforePrintState(); public: void ClearData(); void Save(CXTPCalendarControlView* pView); void Restore(CXTPCalendarControlView* pView); public: BOOL m_bDataValid; COleDateTimeSpan m_spScale_orig; int m_nTopRow; }; CBeforePrintState m_beforePrintState; CPritAdjustContext m_pritAdjustContext; CXTPCalendarControl::CUpdateContext* m_pUpdateContect; CBitmap m_bmpGrayDC; //}}AFX_CODEJOCK_PRIVATE //{{AFX_CODEJOCK_PRIVATE friend class CCalendarControlCtrl; friend class CBeforePrintState; //}}AFX_CODEJOCK_PRIVATE protected: //{{AFX_CODEJOCK_PRIVATE void CalendarDayView_ScrolV(int nTopRow); //}}AFX_CODEJOCK_PRIVATE //{{AFX_CODEJOCK_PRIVATE CXTPNotifySink* m_pSink; virtual void OnEvent_CalendarThemeChanged(XTP_NOTIFY_CODE Event, WPARAM wParam , LPARAM lParam); //}}AFX_CODEJOCK_PRIVATE protected: CXTPCalendarControlViewPrintOptions* m_pPrintOptions; // Printing options. BOOL m_bShowCaptionBar; // Store Office 2007 theme Calendar Caption Bar state. private: CXTPCalendarCaptionBarControl m_wndCalendarCaptionBar; // Child Calendar Caption Bar window CXTPCalendarControl* m_pCalendar; // Child Calendar control pointer (used to set external calendar control). BOOL m_bReleaseCalendarWhenDestroy; CScrollBar* m_pScrollBar; BOOL m_bDayViewMode; //internal flag for DayView and related Views printing public: BOOL m_bPrintDirect; // if TRUE - the Print Dialog is bypassed. FALSE by default. BOOL m_bResizeControlWithView; // if FALSE - attached Calendar control will not be resized with view. TRUE by default. BOOL m_bPrintFullScale; // extra flag for printing if no Range on Print Option selected, FALSE - use Working hour range, TRUE - Time Scale range BOOL m_bPrintFineMode; // if TRUE - default and all Print Option features, if FALSE - B/W print without Header and Footer BOOL m_bPrintRepeatHeaderFooterMode; //flag to repeat readers and footers on each page BOOL m_bDF_mode; // Last page print mode flag (FALSE - print last page same size as other, // TRUE (default) - can be shorter then others) COleDateTime m_dtTimeScaleOldMaxTime; //stored original time scale settings during print / print preview COleDateTime m_dtTimeScaleOldMinTime; //stored original time scale settings during print / print preview //ext print support private: int m_nStartCell, m_nEndCell, m_nCurCell, m_nCellSteps, m_nInitialTopCell; // internal cell's for printing loop CUIntArray m_PageStart; COleDateTimeSpan m_dtInitialScaleInterval; COleDateTime m_dtMonthViewPrintBeginDate; // The range of days to print for month view COleDateTime m_dtMonthViewPrintEndDate; COleDateTime m_dtSavedMonthViewBeginDate; // stores first visible day of month view before printing to restore the view after rint operation BOOL m_bMonthViewMode; }; ///////////////////////////////////////////////////////////////////////////// AFX_INLINE CXTPCalendarControlViewPrintOptions* CXTPCalendarControlView::GetPrintOptions() const { return m_pPrintOptions; } AFX_INLINE CXTPCalendarCaptionBarControl& CXTPCalendarControlView::GetCalendarCaptionBarCtrl() { return m_wndCalendarCaptionBar; } #endif // !defined(__XTPCALENDARCONTROLVIEW_H__)
a6b086081d9fea0e530333e387a2f40c1d8233f7
f189851803d303c342a8f42df55e677cfb8f72da
/include/ttree/pavt/bst.h
c3326414e817bee6f9dd2523203a96491877fe92
[]
no_license
tylertownsend/TTree
5aa32c4215d668d93b2920798f4f03696f9c4aec
cd26a63f5269ec171dbed4bfb6a0c5c694471399
refs/heads/master
2020-03-28T12:59:21.637024
2019-07-13T07:15:22
2019-07-13T07:15:22
148,355,103
0
0
null
2019-07-13T07:15:23
2018-09-11T17:35:46
C++
UTF-8
C++
false
false
915
h
// // Created by ttown on 9/30/2018. // #ifndef TTREE_INCLUDE_PAVT_PAVT_BST_H_ #define TTREE_INCLUDE_PAVT_PAVT_BST_H_ #include <mutex> #include <atomic> #include <ttree/base/binary_tree.h> #include <ttree/pavt/pavt_bst.h> #include <ttree/pavt/lock_manager.h> namespace pavt { class BST: public PaVTBST { public: inline BST() { minSentinel = new PaVTBST::Node(iMin); maxSentinel = new PaVTBST::Node(iMax); maxSentinel->parent = (minSentinel); minSentinel->right = (maxSentinel); maxSentinel->leftSnap = minSentinel; minSentinel->rightSnap = maxSentinel; this->root = maxSentinel; } inline ~BST() { DeleteTree((Node*) root); } void Insert(const int& key); void Remove(const int& key); bool Contains(const int& key); private: void DeleteTree(Node* start); }; } // namespace pavt #endif // TTREE_INCLUDE_PAVT_PAVT_BST_H_
846268f5ea114dbf4f676eca014b3f7819998ea9
16c25858ef1e5f29f653580d4aacda69a50c3244
/hikr/build/iOS/Preview/src/Fuse.Controls.FallbackTextEdit.g.cpp
3752b213c4774176b8fc6ce46c9723c3c4f6ad95
[]
no_license
PoliGomes/tutorialfuse
69c32ff34ba9236bc3e84e99e00eb116d6f16422
0b7fadfe857fed568a5c2899d176acf45249d2b8
refs/heads/master
2021-08-16T02:50:08.993542
2017-11-18T22:04:56
2017-11-18T22:04:56
111,242,469
0
0
null
null
null
null
UTF-8
C++
false
false
101,691
cpp
// This file was generated based on '(multiple files)'. // WARNING: Changes might be lost if you edit this file directly. #include <Fuse.Controls.FallbackTextEdit.DegreeSpan.h> #include <Fuse.Controls.FallbackTextEdit.LineCache.h> #include <Fuse.Controls.FallbackTextEdit.LineCacheLine.h> #include <Fuse.Controls.FallbackTextEdit.LineCachePasswordTransform.h> #include <Fuse.Controls.FallbackTextEdit.LineCacheTransform.h> #include <Fuse.Controls.FallbackTextEdit.SwipeGestureHelper.h> #include <Fuse.Controls.FallbackTextEdit.TextPosition.h> #include <Fuse.Controls.FallbackTextEdit.TextSpan.h> #include <Fuse.Controls.FallbackTextEdit.TextWindow.h> #include <Fuse.Controls.FallbackTextRenderer.DefaultTextRenderer.h> #include <Fuse.Controls.FallbackTextRenderer.WordWrapInfo.h> #include <Fuse.Controls.FallbackTextRenderer.WordWrapper.h> #include <Fuse.Controls.FallbackTextRenderer.WrappedLine.h> #include <Fuse.Controls.TextAlignment.h> #include <Fuse.DrawContext.h> #include <Fuse.Elements.Internal.ElementDraw.h> #include <Fuse.Visual.h> #include <Fuse.VisualBounds.h> #include <Uno.Action.h> #include <Uno.Bool.h> #include <Uno.Char.h> #include <Uno.Collections.EnumerableExtensions.h> #include <Uno.Collections.IEnumerable-1.h> #include <Uno.Collections.List-1.Enumerator.h> #include <Uno.Collections.List-1.h> #include <Uno.Delegate.h> #include <Uno.Float.h> #include <Uno.Float2.h> #include <Uno.Float4x4.h> #include <Uno.Int.h> #include <Uno.Math.h> #include <Uno.String.h> #include <Uno.Vector.h> static uString* STRINGS[2]; static uType* TYPES[6]; namespace g{ namespace Fuse{ namespace Controls{ namespace FallbackTextEdit{ // /usr/local/share/uno/Packages/Fuse.Controls.Primitives/1.2.1/textcontrols/fallbacktextedit/$.uno // ------------------------------------------------------------------------------------------------ // internal sealed class DegreeSpan :18 // { static void DegreeSpan_build(uType* type) { type->SetFields(0, ::g::Uno::Float_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::DegreeSpan, _a), 0, ::g::Uno::Float_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::DegreeSpan, _b), 0); } uType* DegreeSpan_typeof() { static uSStrong<uType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 2; options.ObjectSize = sizeof(DegreeSpan); options.TypeSize = sizeof(uType); type = uClassType::New("Fuse.Controls.FallbackTextEdit.DegreeSpan", options); type->fp_build_ = DegreeSpan_build; return type; } // public DegreeSpan(float a, float b) :22 void DegreeSpan__ctor__fn(DegreeSpan* __this, float* a, float* b) { __this->ctor_(*a, *b); } // public bool IsWithinBounds(float x) :27 void DegreeSpan__IsWithinBounds_fn(DegreeSpan* __this, float* x, bool* __retval) { *__retval = __this->IsWithinBounds(*x); } // public DegreeSpan New(float a, float b) :22 void DegreeSpan__New1_fn(float* a, float* b, DegreeSpan** __retval) { *__retval = DegreeSpan::New1(*a, *b); } // public DegreeSpan(float a, float b) [instance] :22 void DegreeSpan::ctor_(float a, float b) { _a = a; _b = b; } // public bool IsWithinBounds(float x) [instance] :27 bool DegreeSpan::IsWithinBounds(float x) { float angle1 = _a; float angle2 = _b; float rAngle = ::g::Uno::Math::Mod1(::g::Uno::Math::Mod1(angle2 - angle1, 360.0f) + 360.0f, 360.0f); if (rAngle >= 180.0f) { float a = angle1; angle1 = angle2; angle2 = a; } if (angle1 <= angle2) return (x >= angle1) && (x <= angle2); else return (x >= angle2) || (x <= angle2); } // public DegreeSpan New(float a, float b) [static] :22 DegreeSpan* DegreeSpan::New1(float a, float b) { DegreeSpan* obj1 = (DegreeSpan*)uNew(DegreeSpan_typeof()); obj1->ctor_(a, b); return obj1; } // } // /usr/local/share/uno/Packages/Fuse.Controls.Primitives/1.2.1/textcontrols/fallbacktextedit/$.uno // ------------------------------------------------------------------------------------------------ // internal sealed class LineCache :75 // { static void LineCache_build(uType* type) { ::STRINGS[0] = uString::Const(""); ::STRINGS[1] = uString::Const("\n" ""); ::TYPES[0] = ::g::Uno::Collections::List_typeof()->MakeType(::g::Fuse::Controls::FallbackTextEdit::LineCacheLine_typeof(), NULL); ::TYPES[1] = ::g::Uno::Char_typeof()->Array(); ::TYPES[2] = ::g::Uno::Collections::List__Enumerator_typeof()->MakeType(::g::Fuse::Controls::FallbackTextEdit::LineCacheLine_typeof(), NULL); ::TYPES[3] = ::g::Uno::Collections::EnumerableExtensions_typeof()->MakeMethod(3/*First<Fuse.Controls.FallbackTextEdit.LineCacheLine>*/, ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine_typeof(), NULL); type->SetFields(0, ::g::Uno::Action_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCache, _invalideLayout), 0, ::g::Uno::Bool_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCache, _isMultiline), 0, ::g::Uno::Bool_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCache, _isTextValid), 0, ::TYPES[0/*Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine>*/], offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCache, _lines), 0, ::g::Uno::Action_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCache, _onTextChanged), 0, ::g::Uno::String_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCache, _text), 0, ::g::Fuse::Controls::FallbackTextEdit::LineCacheTransform_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCache, _transform), 0); } uType* LineCache_typeof() { static uSStrong<uType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 7; options.ObjectSize = sizeof(LineCache); options.TypeSize = sizeof(uType); type = uClassType::New("Fuse.Controls.FallbackTextEdit.LineCache", options); type->fp_build_ = LineCache_build; return type; } // public LineCache(Uno.Action onTextChanged, Uno.Action invalideLayout, bool isMultiline) :136 void LineCache__ctor__fn(LineCache* __this, uDelegate* onTextChanged, uDelegate* invalideLayout, bool* isMultiline) { __this->ctor_(onTextChanged, invalideLayout, *isMultiline); } // public Fuse.Controls.FallbackTextEdit.TextPosition BoundsToTextPos(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, float2 p) :415 void LineCache__BoundsToTextPos_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int* textAlignment, float* boundsWidth, ::g::Uno::Float2* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->BoundsToTextPos(wrapInfo, *textAlignment, *boundsWidth, *p); } // private Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine> DecomposeLines(string text) :497 void LineCache__DecomposeLines_fn(LineCache* __this, uString* text, ::g::Uno::Collections::List** __retval) { *__retval = __this->DecomposeLines(text); } // public Fuse.Controls.FallbackTextEdit.TextPosition DeleteSpan(Fuse.Controls.FallbackTextEdit.TextSpan s) :205 void LineCache__DeleteSpan_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextSpan* s, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->DeleteSpan(s); } // public Fuse.Controls.FallbackTextEdit.TextPosition End(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.FallbackTextEdit.TextPosition p) :395 void LineCache__End_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->End(wrapInfo, p); } // public float2 GetBoundsSize(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo) :400 void LineCache__GetBoundsSize_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, ::g::Uno::Float2* __retval) { *__retval = __this->GetBoundsSize(wrapInfo); } // public Fuse.Controls.FallbackTextEdit.TextSpan GetFullTextSpan() :452 void LineCache__GetFullTextSpan_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextSpan** __retval) { *__retval = __this->GetFullTextSpan(); } // public Fuse.Controls.FallbackTextEdit.TextPosition GetLastTextPos() :447 void LineCache__GetLastTextPos_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->GetLastTextPos(); } // public string GetString(Fuse.Controls.FallbackTextEdit.TextSpan s) :457 void LineCache__GetString_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextSpan* s, uString** __retval) { *__retval = __this->GetString(s); } // public Fuse.Controls.FallbackTextEdit.TextPosition Home(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.FallbackTextEdit.TextPosition p) :390 void LineCache__Home_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->Home(wrapInfo, p); } // public Fuse.Controls.FallbackTextEdit.TextPosition InsertChar(Fuse.Controls.FallbackTextEdit.TextPosition p, char c) :145 void LineCache__InsertChar_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, uChar* c, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->InsertChar(p, *c); } // public Fuse.Controls.FallbackTextEdit.TextPosition InsertNewline(Fuse.Controls.FallbackTextEdit.TextPosition p) :152 void LineCache__InsertNewline_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->InsertNewline(p); } // private void InvalidateLayout() :491 void LineCache__InvalidateLayout_fn(LineCache* __this) { __this->InvalidateLayout(); } // private void InvalidateText([bool noChange]) :482 void LineCache__InvalidateText_fn(LineCache* __this, bool* noChange) { __this->InvalidateText(*noChange); } // public void InvalidateVisual() :476 void LineCache__InvalidateVisual_fn(LineCache* __this) { __this->InvalidateVisual(); } // private bool IsWordBreaker(char c) :360 void LineCache__IsWordBreaker_fn(LineCache* __this, uChar* c, bool* __retval) { *__retval = __this->IsWordBreaker(*c); } // public Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine> get_Lines() :80 void LineCache__get_Lines_fn(LineCache* __this, ::g::Uno::Collections::List** __retval) { *__retval = __this->Lines(); } // public LineCache New(Uno.Action onTextChanged, Uno.Action invalideLayout, bool isMultiline) :136 void LineCache__New1_fn(uDelegate* onTextChanged, uDelegate* invalideLayout, bool* isMultiline, LineCache** __retval) { *__retval = LineCache::New1(onTextChanged, invalideLayout, *isMultiline); } // private int NextWordLeft(string str, int startIdx) :280 void LineCache__NextWordLeft_fn(LineCache* __this, uString* str, int* startIdx, int* __retval) { *__retval = __this->NextWordLeft(str, *startIdx); } // private int NextWordRight(string str, int startIdx) :327 void LineCache__NextWordRight_fn(LineCache* __this, uString* str, int* startIdx, int* __retval) { *__retval = __this->NextWordRight(str, *startIdx); } // public string get_Text() :93 void LineCache__get_Text_fn(LineCache* __this, uString** __retval) { *__retval = __this->Text(); } // public void set_Text(string value) :106 void LineCache__set_Text_fn(LineCache* __this, uString* value) { __this->Text(value); } // public float2 TextPosToBounds(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, Fuse.Controls.FallbackTextEdit.TextPosition p) :436 void LineCache__TextPosToBounds_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int* textAlignment, float* boundsWidth, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Uno::Float2* __retval) { *__retval = __this->TextPosToBounds(wrapInfo, *textAlignment, *boundsWidth, p); } // public Fuse.Controls.FallbackTextEdit.LineCacheTransform get_Transform() :122 void LineCache__get_Transform_fn(LineCache* __this, uObject** __retval) { *__retval = __this->Transform(); } // public void set_Transform(Fuse.Controls.FallbackTextEdit.LineCacheTransform value) :123 void LineCache__set_Transform_fn(LineCache* __this, uObject* value) { __this->Transform(value); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryBackspace(Fuse.Controls.FallbackTextEdit.TextPosition p) :184 void LineCache__TryBackspace_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->TryBackspace(p); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryDelete(Fuse.Controls.FallbackTextEdit.TextPosition p) :162 void LineCache__TryDelete_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->TryDelete(p); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveDown(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, Fuse.Controls.FallbackTextEdit.TextPosition p) :381 void LineCache__TryMoveDown_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int* textAlignment, float* boundsWidth, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->TryMoveDown(wrapInfo, *textAlignment, *boundsWidth, p); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveLeft(Fuse.Controls.FallbackTextEdit.TextPosition p) :240 void LineCache__TryMoveLeft_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->TryMoveLeft(p); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveOneWordLeft(Fuse.Controls.FallbackTextEdit.TextPosition p) :266 void LineCache__TryMoveOneWordLeft_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->TryMoveOneWordLeft(p); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveOneWordRight(Fuse.Controls.FallbackTextEdit.TextPosition p) :313 void LineCache__TryMoveOneWordRight_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->TryMoveOneWordRight(p); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveRight(Fuse.Controls.FallbackTextEdit.TextPosition p) :253 void LineCache__TryMoveRight_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->TryMoveRight(p); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveUp(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, Fuse.Controls.FallbackTextEdit.TextPosition p) :372 void LineCache__TryMoveUp_fn(LineCache* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int* textAlignment, float* boundsWidth, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, ::g::Fuse::Controls::FallbackTextEdit::TextPosition** __retval) { *__retval = __this->TryMoveUp(wrapInfo, *textAlignment, *boundsWidth, p); } // public LineCache(Uno.Action onTextChanged, Uno.Action invalideLayout, bool isMultiline) [instance] :136 void LineCache::ctor_(uDelegate* onTextChanged, uDelegate* invalideLayout, bool isMultiline) { _isTextValid = true; _isMultiline = isMultiline; _onTextChanged = onTextChanged; _invalideLayout = invalideLayout; _lines = NULL; } // public Fuse.Controls.FallbackTextEdit.TextPosition BoundsToTextPos(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, float2 p) [instance] :415 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::BoundsToTextPos(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int textAlignment, float boundsWidth, ::g::Uno::Float2 p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "BoundsToTextPos(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,Fuse.Controls.TextAlignment,float,float2)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret11; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret12; int l = 0; float startY = 0.0f; if (p.Y > 0.0f) for (; l < (uPtr(Lines())->Count() - 1); l++) { float lineHeight = uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(l), &ret11), ret11))->GetTotalHeight(wrapInfo); float endY = startY + lineHeight; if ((p.Y >= startY) && (p.Y < endY)) break; startY = endY; } int c = uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(l), &ret12), ret12))->BoundsToPos(wrapInfo, textAlignment, boundsWidth, ::g::Uno::Float2__New2(p.X, p.Y - startY)); return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(l, c); } // private Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine> DecomposeLines(string text) [instance] :497 ::g::Uno::Collections::List* LineCache::DecomposeLines(uString* text) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "DecomposeLines(string)"); uArray* array7; int index8; int length9; ::g::Uno::Collections::List* lines = (::g::Uno::Collections::List*)::g::Uno::Collections::List::New1(::TYPES[0/*Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine>*/]); if (::g::Uno::String::op_Inequality(text, NULL)) { if (_isMultiline) for (array7 = ::g::Uno::String::Split(uPtr(text), uArray::Init<int>(::TYPES[1/*char[]*/], 1, 10)), index8 = 0, length9 = uPtr(array7)->Length(); index8 < length9; ++index8) { uString* line = uPtr(array7)->Strong<uString*>(index8); ::g::Uno::Collections::List__Add_fn(uPtr(lines), ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine::New1(line, _transform)); } else ::g::Uno::Collections::List__Add_fn(uPtr(lines), ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine::New1(text, _transform)); } if (lines->Count() == 0) ::g::Uno::Collections::List__Add_fn(uPtr(lines), ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine::New1(::g::Uno::String::Empty(), _transform)); return lines; } // public Fuse.Controls.FallbackTextEdit.TextPosition DeleteSpan(Fuse.Controls.FallbackTextEdit.TextSpan s) [instance] :205 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::DeleteSpan(::g::Fuse::Controls::FallbackTextEdit::TextSpan* s) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "DeleteSpan(Fuse.Controls.FallbackTextEdit.TextSpan)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret13; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret14; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret15; if (::g::Fuse::Controls::FallbackTextEdit::TextSpan::op_Equality(s, GetFullTextSpan())) Text(::STRINGS[0/*""*/]); else for (int i = uPtr(Lines())->Count() - 1; i >= 0; i--) { ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* line = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(i), &ret13), ret13); ::g::Fuse::Controls::FallbackTextEdit::TextSpan* lineSpan = ::g::Fuse::Controls::FallbackTextEdit::TextSpan::New1(::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(i, 0), ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(i, uPtr(uPtr(line)->Text())->Length())); ::g::Fuse::Controls::FallbackTextEdit::TextSpan* intersection = ::g::Fuse::Controls::FallbackTextEdit::TextSpan::Intersection(lineSpan, s); if (::g::Fuse::Controls::FallbackTextEdit::TextSpan::op_Equality(intersection, NULL)) continue; if (::g::Fuse::Controls::FallbackTextEdit::TextSpan::op_Equality(intersection, lineSpan)) uPtr(Lines())->RemoveAt(i); else { uString* text = uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(i), &ret14), ret14))->Text(); uString* start = ::g::Uno::String::Substring1(uPtr(text), 0, uPtr(uPtr(intersection)->Start)->Char); uString* end = ::g::Uno::String::Substring1(text, uPtr(intersection->End)->Char, text->Length() - uPtr(intersection->End)->Char); uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(i), &ret15), ret15))->Text(::g::Uno::String::op_Addition2(start, end)); } } InvalidateText(false); return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(::g::Uno::Math::Min8(uPtr(uPtr(s)->Start)->Line, uPtr(Lines())->Count() - 1), uPtr(uPtr(s)->Start)->Char); } // public Fuse.Controls.FallbackTextEdit.TextPosition End(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :395 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::End(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "End(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret16; return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(uPtr(p)->Line, uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret16), ret16))->End(wrapInfo, uPtr(p)->Char)); } // public float2 GetBoundsSize(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo) [instance] :400 ::g::Uno::Float2 LineCache::GetBoundsSize(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "GetBoundsSize(Fuse.Controls.FallbackTextRenderer.WordWrapInfo)"); uArray* array3; int index4; int length5; ::g::Uno::Collections::List__Enumerator<uStrong< ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine*> > ret17; float maxWidth = 0.0f; float height = 0.0f; for (::g::Uno::Collections::List__Enumerator<uStrong< ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine*> > enum2 = (::g::Uno::Collections::List__GetEnumerator_fn(uPtr(Lines()), &ret17), ret17); enum2.MoveNext(::TYPES[2/*Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine>.Enumerator*/]); ) { ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* line = enum2.Current(::TYPES[2/*Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine>.Enumerator*/]); for (array3 = uPtr(line)->GetWrappedLines(wrapInfo), index4 = 0, length5 = uPtr(array3)->Length(); index4 < length5; ++index4) { ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine* wrappedLine = uPtr(array3)->Strong< ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine*>(index4); maxWidth = ::g::Uno::Math::Max1(maxWidth, uPtr(wrappedLine)->LineWidth); height = height + uPtr(wrapInfo)->LineHeight; } } return ::g::Uno::Float2__New2(maxWidth, height); } // public Fuse.Controls.FallbackTextEdit.TextSpan GetFullTextSpan() [instance] :452 ::g::Fuse::Controls::FallbackTextEdit::TextSpan* LineCache::GetFullTextSpan() { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "GetFullTextSpan()"); return ::g::Fuse::Controls::FallbackTextEdit::TextSpan::New1(::g::Fuse::Controls::FallbackTextEdit::TextPosition::Default(), GetLastTextPos()); } // public Fuse.Controls.FallbackTextEdit.TextPosition GetLastTextPos() [instance] :447 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::GetLastTextPos() { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "GetLastTextPos()"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret18; return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(uPtr(Lines())->Count() - 1, uPtr(uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(Lines())->Count() - 1), &ret18), ret18))->Text())->Length()); } // public string GetString(Fuse.Controls.FallbackTextEdit.TextSpan s) [instance] :457 uString* LineCache::GetString(::g::Fuse::Controls::FallbackTextEdit::TextSpan* s) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "GetString(Fuse.Controls.FallbackTextEdit.TextSpan)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret19; uString* ret = ::STRINGS[0/*""*/]; for (int i = uPtr(uPtr(s)->Start)->Line; i <= uPtr(s->End)->Line; i++) { ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* line = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(i), &ret19), ret19); ::g::Fuse::Controls::FallbackTextEdit::TextSpan* lineSpan = ::g::Fuse::Controls::FallbackTextEdit::TextSpan::New1(::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(i, 0), ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(i, uPtr(uPtr(line)->Text())->Length())); ::g::Fuse::Controls::FallbackTextEdit::TextSpan* intersection = ::g::Fuse::Controls::FallbackTextEdit::TextSpan::Intersection(lineSpan, s); if (::g::Fuse::Controls::FallbackTextEdit::TextSpan::op_Equality(intersection, NULL)) continue; ret = ::g::Uno::String::op_Addition2(ret, ::g::Uno::String::Substring1(uPtr(line->Text()), uPtr(uPtr(intersection)->Start)->Char, uPtr(uPtr(intersection)->End)->Char - uPtr(uPtr(intersection)->Start)->Char)); } return ret; } // public Fuse.Controls.FallbackTextEdit.TextPosition Home(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :390 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::Home(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "Home(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret20; return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(uPtr(p)->Line, uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret20), ret20))->Home(wrapInfo, uPtr(p)->Char)); } // public Fuse.Controls.FallbackTextEdit.TextPosition InsertChar(Fuse.Controls.FallbackTextEdit.TextPosition p, char c) [instance] :145 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::InsertChar(::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, uChar c) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "InsertChar(Fuse.Controls.FallbackTextEdit.TextPosition,char)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret21; uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret21), ret21))->InsertChar(uPtr(p)->Char, c); InvalidateText(false); return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(p->Line, p->Char + 1); } // public Fuse.Controls.FallbackTextEdit.TextPosition InsertNewline(Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :152 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::InsertNewline(::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "InsertNewline(Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret22; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* currentLine = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret22), ret22); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* newLine = ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine::New1(::g::Uno::String::Substring(uPtr(uPtr(currentLine)->Text()), p->Char), _transform); currentLine->Text(::g::Uno::String::Substring1(uPtr(currentLine->Text()), 0, p->Char)); ::g::Uno::Collections::List__Insert_fn(uPtr(Lines()), uCRef<int>(p->Line + 1), newLine); InvalidateText(false); return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(p->Line + 1, 0); } // private void InvalidateLayout() [instance] :491 void LineCache::InvalidateLayout() { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "InvalidateLayout()"); if (::g::Uno::Delegate::op_Inequality(_invalideLayout, NULL)) uPtr(_invalideLayout)->InvokeVoid(); } // private void InvalidateText([bool noChange]) [instance] :482 void LineCache::InvalidateText(bool noChange) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "InvalidateText([bool])"); _text = NULL; _isTextValid = false; if (!noChange && ::g::Uno::Delegate::op_Inequality(_onTextChanged, NULL)) uPtr(_onTextChanged)->InvokeVoid(); InvalidateLayout(); } // public void InvalidateVisual() [instance] :476 void LineCache::InvalidateVisual() { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "InvalidateVisual()"); ::g::Uno::Collections::List__Enumerator<uStrong< ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine*> > ret23; for (::g::Uno::Collections::List__Enumerator<uStrong< ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine*> > enum6 = (::g::Uno::Collections::List__GetEnumerator_fn(uPtr(Lines()), &ret23), ret23); enum6.MoveNext(::TYPES[2/*Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine>.Enumerator*/]); ) { ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* line = enum6.Current(::TYPES[2/*Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine>.Enumerator*/]); uPtr(line)->Invalidate(); } InvalidateLayout(); } // private bool IsWordBreaker(char c) [instance] :360 bool LineCache::IsWordBreaker(uChar c) { return (((((c == ' ') || (c == 9)) || (c == 10)) || (c == '.')) || (c == ',')) || (c == ';'); } // public Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine> get_Lines() [instance] :80 ::g::Uno::Collections::List* LineCache::Lines() { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "get_Lines()"); if (_lines == NULL) _lines = DecomposeLines(_text); return _lines; } // private int NextWordLeft(string str, int startIdx) [instance] :280 int LineCache::NextWordLeft(uString* str, int startIdx) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "NextWordLeft(string,int)"); bool hitWordBreak = false; int nextRealChar = -1; int i = startIdx - 1; bool startsWithRealChar = !IsWordBreaker(uPtr(str)->Item(i)); for (; i >= 0; --i) { uChar c = uPtr(str)->Item(i); if (IsWordBreaker(c)) { hitWordBreak = true; if (startsWithRealChar) { nextRealChar = i; break; } } else if (hitWordBreak) { startsWithRealChar = true; hitWordBreak = false; } } if (i == -1) return 0; return nextRealChar + 1; } // private int NextWordRight(string str, int startIdx) [instance] :327 int LineCache::NextWordRight(uString* str, int startIdx) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "NextWordRight(string,int)"); bool hitWordBreak = false; int nextRealChar = -1; int i = startIdx; bool startsWithRealChar = !IsWordBreaker(uPtr(str)->Item(i)); for (; i < str->Length(); ++i) { uChar c = uPtr(str)->Item(i); if (IsWordBreaker(c)) { hitWordBreak = true; if (startsWithRealChar) { nextRealChar = i; break; } } else if (hitWordBreak) { startsWithRealChar = true; hitWordBreak = false; } } if (i == str->Length()) return i; return nextRealChar; } // public string get_Text() [instance] :93 uString* LineCache::Text() { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "get_Text()"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret37; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret38; if (!_isTextValid) { _text = uPtr((::g::Uno::Collections::EnumerableExtensions__First_fn(::TYPES[3/*Uno.Collections.EnumerableExtensions.First<Fuse.Controls.FallbackTextEdit.LineCacheLine>*/], (uObject*)Lines(), &ret37), ret37))->Text(); for (int i = 1; i < uPtr(Lines())->Count(); i++) _text = ::g::Uno::String::op_Addition2(::g::Uno::String::op_Addition2(_text, ::STRINGS[1/*"\n"*/]), uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(i), &ret38), ret38))->Text()); _isTextValid = true; } return _text; } // public void set_Text(string value) [instance] :106 void LineCache::Text(uString* value) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "set_Text(string)"); if (::g::Uno::String::op_Equality(value, Text())) return; _text = value; _isTextValid = true; _lines = NULL; } // public float2 TextPosToBounds(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :436 ::g::Uno::Float2 LineCache::TextPosToBounds(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int textAlignment, float boundsWidth, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "TextPosToBounds(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,Fuse.Controls.TextAlignment,float,Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret24; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret25; float startY = 0.0f; for (int i = 0; i < uPtr(p)->Line; i++) startY = startY + uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(i), &ret24), ret24))->GetTotalHeight(wrapInfo); ::g::Uno::Float2 linePos = uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret25), ret25))->PosToBounds(wrapInfo, textAlignment, boundsWidth, uPtr(p)->Char); return ::g::Uno::Float2__New2(linePos.X, startY + linePos.Y); } // public Fuse.Controls.FallbackTextEdit.LineCacheTransform get_Transform() [instance] :122 uObject* LineCache::Transform() { return _transform; } // public void set_Transform(Fuse.Controls.FallbackTextEdit.LineCacheTransform value) [instance] :123 void LineCache::Transform(uObject* value) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "set_Transform(Fuse.Controls.FallbackTextEdit.LineCacheTransform)"); ::g::Uno::Collections::List__Enumerator<uStrong< ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine*> > ret39; _transform = value; for (::g::Uno::Collections::List__Enumerator<uStrong< ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine*> > enum1 = (::g::Uno::Collections::List__GetEnumerator_fn(uPtr(Lines()), &ret39), ret39); enum1.MoveNext(::TYPES[2/*Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine>.Enumerator*/]); ) { ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* line = enum1.Current(::TYPES[2/*Uno.Collections.List<Fuse.Controls.FallbackTextEdit.LineCacheLine>.Enumerator*/]); uPtr(line)->Transform(_transform); } InvalidateText(true); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryBackspace(Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :184 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::TryBackspace(::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "TryBackspace(Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret26; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret27; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret28; if (uPtr(p)->Char == 0) { if (uPtr(p)->Line == 0) return p; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* prevLine = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line - 1), &ret26), ret26); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* currentLine = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(p->Line), &ret27), ret27); int newChar = uPtr(uPtr(prevLine)->Text())->Length(); prevLine->Text(::g::Uno::String::op_Addition2(prevLine->Text(), uPtr(currentLine)->Text())); uPtr(Lines())->RemoveAt(p->Line); InvalidateText(false); return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(p->Line - 1, newChar); } ::g::Fuse::Controls::FallbackTextEdit::TextPosition* ret = ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(uPtr(p)->Line, uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret28), ret28))->Backspace(uPtr(p)->Char)); InvalidateText(false); return ret; } // public Fuse.Controls.FallbackTextEdit.TextPosition TryDelete(Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :162 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::TryDelete(::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "TryDelete(Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret29; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret30; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret31; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* line = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret29), ret29); if (p->Char == uPtr(uPtr(line)->Text())->Length()) { if (uPtr(p)->Line == (uPtr(Lines())->Count() - 1)) return p; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* nextLine = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line + 1), &ret30), ret30); uPtr(line)->Text(::g::Uno::String::op_Addition2(uPtr(line)->Text(), uPtr(nextLine)->Text())); uPtr(Lines())->RemoveAt(p->Line + 1); InvalidateText(false); } else { uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret31), ret31))->Delete(uPtr(p)->Char); InvalidateText(false); } return p; } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveDown(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :381 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::TryMoveDown(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int textAlignment, float boundsWidth, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "TryMoveDown(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,Fuse.Controls.TextAlignment,float,Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Uno::Float2 lineBounds = TextPosToBounds(wrapInfo, textAlignment, boundsWidth, p); ::g::Uno::Float2 nextLineBounds = ::g::Uno::Float2__New2(lineBounds.X, lineBounds.Y + (uPtr(wrapInfo)->LineHeight * 1.5f)); ::g::Fuse::Controls::FallbackTextEdit::TextPosition* nextLineTextPos = BoundsToTextPos(wrapInfo, textAlignment, boundsWidth, nextLineBounds); return nextLineTextPos; } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveLeft(Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :240 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::TryMoveLeft(::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "TryMoveLeft(Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret32; if (uPtr(p)->Char == 0) { if (uPtr(p)->Line == 0) return p; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* prevLine = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line - 1), &ret32), ret32); return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(p->Line - 1, uPtr(uPtr(prevLine)->Text())->Length()); } return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(uPtr(p)->Line, uPtr(p)->Char - 1); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveOneWordLeft(Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :266 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::TryMoveOneWordLeft(::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "TryMoveOneWordLeft(Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret33; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret34; if (uPtr(p)->Char == 0) { if (uPtr(p)->Line == 0) return p; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* prevLine = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line - 1), &ret33), ret33); return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(p->Line - 1, uPtr(uPtr(prevLine)->Text())->Length()); } return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(uPtr(p)->Line, NextWordLeft(uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret34), ret34))->Text(), uPtr(p)->Char)); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveOneWordRight(Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :313 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::TryMoveOneWordRight(::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "TryMoveOneWordRight(Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret35; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* line = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret35), ret35); if (p->Char >= uPtr(uPtr(line)->Text())->Length()) { if (uPtr(p)->Line == (uPtr(Lines())->Count() - 1)) return p; return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(uPtr(p)->Line + 1, 0); } return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(p->Line, NextWordRight(uPtr(line)->Text(), p->Char)); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveRight(Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :253 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::TryMoveRight(::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "TryMoveRight(Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret36; ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* line = (::g::Uno::Collections::List__get_Item_fn(uPtr(Lines()), uCRef<int>(uPtr(p)->Line), &ret36), ret36); if (p->Char >= uPtr(uPtr(line)->Text())->Length()) { if (uPtr(p)->Line == (uPtr(Lines())->Count() - 1)) return p; return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(uPtr(p)->Line + 1, 0); } return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(p->Line, p->Char + 1); } // public Fuse.Controls.FallbackTextEdit.TextPosition TryMoveUp(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :372 ::g::Fuse::Controls::FallbackTextEdit::TextPosition* LineCache::TryMoveUp(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int textAlignment, float boundsWidth, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCache", "TryMoveUp(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,Fuse.Controls.TextAlignment,float,Fuse.Controls.FallbackTextEdit.TextPosition)"); ::g::Uno::Float2 lineBounds = TextPosToBounds(wrapInfo, textAlignment, boundsWidth, p); ::g::Uno::Float2 prevLineBounds = ::g::Uno::Float2__New2(lineBounds.X, lineBounds.Y - (uPtr(wrapInfo)->LineHeight * 0.5f)); ::g::Fuse::Controls::FallbackTextEdit::TextPosition* prevLineTextPos = BoundsToTextPos(wrapInfo, textAlignment, boundsWidth, prevLineBounds); return prevLineTextPos; } // public LineCache New(Uno.Action onTextChanged, Uno.Action invalideLayout, bool isMultiline) [static] :136 LineCache* LineCache::New1(uDelegate* onTextChanged, uDelegate* invalideLayout, bool isMultiline) { LineCache* obj10 = (LineCache*)uNew(LineCache_typeof()); obj10->ctor_(onTextChanged, invalideLayout, isMultiline); return obj10; } // } // /usr/local/share/uno/Packages/Fuse.Controls.Primitives/1.2.1/textcontrols/fallbacktextedit/$.uno // ------------------------------------------------------------------------------------------------ // internal sealed class LineCacheLine :531 // { static void LineCacheLine_build(uType* type) { ::TYPES[4] = ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine_typeof()->Array(); ::TYPES[5] = ::g::Fuse::Controls::FallbackTextEdit::LineCacheTransform_typeof(); type->SetFields(0, ::g::Uno::String_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCacheLine, _text), 0, ::TYPES[5/*Fuse.Controls.FallbackTextEdit.LineCacheTransform*/], offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCacheLine, _transform), 0, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCacheLine, _wordWrapInfoCache), 0, ::TYPES[4/*Fuse.Controls.FallbackTextRenderer.WrappedLine[]*/], offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCacheLine, _wrappedLinesCache), 0); } uType* LineCacheLine_typeof() { static uSStrong<uType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 4; options.ObjectSize = sizeof(LineCacheLine); options.TypeSize = sizeof(uType); type = uClassType::New("Fuse.Controls.FallbackTextEdit.LineCacheLine", options); type->fp_build_ = LineCacheLine_build; return type; } // public LineCacheLine(string text, Fuse.Controls.FallbackTextEdit.LineCacheTransform transform) :587 void LineCacheLine__ctor__fn(LineCacheLine* __this, uString* text, uObject* transform) { __this->ctor_(text, transform); } // public int Backspace(int p) :605 void LineCacheLine__Backspace_fn(LineCacheLine* __this, int* p, int* __retval) { *__retval = __this->Backspace(*p); } // public int BoundsToPos(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, float2 p) :621 void LineCacheLine__BoundsToPos_fn(LineCacheLine* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int* textAlignment, float* boundsWidth, ::g::Uno::Float2* p, int* __retval) { *__retval = __this->BoundsToPos(wrapInfo, *textAlignment, *boundsWidth, *p); } // private Fuse.Controls.FallbackTextRenderer.WrappedLine BoundsToWrappedLine(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, float2 p) :644 void LineCacheLine__BoundsToWrappedLine_fn(LineCacheLine* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, ::g::Uno::Float2* p, ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine** __retval) { *__retval = __this->BoundsToWrappedLine(wrapInfo, *p); } // public void Delete(int p) :600 void LineCacheLine__Delete_fn(LineCacheLine* __this, int* p) { __this->Delete(*p); } // public int End(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, int p) :616 void LineCacheLine__End_fn(LineCacheLine* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int* p, int* __retval) { *__retval = __this->End(wrapInfo, *p); } // public float GetTotalHeight(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo) :638 void LineCacheLine__GetTotalHeight_fn(LineCacheLine* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, float* __retval) { *__retval = __this->GetTotalHeight(wrapInfo); } // public Fuse.Controls.FallbackTextRenderer.WrappedLine[] GetWrappedLines(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo) :571 void LineCacheLine__GetWrappedLines_fn(LineCacheLine* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, uArray** __retval) { *__retval = __this->GetWrappedLines(wrapInfo); } // public int Home(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, int p) :611 void LineCacheLine__Home_fn(LineCacheLine* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int* p, int* __retval) { *__retval = __this->Home(wrapInfo, *p); } // public void InsertChar(int p, char c) :593 void LineCacheLine__InsertChar_fn(LineCacheLine* __this, int* p, uChar* c) { __this->InsertChar(*p, *c); } // public void Invalidate() :678 void LineCacheLine__Invalidate_fn(LineCacheLine* __this) { __this->Invalidate(); } // public LineCacheLine New(string text, Fuse.Controls.FallbackTextEdit.LineCacheTransform transform) :587 void LineCacheLine__New1_fn(uString* text, uObject* transform, LineCacheLine** __retval) { *__retval = LineCacheLine::New1(text, transform); } // public float2 PosToBounds(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, int p) :629 void LineCacheLine__PosToBounds_fn(LineCacheLine* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int* textAlignment, float* boundsWidth, int* p, ::g::Uno::Float2* __retval) { *__retval = __this->PosToBounds(wrapInfo, *textAlignment, *boundsWidth, *p); } // private Fuse.Controls.FallbackTextRenderer.WrappedLine PosToWrappedLine(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, int p) :664 void LineCacheLine__PosToWrappedLine_fn(LineCacheLine* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int* p, ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine** __retval) { *__retval = __this->PosToWrappedLine(wrapInfo, *p); } // public string get_Text() :536 void LineCacheLine__get_Text_fn(LineCacheLine* __this, uString** __retval) { *__retval = __this->Text(); } // public void set_Text(string value) :537 void LineCacheLine__set_Text_fn(LineCacheLine* __this, uString* value) { __this->Text(value); } // public Fuse.Controls.FallbackTextEdit.LineCacheTransform get_Transform() :550 void LineCacheLine__get_Transform_fn(LineCacheLine* __this, uObject** __retval) { *__retval = __this->Transform(); } // public void set_Transform(Fuse.Controls.FallbackTextEdit.LineCacheTransform value) :551 void LineCacheLine__set_Transform_fn(LineCacheLine* __this, uObject* value) { __this->Transform(value); } // public string get_VisualText() :560 void LineCacheLine__get_VisualText_fn(LineCacheLine* __this, uString** __retval) { *__retval = __this->VisualText(); } // public LineCacheLine(string text, Fuse.Controls.FallbackTextEdit.LineCacheTransform transform) [instance] :587 void LineCacheLine::ctor_(uString* text, uObject* transform) { _text = text; _transform = transform; } // public int Backspace(int p) [instance] :605 int LineCacheLine::Backspace(int p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "Backspace(int)"); Text(::g::Uno::String::op_Addition2(::g::Uno::String::Substring1(uPtr(Text()), 0, p - 1), ::g::Uno::String::Substring(uPtr(Text()), p))); return p - 1; } // public int BoundsToPos(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, float2 p) [instance] :621 int LineCacheLine::BoundsToPos(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int textAlignment, float boundsWidth, ::g::Uno::Float2 p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "BoundsToPos(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,Fuse.Controls.TextAlignment,float,float2)"); ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine* wrappedLine = BoundsToWrappedLine(wrapInfo, p); float xOffset = uPtr(wrappedLine)->GetXOffset(textAlignment, boundsWidth, uPtr(wrapInfo)->AbsoluteZoom); return wrappedLine->BoundsToPos(wrapInfo, p.X - xOffset) + wrappedLine->LineTextStartOffset; } // private Fuse.Controls.FallbackTextRenderer.WrappedLine BoundsToWrappedLine(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, float2 p) [instance] :644 ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine* LineCacheLine::BoundsToWrappedLine(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, ::g::Uno::Float2 p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "BoundsToWrappedLine(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,float2)"); uArray* wrappedLines = GetWrappedLines(wrapInfo); int l = 0; float startY = 0.0f; if (p.Y > 0.0f) for (; l < (uPtr(wrappedLines)->Length() - 1); l++) { float endY = startY + uPtr(wrapInfo)->LineHeight; if ((p.Y >= startY) && (p.Y < endY)) break; startY = endY; } return uPtr(wrappedLines)->Strong< ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine*>(l); } // public void Delete(int p) [instance] :600 void LineCacheLine::Delete(int p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "Delete(int)"); Text(::g::Uno::String::op_Addition2(::g::Uno::String::Substring1(uPtr(Text()), 0, p), ::g::Uno::String::Substring(uPtr(Text()), p + 1))); } // public int End(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, int p) [instance] :616 int LineCacheLine::End(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "End(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,int)"); return uPtr(PosToWrappedLine(wrapInfo, p))->LineTextEndOffset(); } // public float GetTotalHeight(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo) [instance] :638 float LineCacheLine::GetTotalHeight(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "GetTotalHeight(Fuse.Controls.FallbackTextRenderer.WordWrapInfo)"); uArray* wrappedLines = GetWrappedLines(wrapInfo); return (float)uPtr(wrappedLines)->Length() * uPtr(wrapInfo)->LineHeight; } // public Fuse.Controls.FallbackTextRenderer.WrappedLine[] GetWrappedLines(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo) [instance] :571 uArray* LineCacheLine::GetWrappedLines(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "GetWrappedLines(Fuse.Controls.FallbackTextRenderer.WordWrapInfo)"); if (((_wrappedLinesCache == NULL) || (_wordWrapInfoCache == NULL)) || !uPtr(_wordWrapInfoCache)->Equals(wrapInfo)) { _wrappedLinesCache = ((uPtr(wrapInfo)->IsEnabled && (uPtr(Text())->Length() > 0)) ? (uArray*)::g::Fuse::Controls::FallbackTextRenderer::WordWrapper::WrapLine(wrapInfo, VisualText()) : uArray::Init< ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine*>(::TYPES[4/*Fuse.Controls.FallbackTextRenderer.WrappedLine[]*/], 1, (::g::Fuse::Controls::FallbackTextRenderer::WrappedLine*)::g::Fuse::Controls::FallbackTextRenderer::WrappedLine::New1(VisualText(), 0, 0.0f, uPtr(uPtr(wrapInfo)->TextRenderer)->MeasureStringVirtual(uPtr(wrapInfo)->FontSize, uPtr(wrapInfo)->AbsoluteZoom, VisualText()).X))); _wordWrapInfoCache = wrapInfo; } return _wrappedLinesCache; } // public int Home(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, int p) [instance] :611 int LineCacheLine::Home(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "Home(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,int)"); return uPtr(PosToWrappedLine(wrapInfo, p))->LineTextStartOffset; } // public void InsertChar(int p, char c) [instance] :593 void LineCacheLine::InsertChar(int p, uChar c) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "InsertChar(int,char)"); Text((p < uPtr(Text())->Length()) ? (uString*)::g::Uno::String::op_Addition2(::g::Uno::String::op_Addition1(::g::Uno::String::Substring1(uPtr(Text()), 0, p), uBox<uChar>(::g::Uno::Char_typeof(), c)), ::g::Uno::String::Substring(uPtr(Text()), p)) : (uString*)::g::Uno::String::op_Addition1(Text(), uBox<uChar>(::g::Uno::Char_typeof(), c))); } // public void Invalidate() [instance] :678 void LineCacheLine::Invalidate() { _wrappedLinesCache = NULL; } // public float2 PosToBounds(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.TextAlignment textAlignment, float boundsWidth, int p) [instance] :629 ::g::Uno::Float2 LineCacheLine::PosToBounds(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int textAlignment, float boundsWidth, int p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "PosToBounds(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,Fuse.Controls.TextAlignment,float,int)"); ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine* wrappedLine = PosToWrappedLine(wrapInfo, p); float xOffset = uPtr(wrappedLine)->GetXOffset(textAlignment, boundsWidth, uPtr(wrapInfo)->AbsoluteZoom); float yOffset = wrappedLine->YOffset; return ::g::Uno::Float2__New2(xOffset + wrappedLine->PosToBounds(wrapInfo, p - wrappedLine->LineTextStartOffset), yOffset); } // private Fuse.Controls.FallbackTextRenderer.WrappedLine PosToWrappedLine(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, int p) [instance] :664 ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine* LineCacheLine::PosToWrappedLine(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, int p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "PosToWrappedLine(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,int)"); uArray* wrappedLines = GetWrappedLines(wrapInfo); for (int i = 0; i < (uPtr(wrappedLines)->Length() - 1); i++) { ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine* wrappedLine = uPtr(wrappedLines)->Strong< ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine*>(i); if ((p >= uPtr(wrappedLine)->LineTextStartOffset) && (p < uPtr(wrappedLine)->LineTextEndOffset())) return wrappedLine; } return uPtr(wrappedLines)->Strong< ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine*>(uPtr(wrappedLines)->Length() - 1); } // public string get_Text() [instance] :536 uString* LineCacheLine::Text() { return _text; } // public void set_Text(string value) [instance] :537 void LineCacheLine::Text(uString* value) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "set_Text(string)"); if (::g::Uno::String::op_Equality(value, _text)) return; _text = value; Invalidate(); } // public Fuse.Controls.FallbackTextEdit.LineCacheTransform get_Transform() [instance] :550 uObject* LineCacheLine::Transform() { return _transform; } // public void set_Transform(Fuse.Controls.FallbackTextEdit.LineCacheTransform value) [instance] :551 void LineCacheLine::Transform(uObject* value) { _transform = value; Invalidate(); } // public string get_VisualText() [instance] :560 uString* LineCacheLine::VisualText() { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCacheLine", "get_VisualText()"); if (_transform != NULL) return ::g::Fuse::Controls::FallbackTextEdit::LineCacheTransform::Transform(uInterface(uPtr(_transform), ::TYPES[5/*Fuse.Controls.FallbackTextEdit.LineCacheTransform*/]), _text); return _text; } // public LineCacheLine New(string text, Fuse.Controls.FallbackTextEdit.LineCacheTransform transform) [static] :587 LineCacheLine* LineCacheLine::New1(uString* text, uObject* transform) { LineCacheLine* obj1 = (LineCacheLine*)uNew(LineCacheLine_typeof()); obj1->ctor_(text, transform); return obj1; } // } // /usr/local/share/uno/Packages/Fuse.Controls.Primitives/1.2.1/textcontrols/fallbacktextedit/$.uno // ------------------------------------------------------------------------------------------------ // internal sealed class LineCachePasswordTransform :701 // { static void LineCachePasswordTransform_build(uType* type) { ::TYPES[1] = ::g::Uno::Char_typeof()->Array(); type->SetInterfaces( ::g::Fuse::Controls::FallbackTextEdit::LineCacheTransform_typeof(), offsetof(LineCachePasswordTransform_type, interface0)); type->SetFields(0, ::g::Uno::Int_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::LineCachePasswordTransform, _reveal), 0); } LineCachePasswordTransform_type* LineCachePasswordTransform_typeof() { static uSStrong<LineCachePasswordTransform_type*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 1; options.InterfaceCount = 1; options.ObjectSize = sizeof(LineCachePasswordTransform); options.TypeSize = sizeof(LineCachePasswordTransform_type); type = (LineCachePasswordTransform_type*)uClassType::New("Fuse.Controls.FallbackTextEdit.LineCachePasswordTransform", options); type->fp_build_ = LineCachePasswordTransform_build; type->fp_ctor_ = (void*)LineCachePasswordTransform__New1_fn; type->interface0.fp_Transform = (void(*)(uObject*, uString*, uString**))LineCachePasswordTransform__Transform_fn; return type; } // public generated LineCachePasswordTransform() :701 void LineCachePasswordTransform__ctor__fn(LineCachePasswordTransform* __this) { __this->ctor_(); } // public generated LineCachePasswordTransform New() :701 void LineCachePasswordTransform__New1_fn(LineCachePasswordTransform** __retval) { *__retval = LineCachePasswordTransform::New1(); } // public bool SetReveal(int r) :704 void LineCachePasswordTransform__SetReveal_fn(LineCachePasswordTransform* __this, int* r, bool* __retval) { *__retval = __this->SetReveal(*r); } // public string Transform(string text) :711 void LineCachePasswordTransform__Transform_fn(LineCachePasswordTransform* __this, uString* text, uString** __retval) { *__retval = __this->Transform(text); } // public generated LineCachePasswordTransform() [instance] :701 void LineCachePasswordTransform::ctor_() { _reveal = -1; } // public bool SetReveal(int r) [instance] :704 bool LineCachePasswordTransform::SetReveal(int r) { bool b = r != _reveal; _reveal = r; return b; } // public string Transform(string text) [instance] :711 uString* LineCachePasswordTransform::Transform(uString* text) { uStackFrame __("Fuse.Controls.FallbackTextEdit.LineCachePasswordTransform", "Transform(string)"); if (::g::Uno::String::IsNullOrEmpty(text)) return text; uChar replacement = 8226; uArray* buffer = uArray::New(::TYPES[1/*char[]*/], uPtr(text)->Length()); for (int i = 0; i < buffer->Length(); ++i) uPtr(buffer)->Item<uChar>(i) = replacement; if (_reveal != -1) uPtr(buffer)->Item<uChar>(_reveal) = uPtr(text)->Item(_reveal); return uString::CharArray(buffer); } // public generated LineCachePasswordTransform New() [static] :701 LineCachePasswordTransform* LineCachePasswordTransform::New1() { LineCachePasswordTransform* obj1 = (LineCachePasswordTransform*)uNew(LineCachePasswordTransform_typeof()); obj1->ctor_(); return obj1; } // } // /usr/local/share/uno/Packages/Fuse.Controls.Primitives/1.2.1/textcontrols/fallbacktextedit/$.uno // ------------------------------------------------------------------------------------------------ // internal abstract interface LineCacheTransform :696 // { uInterfaceType* LineCacheTransform_typeof() { static uSStrong<uInterfaceType*> type; if (type != NULL) return type; type = uInterfaceType::New("Fuse.Controls.FallbackTextEdit.LineCacheTransform", 0, 0); return type; } // } // /usr/local/share/uno/Packages/Fuse.Controls.Primitives/1.2.1/textcontrols/fallbacktextedit/$.uno // ------------------------------------------------------------------------------------------------ // internal sealed class SwipeGestureHelper :42 // { static void SwipeGestureHelper_build(uType* type) { type->SetFields(0, ::g::Uno::Float_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::SwipeGestureHelper, _lengthThreshold), 0, ::g::Fuse::Controls::FallbackTextEdit::DegreeSpan_typeof()->Array(), offsetof(::g::Fuse::Controls::FallbackTextEdit::SwipeGestureHelper, _spans), 0); } uType* SwipeGestureHelper_typeof() { static uSStrong<uType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 2; options.ObjectSize = sizeof(SwipeGestureHelper); options.TypeSize = sizeof(uType); type = uClassType::New("Fuse.Controls.FallbackTextEdit.SwipeGestureHelper", options); type->fp_build_ = SwipeGestureHelper_build; return type; } // public SwipeGestureHelper(float lengthThreshold, Fuse.Controls.FallbackTextEdit.DegreeSpan[] spans) :46 void SwipeGestureHelper__ctor__fn(SwipeGestureHelper* __this, float* lengthThreshold, uArray* spans) { __this->ctor_(*lengthThreshold, spans); } // public bool IsWithinBounds(float2 vector) :51 void SwipeGestureHelper__IsWithinBounds_fn(SwipeGestureHelper* __this, ::g::Uno::Float2* vector, bool* __retval) { *__retval = __this->IsWithinBounds(*vector); } // public SwipeGestureHelper New(float lengthThreshold, Fuse.Controls.FallbackTextEdit.DegreeSpan[] spans) :46 void SwipeGestureHelper__New1_fn(float* lengthThreshold, uArray* spans, SwipeGestureHelper** __retval) { *__retval = SwipeGestureHelper::New1(*lengthThreshold, spans); } // public SwipeGestureHelper(float lengthThreshold, Fuse.Controls.FallbackTextEdit.DegreeSpan[] spans) [instance] :46 void SwipeGestureHelper::ctor_(float lengthThreshold, uArray* spans) { _spans = spans; _lengthThreshold = lengthThreshold; } // public bool IsWithinBounds(float2 vector) [instance] :51 bool SwipeGestureHelper::IsWithinBounds(::g::Uno::Float2 vector) { uStackFrame __("Fuse.Controls.FallbackTextEdit.SwipeGestureHelper", "IsWithinBounds(float2)"); float length = ::g::Uno::Vector::Length(vector); if (length < _lengthThreshold) return false; float angle = ::g::Uno::Math::RadiansToDegrees1(::g::Uno::Math::Atan22(vector.X, vector.Y)); for (int i = 0; i < uPtr(_spans)->Length(); i++) if (uPtr(uPtr(_spans)->Strong< ::g::Fuse::Controls::FallbackTextEdit::DegreeSpan*>(i))->IsWithinBounds(angle)) return true; return false; } // public SwipeGestureHelper New(float lengthThreshold, Fuse.Controls.FallbackTextEdit.DegreeSpan[] spans) [static] :46 SwipeGestureHelper* SwipeGestureHelper::New1(float lengthThreshold, uArray* spans) { SwipeGestureHelper* obj1 = (SwipeGestureHelper*)uNew(SwipeGestureHelper_typeof()); obj1->ctor_(lengthThreshold, spans); return obj1; } // } // /usr/local/share/uno/Packages/Fuse.Controls.Primitives/1.2.1/textcontrols/fallbacktextedit/$.uno // ------------------------------------------------------------------------------------------------ // internal sealed class TextPosition :736 // { // static TextPosition() :736 static void TextPosition__cctor__fn(uType* __type) { TextPosition::Default_ = TextPosition::New1(0, 0); } static void TextPosition_build(uType* type) { type->SetFields(0, ::g::Uno::Int_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextPosition, Char), 0, ::g::Uno::Int_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextPosition, Line), 0, type, (uintptr_t)&::g::Fuse::Controls::FallbackTextEdit::TextPosition::Default_, uFieldFlagsStatic); } uType* TextPosition_typeof() { static uSStrong<uType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 3; options.ObjectSize = sizeof(TextPosition); options.TypeSize = sizeof(uType); type = uClassType::New("Fuse.Controls.FallbackTextEdit.TextPosition", options); type->fp_build_ = TextPosition_build; type->fp_cctor_ = TextPosition__cctor__fn; type->fp_Equals = (void(*)(uObject*, uObject*, bool*))TextPosition__Equals_fn; type->fp_GetHashCode = (void(*)(uObject*, int*))TextPosition__GetHashCode_fn; return type; } // public TextPosition(int l, int c) :815 void TextPosition__ctor__fn(TextPosition* __this, int* l, int* c) { __this->ctor_(*l, *c); } // public override sealed bool Equals(object obj) :821 void TextPosition__Equals_fn(TextPosition* __this, uObject* obj, bool* __retval) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextPosition", "Equals(object)"); if (!uIs(obj, __this->__type)) return *__retval = false, void(); TextPosition* other = uCast<TextPosition*>(obj, __this->__type); return *__retval = (__this->Line == uPtr(other)->Line) && (__this->Char == uPtr(other)->Char), void(); } // public override sealed int GetHashCode() :832 void TextPosition__GetHashCode_fn(TextPosition* __this, int* __retval) { return *__retval = __this->Line ^ __this->Char, void(); } // public static Fuse.Controls.FallbackTextEdit.TextPosition Max(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) :808 void TextPosition__Max_fn(TextPosition* a, TextPosition* b, TextPosition** __retval) { *__retval = TextPosition::Max(a, b); } // public static Fuse.Controls.FallbackTextEdit.TextPosition Min(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) :803 void TextPosition__Min_fn(TextPosition* a, TextPosition* b, TextPosition** __retval) { *__retval = TextPosition::Min(a, b); } // public TextPosition New(int l, int c) :815 void TextPosition__New1_fn(int* l, int* c, TextPosition** __retval) { *__retval = TextPosition::New1(*l, *c); } // public static operator ==(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) :740 void TextPosition__op_Equality_fn(TextPosition* a, TextPosition* b, bool* __retval) { *__retval = TextPosition::op_Equality(a, b); } // public static operator >(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) :781 void TextPosition__op_GreaterThan_fn(TextPosition* a, TextPosition* b, bool* __retval) { *__retval = TextPosition::op_GreaterThan(a, b); } // public static operator >=(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) :792 void TextPosition__op_GreaterThanOrEqual_fn(TextPosition* a, TextPosition* b, bool* __retval) { *__retval = TextPosition::op_GreaterThanOrEqual(a, b); } // public static operator !=(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) :754 void TextPosition__op_Inequality_fn(TextPosition* a, TextPosition* b, bool* __retval) { *__retval = TextPosition::op_Inequality(a, b); } // public static operator <(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) :759 void TextPosition__op_LessThan_fn(TextPosition* a, TextPosition* b, bool* __retval) { *__retval = TextPosition::op_LessThan(a, b); } // public static operator <=(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) :770 void TextPosition__op_LessThanOrEqual_fn(TextPosition* a, TextPosition* b, bool* __retval) { *__retval = TextPosition::op_LessThanOrEqual(a, b); } uSStrong<TextPosition*> TextPosition::Default_; // public TextPosition(int l, int c) [instance] :815 void TextPosition::ctor_(int l, int c) { Line = l; Char = c; } // public static Fuse.Controls.FallbackTextEdit.TextPosition Max(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) [static] :808 TextPosition* TextPosition::Max(TextPosition* a, TextPosition* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextPosition", "Max(Fuse.Controls.FallbackTextEdit.TextPosition,Fuse.Controls.FallbackTextEdit.TextPosition)"); TextPosition_typeof()->Init(); return TextPosition::op_GreaterThanOrEqual(a, b) ? a : b; } // public static Fuse.Controls.FallbackTextEdit.TextPosition Min(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) [static] :803 TextPosition* TextPosition::Min(TextPosition* a, TextPosition* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextPosition", "Min(Fuse.Controls.FallbackTextEdit.TextPosition,Fuse.Controls.FallbackTextEdit.TextPosition)"); TextPosition_typeof()->Init(); return TextPosition::op_LessThanOrEqual(a, b) ? a : b; } // public TextPosition New(int l, int c) [static] :815 TextPosition* TextPosition::New1(int l, int c) { TextPosition* obj1 = (TextPosition*)uNew(TextPosition_typeof()); obj1->ctor_(l, c); return obj1; } // public static operator ==(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) [static] :740 bool TextPosition::op_Equality(TextPosition* a, TextPosition* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextPosition", "==(Fuse.Controls.FallbackTextEdit.TextPosition,Fuse.Controls.FallbackTextEdit.TextPosition)"); TextPosition_typeof()->Init(); bool aNull = ::g::Uno::Object::ReferenceEquals(a, NULL); bool bNull = ::g::Uno::Object::ReferenceEquals(b, NULL); if (aNull && bNull) return true; if ((aNull && !bNull) || (!aNull && bNull)) return false; return uPtr(a)->Equals(b); } // public static operator >(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) [static] :781 bool TextPosition::op_GreaterThan(TextPosition* a, TextPosition* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextPosition", ">(Fuse.Controls.FallbackTextEdit.TextPosition,Fuse.Controls.FallbackTextEdit.TextPosition)"); TextPosition_typeof()->Init(); if (uPtr(a)->Line > uPtr(b)->Line) return true; if (uPtr(a)->Line < uPtr(b)->Line) return false; return uPtr(a)->Char > uPtr(b)->Char; } // public static operator >=(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) [static] :792 bool TextPosition::op_GreaterThanOrEqual(TextPosition* a, TextPosition* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextPosition", ">=(Fuse.Controls.FallbackTextEdit.TextPosition,Fuse.Controls.FallbackTextEdit.TextPosition)"); TextPosition_typeof()->Init(); if (uPtr(a)->Line > uPtr(b)->Line) return true; if (uPtr(a)->Line < uPtr(b)->Line) return false; return uPtr(a)->Char >= uPtr(b)->Char; } // public static operator !=(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) [static] :754 bool TextPosition::op_Inequality(TextPosition* a, TextPosition* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextPosition", "!=(Fuse.Controls.FallbackTextEdit.TextPosition,Fuse.Controls.FallbackTextEdit.TextPosition)"); TextPosition_typeof()->Init(); return !TextPosition::op_Equality(a, b); } // public static operator <(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) [static] :759 bool TextPosition::op_LessThan(TextPosition* a, TextPosition* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextPosition", "<(Fuse.Controls.FallbackTextEdit.TextPosition,Fuse.Controls.FallbackTextEdit.TextPosition)"); TextPosition_typeof()->Init(); if (uPtr(a)->Line < uPtr(b)->Line) return true; if (uPtr(a)->Line > uPtr(b)->Line) return false; return uPtr(a)->Char < uPtr(b)->Char; } // public static operator <=(Fuse.Controls.FallbackTextEdit.TextPosition a, Fuse.Controls.FallbackTextEdit.TextPosition b) [static] :770 bool TextPosition::op_LessThanOrEqual(TextPosition* a, TextPosition* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextPosition", "<=(Fuse.Controls.FallbackTextEdit.TextPosition,Fuse.Controls.FallbackTextEdit.TextPosition)"); TextPosition_typeof()->Init(); if (uPtr(a)->Line < uPtr(b)->Line) return true; if (uPtr(a)->Line > uPtr(b)->Line) return false; return uPtr(a)->Char <= uPtr(b)->Char; } // } // /usr/local/share/uno/Packages/Fuse.Controls.Primitives/1.2.1/textcontrols/fallbacktextedit/$.uno // ------------------------------------------------------------------------------------------------ // internal sealed class TextSpan :838 // { static void TextSpan_build(uType* type) { type->SetFields(0, ::g::Fuse::Controls::FallbackTextEdit::TextPosition_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextSpan, End), 0, ::g::Fuse::Controls::FallbackTextEdit::TextPosition_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextSpan, Start), 0); } uType* TextSpan_typeof() { static uSStrong<uType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 2; options.ObjectSize = sizeof(TextSpan); options.TypeSize = sizeof(uType); type = uClassType::New("Fuse.Controls.FallbackTextEdit.TextSpan", options); type->fp_build_ = TextSpan_build; type->fp_Equals = (void(*)(uObject*, uObject*, bool*))TextSpan__Equals_fn; type->fp_GetHashCode = (void(*)(uObject*, int*))TextSpan__GetHashCode_fn; return type; } // public TextSpan(Fuse.Controls.FallbackTextEdit.TextPosition start, Fuse.Controls.FallbackTextEdit.TextPosition end) :873 void TextSpan__ctor__fn(TextSpan* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* start, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* end) { __this->ctor_(start, end); } // public bool Contains(Fuse.Controls.FallbackTextEdit.TextPosition p) :896 void TextSpan__Contains_fn(TextSpan* __this, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* p, bool* __retval) { *__retval = __this->Contains(p); } // public override sealed bool Equals(object obj) :880 void TextSpan__Equals_fn(TextSpan* __this, uObject* obj, bool* __retval) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextSpan", "Equals(object)"); if (!uIs(obj, __this->__type)) return *__retval = false, void(); TextSpan* other = uCast<TextSpan*>(obj, __this->__type); return *__retval = ::g::Fuse::Controls::FallbackTextEdit::TextPosition::op_Equality(__this->Start, uPtr(other)->Start) && ::g::Fuse::Controls::FallbackTextEdit::TextPosition::op_Equality(__this->End, uPtr(other)->End), void(); } // public override sealed int GetHashCode() :891 void TextSpan__GetHashCode_fn(TextSpan* __this, int* __retval) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextSpan", "GetHashCode()"); return *__retval = uPtr(__this->Start)->GetHashCode() ^ uPtr(__this->End)->GetHashCode(), void(); } // public static Fuse.Controls.FallbackTextEdit.TextSpan Intersection(Fuse.Controls.FallbackTextEdit.TextSpan a, Fuse.Controls.FallbackTextEdit.TextSpan b) :864 void TextSpan__Intersection_fn(TextSpan* a, TextSpan* b, TextSpan** __retval) { *__retval = TextSpan::Intersection(a, b); } // public static bool Intersects(Fuse.Controls.FallbackTextEdit.TextSpan a, Fuse.Controls.FallbackTextEdit.TextSpan b) :859 void TextSpan__Intersects_fn(TextSpan* a, TextSpan* b, bool* __retval) { *__retval = TextSpan::Intersects(a, b); } // public TextSpan New(Fuse.Controls.FallbackTextEdit.TextPosition start, Fuse.Controls.FallbackTextEdit.TextPosition end) :873 void TextSpan__New1_fn(::g::Fuse::Controls::FallbackTextEdit::TextPosition* start, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* end, TextSpan** __retval) { *__retval = TextSpan::New1(start, end); } // public static operator ==(Fuse.Controls.FallbackTextEdit.TextSpan a, Fuse.Controls.FallbackTextEdit.TextSpan b) :840 void TextSpan__op_Equality_fn(TextSpan* a, TextSpan* b, bool* __retval) { *__retval = TextSpan::op_Equality(a, b); } // public static operator !=(Fuse.Controls.FallbackTextEdit.TextSpan a, Fuse.Controls.FallbackTextEdit.TextSpan b) :854 void TextSpan__op_Inequality_fn(TextSpan* a, TextSpan* b, bool* __retval) { *__retval = TextSpan::op_Inequality(a, b); } // public TextSpan(Fuse.Controls.FallbackTextEdit.TextPosition start, Fuse.Controls.FallbackTextEdit.TextPosition end) [instance] :873 void TextSpan::ctor_(::g::Fuse::Controls::FallbackTextEdit::TextPosition* start, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* end) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextSpan", ".ctor(Fuse.Controls.FallbackTextEdit.TextPosition,Fuse.Controls.FallbackTextEdit.TextPosition)"); bool isValid = ::g::Fuse::Controls::FallbackTextEdit::TextPosition::op_LessThanOrEqual(start, end); Start = (isValid ? start : end); End = (isValid ? end : start); } // public bool Contains(Fuse.Controls.FallbackTextEdit.TextPosition p) [instance] :896 bool TextSpan::Contains(::g::Fuse::Controls::FallbackTextEdit::TextPosition* p) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextSpan", "Contains(Fuse.Controls.FallbackTextEdit.TextPosition)"); return ::g::Fuse::Controls::FallbackTextEdit::TextPosition::op_GreaterThanOrEqual(p, Start) && ::g::Fuse::Controls::FallbackTextEdit::TextPosition::op_LessThan(p, End); } // public static Fuse.Controls.FallbackTextEdit.TextSpan Intersection(Fuse.Controls.FallbackTextEdit.TextSpan a, Fuse.Controls.FallbackTextEdit.TextSpan b) [static] :864 TextSpan* TextSpan::Intersection(TextSpan* a, TextSpan* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextSpan", "Intersection(Fuse.Controls.FallbackTextEdit.TextSpan,Fuse.Controls.FallbackTextEdit.TextSpan)"); return TextSpan::Intersects(a, b) ? (TextSpan*)TextSpan::New1(::g::Fuse::Controls::FallbackTextEdit::TextPosition::Max(uPtr(a)->Start, uPtr(b)->Start), ::g::Fuse::Controls::FallbackTextEdit::TextPosition::Min(uPtr(a)->End, uPtr(b)->End)) : NULL; } // public static bool Intersects(Fuse.Controls.FallbackTextEdit.TextSpan a, Fuse.Controls.FallbackTextEdit.TextSpan b) [static] :859 bool TextSpan::Intersects(TextSpan* a, TextSpan* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextSpan", "Intersects(Fuse.Controls.FallbackTextEdit.TextSpan,Fuse.Controls.FallbackTextEdit.TextSpan)"); return !(::g::Fuse::Controls::FallbackTextEdit::TextPosition::op_LessThanOrEqual(uPtr(a)->End, uPtr(b)->Start) || ::g::Fuse::Controls::FallbackTextEdit::TextPosition::op_GreaterThanOrEqual(uPtr(a)->Start, uPtr(b)->End)); } // public TextSpan New(Fuse.Controls.FallbackTextEdit.TextPosition start, Fuse.Controls.FallbackTextEdit.TextPosition end) [static] :873 TextSpan* TextSpan::New1(::g::Fuse::Controls::FallbackTextEdit::TextPosition* start, ::g::Fuse::Controls::FallbackTextEdit::TextPosition* end) { TextSpan* obj1 = (TextSpan*)uNew(TextSpan_typeof()); obj1->ctor_(start, end); return obj1; } // public static operator ==(Fuse.Controls.FallbackTextEdit.TextSpan a, Fuse.Controls.FallbackTextEdit.TextSpan b) [static] :840 bool TextSpan::op_Equality(TextSpan* a, TextSpan* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextSpan", "==(Fuse.Controls.FallbackTextEdit.TextSpan,Fuse.Controls.FallbackTextEdit.TextSpan)"); bool aNull = ::g::Uno::Object::ReferenceEquals(a, NULL); bool bNull = ::g::Uno::Object::ReferenceEquals(b, NULL); if (aNull && bNull) return true; if ((aNull && !bNull) || (!aNull && bNull)) return false; return uPtr(a)->Equals(b); } // public static operator !=(Fuse.Controls.FallbackTextEdit.TextSpan a, Fuse.Controls.FallbackTextEdit.TextSpan b) [static] :854 bool TextSpan::op_Inequality(TextSpan* a, TextSpan* b) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextSpan", "!=(Fuse.Controls.FallbackTextEdit.TextSpan,Fuse.Controls.FallbackTextEdit.TextSpan)"); return !TextSpan::op_Equality(a, b); } // } // /usr/local/share/uno/Packages/Fuse.Controls.Primitives/1.2.1/textcontrols/fallbacktextedit/$.uno // ------------------------------------------------------------------------------------------------ // internal sealed class TextWindow :912 // { static void TextWindow_build(uType* type) { type->SetInterfaces( ::g::Uno::Collections::IList_typeof()->MakeType(::g::Fuse::Binding_typeof(), NULL), offsetof(::g::Fuse::Elements::Element_type, interface0), ::g::Fuse::Scripting::IScriptObject_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface1), ::g::Fuse::IProperties_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface2), ::g::Fuse::INotifyUnrooted_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface3), ::g::Uno::Collections::ICollection_typeof()->MakeType(::g::Fuse::Binding_typeof(), NULL), offsetof(::g::Fuse::Elements::Element_type, interface4), ::g::Uno::Collections::IEnumerable_typeof()->MakeType(::g::Fuse::Binding_typeof(), NULL), offsetof(::g::Fuse::Elements::Element_type, interface5), ::g::Uno::Collections::IList_typeof()->MakeType(::g::Fuse::Node_typeof(), NULL), offsetof(::g::Fuse::Elements::Element_type, interface6), ::g::Uno::UX::IPropertyListener_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface7), ::g::Fuse::ITemplateSource_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface8), ::g::Uno::Collections::ICollection_typeof()->MakeType(::g::Fuse::Node_typeof(), NULL), offsetof(::g::Fuse::Elements::Element_type, interface9), ::g::Uno::Collections::IEnumerable_typeof()->MakeType(::g::Fuse::Node_typeof(), NULL), offsetof(::g::Fuse::Elements::Element_type, interface10), ::g::Fuse::Triggers::Actions::IShow_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface11), ::g::Fuse::Triggers::Actions::IHide_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface12), ::g::Fuse::Triggers::Actions::ICollapse_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface13), ::g::Fuse::IActualPlacement_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface14), ::g::Fuse::Animations::IResize_typeof(), offsetof(::g::Fuse::Elements::Element_type, interface15)); type->SetFields(96, ::g::Fuse::Controls::FallbackTextEdit::LineCache_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextWindow, _lineCache), 0, ::g::Uno::Int_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextWindow, _maxTextLength), 0, ::g::Uno::Float2_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextWindow, _offset), 0, ::g::Fuse::Controls::FallbackTextEdit::TextSpan_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextWindow, _selection), 0, ::g::Uno::Float4_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextWindow, _selectionColor), 0, ::g::Fuse::Controls::TextAlignment_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextWindow, _textAlignment), 0, ::g::Uno::Float2_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextWindow, _textBoundsSize), 0, ::g::Uno::Float4_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextWindow, _textColor), 0, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo_typeof(), offsetof(::g::Fuse::Controls::FallbackTextEdit::TextWindow, _wrapInfo), 0); } ::g::Fuse::Elements::Element_type* TextWindow_typeof() { static uSStrong< ::g::Fuse::Elements::Element_type*> type; if (type != NULL) return type; uTypeOptions options; options.BaseDefinition = ::g::Fuse::Elements::Element_typeof(); options.FieldCount = 105; options.InterfaceCount = 16; options.ObjectSize = sizeof(TextWindow); options.TypeSize = sizeof(::g::Fuse::Elements::Element_type); type = (::g::Fuse::Elements::Element_type*)uClassType::New("Fuse.Controls.FallbackTextEdit.TextWindow", options); type->fp_build_ = TextWindow_build; type->fp_CalcRenderBounds = (void(*)(::g::Fuse::Elements::Element*, ::g::Fuse::VisualBounds**))TextWindow__CalcRenderBounds_fn; type->fp_OnDraw = (void(*)(::g::Fuse::Elements::Element*, ::g::Fuse::DrawContext*))TextWindow__OnDraw_fn; type->interface11.fp_Show = (void(*)(uObject*))::g::Fuse::Elements::Element__FuseTriggersActionsIShowShow_fn; type->interface13.fp_Collapse = (void(*)(uObject*))::g::Fuse::Elements::Element__FuseTriggersActionsICollapseCollapse_fn; type->interface12.fp_Hide = (void(*)(uObject*))::g::Fuse::Elements::Element__FuseTriggersActionsIHideHide_fn; type->interface15.fp_SetSize = (void(*)(uObject*, ::g::Uno::Float2*))::g::Fuse::Elements::Element__FuseAnimationsIResizeSetSize_fn; type->interface14.fp_get_ActualSize = (void(*)(uObject*, ::g::Uno::Float3*))::g::Fuse::Elements::Element__FuseIActualPlacementget_ActualSize_fn; type->interface14.fp_get_ActualPosition = (void(*)(uObject*, ::g::Uno::Float3*))::g::Fuse::Elements::Element__FuseIActualPlacementget_ActualPosition_fn; type->interface14.fp_add_Placed = (void(*)(uObject*, uDelegate*))::g::Fuse::Elements::Element__add_Placed_fn; type->interface14.fp_remove_Placed = (void(*)(uObject*, uDelegate*))::g::Fuse::Elements::Element__remove_Placed_fn; type->interface9.fp_Clear = (void(*)(uObject*))::g::Fuse::Visual__UnoCollectionsICollectionFuseNodeClear_fn; type->interface9.fp_Contains = (void(*)(uObject*, void*, bool*))::g::Fuse::Visual__UnoCollectionsICollectionFuseNodeContains_fn; type->interface6.fp_RemoveAt = (void(*)(uObject*, int*))::g::Fuse::Visual__UnoCollectionsIListFuseNodeRemoveAt_fn; type->interface10.fp_GetEnumerator = (void(*)(uObject*, uObject**))::g::Fuse::Visual__UnoCollectionsIEnumerableFuseNodeGetEnumerator_fn; type->interface9.fp_get_Count = (void(*)(uObject*, int*))::g::Fuse::Visual__UnoCollectionsICollectionFuseNodeget_Count_fn; type->interface6.fp_get_Item = (void(*)(uObject*, int*, uTRef))::g::Fuse::Visual__UnoCollectionsIListFuseNodeget_Item_fn; type->interface6.fp_Insert = (void(*)(uObject*, int*, void*))::g::Fuse::Visual__Insert1_fn; type->interface7.fp_OnPropertyChanged = (void(*)(uObject*, ::g::Uno::UX::PropertyObject*, ::g::Uno::UX::Selector*))::g::Fuse::Visual__OnPropertyChanged2_fn; type->interface8.fp_FindTemplate = (void(*)(uObject*, uString*, ::g::Uno::UX::Template**))::g::Fuse::Visual__FindTemplate_fn; type->interface9.fp_Add = (void(*)(uObject*, void*))::g::Fuse::Visual__Add1_fn; type->interface9.fp_Remove = (void(*)(uObject*, void*, bool*))::g::Fuse::Visual__Remove1_fn; type->interface4.fp_Clear = (void(*)(uObject*))::g::Fuse::Node__UnoCollectionsICollectionFuseBindingClear_fn; type->interface4.fp_Contains = (void(*)(uObject*, void*, bool*))::g::Fuse::Node__UnoCollectionsICollectionFuseBindingContains_fn; type->interface0.fp_RemoveAt = (void(*)(uObject*, int*))::g::Fuse::Node__UnoCollectionsIListFuseBindingRemoveAt_fn; type->interface5.fp_GetEnumerator = (void(*)(uObject*, uObject**))::g::Fuse::Node__UnoCollectionsIEnumerableFuseBindingGetEnumerator_fn; type->interface1.fp_SetScriptObject = (void(*)(uObject*, uObject*, ::g::Fuse::Scripting::Context*))::g::Fuse::Node__FuseScriptingIScriptObjectSetScriptObject_fn; type->interface4.fp_get_Count = (void(*)(uObject*, int*))::g::Fuse::Node__UnoCollectionsICollectionFuseBindingget_Count_fn; type->interface0.fp_get_Item = (void(*)(uObject*, int*, uTRef))::g::Fuse::Node__UnoCollectionsIListFuseBindingget_Item_fn; type->interface1.fp_get_ScriptObject = (void(*)(uObject*, uObject**))::g::Fuse::Node__FuseScriptingIScriptObjectget_ScriptObject_fn; type->interface1.fp_get_ScriptContext = (void(*)(uObject*, ::g::Fuse::Scripting::Context**))::g::Fuse::Node__FuseScriptingIScriptObjectget_ScriptContext_fn; type->interface3.fp_add_Unrooted = (void(*)(uObject*, uDelegate*))::g::Fuse::Node__FuseINotifyUnrootedadd_Unrooted_fn; type->interface3.fp_remove_Unrooted = (void(*)(uObject*, uDelegate*))::g::Fuse::Node__FuseINotifyUnrootedremove_Unrooted_fn; type->interface0.fp_Insert = (void(*)(uObject*, int*, void*))::g::Fuse::Node__Insert_fn; type->interface2.fp_get_Properties = (void(*)(uObject*, ::g::Fuse::Properties**))::g::Fuse::Node__get_Properties_fn; type->interface4.fp_Add = (void(*)(uObject*, void*))::g::Fuse::Node__Add_fn; type->interface4.fp_Remove = (void(*)(uObject*, void*, bool*))::g::Fuse::Node__Remove_fn; return type; } // public TextWindow(Fuse.Visual parent, Fuse.Controls.FallbackTextEdit.LineCache lineCache) :916 void TextWindow__ctor_4_fn(TextWindow* __this, ::g::Fuse::Visual* parent, ::g::Fuse::Controls::FallbackTextEdit::LineCache* lineCache) { __this->ctor_4(parent, lineCache); } // protected override sealed Fuse.VisualBounds CalcRenderBounds() :932 void TextWindow__CalcRenderBounds_fn(TextWindow* __this, ::g::Fuse::VisualBounds** __retval) { return *__retval = ::g::Fuse::VisualBounds::Rect(::g::Uno::Float2__New1(0.0f), __this->_textBoundsSize), void(); } // public void Draw(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.FallbackTextEdit.TextSpan selection, float4 textColor, float4 selectionColor, int maxTextLength, Fuse.Controls.TextAlignment textAlignment, float2 textBoundsSize, float2 offset, Fuse.DrawContext dc) :937 void TextWindow__Draw1_fn(TextWindow* __this, ::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, ::g::Fuse::Controls::FallbackTextEdit::TextSpan* selection, ::g::Uno::Float4* textColor, ::g::Uno::Float4* selectionColor, int* maxTextLength, int* textAlignment, ::g::Uno::Float2* textBoundsSize, ::g::Uno::Float2* offset, ::g::Fuse::DrawContext* dc) { __this->Draw1(wrapInfo, selection, *textColor, *selectionColor, *maxTextLength, *textAlignment, *textBoundsSize, *offset, dc); } // public TextWindow New(Fuse.Visual parent, Fuse.Controls.FallbackTextEdit.LineCache lineCache) :916 void TextWindow__New2_fn(::g::Fuse::Visual* parent, ::g::Fuse::Controls::FallbackTextEdit::LineCache* lineCache, TextWindow** __retval) { *__retval = TextWindow::New2(parent, lineCache); } // protected override sealed void OnDraw(Fuse.DrawContext dc) :954 void TextWindow__OnDraw_fn(TextWindow* __this, ::g::Fuse::DrawContext* dc) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextWindow", "OnDraw(Fuse.DrawContext)"); ::g::Fuse::Controls::FallbackTextEdit::LineCacheLine* ret2; uPtr(uPtr(__this->_wrapInfo)->TextRenderer)->BeginRendering(uPtr(__this->_wrapInfo)->FontSize, uPtr(__this->_wrapInfo)->AbsoluteZoom, __this->WorldTransform(), __this->ActualSize(), __this->_textColor, __this->_maxTextLength); float lineHeight = uPtr(__this->_wrapInfo)->LineHeight * uPtr(__this->_wrapInfo)->AbsoluteZoom; ::g::Uno::Float2 scaledOffset = ::g::Uno::Float2__op_Multiply1(__this->_offset, uPtr(__this->_wrapInfo)->AbsoluteZoom); float y = 0.0f; float selectionY = 0.0f; for (int i = 0; i < uPtr(uPtr(__this->_lineCache)->Lines())->Count(); i++) { uArray* lines = uPtr((::g::Uno::Collections::List__get_Item_fn(uPtr(uPtr(__this->_lineCache)->Lines()), uCRef<int>(i), &ret2), ret2))->GetWrappedLines(__this->_wrapInfo); for (int j = 0; j < uPtr(lines)->Length(); ++j) { ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine* wrappedLine = uPtr(lines)->Strong< ::g::Fuse::Controls::FallbackTextRenderer::WrappedLine*>(j); float drawY = scaledOffset.Y + y; if (drawY >= (__this->ActualSize().Y * uPtr(__this->_wrapInfo)->AbsoluteZoom)) break; else if (drawY >= -lineHeight) { float x = uPtr(wrappedLine)->GetXOffset(__this->_textAlignment, __this->_textBoundsSize.X, __this->AbsoluteZoom()); if (::g::Fuse::Controls::FallbackTextEdit::TextSpan::op_Inequality(__this->_selection, NULL)) { ::g::Fuse::Controls::FallbackTextEdit::TextPosition* start = ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(i, uPtr(wrappedLine)->LineTextStartOffset); ::g::Fuse::Controls::FallbackTextEdit::TextPosition* end = ::g::Fuse::Controls::FallbackTextEdit::TextPosition::New1(i, wrappedLine->LineTextEndOffset()); ::g::Fuse::Controls::FallbackTextEdit::TextSpan* span = ::g::Fuse::Controls::FallbackTextEdit::TextSpan::New1(start, end); ::g::Fuse::Controls::FallbackTextEdit::TextSpan* intersection = ::g::Fuse::Controls::FallbackTextEdit::TextSpan::Intersection(span, __this->_selection); if (::g::Fuse::Controls::FallbackTextEdit::TextSpan::op_Inequality(intersection, NULL)) { float startPos = uPtr(wrappedLine)->PosToBounds(__this->_wrapInfo, uPtr(uPtr(intersection)->Start)->Char - uPtr(wrappedLine)->LineTextStartOffset); float endPos = (uPtr(intersection->End)->Char < wrappedLine->LineTextEndOffset()) ? wrappedLine->PosToBounds(__this->_wrapInfo, uPtr(intersection->End)->Char - wrappedLine->LineTextStartOffset) : wrappedLine->LineWidth; uPtr(::g::Fuse::Elements::Internal::ElementDraw::Impl())->Rectangle(dc, __this, ::g::Uno::Math::Floor2(::g::Uno::Float2__New2((__this->_offset.X + x) + startPos, __this->_offset.Y + selectionY)), ::g::Uno::Float2__New2(endPos - startPos, uPtr(__this->_wrapInfo)->LineHeight), __this->_selectionColor); } } uPtr(uPtr(__this->_wrapInfo)->TextRenderer)->DrawLine(dc, scaledOffset.X + (x * uPtr(__this->_wrapInfo)->AbsoluteZoom), drawY, wrappedLine->Text); } y = y + lineHeight; selectionY = selectionY + (lineHeight / uPtr(__this->_wrapInfo)->AbsoluteZoom); } } uPtr(uPtr(__this->_wrapInfo)->TextRenderer)->EndRendering(dc); } // public TextWindow(Fuse.Visual parent, Fuse.Controls.FallbackTextEdit.LineCache lineCache) [instance] :916 void TextWindow::ctor_4(::g::Fuse::Visual* parent, ::g::Fuse::Controls::FallbackTextEdit::LineCache* lineCache) { ctor_3(); _lineCache = lineCache; ClipToBounds(true); } // public void Draw(Fuse.Controls.FallbackTextRenderer.WordWrapInfo wrapInfo, Fuse.Controls.FallbackTextEdit.TextSpan selection, float4 textColor, float4 selectionColor, int maxTextLength, Fuse.Controls.TextAlignment textAlignment, float2 textBoundsSize, float2 offset, Fuse.DrawContext dc) [instance] :937 void TextWindow::Draw1(::g::Fuse::Controls::FallbackTextRenderer::WordWrapInfo* wrapInfo, ::g::Fuse::Controls::FallbackTextEdit::TextSpan* selection, ::g::Uno::Float4 textColor, ::g::Uno::Float4 selectionColor, int maxTextLength, int textAlignment, ::g::Uno::Float2 textBoundsSize, ::g::Uno::Float2 offset, ::g::Fuse::DrawContext* dc) { uStackFrame __("Fuse.Controls.FallbackTextEdit.TextWindow", "Draw(Fuse.Controls.FallbackTextRenderer.WordWrapInfo,Fuse.Controls.FallbackTextEdit.TextSpan,float4,float4,int,Fuse.Controls.TextAlignment,float2,float2,Fuse.DrawContext)"); if (::g::Uno::Float2__op_Inequality(_textBoundsSize, textBoundsSize)) InvalidateRenderBounds(); _wrapInfo = wrapInfo; _selection = selection; _textColor = textColor; _selectionColor = selectionColor; _maxTextLength = maxTextLength; _textAlignment = textAlignment; _textBoundsSize = textBoundsSize; _offset = offset; OnDraw(dc); } // public TextWindow New(Fuse.Visual parent, Fuse.Controls.FallbackTextEdit.LineCache lineCache) [static] :916 TextWindow* TextWindow::New2(::g::Fuse::Visual* parent, ::g::Fuse::Controls::FallbackTextEdit::LineCache* lineCache) { TextWindow* obj1 = (TextWindow*)uNew(TextWindow_typeof()); obj1->ctor_4(parent, lineCache); return obj1; } // } }}}} // ::g::Fuse::Controls::FallbackTextEdit
ed4e14979978c0bf396ff346d5bec68845ab5177
dd6ffac87c25069939dddccd0e5d0d41c23f832f
/Project1/Source/Resources/Model.h
7aa6196c28a9f3beb6d5924655bfc81b21f9af91
[]
no_license
vidhisoni/3D-Game-Project
901e8fb3ecbeeffe0188b72f865e38ad55f8c6fe
f53c8c9eb95662455a4e1ce9105d2393664af1a6
refs/heads/master
2022-10-26T06:16:51.875969
2020-06-16T04:39:53
2020-06-16T04:39:53
272,602,412
0
0
null
null
null
null
UTF-8
C++
false
false
1,362
h
#pragma once #include "Resource.h" class Mesh; class Material; class Skeleton; /*! * Model Resource that defines a collection * of Meshes and their skeletal structure * */ class Model : public Resource { public: /*! * Model Overloaded Contructor * * \param a_name The name of the Model Resource */ GEAR_API Model(std::string a_name); /*! * Model Default Destructor * */ GEAR_API virtual ~Model(); /*! * Load the Model with ASSIMP * */ GEAR_API void Load(); private: GEAR_API Mesh* SerializeMesh(aiMesh* a_meshData); GEAR_API float GetMaxLength(); GEAR_API void UpdateMinMax(Mesh* a_pMesh, glm::vec3 a_vertex); public: const aiScene* mpScene; /*!< ASSIMP scene used to load the Model */ Skeleton* mpSkeleton; /*!< Skeleton structure of the Model */ std::vector<Mesh*> mMeshes; /*!< Vector of the Meshes that make up the Model */ glm::mat4 mGlobalInverse; /*!< The inverse transformation from root of the ASSIMP scene */ glm::vec2 mMinMaxX; /*!< Minimum and maximum x value seen amoung each of the Model's Meshes */ glm::vec2 mMinMaxY; /*!< Minimum and maximum y value seen amoung each of the Model's Meshes */ glm::vec2 mMinMaxZ; /*!< Minimum and maximum z value seen amoung each of the Model's Meshes */ float mMaxLength; /*!< Maximum difference in vertex position range in each of the x, y, and z directions */ };
daaeb6ec97a4849274f1beb83710b81dcc7f4e8e
a3d4aa8e1caf8b0db174be07f4d102605b05dff1
/include/node/node_contextify.h
e6b7e0a9e080f272ae98b241b4f06d657b6bd8ca
[ "MIT" ]
permissive
mafia2online/m2o-node-plugin
2bff514e53ef416bcf46dfa056d485bcb441b621
d741a168397ebe7cd57e12c0bb1e1b502e500b4e
refs/heads/master
2020-03-15T16:45:59.791928
2018-10-08T15:17:22
2018-10-08T15:17:22
132,242,374
1
0
null
null
null
null
UTF-8
C++
false
false
3,867
h
#ifndef SRC_NODE_CONTEXTIFY_H_ #define SRC_NODE_CONTEXTIFY_H_ #include "node_internals.h" #include "node_watchdog.h" #include "base_object-inl.h" namespace node { namespace contextify { class ContextifyContext { protected: // V8 reserves the first field in context objects for the debugger. We use the // second field to hold a reference to the sandbox object. enum { kSandboxObjectIndex = 1 }; Environment* const env_; Persistent<v8::Context> context_; public: ContextifyContext(Environment* env, v8::Local<v8::Object> sandbox_obj, v8::Local<v8::Object> options_obj); v8::Local<v8::Value> CreateDataWrapper(Environment* env); v8::Local<v8::Context> CreateV8Context(Environment* env, v8::Local<v8::Object> sandbox_obj, v8::Local<v8::Object> options_obj); static void Init(Environment* env, v8::Local<v8::Object> target); static ContextifyContext* ContextFromContextifiedSandbox( Environment* env, const v8::Local<v8::Object>& sandbox); inline Environment* env() const { return env_; } inline v8::Local<v8::Context> context() const { return PersistentToLocal(env()->isolate(), context_); } inline v8::Local<v8::Object> global_proxy() const { return context()->Global(); } inline v8::Local<v8::Object> sandbox() const { return v8::Local<v8::Object>::Cast( context()->GetEmbedderData(kSandboxObjectIndex)); } private: static void RunInDebugContext( const v8::FunctionCallbackInfo<v8::Value>& args); static void MakeContext(const v8::FunctionCallbackInfo<v8::Value>& args); static void IsContext(const v8::FunctionCallbackInfo<v8::Value>& args); static void WeakCallback( const v8::WeakCallbackInfo<ContextifyContext>& data); static void PropertyGetterCallback( v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& args); static void PropertySetterCallback( v8::Local<v8::Name> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& args); static void PropertyDescriptorCallback( v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& args); static void PropertyDefinerCallback( v8::Local<v8::Name> property, const v8::PropertyDescriptor& desc, const v8::PropertyCallbackInfo<v8::Value>& args); static void PropertyDeleterCallback( v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Boolean>& args); static void PropertyEnumeratorCallback( const v8::PropertyCallbackInfo<v8::Array>& args); static void IndexedPropertyGetterCallback( uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& args); static void IndexedPropertySetterCallback( uint32_t index, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& args); static void IndexedPropertyDescriptorCallback( uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& args); static void IndexedPropertyDefinerCallback( uint32_t index, const v8::PropertyDescriptor& desc, const v8::PropertyCallbackInfo<v8::Value>& args); static void IndexedPropertyDeleterCallback( uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& args); }; v8::Maybe<bool> GetBreakOnSigintArg( Environment* env, v8::Local<v8::Value> options); v8::Maybe<int64_t> GetTimeoutArg( Environment* env, v8::Local<v8::Value> options); v8::MaybeLocal<v8::Integer> GetLineOffsetArg( Environment* env, v8::Local<v8::Value> options); v8::MaybeLocal<v8::Integer> GetColumnOffsetArg( Environment* env, v8::Local<v8::Value> options); v8::MaybeLocal<v8::Context> GetContextArg( Environment* env, v8::Local<v8::Value> options); } // namespace contextify } // namespace node #endif // SRC_NODE_CONTEXTIFY_H_
1eef9c714563922b64346cd596eabc388e6ee570
7926bafb7e46fca5ad0ff1a5ed4235746b51f086
/tests/core_tests/transaction_tests.cpp
f2a93b7e3817a917bf1822ee8bf47f2c0642cdff
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
btmdteam/bitcoinmedal
40253796139ed029832d2720d28a200e136407da
7688ce1b30cf0a728bd590841b02c772b606e43f
refs/heads/master
2020-04-10T10:22:36.919475
2018-12-08T17:53:55
2018-12-08T17:53:55
160,963,325
0
0
null
null
null
null
UTF-8
C++
false
false
7,117
cpp
// Copyrights(c) 2017-2018, The BitcoinMedal Project // Copyrights(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. // // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "include_base_utils.h" #include "cryptonote_basic/cryptonote_basic_impl.h" #include "cryptonote_basic/account.h" #include "cryptonote_core/cryptonote_tx_utils.h" #include "misc_language.h" using namespace cryptonote; bool test_transaction_generation_and_ring_signature() { account_base miner_acc1; miner_acc1.generate(); account_base miner_acc2; miner_acc2.generate(); account_base miner_acc3; miner_acc3.generate(); account_base miner_acc4; miner_acc4.generate(); account_base miner_acc5; miner_acc5.generate(); account_base miner_acc6; miner_acc6.generate(); std::string add_str = miner_acc3.get_public_address_str(false); account_base rv_acc; rv_acc.generate(); account_base rv_acc2; rv_acc2.generate(); transaction tx_mine_1; construct_miner_tx(0, 0, 0, 10, 0, miner_acc1.get_keys().m_account_address, tx_mine_1); transaction tx_mine_2; construct_miner_tx(0, 0, 0, 0, 0, miner_acc2.get_keys().m_account_address, tx_mine_2); transaction tx_mine_3; construct_miner_tx(0, 0, 0, 0, 0, miner_acc3.get_keys().m_account_address, tx_mine_3); transaction tx_mine_4; construct_miner_tx(0, 0, 0, 0, 0, miner_acc4.get_keys().m_account_address, tx_mine_4); transaction tx_mine_5; construct_miner_tx(0, 0, 0, 0, 0, miner_acc5.get_keys().m_account_address, tx_mine_5); transaction tx_mine_6; construct_miner_tx(0, 0, 0, 0, 0, miner_acc6.get_keys().m_account_address, tx_mine_6); //fill inputs entry typedef tx_source_entry::output_entry tx_output_entry; std::vector<tx_source_entry> sources; sources.resize(sources.size()+1); tx_source_entry& src = sources.back(); src.amount = 70368744177663; { tx_output_entry oe; src.push_output(0, boost::get<txout_to_key>(tx_mine_1.vout[0].target).key, src.amount); src.push_output(1, boost::get<txout_to_key>(tx_mine_2.vout[0].target).key, src.amount); src.push_output(2, boost::get<txout_to_key>(tx_mine_3.vout[0].target).key, src.amount); src.push_output(3, boost::get<txout_to_key>(tx_mine_4.vout[0].target).key, src.amount); src.push_output(4, boost::get<txout_to_key>(tx_mine_5.vout[0].target).key, src.amount); src.push_output(5, boost::get<txout_to_key>(tx_mine_6.vout[0].target).key, src.amount); src.real_out_tx_key = cryptonote::get_tx_pub_key_from_extra(tx_mine_2); src.real_output = 1; src.rct = false; src.real_output_in_tx_index = 0; } //fill outputs entry tx_destination_entry td; td.addr = rv_acc.get_keys().m_account_address; td.amount = 69368744177663; std::vector<tx_destination_entry> destinations; destinations.push_back(td); transaction tx_rc1; bool r = construct_tx(miner_acc2.get_keys(), sources, destinations, std::vector<uint8_t>(), tx_rc1, 0); CHECK_AND_ASSERT_MES(r, false, "failed to construct transaction"); crypto::hash pref_hash = get_transaction_prefix_hash(tx_rc1); std::vector<const crypto::public_key *> output_keys; output_keys.push_back(&boost::get<txout_to_key>(tx_mine_1.vout[0].target).key); output_keys.push_back(&boost::get<txout_to_key>(tx_mine_2.vout[0].target).key); output_keys.push_back(&boost::get<txout_to_key>(tx_mine_3.vout[0].target).key); output_keys.push_back(&boost::get<txout_to_key>(tx_mine_4.vout[0].target).key); output_keys.push_back(&boost::get<txout_to_key>(tx_mine_5.vout[0].target).key); output_keys.push_back(&boost::get<txout_to_key>(tx_mine_6.vout[0].target).key); r = crypto::check_ring_signature(pref_hash, boost::get<txin_to_key>(tx_rc1.vin[0]).k_image, output_keys, &tx_rc1.signatures[0][0]); CHECK_AND_ASSERT_MES(r, false, "failed to check ring signature"); std::vector<size_t> outs; uint64_t money = 0; r = lookup_acc_outs(rv_acc.get_keys(), tx_rc1, get_tx_pub_key_from_extra(tx_rc1), outs, money); CHECK_AND_ASSERT_MES(r, false, "failed to lookup_acc_outs"); CHECK_AND_ASSERT_MES(td.amount == money, false, "wrong money amount in new transaction"); money = 0; r = lookup_acc_outs(rv_acc2.get_keys(), tx_rc1, get_tx_pub_key_from_extra(tx_rc1), outs, money); CHECK_AND_ASSERT_MES(r, false, "failed to lookup_acc_outs"); CHECK_AND_ASSERT_MES(0 == money, false, "wrong money amount in new transaction"); return true; } bool test_block_creation() { uint64_t vszs[] = {80,476,476,475,475,474,475,474,474,475,472,476,476,475,475,474,475,474,474,475,472,476,476,475,475,474,475,474,474,475,9391,476,476,475,475,474,475,8819,8301,475,472,4302,5316,14347,16620,19583,19403,19728,19442,19852,19015,19000,19016,19795,19749,18087,19787,19704,19750,19267,19006,19050,19445,19407,19522,19546,19788,19369,19486,19329,19370,18853,19600,19110,19320,19746,19474,19474,19743,19494,19755,19715,19769,19620,19368,19839,19532,23424,28287,30707}; std::vector<uint64_t> szs(&vszs[0], &vszs[90]); account_public_address adr; bool r = get_account_address_from_str(adr, false, "0099be99c70ef10fd534c43c88e9d13d1c8853213df7e362afbec0e4ee6fec4948d0c190b58f4b356cd7feaf8d9d0a76e7c7e5a9a0a497a6b1faf7a765882dd08ac2"); CHECK_AND_ASSERT_MES(r, false, "failed to import"); block b; r = construct_miner_tx(90, epee::misc_utils::median(szs), 3553616528562147, 33094, 10000000, adr, b.miner_tx, blobdata(), 11); return r; } bool test_transactions() { if(!test_transaction_generation_and_ring_signature()) return false; if(!test_block_creation()) return false; return true; }
49529e2a0920afae4084b60b129ca77d5656b2d5
7895017bba3049a80dd5dafc154dc68ba9f2af05
/Launcher_Module.h
e6130cb4953626f74097768a26c774df94ecea06
[ "MIT" ]
permissive
tesolberg/BusyBoard
2e304ccd16c39f62acd822b4d647c3a5e97c4091
81ab0266343579058bc8a0f89394aa675b62baef
refs/heads/master
2020-03-18T22:26:44.516332
2018-05-29T20:30:17
2018-05-29T20:30:17
135,345,830
0
0
null
null
null
null
UTF-8
C++
false
false
432
h
#ifndef Launcher_Module_h #define Launcher_Module_h #include "Arduino.h" class Launcher_Module { public: Launcher_Module(int launcherVccPin, int launcherInputPin, int buzzerPin); void updateLauncherModule(); private: void runLaunch(); int _launcherVccPin; int _launcherInputPin; int _buzzerPin; boolean launching; boolean launchFinished; int startBuzzerHz; int maxBuzzerHz; int currentBuzzerHz; }; #endif
ca1c6b29f9f2be3be6a7237cb416e3cfe1037640
35a9dcf009857ca7c720e31dbef6cd22479854ef
/src/Simulator/Boids.cxx
47b6cc05b23ad0c0cb0ff420accb312e3db9ac0f
[]
no_license
x3ent3nte/SimulationProject
22e9646512f374c74a3fdde68cc2fa5b183bb327
292e4e663a66d35147442dcda0841a56a736ed4a
refs/heads/master
2023-05-14T06:28:15.124400
2021-06-06T19:42:43
2021-06-06T19:42:43
275,607,695
0
0
null
null
null
null
UTF-8
C++
false
false
14,585
cxx
#include <Simulator/Boids.h> #include <Simulator/Agent.h> #include <Utils/Buffer.h> #include <Utils/Compute.h> #include <Utils/Timer.h> #include <Utils/Command.h> #include <array> #include <stdexcept> #include <iostream> namespace BoidsUtil { size_t xDim = 512; size_t kNumberOfBindings = 6; VkDescriptorSetLayout createDescriptorSetLayout(VkDevice logicalDevice) { return Compute::createDescriptorSetLayout(logicalDevice, kNumberOfBindings); } VkDescriptorPool createDescriptorPool(VkDevice logicalDevice, size_t maxSets) { return Compute::createDescriptorPool(logicalDevice, kNumberOfBindings, maxSets); } VkDescriptorSet createDescriptorSet( VkDevice logicalDevice, VkDescriptorSetLayout descriptorSetLayout, VkDescriptorPool descriptorPool, VkBuffer agentsInBuffer, VkBuffer agentsOutBuffer, VkBuffer reproductionBuffer, VkBuffer timeDeltaBuffer, VkBuffer numberOfElementsBuffer, VkBuffer playerInputStatesBuffer, uint32_t numberOfElements, uint32_t maxNumberOfPlayers) { std::vector<Compute::BufferAndSize> bufferAndSizes = { {agentsInBuffer, numberOfElements * sizeof(Agent)}, {agentsOutBuffer, numberOfElements * sizeof(Agent)}, {reproductionBuffer, numberOfElements * sizeof(uint32_t)}, {timeDeltaBuffer, sizeof(float)}, {numberOfElementsBuffer, sizeof(uint32_t)}, {playerInputStatesBuffer, maxNumberOfPlayers * sizeof(uint32_t)} }; return Compute::createDescriptorSet( logicalDevice, descriptorSetLayout, descriptorPool, bufferAndSizes); } VkPipeline createPipeline(VkDevice logicalDevice, VkPipelineLayout pipelineLayout) { return Compute::createPipeline("src/GLSL/spv/Boids.spv", logicalDevice, pipelineLayout); } VkCommandBuffer createCommandBuffer( VkDevice logicalDevice, VkCommandPool commandPool, VkPipeline pipeline, VkPipelineLayout pipelineLayout, VkDescriptorSet descriptorSet, VkBuffer agentsBuffer, VkBuffer otherAgentsBuffer, VkBuffer timeDeltaBuffer, VkBuffer timeDeltaHostVisibleBuffer, std::shared_ptr<Scanner<int32_t>> scanner, std::shared_ptr<Reproducer> reproducer, uint32_t numberOfElements) { VkCommandBuffer commandBuffer; VkCommandBufferAllocateInfo commandBufferAllocateInfo = {}; commandBufferAllocateInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; commandBufferAllocateInfo.commandPool = commandPool; commandBufferAllocateInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; commandBufferAllocateInfo.commandBufferCount = 1; VkMemoryBarrier memoryBarrier = {}; memoryBarrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER; memoryBarrier.pNext = nullptr; memoryBarrier.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_SHADER_READ_BIT; memoryBarrier.dstAccessMask = VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_SHADER_READ_BIT; if (vkAllocateCommandBuffers(logicalDevice, &commandBufferAllocateInfo, &commandBuffer) != VK_SUCCESS) { throw std::runtime_error("Failed to create compute command buffer"); } VkCommandBufferBeginInfo beginInfo = {}; beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; beginInfo.flags = VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT; if (vkBeginCommandBuffer(commandBuffer, &beginInfo) != VK_SUCCESS) { throw std::runtime_error("Failed to begin compute command buffer"); } VkBufferCopy copyRegion{}; copyRegion.srcOffset = 0; copyRegion.dstOffset = 0; copyRegion.size = sizeof(float); vkCmdCopyBuffer(commandBuffer, timeDeltaHostVisibleBuffer, timeDeltaBuffer, 1, &copyRegion); vkCmdPipelineBarrier( commandBuffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 1, &memoryBarrier, 0, nullptr, 0, nullptr); vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline); uint32_t xGroups = ceil(((float) numberOfElements) / ((float) xDim)); vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, pipelineLayout, 0, 1, &descriptorSet, 0, nullptr); vkCmdDispatch(commandBuffer, xGroups, 1, 1); vkCmdPipelineBarrier( commandBuffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 1, &memoryBarrier, 0, nullptr, 0, nullptr); scanner->recordCommand(commandBuffer, numberOfElements); vkCmdPipelineBarrier( commandBuffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 1, &memoryBarrier, 0, nullptr, 0, nullptr); reproducer->recordCommand(commandBuffer, numberOfElements); if (vkEndCommandBuffer(commandBuffer) != VK_SUCCESS) { throw std::runtime_error("Failed to end compute command buffer"); } return commandBuffer; } } // end namespace BoidsUtil Boids::Boids( VkPhysicalDevice physicalDevice, VkDevice logicalDevice, VkQueue queue, VkCommandPool commandPool, VkBuffer agentsBuffer, uint32_t numberOfElements, uint32_t maxNumberOfPlayers) : m_logicalDevice(logicalDevice) , m_queue(queue) , m_commandPool(commandPool) , m_agentsBuffer(agentsBuffer) , m_currentNumberOfElements(numberOfElements) , m_maxNumberOfPlayers(maxNumberOfPlayers) { Buffer::createBuffer( physicalDevice, m_logicalDevice, numberOfElements * sizeof(Agent), VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, m_otherAgentsBuffer, m_otherAgentsDeviceMemory); Buffer::createBuffer( physicalDevice, m_logicalDevice, sizeof(float), VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, m_timeDeltaBuffer, m_timeDeltaDeviceMemory); Buffer::createBuffer( physicalDevice, m_logicalDevice, sizeof(float), VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, m_timeDeltaBufferHostVisible, m_timeDeltaDeviceMemoryHostVisible); Buffer::createBufferWithData( &numberOfElements, sizeof(uint32_t), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, physicalDevice, m_logicalDevice, commandPool, queue, m_numberOfElementsBuffer, m_numberOfElementsDeviceMemory); Buffer::createBuffer( physicalDevice, m_logicalDevice, sizeof(uint32_t), VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, m_numberOfElementsBufferHostVisible, m_numberOfElementsDeviceMemoryHostVisible); Buffer::createBuffer( physicalDevice, m_logicalDevice, m_maxNumberOfPlayers * sizeof(uint32_t), VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, m_playerInputStatesBuffer, m_playerInputStatesDeviceMemory); Buffer::createBuffer( physicalDevice, m_logicalDevice, m_maxNumberOfPlayers * sizeof(uint32_t), VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, m_playerInputStatesHostVisibleBuffer, m_playerInputStatesHostVisibleDeviceMemory); m_scanner = std::make_shared<Scanner<int32_t>>( physicalDevice, m_logicalDevice, m_queue, m_commandPool, numberOfElements); m_reproducer = std::make_shared<Reproducer>( logicalDevice, m_otherAgentsBuffer, m_scanner->m_dataBuffer, agentsBuffer, numberOfElements); m_descriptorSetLayout = BoidsUtil::createDescriptorSetLayout(m_logicalDevice); m_descriptorPool = BoidsUtil::createDescriptorPool(m_logicalDevice, 1); m_pipelineLayout = Compute::createPipelineLayout(m_logicalDevice, m_descriptorSetLayout); m_pipeline = BoidsUtil::createPipeline(m_logicalDevice, m_pipelineLayout); m_descriptorSet = BoidsUtil::createDescriptorSet( m_logicalDevice, m_descriptorSetLayout, m_descriptorPool, m_agentsBuffer, m_otherAgentsBuffer, m_scanner->m_dataBuffer, m_timeDeltaBuffer, m_numberOfElementsBuffer, m_playerInputStatesBuffer, numberOfElements, m_maxNumberOfPlayers); createCommandBuffer(numberOfElements); m_setNumberOfElementsCommandBuffer = Buffer::recordCopyCommand( m_logicalDevice, m_commandPool, m_numberOfElementsBufferHostVisible, m_numberOfElementsBuffer, sizeof(uint32_t)); VkFenceCreateInfo fenceCreateInfo = {}; fenceCreateInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; fenceCreateInfo.flags = VK_FENCE_CREATE_SIGNALED_BIT; if (vkCreateFence(logicalDevice, &fenceCreateInfo, nullptr, &m_fence) != VK_SUCCESS) { throw std::runtime_error("Failed to create compute fence"); } } Boids::~Boids() { vkFreeMemory(m_logicalDevice, m_otherAgentsDeviceMemory, nullptr); vkDestroyBuffer(m_logicalDevice, m_otherAgentsBuffer, nullptr); vkFreeMemory(m_logicalDevice, m_timeDeltaDeviceMemory, nullptr); vkDestroyBuffer(m_logicalDevice, m_timeDeltaBuffer, nullptr); vkFreeMemory(m_logicalDevice, m_timeDeltaDeviceMemoryHostVisible, nullptr); vkDestroyBuffer(m_logicalDevice, m_timeDeltaBufferHostVisible, nullptr); vkFreeMemory(m_logicalDevice, m_numberOfElementsDeviceMemory, nullptr); vkDestroyBuffer(m_logicalDevice, m_numberOfElementsBuffer, nullptr); vkFreeMemory(m_logicalDevice, m_numberOfElementsDeviceMemoryHostVisible, nullptr); vkDestroyBuffer(m_logicalDevice, m_numberOfElementsBufferHostVisible, nullptr); vkFreeMemory(m_logicalDevice, m_playerInputStatesDeviceMemory, nullptr); vkDestroyBuffer(m_logicalDevice, m_playerInputStatesBuffer, nullptr); vkFreeMemory(m_logicalDevice, m_playerInputStatesHostVisibleDeviceMemory, nullptr); vkDestroyBuffer(m_logicalDevice, m_playerInputStatesHostVisibleBuffer, nullptr); vkDestroyDescriptorSetLayout(m_logicalDevice, m_descriptorSetLayout, nullptr); vkDestroyDescriptorPool(m_logicalDevice, m_descriptorPool, nullptr); vkDestroyPipelineLayout(m_logicalDevice, m_pipelineLayout, nullptr); vkDestroyPipeline(m_logicalDevice, m_pipeline, nullptr); std::array<VkCommandBuffer, 2> commandBuffers = { m_commandBuffer, m_setNumberOfElementsCommandBuffer}; vkFreeCommandBuffers(m_logicalDevice, m_commandPool, commandBuffers.size(), commandBuffers.data()); vkDestroyFence(m_logicalDevice, m_fence, nullptr); } void Boids::updateNumberOfElementsIfNecessary(uint32_t numberOfElements) { if (m_currentNumberOfElements == numberOfElements) { return; } vkFreeCommandBuffers(m_logicalDevice, m_commandPool, 1, &m_commandBuffer); createCommandBuffer(numberOfElements); m_currentNumberOfElements = numberOfElements; Buffer::writeHostVisible(&numberOfElements, m_numberOfElementsDeviceMemoryHostVisible, 0, sizeof(uint32_t), m_logicalDevice); Command::runAndWait(m_setNumberOfElementsCommandBuffer, m_fence, m_queue, m_logicalDevice); } void Boids::createCommandBuffer(uint32_t numberOfElements) { m_commandBuffer = BoidsUtil::createCommandBuffer( m_logicalDevice, m_commandPool, m_pipeline, m_pipelineLayout, m_descriptorSet, m_agentsBuffer, m_otherAgentsBuffer, m_timeDeltaBuffer, m_timeDeltaBufferHostVisible, m_scanner, m_reproducer, numberOfElements); } uint32_t Boids::extractNumberOfElements() { //Timer timer("Boids::extractNumberOfElements"); VkCommandBuffer copyCommand = Buffer::recordCopyCommand( m_logicalDevice, m_commandPool, m_scanner->m_dataBuffer, m_numberOfElementsBufferHostVisible, sizeof(uint32_t), (m_currentNumberOfElements - 1) * sizeof(uint32_t), 0); Command::runAndWait(copyCommand, m_fence, m_queue, m_logicalDevice); vkFreeCommandBuffers(m_logicalDevice, m_commandPool, 1, &copyCommand); uint32_t numberOfElements; Buffer::readHostVisible(m_numberOfElementsDeviceMemoryHostVisible, &numberOfElements, 0, sizeof(uint32_t), m_logicalDevice); return numberOfElements; } void Boids::copyPlayerInputStates(std::vector<uint32_t>& playerInputStates) { //Timer timer("Boids::copyPlayerInputStates"); const size_t memorySize = playerInputStates.size() * sizeof(uint32_t); Buffer::writeHostVisible(playerInputStates.data(), m_playerInputStatesHostVisibleDeviceMemory, 0, memorySize, m_logicalDevice); VkCommandBuffer copyCommand = Buffer::recordCopyCommand( m_logicalDevice, m_commandPool, m_playerInputStatesHostVisibleBuffer, m_playerInputStatesBuffer, memorySize); Command::runAndWait(copyCommand, m_fence, m_queue, m_logicalDevice); vkFreeCommandBuffers(m_logicalDevice, m_commandPool, 1, &copyCommand); } uint32_t Boids::run(float timeDelta, uint32_t numberOfElements, std::vector<uint32_t>& playerInputStates) { updateNumberOfElementsIfNecessary(numberOfElements); copyPlayerInputStates(playerInputStates); Buffer::writeHostVisible(&timeDelta, m_timeDeltaDeviceMemoryHostVisible, 0, sizeof(float), m_logicalDevice); Command::runAndWait(m_commandBuffer, m_fence, m_queue, m_logicalDevice); return extractNumberOfElements(); }
5eac579b779108ef5a08e800a7eb44e28cfc7ea9
fd9b12a40aca3d6a331eacb825c82fe2ddeb9874
/final/db/db.cpp
5faa284b1a5575b54b0b05b4d221106c926cb4a7
[]
no_license
xzeng17/CS466
e8c666ec2887256f099c1a3c5773c051d4a94206
ab7a018cfe629bddafe8a1f8fb2e1b16fe2438c9
refs/heads/main
2023-04-15T19:25:53.809807
2021-05-06T16:23:20
2021-05-06T16:23:20
341,237,490
0
0
null
null
null
null
UTF-8
C++
false
false
1,750
cpp
#include "db.h" #include <iostream> using namespace std; Database::Database(const string& filename) { Fileloader fl(filename); try { init(fl); } catch (runtime_error e) { cout<<e.what()<<endl; } cout<<"Parsed from "<<filename<<". Database has: "<<size()<<" entries!"<<endl; } void Database::init(Fileloader& fl) { cout<<"Fetching Subjects..."<<endl; string line; line = fl.readLine(); // iterator through each fasta entry as a block while (fl.hasNext() && line[0] == '>') { // cout<<"Processing sequence: "<<line<<endl; // process each fasta entry //cout<<"showing header: "<<line<<endl; SequenceMapping sm(line); titles_[line] = (int) db_.size(); line = fl.readLine(); while (line.size() > 0 && line[0] != '>') { sm.addSequence(line); if (!fl.hasNext()) break; line.clear(); while (line.size() == 0 && fl.hasNext()) line = fl.readLine(); } sm.build(); db_.push_back(sm); // cout<<"Finish processing sequence: "<<sm.title()<<endl; } } unsigned Database::size() const { return db_.size(); } bool Database::contains(const string& title) const { return titles_.find(title) != titles_.end(); } bool Database::contains(const string& title, const string& aa) { if (!contains(title)) return false; int idx = titles_[title]; SequenceMapping& sm = db_[idx]; return sm.contains(aa); } // for testing purpose, exposing data structure through public API const vector<SequenceMapping>& Database::getDB() const { return db_; } void Database::printMap(const string& title) { db_[titles_[title]].printMap(); }
b58b30dab2fbbbb871cbfe6bedab490a4fe397b0
5c3971098a8a6547a51b6d2f6b5458619806f99e
/sources/main.cpp
fb95959c00dc010ad1aaaf325573f35596ffb484
[]
no_license
Teaching-projects/SZE-MOSZE-2020-Random
a0c2d6d62a5c5566c0aef0f9e04f9d4df3d3f7e5
51b0c95e51b20fc301a396114452040481221cb4
refs/heads/master
2023-01-29T22:02:34.974476
2020-12-09T18:42:01
2020-12-09T18:42:01
294,094,872
0
0
null
2020-12-09T18:42:02
2020-09-09T11:39:14
C++
UTF-8
C++
false
false
2,267
cpp
#include <iostream> #include <map> #include <string> #include <filesystem> #include <algorithm> #include <iterator> #include <list> #include "JSON.h" #include "Map.h" #include "Game.h" #include "PreparedGame.h" #include "HeroTextRenderer.h" #include "ObserverTextRenderer.h" #include "HeroSVGRenderer.h" const std::map<int,std::string> error_messages = { { 1 , "Bad number of arguments. Only a single configuration file should be provided." }, { 2 , "The provided configuration file is not accessible." }, { 3 , "JSON parsing error." }, { 4 , "The provided map file is not accessible." }, { 5 , "The provided map file is invalid." }, { 6 , "Invalid access on map." }, { 7 , "Multiple hero placement is forbidden." }, { 8 , "Map change while units are initialized is forbidden." }, { 9 , "Tried to change the game after it has been started." }, { 10 , "Game not initialized properly." }, { 11 , "The given position is not accessible." } }; void bad_exit(int exitcode){ std::cerr << (error_messages.count(exitcode) ? error_messages.at(exitcode) : "Unknown error") << std::endl; exit(exitcode); } int main(int argc, char** argv){ if (argc != 2) bad_exit(1); if (!std::filesystem::exists(argv[1])) bad_exit(2); try { std::ofstream renderFile("../text_render.txt"); PreparedGame game(argv[1]); game.registerRenderer(new HeroTextRenderer()); game.registerRenderer(new HeroSVGRenderer("../svg_image.svg")); game.registerRenderer(new ObserverTextRenderer(renderFile)); game.run(); renderFile.close(); } catch (const JSON::ParseException& e) { std::cerr << e.what() << std::endl; bad_exit(3); } catch ( const Map::FileNotFoundException& e) { bad_exit(4); } catch ( const Map::InvalidFileException& e) { bad_exit(5); } catch ( const Map::WrongIndexException& e) { bad_exit(6); } catch ( const Game::AlreadyHasHeroException& e) { bad_exit(7); } catch ( const Game::AlreadyHasUnitsException& e) { bad_exit(8); } catch ( const Game::GameAlreadyStartedException& e) { bad_exit(9); } catch ( const Game::NotInitializedException& e) { bad_exit(10); } catch ( const Game::OccupiedException& e) { bad_exit(11); } return 0; }
4c9d7f6b57db358f09e8731a6d88922b406d680b
bd0b341c3839734e4c2ed9a61ea90deae83f7b8d
/Marlin/WebConfig.cpp
dc77b681131d28cf618d11dbb9e78be136976104
[]
no_license
robertbjarum/CXHibernate
976e823ae037a4715ac77786e2951ee157cb2216
4fa4c366ab6975fc2174144fb65cd9276941ab43
refs/heads/master
2023-06-03T08:25:02.008286
2021-06-26T15:04:56
2021-06-26T15:04:56
null
0
0
null
null
null
null
UTF-8
C++
false
false
13,250
cpp
///////////////////////////////////////////////////////////////////////////////// // // SourceFile: WebConfig.cpp // // Marlin Server: Internet server/client // // Copyright (c) 2015-2018 ir. W.E. Huisman // All rights reserved // // 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 "Stdafx.h" #include "WebConfig.h" #include "Crypto.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif WebConfig::WebConfig() { ReadConfig("web.config"); } WebConfig::WebConfig(CString p_filename) { if(p_filename.IsEmpty()) { ReadConfig("web.config"); } else { ReadConfig(p_filename); } } WebConfig::~WebConfig() { WriteConfig(); } static char g_staticAddress; /* static */ CString WebConfig::GetExeModule() { char buffer[_MAX_PATH + 1]; // Getting the module handle, if any // If it fails, the process names will be retrieved // Thus we get the *.DLL handle in IIS instead of a // %systemdrive\system32\inetsrv\w3wp.exe path HMODULE hmodule = NULL; GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT ,static_cast<LPCTSTR>(&g_staticAddress) ,&hmodule); // Retrieve the path GetModuleFileName(hmodule,buffer,_MAX_PATH); return CString(buffer); } /* static */ CString WebConfig::GetExePath() { CString assembly = GetExeModule(); int slashPosition = assembly.ReverseFind('\\'); if(slashPosition == 0) { return ""; } return assembly.Left(slashPosition + 1); } // Find the name of a URL site specific web.config file // Thus we can set overrides on a site basis // Will produce something like 'Site-<port>-url-without-slashes.config' /* static */ CString WebConfig::GetSiteConfig(CString p_prefixURL) { CString pathName = WebConfig::GetExePath(); CString name(p_prefixURL); int pos = name.Find("//"); if(pos) { name = "Site" + name.Mid(pos + 2); name.Replace(':','-'); // name.Replace('+','-'); // Strong can appear in the filename name.Replace('*','!'); // Weak appears as '!' in the filename name.Replace('.','_'); name.Replace('/','-'); name.Replace('\\','-'); name.Replace("--","-"); name.TrimRight('-'); name += ".config"; return pathName + name; } return ""; } /* static */ CString WebConfig::GetURLConfig(CString p_url) { CString pathName = WebConfig::GetExePath(); CString url(p_url); int pos = url.Find("//"); if(pos) { // Knock of the protocol url = "URL" + url.Mid(pos+2); // Knock of the query/anchor sequence pos = url.Find("?"); if(pos > 0) { url = url.Left(pos); } // Knock of the resource, we just want the URL pos = url.ReverseFind('/'); if(pos > 0) { url = url.Left(pos); } // For all you dumbs url.Replace("\\","/"); // Remove special chars url.Replace(':','-'); url.Replace(']','-'); url.Replace('[','-'); url.Replace('.','_'); url.Replace('/','-'); url.Replace('\\','-'); url.Replace("--","-"); url.TrimRight('-'); // Create config file name url+= ".config"; return pathName + url; } return ""; } bool WebConfig::ReadConfig(CString p_filename) { // File to open // Remember where we read it m_fileName = p_filename; // If it's not a UNC path and not a drive or a relative path // assume it's in our working directory if(p_filename.GetAt(0) != '\\' && p_filename.GetAt(1) != ':' && p_filename.GetAt(0) != '.' ) { m_fileName = GetExePath() + p_filename; } if(XMLMessage::LoadFile(m_fileName)) { CString rootName = m_root->GetName(); if(rootName.CompareNoCase("Configuration") == 0) { // A Configuration file return m_filled = true; } } Reset(); SetRootNodeName("Configuration"); return false; } bool WebConfig::WriteConfig() { if(!m_changed) { return true; } // Check for new file if(m_fileName.IsEmpty()) { m_fileName = GetExePath() + "web.config"; } return XMLMessage::SaveFile(m_fileName); } // In case we want to make in-memory changes that may never // be written back to disk void WebConfig::ForgetChanges() { m_changed = false; } // Find section with this name XMLElement* WebConfig::FindSection(CString p_section) { return FindElement(p_section); } // Find parameter within a section XMLElement* WebConfig::FindParameter(XMLElement* p_section,CString p_parameter) { return FindElement(p_section,p_parameter); } // Remove a parameter void WebConfig::RemoveParameter(XMLElement* p_section,CString p_parameter) { DeleteElement(p_section,p_parameter); } // Find an attribute within a parameter XMLAttribute* WebConfig::FindAttribute(XMLElement* p_parameter,CString p_attribute) { return XMLMessage::FindAttribute(p_parameter,p_attribute); } // SETTERS bool WebConfig::SetSection(CString p_section) { if(FindElement(p_section)) { // Section already exists return false; } if(AddElement(NULL,p_section,XDT_Complex,"")) { m_changed = true; } return true; } bool WebConfig::SetParameter(CString p_section,CString p_parameter,CString p_value) { XMLElement* section = FindElement(p_section); if(section) { XMLElement* elem = FindElement(section,p_parameter); if(elem) { if(elem->GetValue().Compare(p_value)) { elem->SetValue(p_value); m_changed = true; } return false; } if(AddElement(section,p_parameter,XDT_String,p_value)) { m_changed = true; return true; } } return false; } bool WebConfig::SetParameter(CString p_section,CString p_parameter,int p_value) { CString value; if(p_value) { value.Format("%d",p_value); } return SetParameter(p_section,p_parameter,value); } bool WebConfig::SetParameter(CString p_section,CString p_parameter,bool p_value) { CString value = p_value ? "true" : "false"; return SetParameter(p_section,p_parameter,value); } bool WebConfig::SetEncrypted(CString p_section,CString p_parameter,CString p_value) { Crypto crypt; CString encrypted; if(!p_value.IsEmpty()) { CString reverse(p_value); reverse.MakeReverse(); CString value = reverse + ":" + p_value; encrypted = crypt.Encryption(value,WEBCONFIG_WACHTWOORD); } return SetParameter(p_section,p_parameter,encrypted); } bool WebConfig::SetAttribute(CString p_section,CString p_parameter,CString p_attrib,CString p_value) { XMLElement* section = FindElement(p_section); if(section) { XMLElement* param = FindElement(section,p_parameter); if(param) { if(XMLMessage::SetAttribute(param,p_attrib,p_value)) { m_changed = true; return true; } } } return false; } bool WebConfig::SetAttribute(CString p_section,CString p_parameter,CString p_attrib,int p_value) { CString value; value.Format("%d",p_value); return SetAttribute(p_section,p_parameter,p_attrib,value); } bool WebConfig::SetAttribute(CString p_section,CString p_parameter,CString p_attrib,double p_value) { CString value; value.Format("%G",p_value); return SetAttribute(p_section,p_parameter,p_attrib,value); } // Remove an attribute void WebConfig::RemoveAttribute(XMLElement* p_parameter,CString p_attribute) { // to be implemented if(DeleteAttribute(p_parameter,p_attribute)) { m_changed = true; } } bool WebConfig::RemoveSection(CString p_section) { XMLElement* section = FindElement(p_section); if(section) { if(DeleteElement(m_root,section)) { return m_changed = true; } } // Not found return false; } bool WebConfig::RemoveParameter(CString p_section,CString p_parameter) { XMLElement* section = FindElement(p_section); if(section) { XMLElement* param = FindElement(section,p_parameter); if(param) { if(DeleteElement(section,param)) { return m_changed = true; } } } return false; } bool WebConfig::RemoveAttribute(CString p_section,CString p_parameter,CString p_attrib) { XMLElement* section = FindElement(p_section); if(section) { XMLElement* param = FindElement(section,p_parameter); if(param) { if(DeleteAttribute(param,p_attrib)) { return m_changed = true; } } } return false; } ////////////////////////////////////////////////////////////////////////// // // GETTERS // ////////////////////////////////////////////////////////////////////////// CString WebConfig::GetParameterString(CString p_section,CString p_parameter,CString p_default) { XMLElement* section = FindElement(p_section); if(section) { XMLElement* element = FindElement(section,p_parameter); if(element) { return element->GetValue(); } } return p_default; } int WebConfig::GetParameterInteger(CString p_section,CString p_parameter,int p_default) { CString param = GetParameterString(p_section,p_parameter,""); if(param.IsEmpty()) { return p_default; } return atoi(param); } bool WebConfig::GetParameterBoolean(CString p_section,CString p_parameter,bool p_default) { CString param = GetParameterString(p_section,p_parameter,""); if(param.IsEmpty()) { return p_default; } if(param.CompareNoCase("true") == 0) { return true; } if(param.CompareNoCase("false") == 0) { return false; } // Simply 0 or 1 return (atoi(param) > 0); } CString WebConfig::GetEncryptedString (CString p_section,CString p_parameter,CString p_default) { Crypto crypt; CString decrypted; try { CString encrypted = GetParameterString(p_section,p_parameter,""); if(!encrypted.IsEmpty()) { decrypted = crypt.Decryption(encrypted,WEBCONFIG_WACHTWOORD); int pos = decrypted.Find(':'); if(pos > 0) { CString reversed = decrypted.Left(pos); decrypted = decrypted.Mid(pos + 1); reversed.MakeReverse(); if(reversed != decrypted) { // pre-empt invalid results decrypted.Empty(); } } else { // pre-empt invalid results decrypted.Empty(); } return decrypted; } } catch(StdException& er) { UNREFERENCED_PARAMETER(er); } return p_default; } CString WebConfig::GetAttribute(CString p_section,CString p_parameter,CString p_attrib,CString p_default) { CString val = p_default; XMLElement* section = FindElement(p_section); if(section) { XMLElement* param = FindElement(section,p_parameter); if(param) { return XMLMessage::GetAttribute(param,p_attrib); } } return val; } int WebConfig::GetAttribute(CString p_section,CString p_parameter,CString p_attrib,int p_default) { int val = p_default; XMLElement* section = FindElement(p_section); if(section) { XMLElement* param = FindElement(section,p_parameter); if(param) { return atoi(XMLMessage::GetAttribute(param,p_attrib)); } } return val; } double WebConfig::GetAttribute(CString p_section,CString p_parameter,CString p_attrib,double p_default) { double val = p_default; XMLElement* section = FindElement(p_section); if(section) { XMLElement* param = FindElement(section,p_parameter); if(param) { return atof(XMLMessage::GetAttribute(param,p_attrib)); } } return val; } // DISCOVERY bool WebConfig::HasSection(CString p_section) { return FindSection(p_section) != nullptr; } bool WebConfig::HasParameter(CString p_section,CString p_parameter) { XMLElement* section = FindSection(p_section); if(section != nullptr) { return FindParameter(section,p_parameter) != nullptr; } return false; } bool WebConfig::HasAttribute(CString p_section,CString p_parameter,CString p_attribute) { XMLElement* section = FindElement(p_section); if(section) { XMLElement* param = FindElement(section,p_parameter); if(param) { if(FindAttribute(param,p_attribute)) { return true; } } } return false; } bool WebConfig::IsChanged() { return m_changed; } CString WebConfig::GetFilename() { return m_fileName; }
2dfb40353c472f31bbd3d3a6b283a161307e835a
5a95fff651cb0e3f56c8c721434578bfba1fcae4
/tools/zapccs/UserReplacer.h
e1ab6db3d60d21a2192f57b49cf1cbd9fe1c03f3
[ "NCSA", "LicenseRef-scancode-unknown-license-reference" ]
permissive
wangqiang1588/zapcc
1f864133b4037f7591f4b1a84ddf7be1bda427ae
c2b11ba7d65eb36a595f8da5044e39868d8d825b
refs/heads/master
2020-03-21T01:59:35.758257
2018-06-19T18:27:40
2018-06-19T18:27:40
null
0
0
null
null
null
null
UTF-8
C++
false
false
930
h
#ifndef ZAPCC_USERREPLACER_H #define ZAPCC_USERREPLACER_H #include "llvm/ADT/SetVector.h" #include "llvm/Support/Casting.h" namespace clang { class Decl; class Expr; class NestedNameSpecifier; class Type; class Stmt; class UserReplacer { public: UserReplacer(Decl *Dependee, Decl *Replacement) : Dependee(Dependee), Replacement(Replacement), Replaced(false) {} void replaceDecl(Decl *D); void replaceType(Type *T); void replaceNestedNameSpecifier(NestedNameSpecifier *NNS); bool wasReplaced() { return Replaced; } private: UserReplacer(UserReplacer &) = delete; UserReplacer &operator=(UserReplacer &) = delete; Decl *Dependee; Decl *Replacement; bool Replaced; void replaceStmt(Stmt *S); void replaceExpr(Expr *E); template <typename T> T *nonUser(T *D) { if (D != Dependee && D != Replacement) return D; Replaced = true; return llvm::cast<T>(Replacement); } }; } #endif
7800df704850289a412e351256be4f1402ef55d6
0a4cd1fd14e2c4f50fb05d7c5a613ba0a943001b
/proxy1541/uno_proxy1541/uno_proxy1541.ino
4aceb9cf913a5aa8b667f56a3abdba0a693f8dc3
[]
no_license
c64scene-ar/c64f3
2852cbd2cd867751daa6b4189856512d21658a23
2023e896d396350c7d9660706101ce09c1196224
refs/heads/master
2021-01-10T13:00:05.830575
2015-07-16T13:34:56
2015-07-16T13:34:56
36,076,626
2
0
null
null
null
null
UTF-8
C++
false
false
1,993
ino
//#include <Console.h> #include <stdarg.h> int iToC64; char format[100]; // digital pin 2 has a pushbutton attached to it. Give it a name: int atn_button = 2; // BLUE int data_button = 3; // BROWN int clk_button = 4; // BLACK int atn_state, data_state, clk_state; int debug = 0; int prev_state = 0xFFFF, cur_state; void waitForPeer(void) { //Console.begin(); Serial.begin(115200); while (! Serial); // Wait until Serial is ready - Leonardo } void setup() { // Now we're ready to wait for the PI to respond to our connection attempts. // initial connection handling. waitForPeer(); } void loop() { // // First stage: PC -> C64 // if (Serial.available() > 0) { pinMode(atn_button, OUTPUT); pinMode(clk_button, OUTPUT); pinMode(data_button, OUTPUT); iToC64 = Serial.read(); data_state = (iToC64 >> 2) & 1; digitalWrite(data_button, data_state); clk_state = (iToC64 >> 1) & 1; digitalWrite(clk_button, clk_state); atn_state = iToC64 & 1; digitalWrite(atn_button, atn_state); if (debug) { snprintf(format, sizeof(format), "<<< ATN : %d - CLK : %d - DATA : %d\r", atn_state, clk_state, data_state); Serial.print(format); } } // // Second stage: C64 -> PC // pinMode(atn_button, INPUT); pinMode(clk_button, INPUT); pinMode(data_button, INPUT); data_state = digitalRead(data_button); clk_state = digitalRead(clk_button); atn_state = digitalRead(atn_button); cur_state = (data_state << 2) | (clk_state << 1) | atn_state; if (debug) { if (prev_state != cur_state) { prev_state = cur_state; snprintf(format, sizeof(format), ">>> ATN : %d - CLK : %d - DATA : %d", atn_state, clk_state, data_state); Serial.println(format); //if ((atn_state | data_state | clk_state) == 1) { // Serial.println("Gotcha....."); // delay(1000); //} } } else { Serial.write(cur_state); } }
9e54f14ccd09bf4e018e535b610a9af2aeaa1d4f
8675b8c7c8eaac4912989462d7090c62db6c7299
/leetcode/main.cpp
b95f89afa60ff3af3e0651da9b2ab5e54d46c8d6
[]
no_license
zxnn81/ojcode
c524943047e6782c3a2f5bec425f38de72f70d16
f838e4f323e4a27aa27a64190e879bcbd0ed05ce
refs/heads/master
2016-08-06T20:18:53.557550
2015-07-06T18:39:47
2015-07-06T18:39:47
38,487,524
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
1,218
cpp
#include "main.h" int main() { /// int a=hammingWeight(001101111001); // printf("%d",a); /* int a[3]={3,2,4}; int ll1[2]={9,9}; int ll2[1]={1}; ListNode*l1=NULL,*l2=NULL; ListNode* end; for(int i=0;i<2;i++) { if(l1==NULL) { l1=new ListNode(ll1[i]); end=l1; }else { ListNode* tmp=end; end=new ListNode(ll1[i]); tmp->next=end; } } for(int i=0;i<1;i++) { if(l2==NULL) { l2=new ListNode(ll2[i]); end=l2; }else { ListNode* tmp=end; end=new ListNode(ll2[i]); tmp->next=end; } } */ /*ListNode *res=addTwoNumbers(l1, l2); while(res!=NULL) { cout<<res->val; res=res->next; }*/ /*vector<int> test(a,a+3); ifstream file; // file.open("a.txt"); string str="2-1-1"; // string str; // file>>str; //int res=calculate(str); vector<int> res=twoSum(test,6); cout<<res[0]<<endl<<res[1];*/ // for(int i=0;i<res.size();i++) // { // printf("%s ",res[i].c_str()); //} //int a=lengthOfLongestSubstring("hh;'gh/ofa'o;egg/.a*gehhybah"); //cout<<a; int a[1]={3}; int b[3]={1,3,4}; vector<int> va(a,a+1); vector<int> vb(b,b+3); double res=findMedianSortedArrays(va,vb); cout<<res; printf("\n°´ÈÎÒâ¼ü½áÊø"); getchar(); return 0; }
693522d2522a216ca5b95aca87d28ad3ab87723e
13ea9deda4f88378a78fac44cbf1ef1209dc8d74
/src/spork.cpp
262b8b6badc251427d83f0d09ea63070af45e32b
[ "MIT" ]
permissive
tminussi/arepacoin
bf3502db4e2f234ab9b2e7ab627aca0cd4ecc7cb
cc3d756d470d5f342f2625637d63b89a40bd1884
refs/heads/master
2020-03-30T12:55:34.939859
2018-10-02T12:10:34
2018-10-02T12:10:34
151,248,304
0
0
null
2018-10-02T12:09:03
2018-10-02T12:09:02
null
UTF-8
C++
false
false
11,074
cpp
// Copyright (c) 2014-2016 The Dash developers // Copyright (c) 2016-2017 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "spork.h" #include "base58.h" #include "key.h" #include "main.h" #include "masternode-budget.h" #include "net.h" #include "protocol.h" #include "sync.h" #include "sporkdb.h" #include "util.h" #include <boost/lexical_cast.hpp> using namespace std; using namespace boost; class CSporkMessage; class CSporkManager; CSporkManager sporkManager; std::map<uint256, CSporkMessage> mapSporks; std::map<int, CSporkMessage> mapSporksActive; // ArepaCoin: on startup load spork values from previous session if they exist in the sporkDB void LoadSporksFromDB() { for (int i = SPORK_START; i <= SPORK_END; ++i) { // Since not all spork IDs are in use, we have to exclude undefined IDs std::string strSpork = sporkManager.GetSporkNameByID(i); if (strSpork == "Unknown") continue; // attempt to read spork from sporkDB CSporkMessage spork; if (!pSporkDB->ReadSpork(i, spork)) { LogPrintf("%s : no previous value for %s found in database\n", __func__, strSpork); continue; } // add spork to memory mapSporks[spork.GetHash()] = spork; mapSporksActive[spork.nSporkID] = spork; std::time_t result = spork.nValue; // If SPORK Value is greater than 1,000,000 assume it's actually a Date and then convert to a more readable format if (spork.nValue > 1000000) { LogPrintf("%s : loaded spork %s with value %d : %s", __func__, sporkManager.GetSporkNameByID(spork.nSporkID), spork.nValue, std::ctime(&result)); } else { LogPrintf("%s : loaded spork %s with value %d\n", __func__, sporkManager.GetSporkNameByID(spork.nSporkID), spork.nValue); } } } void ProcessSpork(CNode* pfrom, std::string& strCommand, CDataStream& vRecv) { if (fLiteMode) return; //disable all obfuscation/masternode related functionality if (strCommand == "spork") { //LogPrintf("ProcessSpork::spork\n"); CDataStream vMsg(vRecv); CSporkMessage spork; vRecv >> spork; if (chainActive.Tip() == NULL) return; // Ignore spork messages about unknown/deleted sporks std::string strSpork = sporkManager.GetSporkNameByID(spork.nSporkID); if (strSpork == "Unknown") return; uint256 hash = spork.GetHash(); if (mapSporksActive.count(spork.nSporkID)) { if (mapSporksActive[spork.nSporkID].nTimeSigned >= spork.nTimeSigned) { if (fDebug) LogPrintf("spork - seen %s block %d \n", hash.ToString(), chainActive.Tip()->nHeight); return; } else { if (fDebug) LogPrintf("spork - got updated spork %s block %d \n", hash.ToString(), chainActive.Tip()->nHeight); } } LogPrintf("spork - new %s ID %d Time %d bestHeight %d\n", hash.ToString(), spork.nSporkID, spork.nValue, chainActive.Tip()->nHeight); if (!sporkManager.CheckSignature(spork)) { LogPrintf("spork - invalid signature\n"); Misbehaving(pfrom->GetId(), 100); return; } mapSporks[hash] = spork; mapSporksActive[spork.nSporkID] = spork; sporkManager.Relay(spork); // ArepaCoin: add to spork database. pSporkDB->WriteSpork(spork.nSporkID, spork); } if (strCommand == "getsporks") { std::map<int, CSporkMessage>::iterator it = mapSporksActive.begin(); while (it != mapSporksActive.end()) { pfrom->PushMessage("spork", it->second); it++; } } } // grab the value of the spork on the network, or the default int64_t GetSporkValue(int nSporkID) { int64_t r = -1; if (mapSporksActive.count(nSporkID)) { r = mapSporksActive[nSporkID].nValue; } else { if (nSporkID == SPORK_2_SWIFTTX) r = SPORK_2_SWIFTTX_DEFAULT; if (nSporkID == SPORK_3_SWIFTTX_BLOCK_FILTERING) r = SPORK_3_SWIFTTX_BLOCK_FILTERING_DEFAULT; if (nSporkID == SPORK_5_MAX_VALUE) r = SPORK_5_MAX_VALUE_DEFAULT; if (nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT; if (nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT; if (nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT; if (nSporkID == SPORK_10_MASTERNODE_PAY_UPDATED_NODES) r = SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT; if (nSporkID == SPORK_13_ENABLE_SUPERBLOCKS) r = SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT; if (nSporkID == SPORK_14_NEW_PROTOCOL_ENFORCEMENT) r = SPORK_14_NEW_PROTOCOL_ENFORCEMENT_DEFAULT; if (nSporkID == SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2) r = SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT; if (nSporkID == SPORK_17_ENABLE_ZEROCOIN) r = SPORK_17_ENABLE_ZEROCOIN_DEFAULT; if (r == -1) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID); } return r; } // grab the spork value, and see if it's off bool IsSporkActive(int nSporkID) { int64_t r = GetSporkValue(nSporkID); if (r == -1) return false; return r < GetTime(); } void ReprocessBlocks(int nBlocks) { std::map<uint256, int64_t>::iterator it = mapRejectedBlocks.begin(); while (it != mapRejectedBlocks.end()) { //use a window twice as large as is usual for the nBlocks we want to reset if ((*it).second > GetTime() - (nBlocks * 60 * 5)) { BlockMap::iterator mi = mapBlockIndex.find((*it).first); if (mi != mapBlockIndex.end() && (*mi).second) { LOCK(cs_main); CBlockIndex* pindex = (*mi).second; LogPrintf("ReprocessBlocks - %s\n", (*it).first.ToString()); CValidationState state; ReconsiderBlock(state, pindex); } } ++it; } CValidationState state; { LOCK(cs_main); DisconnectBlocksAndReprocess(nBlocks); } if (state.IsValid()) { ActivateBestChain(state); } } bool CSporkManager::CheckSignature(CSporkMessage& spork) { //note: need to investigate why this is failing std::string strMessage = boost::lexical_cast<std::string>(spork.nSporkID) + boost::lexical_cast<std::string>(spork.nValue) + boost::lexical_cast<std::string>(spork.nTimeSigned); CPubKey pubkeynew(ParseHex(Params().SporkKey())); std::string errorMessage = ""; if (GetAdjustedTime() < Params().StopDualSporkKeys()) { CPubKey pubkey(ParseHex(Params().SporkKeyOld())); if (obfuScationSigner.VerifyMessage(pubkey, spork.vchSig, strMessage, errorMessage) || obfuScationSigner.VerifyMessage(pubkeynew, spork.vchSig, strMessage, errorMessage)) { return true; } } else if (obfuScationSigner.VerifyMessage(pubkeynew, spork.vchSig, strMessage, errorMessage)) { return true; } return false; } bool CSporkManager::Sign(CSporkMessage& spork) { std::string strMessage = boost::lexical_cast<std::string>(spork.nSporkID) + boost::lexical_cast<std::string>(spork.nValue) + boost::lexical_cast<std::string>(spork.nTimeSigned); CKey key2; CPubKey pubkey2; std::string errorMessage = ""; if (!obfuScationSigner.SetKey(strMasterPrivKey, errorMessage, key2, pubkey2)) { LogPrintf("CMasternodePayments::Sign - ERROR: Invalid masternodeprivkey: '%s'\n", errorMessage); return false; } if (!obfuScationSigner.SignMessage(strMessage, errorMessage, spork.vchSig, key2)) { LogPrintf("CMasternodePayments::Sign - Sign message failed"); return false; } if (!obfuScationSigner.VerifyMessage(pubkey2, spork.vchSig, strMessage, errorMessage)) { LogPrintf("CMasternodePayments::Sign - Verify message failed"); return false; } return true; } bool CSporkManager::UpdateSpork(int nSporkID, int64_t nValue) { CSporkMessage msg; msg.nSporkID = nSporkID; msg.nValue = nValue; msg.nTimeSigned = GetTime(); if (Sign(msg)) { Relay(msg); mapSporks[msg.GetHash()] = msg; mapSporksActive[nSporkID] = msg; return true; } return false; } void CSporkManager::Relay(CSporkMessage& msg) { CInv inv(MSG_SPORK, msg.GetHash()); RelayInv(inv); } bool CSporkManager::SetPrivKey(std::string strPrivKey) { CSporkMessage msg; // Test signing successful, proceed strMasterPrivKey = strPrivKey; Sign(msg); if (CheckSignature(msg)) { LogPrintf("CSporkManager::SetPrivKey - Successfully initialized as spork signer\n"); return true; } else { return false; } } int CSporkManager::GetSporkIDByName(std::string strName) { if (strName == "SPORK_2_SWIFTTX") return SPORK_2_SWIFTTX; if (strName == "SPORK_3_SWIFTTX_BLOCK_FILTERING") return SPORK_3_SWIFTTX_BLOCK_FILTERING; if (strName == "SPORK_5_MAX_VALUE") return SPORK_5_MAX_VALUE; if (strName == "SPORK_7_MASTERNODE_SCANNING") return SPORK_7_MASTERNODE_SCANNING; if (strName == "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT") return SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT; if (strName == "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT") return SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT; if (strName == "SPORK_10_MASTERNODE_PAY_UPDATED_NODES") return SPORK_10_MASTERNODE_PAY_UPDATED_NODES; if (strName == "SPORK_13_ENABLE_SUPERBLOCKS") return SPORK_13_ENABLE_SUPERBLOCKS; if (strName == "SPORK_14_NEW_PROTOCOL_ENFORCEMENT") return SPORK_14_NEW_PROTOCOL_ENFORCEMENT; if (strName == "SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2") return SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2; if (strName == "SPORK_17_ENABLE_ZEROCOIN") return SPORK_17_ENABLE_ZEROCOIN; return -1; } std::string CSporkManager::GetSporkNameByID(int id) { if (id == SPORK_2_SWIFTTX) return "SPORK_2_SWIFTTX"; if (id == SPORK_3_SWIFTTX_BLOCK_FILTERING) return "SPORK_3_SWIFTTX_BLOCK_FILTERING"; if (id == SPORK_5_MAX_VALUE) return "SPORK_5_MAX_VALUE"; if (id == SPORK_7_MASTERNODE_SCANNING) return "SPORK_7_MASTERNODE_SCANNING"; if (id == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) return "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT"; if (id == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) return "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT"; if (id == SPORK_10_MASTERNODE_PAY_UPDATED_NODES) return "SPORK_10_MASTERNODE_PAY_UPDATED_NODES"; if (id == SPORK_13_ENABLE_SUPERBLOCKS) return "SPORK_13_ENABLE_SUPERBLOCKS"; if (id == SPORK_14_NEW_PROTOCOL_ENFORCEMENT) return "SPORK_14_NEW_PROTOCOL_ENFORCEMENT"; if (id == SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2) return "SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2"; if (id == SPORK_17_ENABLE_ZEROCOIN) return "SPORK_17_ENABLE_ZEROCOIN"; return "Unknown"; }