blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 201 | content_id stringlengths 40 40 | detected_licenses listlengths 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 listlengths 1 1 | author stringlengths 0 119 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
219e0f6be358d29f096ff5fbfd8d6554083db22c | c3a7a7cefd53bf5b1c3284d68fd9af70f35484b1 | /Trabalho1/CifraDeTransposicao/CifraDeTransposicaoCrip.cpp | 953578c634fe6c0e714a44c63b11876eef8b563c | [] | no_license | Alesom/Seguranca | 2cadc0cb3f576f9e7046eeeec5d9286c8328889c | 56278efb3da81bd470640b5d80da2bdc13b84352 | refs/heads/master | 2016-09-06T16:16:28.460440 | 2015-08-24T22:19:49 | 2015-08-24T22:19:49 | 40,151,144 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 597 | cpp | #include <stdio.h>
#include <vector>
using namespace std;
#define pb push_back
vector < vector <char> > M;
int main(int argc, char *argv[] ){
int chave;
sscanf(argv[1], "%d", &chave);
char a;
int i = 0;
vector <char > v;
while (scanf("%c", &a)!=EOF){
v.pb(a);
i++;
if (i == chave){
M.pb(v);
i = 0 ;
v.clear();
// printf("\n");
}
}
bool ff = false;
while (i < chave){
ff = true;
v.pb('\0');
i++;
}
if (ff) M.pb(v);
for (int j =0 ; j < chave;j++){
for (i = 0 ; i < (int)M.size();i++){
printf("%c", M[ i ][ j ]);
}
}
return 0;
}
| [
"alesom.zorzi@gmail.com"
] | alesom.zorzi@gmail.com |
58817a64444bbeb1ce25d1670a70282c4356d42a | 7d913879bc88867ed1d8d635408b2287d13f77de | /Digitick.cpp | e3937507924511b749bb01183b93a01a0a9a464d | [] | no_license | laurent33440/concert | e897726054a3c2dedc4f8aff05b3f9d58f6ef96b | 6f0b764a1e923c7d1e285f2e6445dd1fa9ab304b | refs/heads/master | 2021-01-17T18:48:07.340150 | 2016-07-25T08:05:22 | 2016-07-25T08:05:22 | 64,853,878 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 22,819 | cpp | #include "stdafx.h"
#include "Concerto.h"
#include "ConcertoDlg.h"
void CConcertoDlg::SendDigitickSpooler()
{
CString temp1;
CString place="";
int j;
for(j=1;j<=NART;j++)
{
if(prix[j]==0&&(libel1[j]!=""||libel2[j]!="")&&(conso[j])==0&&(perso[j]&1))
break;
}
if(j<=NART)
{
if(nvalplace&&(perso[j]&2))
{
retry_place1:;
if(master)
placepath=controldir+"\\Place.dat";
else
{
if(netcontdir!=""&&netcontdir!=controldir)
placepath=netcontdir+"\\Place.dat";
else
{
CMessage dlg;
CString temp1;
CString temp2;
CString temp3;
temp1=txtm[75];//Le gestionnaire de place n'est pas connecté.
temp2=txtm[76];//L'impression est annulée.
temp3=txtm[77];//Veuillez vérifier votre connection.
dlg.mes1=temp1;
dlg.mes2=temp2;
dlg.mes3=temp3;
dlg.mode=1;
dlg.DoModal();
goto abort;
}
}
temp1=txtc[59];//Place
CNum* pnum=new CNum ();
if(pnum==NULL)
MessageBox("num place==NULL");
else
{
pnum->wlargeur=(int)((float)(wlargeur/2));
pnum->whauteur=whauteur/3;
pnum->nID=IDC_DUM;
pnum->chiffre = 6;
pnum->mode=3;
pnum->nombre="";
pnum->txtmessage=temp1;
pnum->DoModal();
place=pnum->nombre;
delete pnum;
int ret=SearchPlace(place);
if(ret==0)
goto retry_place1;
else
{
if(ret==-1)
{
place="";
goto abort;
}
}
SPX[SPW]=1;
SPT[SPW]=j;
STT[SPW]=place;
IncSpoolIndex(&SPW);
InterlockedIncrement(&SPN);
}
}
else
{
place="";
SPX[SPW]=1;
SPT[SPW]=j;
STT[SPW]=place;
IncSpoolIndex(&SPW);
InterlockedIncrement(&SPN);
}
RefreshControle();
RefreshControlList();
}
abort:;
}
int CConcertoDlg::ControlDigitick(CString billet,int remove)
{
CString temp;
CString ligne;
int istop=0;
int istart=0;
int idx=0;
int idy=0;
int idz=0;
int wdg=0;
HANDLE hf;
CString touche;
CString ntouche;
CString dir;
CString buf;
CString buftail;
CString bufhead;
DWORD nbw;
int i=1;
valid=0;
while(i<=16)
{
temp.Format("%u",i);
if(AfxGetApp()->GetProfileInt(temp,"CONTROLE",0)==1)
{
if(temp.GetLength()==1)
temp="0"+temp;
if(master==0&&controldir==netcontdir)
{
MessageBox("Serveur controle absent");
break;
}
if(master)
dir=controldir+"\\"+temp;
else
dir=netcontdir+"\\"+temp;
retry:;
hf=(CreateFile(dir+"\\Controle.dat",GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL));
if(hf==INVALID_HANDLE_VALUE)
{
Sleep(100);
wdg++;
if(wdg<10)
goto retry;
break;
}
else
{
if(ReadFile(hf,buf.GetBuffer(GetFileSize(hf,NULL)),GetFileSize(hf,NULL),&nbw,NULL))
{
buf.ReleaseBuffer(nbw);
istart=0;
if((istop=buf.Find(billet,istart))!=-1)
{
if(remove==0)
{
istart=buf.Find("\r\n",istop);
if(buf.GetAt(istart-1)=='X')
{
CloseHandle(hf);
valid=-1;
return valid;
}
buf.Insert(istart,"X");
ligne="-"+buf.Mid(istop,istart-istop+1)+"-";
SetFilePointer(hf,NULL,NULL,FILE_BEGIN);
WriteFile(hf,buf.GetBuffer(buf.GetLength()),buf.GetLength(),&nbw,NULL);
SetEndOfFile(hf);
FlushFileBuffers(hf);
CloseHandle(hf);
controlcolor=0x00FF00;
//ctick.SetWindowText(scantxt[idx]);
//ctt.SetWindowText("");
SendSpot(2);
if(viewscan)
{
if(tempscan!="")
{
scan=tempscan+"\n"+scantemp;
//pDC->DrawText(tempscan+"\n"+scantemp,-1,&rct,DT_CENTER|DT_VCENTER );
SCANMODE=DT_CENTER|DT_SINGLELINE|DT_VCENTER|DT_NOPREFIX ;
SCANCOLOR=0;
}
else
{
scan=scantemp;
SCANMODE=DT_CENTER|DT_SINGLELINE|DT_VCENTER|DT_NOPREFIX ;
SCANCOLOR=0;
}
nscan.ShowWindow(0);
nscan.SetWindowTextA(scan);
nscan.ShowWindow(1);
}
if(exoflag)
{
SendDigitickSpooler();
//InterlockedExchange(&artro,1);
}
else
{
RefreshControle();
RefreshControlList();
}
cscan[i]++;
temp.Format("%u",i);
AfxGetApp()->WriteProfileInt(temp,"CSCAN",cscan[i]);
valid=1;
return valid;
}
else
{
bufhead=buf.Left(istop);
buftail=buf.Mid(istop+10);
valid=0;
return valid;
}
}
}
else
MessageBox("Fichier "+dir+"\\Controle.dat non lu.");
}
CloseHandle(hf);
}
i++;
}
valid=0;
return valid;
}
void CConcertoDlg::PrintDigitickList()
{
CString temp;
CString log;
CString buf="";
CString commande;
CString nom;
CString dir;
DWORD nbw;
HANDLE hf;
CString temp1;
CString temp2;
CString temp3;
CString ntemp;
CString date;
CString page;
CString vsht;
CString vsttc;
CString haut;
CString larg;
CString pox;
CString mes2;
CString mes3;
CString mes4;
CString nttxt;
CString nstxt;
CString nnstxt;
CString titre;
CTime ct=CTime::GetCurrentTime();
date=ct.Format("%d/%m/%Y %H:%M");
CDC m_Cdc;
CRect rect;
//CRect butrect;
CRect rct;
CFont tf;
CFont mic;
CFont mid;
CFont miw;
float plargeur;
float phauteur;
float x;
float xl1;
float xl2;
int largeur;//
int hauteur;//
int bc;//
int i;
int j;
int k;
int nbr;
int nb;
int nent;
int nbil;
float y;
int toporg;
int gdcx;
int idx;
int idy;
int flagabort=0;
COLORREF pencolor=0x00000000;
COLORREF blancolor=0x00FFFFFF;
CPen finepen(PS_SOLID,2,pencolor);
CPen dashpen(PS_DASH,1,pencolor);
XFORM xForm;
CBrush br;
CDC cdc;
CDC* pdc;
br.CreateSolidBrush(pencolor);
i=digidx;
log="";
temp.Format("%u",i);
if(temp.GetLength()==1)
temp="0"+temp;
dir=workdir+"\\Control\\"+temp;
log=clibel1[i]+"\r\n";
titre=clibel1[i];
hf=(CreateFile(dir+"\\Controle.dat",GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL));
if(hf==INVALID_HANDLE_VALUE)
{
InterlockedExchange(&PRMODE,0);
}
else
{
if(ReadFile(hf,buf.GetBuffer(GetFileSize(hf,NULL)),GetFileSize(hf,NULL),&nbw,NULL))
{
buf.ReleaseBuffer(nbw);
CloseHandle(hf);
InterlockedExchange(&PRMODE,0);
Sleep(300);
if(master)
{
ClearControl(i);
RefreshControle();// mise à jour du fichier de config controle pour l'esclave
}
else
DeleteFile(dir+"\\Controle.dat");
CPrintDialog prt(FALSE);
if(noprint)
{
cdc.Attach((pdc=sp.GetDC())->m_hDC);
if(wlargeur>whauteur)
plargeur=(float)wlargeur/6;
else
plargeur=(float)wlargeur/2;
x=0;
lmarge=0;
rmarge=5;
i=botline;
hauteur= 3*i/4;
rct.top=0;
rct.bottom=hauteur;
bc=(0xFFFFFF);
rct.left=0;
if(wlargeur>whauteur)
rct.right=wlargeur/6;
else
rct.right=wlargeur/2;
if(wlargeur>whauteur)
sp.SetWindowPos(&wndTopMost,0,0,wlargeur/6,hauteur/*95*/,SWP_HIDEWINDOW);
else
sp.SetWindowPos(&wndTopMost,0,0,wlargeur/2,hauteur,SWP_HIDEWINDOW);
sp.CenterWindow();
sp.GetClientRect(&rect);
sp.ShowWindow(1);
cdc.FillSolidRect(&rect,bc);
hauteur= 770;
}
else
{
prt.GetDefaults();
if(prt.m_pd.hDC!=NULL)//&&prt.GetDeviceName()==printername)
{
cdc.Attach(prt.m_pd.hDC);
InterlockedExchange(&PJOB,cdc.StartDoc("Impression liste Digitick"));
}
if(printername.Find("Citizen CL-S400DT")!=-1)
gdcx=cdc.GetDeviceCaps(HORZRES)/2;//-(2*cdc.GetDeviceCaps(PHYSICALOFFSETX)));
else
gdcx=cdc.GetDeviceCaps(HORZRES);//-(2*cdc.GetDeviceCaps(PHYSICALOFFSETX)));
if(paravent)
plargeur=(float)midline;
else
plargeur=(float)gdcx;
phauteur=(float)cdc.GetDeviceCaps(VERTRES);//-(2*cdc.GetDeviceCaps(PHYSICALOFFSETY)));
x=(float)cdc.GetDeviceCaps(PHYSICALOFFSETX);
hauteur= 1000;
cdc.SetGraphicsMode(GM_ADVANCED);
cdc.GetWorldTransform(&xForm);
if(printername.Find("KMGA")!=-1)
{
xForm.eM11 = (FLOAT) -1.0;
xForm.eM12 = (FLOAT) 0.0;
xForm.eM21 = (FLOAT) 0.0;
xForm.eM22 = (FLOAT) -1.0;
xForm.eDx = (FLOAT) invxa;
xForm.eDy = (FLOAT) invya;
}
else
{
if(printername.Find("KPSX")!=-1)
{
xForm.eM11 = (FLOAT) -1.0;
xForm.eM12 = (FLOAT) 0.0;
xForm.eM21 = (FLOAT) 0.0;
xForm.eM22 = (FLOAT) -1.0;
xForm.eDx = (FLOAT) invxt;
xForm.eDy = (FLOAT) invyt;
}
else
{
if(printername.Find("Citizen CL-S400DT")!=-1)
{
xForm.eM11 = (FLOAT) -1.0;
xForm.eM12 = (FLOAT) 0.0;
xForm.eM21 = (FLOAT) 0.0;
xForm.eM22 = (FLOAT) -1.0;
if(paravent)
{
xForm.eDy = (FLOAT) 1150;
xForm.eDx = (FLOAT) 680;
}
else
{
xForm.eDy = (FLOAT) 785;
xForm.eDx = (FLOAT) 590;
}
}
}
}
cdc.SetWorldTransform(&xForm);
}
tf.CreateFont((int)hauteur/17,
(int)plargeur/60,
0,
0,
600 ,//Epaisseur
0,
0,
0,
DEFAULT_CHARSET,
OUT_TT_PRECIS,
CLIP_DEFAULT_PRECIS,
NONANTIALIASED_QUALITY,//ANTIALIASED_QUALITY,//PROOF_QUALITY,
DEFAULT_PITCH|FF_DONTCARE,
"ARIAL");
mic.CreateFont((int)hauteur/20,
(int)plargeur/70,
0,
0,
600 ,//Epaisseur
0,
0,
0,
DEFAULT_CHARSET,
OUT_TT_PRECIS,
CLIP_DEFAULT_PRECIS,
NONANTIALIASED_QUALITY,//ANTIALIASED_QUALITY,//PROOF_QUALITY,
DEFAULT_PITCH|FF_DONTCARE,
"ARIAL");
mid.CreateFont((int)hauteur/25,
(int)plargeur/55,
0,
0,
600 ,//Epaisseur
0,
0,
0,
DEFAULT_CHARSET,
OUT_TT_PRECIS,
CLIP_DEFAULT_PRECIS,
NONANTIALIASED_QUALITY,//ANTIALIASED_QUALITY,//PROOF_QUALITY,
DEFAULT_PITCH|FF_DONTCARE,
"ARIAL");
miw.CreateFont((int)hauteur/30,
(int)plargeur/60,
0,
0,
200 ,//Epaisseur
0,
0,
0,
DEFAULT_CHARSET,
OUT_TT_PRECIS,
CLIP_DEFAULT_PRECIS,
NONANTIALIASED_QUALITY,//ANTIALIASED_QUALITY,//PROOF_QUALITY,
DEFAULT_PITCH|FF_DONTCARE,
"ARIAL");
xl1=(plargeur)-rmarge;
xl2=xl1/2;
largeur=(int)(plargeur/2.1);
bc=(0xFFFFFF);
cdc.SetTextColor(0);
if(!noprint)
cdc.StartPage();
else
{
cdc.FillSolidRect(0,0,wlargeur/2,rct.bottom,bc);
}
toporg=0;
y=(float)hauteur/15;
if(noprint)
rct.top=toporg+(int)(y/2);
else
rct.top=toporg;//+(int)(y/3);
rct.bottom=rct.top+(int)y;
cdc.SetBkMode(TRANSPARENT);
rct.left=(LONG)10;
rct.right=(LONG)xl1-10;
cdc.FillSolidRect(&rct,bc);
int nt=0;
int ne=0;
int nr=0;
idx=0;
while((idx=buf.Find("\r\n",idx))!=-1)
{
nt++;
if(buf.GetAt(idx-1)=='X')
ne++;
idx+=2;
}
nttxt.Format("%u",nt);
nstxt.Format("%u",ne);
nnstxt.Format("%u",nt-ne);
temp1="Préventes scannées "+nstxt+"/"+nttxt;
log+=temp1+"\r\n";
nstxt.Format("%u",cscan[i]);
temp1="Préventes scannées sur ce poste : "+nstxt;
log+=temp1+"\r\n";
temp1="Préventes non scannées "+nnstxt+"/"+nttxt;
log+=temp1+"\r\n";
idx=0;
sl.ResetContent();
tl.ResetContent();
cdc.SelectObject(&mid);
while(TRUE)
{
idy=buf.Find("\r\n",idx);
if(idy==-1)
break;
if(buf.GetAt(idy-1)=='X')
{
idx=idy+2;
continue;
}
idy=buf.Find(";",idx);
commande=buf.Mid(idx,idy-idx);
sl.AddString(commande);
idx=idy+1;
idy=buf.Find(";",idx);
nom=buf.Mid(idx,idy-idx);
tl.AddString(nom);
temp1=commande+" :";
log+=temp1;
temp1=" "+nom;
log+=temp1+"\r\n";
idy=buf.Find("\r\n",idx);
idx=idy+2;
}
nr=nt-ne;
flagabort=0;
if((nt-ne)>100)
{
temp1=txtm[91];//Plus de 100 tickets n'ont pas été scannés.
temp2=txtm[92];//Voulez-vous imprimer la liste quand même.
temp3=txtm[6];//Taper OK pour valider
if(MessageBox(temp1+"\r\n"+temp2+"\r\n"+temp3,"",MB_OKCANCEL)==IDCANCEL)
{
flagabort=1;
goto ABORT_LISTE;
}
}
if(paravent)
{
nent=17;
nbil=32;
}
else
{
nent=6;
nbil=22;
}
if(nr>nent&&!noprint)
{
nb=(nr-nent)/nbil;
nbr=(nr-nent)%nbil;
j=0;
while(j<nbr)
{
sl.GetText((nb*nbil)+nent+j,commande);
tl.GetText((nb*nbil)+nent+j,nom);
rct.top+=hauteur/30;//40;
rct.bottom+=hauteur/30;//40;
rct.left=(LONG)10;
rct.right=(LONG)(xl1-10)/2;
temp1=commande+" :";
cdc.DrawText(temp1,-1,&rct,DT_RIGHT|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
rct.left=rct.right;
rct.right=(LONG)((xl1-10));
temp1=" "+nom;
cdc.DrawText(temp1,-1,&rct,DT_LEFT|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
j++;
}
if(nbr>0)
{
cdc.EndPage();
cdc.StartPage();
if(printername.Find("Citizen CL-S400DT")!=-1)
{
xForm.eM11 = (FLOAT) -1.0;
xForm.eM12 = (FLOAT) 0.0;
xForm.eM21 = (FLOAT) 0.0;
xForm.eM22 = (FLOAT) -1.0;
if(paravent)
{
xForm.eDy = (FLOAT) 1150;
xForm.eDx = (FLOAT) 680;
}
else
{
xForm.eDy = (FLOAT) 785;
xForm.eDx = (FLOAT) 590;
}
cdc.SetWorldTransform(&xForm);
}
if(noprint)
rct.top=toporg+(int)(y/2);
else
rct.top=toporg;//+(int)(y/3);
rct.bottom=rct.top+(int)y;
}
k=nb;
while(k>0)
{
j=((nb-1)*nbil)+nent;//index départliste
while(j<(nb*nbil)+nent)
{
sl.GetText(j,commande);
tl.GetText(j,nom);
rct.top+=hauteur/30;//40;
rct.bottom+=hauteur/30;//40;
rct.left=(LONG)10;
rct.right=(LONG)(xl1-10)/2;
temp1=commande+" :";
cdc.DrawText(temp1,-1,&rct,DT_RIGHT|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
rct.left=rct.right;
rct.right=(LONG)((xl1-10));
temp1=" "+nom;
cdc.DrawText(temp1,-1,&rct,DT_LEFT|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
j++;
}
cdc.EndPage();
cdc.StartPage();
if(printername.Find("Citizen CL-S400DT")!=-1)
{
xForm.eM11 = (FLOAT) -1.0;
xForm.eM12 = (FLOAT) 0.0;
xForm.eM21 = (FLOAT) 0.0;
xForm.eM22 = (FLOAT) -1.0;
if(paravent)
{
xForm.eDy = (FLOAT) 1150;
xForm.eDx = (FLOAT) 680;
}
else
{
xForm.eDy = (FLOAT) 785;
xForm.eDx = (FLOAT) 590;
}
cdc.SetWorldTransform(&xForm);
}
if(noprint)
rct.top=toporg+(int)(y/2);
else
rct.top=toporg;//+(int)(y/3);
rct.bottom=rct.top+(int)y;
k--;
}/**/
}
ABORT_LISTE:;
rct.left=(LONG)10;
rct.right=(LONG)((xl1-10));
cdc.SelectObject(&tf);
cdc.DrawText("SYNTHESE PREVENTE DIGITICK",-1,&rct,DT_CENTER|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
rct.top+=hauteur/10;//60;
rct.bottom+=hauteur/10;//60;
cdc.SelectObject(&mic);
cdc.DrawText("POSTE "+poste,-1,&rct,DT_CENTER|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
rct.top+=hauteur/12;//60;
rct.bottom+=hauteur/12;//60;
cdc.SelectObject(&mid);
rct.left=(LONG)10;
cdc.DrawText(titre,-1,&rct,DT_CENTER|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
rct.top+=hauteur/10;//60;
rct.bottom+=hauteur/10;//60;
cdc.SelectObject(&mid);
rct.left=(LONG)10;
nttxt.Format("%u",nt);
nstxt.Format("%u",ne);
nnstxt.Format("%u",nt-ne);
temp1="Préventes scannées "+nstxt+"/"+nttxt;
cdc.DrawText(temp1,-1,&rct,DT_CENTER|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
rct.top+=hauteur/20;//60;
rct.bottom+=hauteur/20;//60;
nstxt.Format("%u",cscan[i]);
temp1="Préventes scannées sur ce poste : "+nstxt;
cdc.DrawText(temp1,-1,&rct,DT_CENTER|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
rct.top+=hauteur/20;//60;
rct.bottom+=hauteur/20;//60;
temp1.Format("CA scanné sur ce poste : %.2f",cas[i]);
temp1="";//temp1+" "+cur+" TTC";
cdc.DrawText(temp1,-1,&rct,DT_CENTER|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
rct.top+=hauteur/10;//60;
rct.bottom+=hauteur/10;//60;
cdc.SelectObject(&mid);
rct.left=(LONG)10;
temp1="Préventes non scannées "+nnstxt+"/"+nttxt;
cdc.DrawText(temp1,-1,&rct,DT_CENTER|DT_SINGLELINE|DT_TOP |DT_NOPREFIX );
if(flagabort==0)
{
rct.top+=hauteur/30;//60;
rct.bottom+=hauteur/30;//60;
rct.left=(LONG)10;
cdc.SelectObject(&mid);
j=0;
while(j<nent&&nr>0)
{
sl.GetText(j,commande);
tl.GetText(j,nom);
rct.top+=hauteur/30;//40;
rct.bottom+=hauteur/30;//40;
rct.left=(LONG)10;
rct.right=(LONG)(xl1-10)/2;
temp1=commande+" :";
cdc.DrawText(temp1,-1,&rct,DT_RIGHT|DT_SINGLELINE|DT_TOP |DT_NOPREFIX );
rct.left=rct.right;
rct.right=(LONG)((xl1-10));
temp1=" "+nom;
cdc.DrawText(temp1,-1,&rct,DT_LEFT|DT_SINGLELINE|DT_TOP|DT_NOPREFIX );
j++;
nr--;
}
}
log+="Controle\r\n"+buf;
CString digitickdir=controldir+"\\Archive Prevente Digitick";
CreateDirectory(digitickdir,NULL);
temp=titre;
temp.Replace("/"," ");
hf=CreateFile(digitickdir+"\\"+temp+".log",GENERIC_READ|GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
if(hf==INVALID_HANDLE_VALUE)
AfxMessageBox("Erreur Archive Prevente Digitick");
else
{
if(WriteFile(hf,log.GetBuffer(log.GetLength()),log.GetLength(),&nbw,NULL))
{
log.ReleaseBuffer(nbw);
}
CloseHandle(hf);
}
if((printername.Find("KMGA")!=-1||printername.Find("KPSX")!=-1)||printername.Find("Citizen CL-S400DT")!=-1||noprint)
{
cdc.SelectObject(&finepen);
//cdc.MoveTo(300,botline);//300);
//cdc.LineTo(310,botline);//310);
}
else
{
int memtop=rct.top;
rct.top=toporg;
int membottom=rct.bottom;
rct.bottom=membottom-hauteur/10;//95;
rct.right=(LONG)lmarge+5;
rct.left=(LONG)((xl1-5));
cdc.SelectObject(&finepen);
cdc.SelectStockObject(NULL_BRUSH);
cdc.Rectangle(&rct);//60,5,xl1-5,340
rct.top=memtop+hauteur/33;//30;
rct.bottom=membottom+hauteur/33;//30;
rct.right=(LONG)lmarge+10;
rct.left=(LONG)((xl1-10));
cdc.SelectObject(&miw);
//cdc.DrawText("",-1,&rct,DT_CENTER|DT_SINGLELINE|DT_TOP );
cdc.SelectObject(&finepen);
cdc.MoveTo(300,rct.bottom-hauteur/9);//110);//410);
cdc.LineTo(310,rct.bottom-hauteur/9);//110);//410);
}
if(!noprint)
{
cdc.EndPage();
cdc.EndDoc();
cdc.Detach();
DeleteDC(prt.m_pd.hDC);
GlobalFree(prt.m_pd.hDevMode);
GlobalFree(prt.m_pd.hDevNames);
InterlockedExchange(&PJOB,0);
}
else
{
cdc.SelectObject(&finepen);
sp.GetClientRect(&rect);
int i=SimTicketRect(&cdc,rect);
cdc.SelectObject(&dashpen);
Sleep(100);
cdc.Detach();
ReleaseDC(pdc);
}
}
else
{
InterlockedExchange(&PRMODE,0);
}
}
}
int CConcertoDlg::ImportFichierDigitick(CString source)
{
CString dir;
HANDLE hfr;
HANDLE hf;
CString buf;
CString temp;
CString ticket;
CString touche;
CString ntouche;
CString client;
CString art;
CString liste="";
CString nart;
CString impposte;
CString implibel1;
CString implibel2;
CString imptitre;
CString date;
CString jour;
CString mois;
CString num;
CString an;
CString sea;
CString ligne;
int org;
int i;
int idx;
int idy;
DWORD len;
DWORD nbt;
hfr=CreateFile(source,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
if(ReadFile(hfr,buf.GetBuffer(GetFileSize(hfr,NULL)),GetFileSize(hfr,NULL),&len,NULL))
{
CloseHandle(hfr);
buf.ReleaseBuffer(len);
buf.Replace("\"","");
idx=source.ReverseFind('\\');
imptitre=source.Mid(idx+1);
idx=imptitre.Find("DIGITICK",0);
imptitre=imptitre.Mid(idx);
idx=buf.Find("\r\n",0);
idx+=2;
buf=buf.Mid(idx);
nbt=0;
idx=0;
while(TRUE)
{//39698920;Aucun Type;Aucun Type;MIX EN BOUCHE/ CAFE BORELY;04/07/2014 17:45;4533-14052410230092078;24/05/2014 10:23;css5_mixenbouche_web;Réseau;Calderon;Anne-Laure;671915985;mars@yahoo.fr;;;;France;Calderon;Anne-Laure;_00024957380000000001;93726024; PDF;Oui;Achat Web;;;;Tarif unique;21.7;;;;;Billet électronique;1689782974;
if((idy=buf.Find(";",idx))==-1)// test fin de listing
break;
org=idx;
idx=idy+1;
idy=buf.Find(";",idx);
idx=idy+1;
idy=buf.Find(";",idx);
idx=idy+1;
idy=buf.Find(";",idx);
imptitre=buf.Mid(idx,idy-idx);
idx=idy+1;
idy=buf.Find(";",idx);
date=buf.Mid(idx,idy-idx);
idx=idy+1;
idy=buf.Find(";",idx);
idx=idy+1;
idy=buf.Find(";",idx);
idx=idy+1;
idy=buf.Find(";",idx);
idx=idy+1;
idy=buf.Find(";",idx);
idx=idy+1;
idy=buf.Find(";",idx);
client=buf.Mid(idx,idy-idx);// Nom du client
idx=idy+1;
idy=buf.Find(";",idx);
client+=" "+buf.Mid(idx,idy-idx);// Prénom du client
if((idy=buf.Find("\r\n",idx))==-1)
break;
else
{
ligne=buf.Mid(org,idy-org);
do
{
idx=ligne.ReverseFind(';');
ligne=ligne.Left(idx);
idx=ligne.ReverseFind(';');
ticket=ligne.Mid(idx+1);
}
while(atoi(ticket)==0);
idx=idy+2;
}
liste=liste+ticket+";"+client+";\r\n";
nbt++;
}
i=1; // **** RECHERCHE DE FICHIERS DU MEME CONTROLE ****
while(i<=16)
{
if(clibel1[i]==imptitre)//&&clibel2[i]==date)//&&cfrom[i]=="Billetterie N°"+impposte)
{
temp.Format("0%u",i);
dir=controldir+"\\"+temp.Right(2);
DeleteFile(dir+"\\Controle.dat");
RemoveDirectory(dir);
break;
}
i++;
}
i=1;// **** OU CREATION D'UN NOUVEAU FICHIER DE CONTROLE****
while(i<=16)
{
temp.Format("0%u",i);
dir=controldir+"\\"+temp.Right(2);
CreateDirectory(dir,NULL);
hf=(CreateFile(dir+"\\Controle.dat",GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL));
if(hf==INVALID_HANDLE_VALUE)
{
hf=(CreateFile(dir+"\\Controle.dat",GENERIC_READ|GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL));
break;
}
else
CloseHandle(hf);
i++;
}
if(i<=16)//**** SI dans les limites de la mémoire ****
{
if(WriteFile(hf,liste.GetBuffer(liste.GetLength()),liste.GetLength(),&len,NULL))
{
clibel1[i]=imptitre;
clibel2[i]=date;
cfrom[i]="WEB DIGITICK";
ctot[i]=nbt;
cscan[i]=0;
cas[i]=0;
cselevt[i]=0;
CString nart;
nart.Format("%u",i);
AfxGetApp()->WriteProfileString(nart,"CLIBELLE1",clibel1[i]);
AfxGetApp()->WriteProfileString(nart,"CLIBELLE2",clibel2[i]);
AfxGetApp()->WriteProfileString(nart,"CFROM",cfrom[i]);
AfxGetApp()->WriteProfileInt(nart,"CTOT",ctot[i]);
AfxGetApp()->WriteProfileInt(nart,"CONTROLE",cselevt[i]);
AfxGetApp()->WriteProfileInt(nart,"CSCAN",0);
AfxGetApp()->WriteProfileInt(nart,"CAS",0);
//DrawBoutonImport();
DrawBoutonArticle(17);
DeleteFile(source);//*************************************************************************
}
else
MessageBox("Erreur écriture du fichier contrôle");
}
CloseHandle(hf);
}
else
MessageBox("Erreur lecture fichier csv");
return i;
}
| [
"laurent.a@dineoquick.fr"
] | laurent.a@dineoquick.fr |
11f6e6cecea0948453c89c7d6f1f7b940acd37aa | 0a0781ba8f2641621d4afc16e26e86efa92cd646 | /include/PictureButton.h | 8af53895f6f869b63a623dbf87dddcc8617c3b6e | [
"MIT"
] | permissive | louisdem/LibWalter | 955e271bb0bccd7a55032e0c95997d8165dcfd20 | a6c88387697e5e7e9012cd5396591487afea8130 | refs/heads/master | 2022-02-20T15:59:04.278332 | 2018-11-09T15:57:23 | 2018-11-09T15:57:23 | 19,485,210 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,843 | h | // ============================================================================
//
// libwalter PictureButton.h
//
// Distributed under the terms of the MIT License.
//
// Authors:
// Gabriele Biffi - http://www.biffuz.it/
//
// ============================================================================
#ifndef __PICTUREBUTTON_H__
#define __PICTUREBUTTON_H__
// Haiku headers
#include <Button.h>
// libwalter headers
#include "ButtonDecorator.h"
class PictureButton : public BButton {
private:
BRect _draw_default(BRect bounds, bool enabled);
void _draw_focus_line(float x, float y, float width,
bool visible);
float fContentWidth, fContentHeight;
float fMinWidth, fMinHeight;
ButtonDecorator * fDecorator;
public:
PictureButton(BRect frame, const char *name, const char *label,
BBitmap *picture, BDPosition position, BMessage *message,
uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_FULL_UPDATE_ON_RESIZE | B_NAVIGABLE |
B_WILL_DRAW);
PictureButton(BMessage *archive);
virtual ~PictureButton();
// Our methods
ButtonDecorator * Decorator(void);
BBitmap * Picture(void);
BDPictureType PictureType(void);
virtual bool SetPicture(BBitmap *picture);
BDPosition Position(void);
virtual void SetPosition(BDPosition position);
BDVisible Visible(void);
virtual void SetVisible(BDVisible visible);
// BArchivable hooks
static BArchivable * Instantiate(BMessage *archive);
virtual status_t Archive(BMessage *archive, bool deep = true) const;
// BButton hooks
virtual void MakeDefault(bool flag);
// BControl hooks
virtual void SetLabel(const char *label);
// BView hooks
virtual void Draw(BRect updateRect);
virtual void GetPreferredSize(float *width, float *height);
};
#endif // __PICTUREBUTTON_H__
| [
"biffuz@4c7b89fb-9b2e-0410-b0fa-81d8202d9b54"
] | biffuz@4c7b89fb-9b2e-0410-b0fa-81d8202d9b54 |
b3bea0978ecd8f276b4612e26e116b39aef9d0f8 | 6a51494eb7e41598d12fbbbd6a2c3daee886a2fc | /src/gl/Texture.hpp | 5419b354f41cf5fbde72002a875dc3c7a69bbdf4 | [] | no_license | hstefan/SpaceCrawler | 7e288db4b4824ca1442d758c02e6a60a9b6f5067 | 3c9efd6da5df7f54aa2ad431f45db3e8c38a2d65 | refs/heads/master | 2021-01-15T20:52:20.767356 | 2013-01-11T02:18:18 | 2013-01-11T02:18:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 470 | hpp | #pragma once
#include <algorithm>
#include "gl/gl_1_5.h"
#include "util.hpp"
namespace gl {
struct Texture {
GLuint name;
Texture()
: name(0)
{ }
explicit Texture(GLuint name)
: name(name)
{ }
Texture(Texture&& o)
: name(o.name)
{
o.name = 0;
}
Texture& operator=(Texture&& o) {
std::swap(name, o.name);
return *this;
}
~Texture() {
if (name != 0)
glDeleteTextures(1, &name);
}
private:
NONCOPYABLE(Texture);
};
} // namespace gl
| [
"yuriks@yuriks.net"
] | yuriks@yuriks.net |
c9c8832b985b72ba72e5292205e2fb6d19ea1065 | aee89790d61cb3051ceae57b987dfefd2b090e3e | /FileService.cpp | bc2fc6d75926424f23f6f1b4f379c5cb7ae907f7 | [
"BSD-3-Clause"
] | permissive | NoahTarr/DCash-Wallet-Stripe-API | 49cfc63e0874b63ca09e17fcf56cf910554443e7 | c9892b8b94460ffc27ba785edd1a4a6ff00d7a62 | refs/heads/main | 2023-05-27T05:38:33.517518 | 2021-06-07T01:50:54 | 2021-06-07T01:50:54 | 373,963,997 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,655 | cpp | #include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <iostream>
#include <map>
#include <string>
#include "FileService.h"
#include "ClientError.h"
using namespace std;
FileService::FileService(string basedir) : HttpService("/") {
while (endswith(basedir, "/")) {
basedir = basedir.substr(0, basedir.length() - 1);
}
if (basedir.length() == 0) {
cout << "invalid basedir" << endl;
exit(1);
}
this->m_basedir = basedir;
}
bool FileService::endswith(string str, string suffix) {
size_t pos = str.rfind(suffix);
return pos == (str.length() - suffix.length());
}
void FileService::get(HTTPRequest *request, HTTPResponse *response) {
string path = this->m_basedir + request->getPath();
string fileContents = this->readFile(path);
if (fileContents.size() == 0) {
throw ClientError::notFound();
} else {
if (this->endswith(path, ".css")) {
response->setContentType("text/css");
} else if (this->endswith(path, ".js")) {
response->setContentType("text/javascript");
}
response->setBody(fileContents);
}
}
string FileService::readFile(string path) {
int fd = open(path.c_str(), O_RDONLY);
if (fd < 0) {
return "";
}
string result;
int ret;
char buffer[4096];
while ((ret = read(fd, buffer, sizeof(buffer))) > 0) {
result.append(buffer, ret);
}
close(fd);
return result;
}
void FileService::head(HTTPRequest *request, HTTPResponse *response) {
// HEAD is the same as get but with no body
this->get(request, response);
response->setBody("");
}
| [
"noahtarr1@gmail.com"
] | noahtarr1@gmail.com |
68b093bbe216f4902956284af2aa703c155fd668 | 6870ea7fa607e314737ed7e814f22537eeb0fd0f | /Array/Array_to_binary_search_tree_conversion.cpp | f2b3f7d99e924a879b12d73d1e91a89b7395de35 | [] | no_license | ranjansingh119/Programming-source-code | e65b332d602a45574899d61097a46e220a67e7f2 | 2029be1e38f6634d287b5901ebf17e65a46fde0c | refs/heads/master | 2021-01-20T20:05:24.914852 | 2016-06-20T18:09:52 | 2016-06-20T18:09:52 | 46,512,213 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,751 | cpp | /*Taking an array and converting it into a binary search tree with along with converting th binary numbers
into decimal numbers */
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#define row 4
#define col 3
using namespace std;
struct tnode{
int data;
int roww;
struct tnode* left;
struct tnode* right;
};
struct tnode* newnode(int data, int roww){
struct tnode* temp = (struct tnode*)malloc(sizeof(struct tnode));
temp->data = data;
temp->roww = roww;
temp->left = temp->right =NULL;
return temp;
}
void print_tree(struct tnode* r);
struct tnode* insert_into_bst(struct tnode* node, int data, int roww)
{
/* If the tree is empty, return a new node */
if (node == NULL)
return newnode(data, roww);
if (data < node->data)
node->left = insert_into_bst(node->left, data, roww);
else if (data > node->data)
node->right = insert_into_bst(node->right, data, roww);
return node;
}
void arr_to_decimal(int arr[][col] ){
int i, sum[4], temp;
int power;
for( i=0; i<row; i++){
temp =0;
power =2;
for(int j=0;j<col; j++){
temp += pow(2,power)* arr[i][j];
power--;
}
sum[i] = temp;
}
struct tnode* root = newnode(sum[0], 0);
for(i=1;i<4;i++){
insert_into_bst(root, sum[i], i);
}
print_tree(root);
}
void print_tree(struct tnode* r){
if (r == NULL)
return;
/* first print data of node */
cout<<r->data<<" "<<r->roww<<endl;
/* then recur on left sutree */
print_tree(r->left);
/* now recur on right subtree */
print_tree(r->right);
}
int main(){
int arr[][3] = {{1,0,1}, {1,0,0}, {1,1,0}, {1,1,1} };
arr_to_decimal(arr);
return 0;
getchar();
}
| [
"ranjansingh119@gmail.com"
] | ranjansingh119@gmail.com |
e535bac3ac5ae23448a63959739e4b443c2f9297 | f16ca93a097425dd80012deb14fa5840b87eb650 | /Physics2012/Collide/Shape/Convex/ConvexVertices/hkpConvexVerticesShape.h | 67539bdb549839f14bbc407eea715f81d235112f | [] | no_license | Veryzon/havok-2013 | 868a4873f5254709b77a2ed8393355b89d2398af | 45812e33f4bd92c428866e5e7c1b4d71a4762fb5 | refs/heads/master | 2021-06-25T23:48:11.919356 | 2021-04-17T02:12:06 | 2021-04-17T02:12:06 | 226,624,337 | 4 | 1 | null | 2019-12-08T06:21:56 | 2019-12-08T06:21:56 | null | UTF-8 | C++ | false | false | 8,703 | h | /*
*
* Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's
* prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok.
* Product and Trade Secret source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2013 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement.
*
*/
#ifndef HKP_CONVEX_VERTICES_SHAPE_H
#define HKP_CONVEX_VERTICES_SHAPE_H
#include <Common/Base/Math/Vector/hkFourTransposedPoints.h>
#include <Common/Base/Types/Geometry/Aabb/hkAabbUtil.h>
#include <Physics2012/Collide/Shape/Convex/hkpConvexShape.h>
extern const class hkClass hkpConvexVerticesShapeFourVectorsClass;
extern const hkClass hkpConvexVerticesShapeClass;
struct hkStridedVertices;
class hkpConvexVerticesConnectivity;
/// A convex geometric shape, specified by a set of vertices in the shape's local space.
/// An optional set of corresponding planes may be provided - if present, they will improve
/// ray cast performance. Optional connectivity information may also be provided - this is
/// required for certain algorithms, but not for most use cases.
class hkpConvexVerticesShape : public hkpConvexShape
{
//+version(4)
public:
HK_DECLARE_CLASS_ALLOCATOR( HK_MEMORY_CLASS_SHAPE );
HK_DECLARE_REFLECTION();
HK_DECLARE_GET_SIZE_FOR_SPU( hkpConvexVerticesShape );
HKCD_DECLARE_SHAPE_TYPE( hkcdShapeType::CONVEX_VERTICES );
public:
/// Build configuration.
/// Warning: m_useOptimizedShrinking is not always robust and is disable by default.
struct BuildConfig
{
BuildConfig();
hkBool m_createConnectivity; ///< Create connectivity (default: false).
hkBool m_shrinkByConvexRadius; ///< Shrink vertices by convex radius (default: true), so that raycast and physics collisions are consistent.
hkBool m_useOptimizedShrinking; ///< Optimized shrinking such as the number of vertices after shrinking is less or equal to the unshrunk shape vertices count.
hkReal m_convexRadius; ///< Convex radius (default: hkConvexShapeDefaultRadius).
int m_maxVertices; ///< Maximum vertices, used for simplification (default: 0, no simplification).
hkReal m_maxRelativeShrink; ///< Maximum relative shrink factor (default: 0.05) (relative to the AABB of the object).
hkReal m_maxShrinkingVerticesDisplacement; ///< Maximum vertices displacement due to shrinking (default: 0.07).
hkReal m_maxCosAngleForBevelPlanes; ///< If the cos angle (== dot product) of two neighboring face normals is smaller than this, a bevel plane is inserted to optimize raycast behavior (default -0.1f)
};
public:
/// Create a shape from the given vertices, automatically setting planes equations and connectivity.
/// Also shrink the shape vertices so that collision detection and ray cast results are consistent.
/// Notes: This is the recommended way to create a convex vertices shape.
hkpConvexVerticesShape( const hkStridedVertices& vertices, const BuildConfig& config=BuildConfig() );
/// Create a shape from the given vertices and matching plane equations.
/// These are plane equations of the convex hull and can be generated
/// using the hkGeometryUtility::createConvexGeometry method.
/// This constructor makes an internal copy of the vertices.
/// You should take care of not passing in unnecessary vertices, e.g., inner vertices or
/// duplicated vertices. hkGeometryUtility::createConvexGeometry will also give
/// you back a clean list of vertices to use.
hkpConvexVerticesShape( const hkStridedVertices& vertsIn, const hkArray<hkVector4>& planeEquations, hkReal radius = hkConvexShapeDefaultRadius );
/// Create a shape from precomputed data.
/// Note: numVertices is the actual number of vertices, not the number of hkFourTransposedPoints structures.
hkpConvexVerticesShape( hkFourTransposedPoints* rotatedVertices, int numVertices, hkVector4* planes, int numPlanes, const hkAabb& aabb, hkReal radius = hkConvexShapeDefaultRadius );
/// Create an empty shape.
hkpConvexVerticesShape( hkReal radius = hkConvexShapeDefaultRadius );
/// Serialization constructor.
hkpConvexVerticesShape( hkFinishLoadedObjectFlag flag );
/// Destructor
~hkpConvexVerticesShape();
/// Allocates a new convex vertices shape at the given memory location
static HK_FORCE_INLINE hkpConvexVerticesShape* HK_CALL createInPlace( hkUint8*& memPtr, hkReal convexRadius );
public:
/// The original vertices passed during construction are stored in a packed form within the shape.
/// This retrieves the original vertices into the provided array.
void getOriginalVertices( hkArray<hkVector4>& vertices ) const;
/// Returns the plane equations, if any
const hkArray<hkVector4>& getPlaneEquations() const;
/// Overwrite plane equations
void setPlaneEquations( const hkArray<hkVector4>& planes );
/// Overwrite only the convex radius without caring about plane equations or shape shrinking.
void setRadiusUnchecked( hkReal radius ) { m_radius = radius; }
// Utility function to convert this shape to a new space
void transformVerticesAndPlaneEquations( const hkTransform& t );
// Utility function to overwrite the vertices
void copyVertexData( const hkReal* vertexIn, int byteStriding, int numVertices );
//
// Connectivity
//
// Get the connectivity. This is optional for this shape. Returns HK_NULL if connectivity is not present.
HK_FORCE_INLINE const hkpConvexVerticesConnectivity* getConnectivity() const { return m_connectivity; }
// Set the connectivity. Setting to HK_NULL will remove connectivity information.
// The connectivity information is a 'cache' of information - so can be used to modify a const shape
void setConnectivity( const hkpConvexVerticesConnectivity* connect, bool sort=true );
// hkpConvexShape interface implementation
void getFirstVertex(hkVector4& v) const;
protected:
void sortPlanes(void);
public:
//
// hkpShapeBase interface implementation
//
virtual void getSupportingVertex( hkVector4Parameter direction, hkcdVertex& supportingVertexOut ) const;
// Note: You must be able to supply one valid vertex corresponding to ID 0.
// This is a requirement because getFirstVertex() is not supported on SPU.
virtual void convertVertexIdsToVertices( const hkpVertexId* ids, int numIds, hkcdVertex* verticesOut ) const;
virtual void getCentre( hkVector4& centreOut ) const;
virtual HK_FORCE_INLINE int getNumCollisionSpheres() const;
virtual const hkSphere* getCollisionSpheres( hkSphere* sphereBuffer ) const;
virtual void getAabb( const hkTransform& localToWorld, hkReal tolerance, hkAabb& out ) const;
virtual hkBool castRay( const hkpShapeRayCastInput& input, hkpShapeRayCastOutput& results ) const;
public:
// Cached AABB
hkVector4 m_aabbHalfExtents;
hkVector4 m_aabbCenter;
/// The vertices, packed in a transposed format
hkArray<hkFourTransposedPoints> m_rotatedVertices;
hkInt32 m_numVertices;
// Internal flag indicating whether the vertices reside in SPU memory.
// This should be true only if constructed on-the-fly by some container shapes.
hkBool m_useSpuBuffer; //+default(0) +nosave
/// Optional plane equations, for faster ray cast queries.
mutable hkArray<hkVector4> m_planeEquations;
/// Optional (reference counted) vertex connectivity information for this shape.
/// Set to HK_NULL if connectivity information is not present.
mutable const hkpConvexVerticesConnectivity* m_connectivity;
};
#include <Physics2012/Collide/Shape/Convex/ConvexVertices/hkpConvexVerticesShape.inl>
#endif // HKP_CONVEX_VERTICES_SHAPE_H
/*
* Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20130718)
*
* Confidential Information of Havok. (C) Copyright 1999-2013
* Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok
* Logo, and the Havok buzzsaw logo are trademarks of Havok. Title, ownership
* rights, and intellectual property rights in the Havok software remain in
* Havok and/or its suppliers.
*
* Use of this software for evaluation purposes is subject to and indicates
* acceptance of the End User licence Agreement for this product. A copy of
* the license is included with this software and is also available at www.havok.com/tryhavok.
*
*/
| [
"veryzon@outlook.com.br"
] | veryzon@outlook.com.br |
ae7a747e3dad7feebeea1a7185d2da4bd86f87fc | 5ad0aeecf65fba56254357c9cb49cb0e1a1e8796 | /aising2020/e/e.cc | 8f84b75e2a42d41a412231e29162638bec2befaf | [] | no_license | lucifer1004/AtCoder | e561e9fb00cbae6db6699a5b4491ea58090d8b4e | 310bf6c3b5b2f7cd1f202bf6bb338abd524932e5 | refs/heads/main | 2023-04-02T02:09:07.863564 | 2022-09-17T13:40:59 | 2022-09-17T13:40:59 | 230,712,782 | 3 | 0 | null | 2021-01-22T11:51:27 | 2019-12-29T06:33:33 | C++ | UTF-8 | C++ | false | false | 1,486 | cc | #include <cstdio>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
template <typename T> void read(T &x) {
x = 0;
char c = getchar();
T sig = 1;
for (; !isdigit(c); c = getchar())
if (c == '-')
sig = -1;
for (; isdigit(c); c = getchar())
x = (x << 3) + (x << 1) + c - '0';
x *= sig;
}
class Solution {
public:
void solve() {
int n;
read(n);
vector<vector<int>> red(n + 1), blue(n + 1);
vector<int> L(n), R(n);
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<>> pq;
ll ans = 0;
for (int i = 0; i < n; ++i) {
int k, l, r;
read(k), read(l), read(r);
if (l >= r)
red[k].emplace_back(i);
else
blue[k].emplace_back(i);
L[i] = l;
R[i] = r;
ans += min(l, r);
}
for (int i = 1; i <= n; ++i) {
for (int j : red[i])
pq.push({L[j] - R[j], j});
while (pq.size() > i)
pq.pop();
}
while (!pq.empty()) {
ans += pq.top().first;
pq.pop();
}
for (int i = n; i >= 1; --i) {
for (int j : blue[i])
pq.push({R[j] - L[j], j});
while (pq.size() > n - i)
pq.pop();
}
while (!pq.empty()) {
ans += pq.top().first;
pq.pop();
}
cout << ans << endl;
}
};
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int t;
read(t);
while (t--) {
Solution solution = Solution();
solution.solve();
}
} | [
"qqbbnease1004@126.com"
] | qqbbnease1004@126.com |
bdd5820427125298f1dc0a909b462da12130a970 | 77c12e4d1d6e070f88768e17e3d0093537fe7277 | /include/alps/alps_individ.h | a6a94b7943f3fb33d643cab5234b1fb4faaa6c0f | [] | no_license | infoburp/alps | c7ed31b2400b03edfa21e3b58822b3ae9ae5cc98 | 721e2236720382090e85852a890d2ff3fa9f2c38 | refs/heads/master | 2020-12-14T00:21:24.394314 | 2013-08-04T16:05:11 | 2013-08-04T16:05:11 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,215 | h | /************************************************************
Copyright Gregory S. Hornby.
All Rights Reserved.
************************************************************/
#ifndef ALPS_INDIVIDUAL_HEADER_FILE
#define ALPS_INDIVIDUAL_HEADER_FILE
#include <iostream>
#include <fstream>
#include "alps/alps_history.h"
const double Worst_Fitness = 1.5E+15;
const int NUM_HISTORY_OPS = 15;
const int NUM_FITNESS = 20;
const int HIST_NUM_COMPLEXITY = 27;
namespace alps {
extern int gNum_Fitness;
extern int gNum_Operators;
extern double gRec_Delta;
extern double gMutate_Size;
class Individual
{
public:
Individual();
Individual(Individual *sample);
virtual Individual* new_instance();
virtual ~Individual();
/*** Interface Methods ***/
virtual void initialize();
virtual bool valid();
double fitness_hist_diff(int index);
double fitness_hist_diff();
virtual int better(bool maximize);
virtual bool keep(bool maximize);
virtual int compare_fitness(bool maximizing, Individual *individ2);
virtual bool same(Individual *individ2);
bool created_by_variation();
double get_fitness();
void get_fitness(std::vector<double>& fitness_vec);
std::vector<double>& get_fitness_vec();
void set_fitness(double fitness);
void set_fitness(bool maximize, std::vector<double>& fitness_vec);
void set_fitness(std::vector<double>& fitness_vec);
int get_num_evaluations();
void incr_num_evaluations();
int get_age() const;
int get_age(int evals, int num_individs) const;
void set_age(int age);
void increase_age();
int get_age_move() const;
void set_age_move(int age);
void set_take_age_older();
void set_take_age_average();
void set_take_age_younger();
void set_creation(int type);
int get_creation();
void print_history();
virtual void make_random();
virtual void duplicate_settings(Individual *individ2);
virtual void duplicate(Individual *ind);
virtual bool mutate();
virtual bool mutate(std::vector<Individual*>& ind2s);
virtual bool recombine(Individual *parent2);
virtual bool recombine_rand2(Individual *parent2);
virtual bool recombine(std::vector<Individual*>& ind2s);
virtual int phenotype_distance(Individual* ind2);
virtual bool make_phenotype(void* arg);
virtual bool make_phenotype();
void write_log(char *string);
std::ostream& write_log(std::ostream& log_stream);
virtual std::istream& read(std::istream& istr);
virtual bool read(const char *fname);
virtual std::ostream& write(std::ostream& ostr);
virtual bool write(const char *fname);
void print_history_ops();
void print_results();
void print_history_full();
private:
int evaluations_; // Count of number of times evaluated.
int age_move_; // For steady-state ALPS: try_move_up()
int assign_age_type_;
IndHistory history_self_;
IndHistory history_parent1_;
IndHistory history_parent2_;
};
bool individ_compare_max(void const *elt1, void const *elt2);
bool individ_compare_min(const void *elt1, const void *elt2);
void individual_print_op_history();
void individual_print_op_history(char *string);
void individual_write_op_history(char *string);
void individual_read_op_history(const char *string);
}
#endif
| [
"ghornby@gmail.com"
] | ghornby@gmail.com |
c2176517f7871fd47e0919c621238a6ddc74564f | fa8aa8c1b3f9728d07757d3adcffe21e20f03100 | /brute/NandM/nm12.cc | 1e5fda16a97a142bbd851dcf6deea78e5fb2ed98 | [
"Apache-2.0"
] | permissive | SiverPineValley/algo | 8f9f5bfa399fe3e8d6c0a9037fc22e34761661cc | a9b8af7af32b94951910d6d9208a7d12ddce5e6f | refs/heads/master | 2022-07-11T08:46:26.893280 | 2022-07-02T05:24:05 | 2022-07-02T05:24:05 | 163,962,256 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 848 | cc | // 15666
// 백준's 코드
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int a[10]; int num[10];
vector<vector<int>> v;
void nm(int index, int start, int N, int M)
{
if(index == M)
{
vector<int> temp;
for (int i=0; i < M; i++)
{
temp.push_back(num[a[i]-1]);
}
v.push_back(temp);
return;
}
for(int i = start; i<=N; i++)
{
a[index] = i;
nm(index+1,i,N,M);
}
}
int main(void)
{
int N, M;
cin >> N >> M;
for(int i = 0; i < N; i++)
cin >> num[i];
sort(num,num+N);
nm(0,1,N,M);
sort(v.begin(), v.end());
v.erase(unique(v.begin(),v.end()),v.end());
for (auto &d : v)
{
for (int i=0; i<M; i++)
{
cout << d[i];
if (i != M-1)
cout << ' ';
}
cout << '\n';
}
return 0;
} | [
"whddls9632@naver.com"
] | whddls9632@naver.com |
46085ffa0790956b5f1a72297f4cadf9752131cd | 07ec6b72a5ff9a7c8c42f6f1213a75cb6ef2719a | /NKOJ/1081.cc | efe9256160d08072c290d41d189c8e2075943f4b | [] | no_license | cheuk-fung/Programming-Challenges | fbfbf833b19ff1063b0fca4b5d14d1e907264aa1 | 7c055fd2891b7edc865e7da8886d057a93fb41fe | refs/heads/master | 2020-12-24T17:36:21.407367 | 2020-04-26T19:44:42 | 2020-04-27T17:13:09 | 1,443,793 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 449 | cc | /*
* SRC: NKOJ 1081
* PROB: All in all
* ALGO: String
* DATE: Aug 20, 2011
* COMP: g++
*
* Created by Leewings Ac
*/
#include <iostream>
#include <string>
using namespace std;
string s, t;
int main()
{
while (cin >> s >> t) {
int cnt = 0;
for (int i = 0; i < t.length(); i++)
if (s[cnt] == t[i]) cnt++;
if (cnt == s.length()) cout << "Yes\n";
else cout << "No\n";
}
return 0;
}
| [
"osideal@gmail.com"
] | osideal@gmail.com |
19efe6e8e299c10015672544153ec64049245fb3 | 4f8e66ebd1bc845ba011907c9fc7c6400dd7a6be | /SDL_Core/src/components/TransportManager/src/ITransportManager.cpp | 5406265fc59d942e7b5a255de6e07b646b9e233d | [] | no_license | zhanzhengxiang/smartdevicelink | 0145c304f28fdcebb67d36138a3a34249723ae28 | fbf304e5c3b0b269cf37d3ab22ee14166e7a110b | refs/heads/master | 2020-05-18T11:54:10.005784 | 2014-05-18T09:46:33 | 2014-05-18T09:46:33 | 20,008,961 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,931 | cpp | /**
* \file ITransportManager.cpp
* \brief Class ITransportManager.
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
* Neither the name of the Ford Motor Company nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "CTransportManager.hpp"
NsSmartDeviceLink::NsTransportManager::ITransportManager * NsSmartDeviceLink::NsTransportManager::ITransportManager::create(void)
{
return new CTransportManager();
}
NsSmartDeviceLink::NsTransportManager::ITransportManager::~ITransportManager(void)
{
}
| [
"kburdet1@ford.com"
] | kburdet1@ford.com |
ec46ec29742090041873b9d08a6c5e5cba5c35ae | e9ed8f198134984a9342e50d96a454a0ed1e094a | /ML/Saksham-Gupta-30_SakshamGupta_2024csit1164_2/GettingStarted/ReverseANumber.cpp | e072ea87004d0291d2ea9719989ae0c6e44a222e | [] | no_license | divyaagarwal24/coderspree | 20978b6dabefd84cac1343fffa79741bd6372046 | 7aafdab534bbab8dd1073007d83517470aae3492 | refs/heads/main | 2023-08-26T12:15:52.236087 | 2021-11-10T11:48:55 | 2021-11-10T11:48:55 | 412,049,822 | 0 | 1 | null | 2021-09-30T12:09:47 | 2021-09-30T12:09:47 | null | UTF-8 | C++ | false | false | 386 | cpp | #include <iostream>
using namespace std;
int main(int argc, char **argv){
int n;
cin >> n;
int arr[10];
int temp = n, i, rem, count=0;
while (temp != 0)
{
rem = temp % 10;
temp = temp - rem;
temp = temp / 10;
count++;
arr[count] = rem;
}
for (i = 1; i <= count; i++)
{
cout << arr[i] << endl;
}
}
| [
"30565750+tushar5526@users.noreply.github.com"
] | 30565750+tushar5526@users.noreply.github.com |
6c14a9c1122021420e887f61b277d94315d7bc13 | ed3aa1d49e9d852b0097c635be8aadee202ff090 | /Programs/Otro_PWM/Otro_PWM.ino | b874ace4bd44594bb4802bd01bc82c855c69adba | [] | no_license | Juanchizo991201/Arduino | a06473d43e871e26f6d58e85bc49e85ff9f7f92f | 38d43fa8d7ad6c3641917def5319f67f5696e05c | refs/heads/main | 2023-05-26T21:41:10.006224 | 2021-06-03T13:23:16 | 2021-06-03T13:23:16 | 373,376,981 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 682 | ino |
/*FECHA: 16/04/2020
*AUTOR: Elías Montenegro Ramos
*DESCRIPCIÓN DEL PROGRAMA: PMW con un LED salida por el pin Analogo númerto 3 del Arduino
*/
const int LED = 3; //Declaramos una Constante Entera Llamada LED.
int Brillo = 0; //Declaramos una variable entera llamada Brillo.
void setup()
{
Serial.begin(9600);
pinMode(LED, OUTPUT);
}
void loop()
{
for(Brillo = 0; Brillo < 256; Brillo++)
{
analogWrite(LED, Brillo);
delay(100);
Serial.println(Brillo);
}
for(Brillo = 255; Brillo > 0; Brillo--)
{
analogWrite(LED, Brillo);
delay(100);
Serial.println(Brillo);
}
}
| [
"juan.montenegro@correo.usa.edu.co"
] | juan.montenegro@correo.usa.edu.co |
8f5a9b9c7dc8b2b7967fcc8fe8f0f7f83ba4dc77 | 56a332aa7458071503c59f0b79ef3e61b570fec7 | /src/suggestion_engine/suggestion_prototype.h | 180eb69df41118b11ee761502efa5e86d7693811 | [
"BSD-3-Clause"
] | permissive | gabeschine/maxwell | 5c6a22153e0d5565c15eed300cecdd83a5612fd1 | 2fad5ca48903b0b2758c4f3b3776ec275c740342 | refs/heads/master | 2021-01-19T23:43:36.170857 | 2017-04-04T14:55:32 | 2017-04-04T15:09:09 | 89,014,227 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 955 | h | // Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include <strstream>
#include <unordered_map>
#include "apps/maxwell/services/suggestion/proposal.fidl.h"
#include "lib/ftl/time/time_point.h"
namespace maxwell {
class ProposalPublisherImpl;
class SuggestionChannel;
struct RankedSuggestion;
struct SuggestionPrototype {
std::string suggestion_id;
ProposalPublisherImpl* source;
ftl::TimePoint timestamp;
ProposalPtr proposal;
// TODO(rosswang): Do we actually need to support multiple channels per
// suggestion? Ask is better implemented as a sometime-slave channel to Next.
// This should become clearer after we implement Interruption.
std::unordered_map<SuggestionChannel*, RankedSuggestion*> ranks_by_channel;
};
std::string short_proposal_str(const SuggestionPrototype& prototype);
} // maxwell
| [
"rosswang@google.com"
] | rosswang@google.com |
b87ee7702ac5945b76c9e72582bbea134b86133c | 64e4fabf9b43b6b02b14b9df7e1751732b30ad38 | /src/chromium/gen/gen_combined/third_party/blink/renderer/core/css/properties/shorthands/webkit_mask.h | 7c656bc59229b0cc0bae82e476060eeee5ba12c8 | [
"BSD-3-Clause"
] | permissive | ivan-kits/skia-opengl-emscripten | 8a5ee0eab0214c84df3cd7eef37c8ba54acb045e | 79573e1ee794061bdcfd88cacdb75243eff5f6f0 | refs/heads/master | 2023-02-03T16:39:20.556706 | 2020-12-25T14:00:49 | 2020-12-25T14:00:49 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,979 | h | // Copyright 2016 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.
// Generated from template:
// core/css/properties/templates/css_property_subclass.h.tmpl
// and input files:
// ../../third_party/blink/renderer/core/css/computed_style_field_aliases.json5
// ../../third_party/blink/renderer/core/css/css_properties.json5
// ../../third_party/blink/renderer/core/css/properties/css_property_methods.json5
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PROPERTIES_SHORTHAND_WEBKIT_MASK_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PROPERTIES_SHORTHAND_WEBKIT_MASK_H_
#include "third_party/blink/renderer/core/css/css_identifier_value.h"
#include "third_party/blink/renderer/core/css/css_primitive_value_mappings.h"
#include "third_party/blink/renderer/core/css/properties/shorthand.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver_state.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
namespace blink {
namespace css_shorthand {
// Implements the '-webkit-mask' CSS property
// See src/third_party/blink/renderer/core/css/properties/README.md
class WebkitMask final : public Shorthand {
public:
constexpr WebkitMask() : Shorthand(CSSPropertyID::kWebkitMask,
0
| kProperty
,
'\0'
) {}
const char* GetPropertyName() const override { return "-webkit-mask"; }
const WTF::AtomicString& GetPropertyNameAtomicString() const override {
DEFINE_STATIC_LOCAL(const AtomicString, name, ("-webkit-mask"));
return name;
}
const char* GetJSPropertyName() const override {
return "webkitMask";
}
bool ParseShorthand(bool, CSSParserTokenRange&, const CSSParserContext&, const CSSParserLocalContext&, HeapVector<CSSPropertyValue, 256>&) const override;
};
} // namespace css_shorthand
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PROPERTIES_SHORTHAND_WEBKIT_MASK_H_
| [
"trofimov_d_a@magnit.ru"
] | trofimov_d_a@magnit.ru |
d19fa0609e552bc416100d80a21af0ddafe7b538 | a75a5a272c2faea4b9f30454afe3b5d5bc10ea54 | /src/protocol/SkywellAddress.h | eb435cbaaa2c9051d7813639dc3cf47fb695fdb5 | [] | no_license | mgicode/jingtum-core | 988ab269e27584238b7ecc25bdc2d2425aa4a5ca | b189c75a9674706499ac59f9caf509f869f25f18 | refs/heads/master | 2021-01-24T21:42:00.732087 | 2018-02-28T09:45:08 | 2018-02-28T09:45:08 | 123,274,962 | 2 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 8,663 | h | //------------------------------------------------------------------------------
/*
This file is part of skywelld: https://github.com/skywell/skywelld
Copyright (c) 2012, 2013 Skywell Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#ifndef SKYWELL_PROTOCOL_SKYWELLADDRESS_H_INCLUDED
#define SKYWELL_PROTOCOL_SKYWELLADDRESS_H_INCLUDED
#include <common/base/base_uint.h>
#include <common/json/json_value.h>
#include <crypto/Base58Data.h>
#include <crypto/ECDSACanonical.h>
#include <crypto/KeyType.h>
#include <protocol/SkywellPublicKey.h>
#include <protocol/UInt160.h>
#include <protocol/UintTypes.h>
#include <protocol/ErrorCodes.h>
namespace skywell {
//
// Used to hold addresses and parse and produce human formats.
//
// XXX This needs to be reworked to store data in uint160 and uint256.
class SkywellAddress : private CBase58Data
{
private:
typedef enum
{
VER_NONE = 1,
VER_NODE_PUBLIC = 28,
VER_NODE_PRIVATE = 32,
VER_ACCOUNT_ID = 0,
VER_ACCOUNT_PUBLIC = 35,
VER_ACCOUNT_PRIVATE = 34,
VER_FAMILY_GENERATOR = 41,
VER_FAMILY_SEED = 33,
} VersionEncoding;
bool mIsValid;
public:
SkywellAddress ();
void const*
data() const noexcept
{
return vchData.data();
}
std::size_t
size() const noexcept
{
return vchData.size();
}
// For public and private key, checks if they are legal.
bool isValid () const
{
return mIsValid;
}
void clear ();
bool isSet () const;
static void clearCache ();
/** Returns the public key.
Precondition: version == VER_NODE_PUBLIC
*/
SkywellPublicKey
toPublicKey() const;
//
// Node Public - Also used for Validators
//
NodeID getNodeID () const;
Blob const& getNodePublic () const;
std::string humanNodePublic () const;
bool setNodePublic (std::string const& strPublic);
void setNodePublic (Blob const& vPublic);
bool verifyNodePublic (uint256 const& hash, Blob const& vchSig,
ECDSA mustBeFullyCanonical) const;
bool verifyNodePublic (uint256 const& hash, std::string const& strSig,
ECDSA mustBeFullyCanonical) const;
static SkywellAddress createNodePublic (SkywellAddress const& naSeed);
static SkywellAddress createNodePublic (Blob const& vPublic);
static SkywellAddress createNodePublic (std::string const& strPublic);
//
// Node Private
//
Blob const& getNodePrivateData () const;
uint256 getNodePrivate () const;
std::string humanNodePrivate () const;
bool setNodePrivate (std::string const& strPrivate);
void setNodePrivate (Blob const& vPrivate);
void setNodePrivate (uint256 hash256);
void signNodePrivate (uint256 const& hash, Blob& vchSig) const;
static SkywellAddress createNodePrivate (SkywellAddress const& naSeed);
//
// Accounts IDs
//
Account getAccountID () const;
std::string humanAccountID () const;
bool setAccountID (
std::string const& strAccountID,
Base58::Alphabet const& alphabet = Base58::getSkywellAlphabet());
void setAccountID (Account const& hash160In);
static SkywellAddress createAccountID (Account const& uiAccountID);
//
// Accounts Public
//
Blob const& getAccountPublic () const;
std::string humanAccountPublic () const;
bool setAccountPublic (std::string const& strPublic);
void setAccountPublic (Blob const& vPublic);
void setAccountPublic (SkywellAddress const& generator, int seq);
bool accountPublicVerify (Blob const& message, Blob const& vucSig,
ECDSA mustBeFullyCanonical) const;
static SkywellAddress createAccountPublic (Blob const& vPublic)
{
SkywellAddress naNew;
naNew.setAccountPublic (vPublic);
return naNew;
}
static std::string createHumanAccountPublic (Blob const& vPublic)
{
return createAccountPublic (vPublic).humanAccountPublic ();
}
// Create a deterministic public key from a public generator.
static SkywellAddress createAccountPublic (
SkywellAddress const& naGenerator, int iSeq);
//
// Accounts Private
//
uint256 getAccountPrivate () const;
bool setAccountPrivate (std::string const& strPrivate);
void setAccountPrivate (Blob const& vPrivate);
void setAccountPrivate (uint256 hash256);
void setAccountPrivate (SkywellAddress const& naGenerator,
SkywellAddress const& naSeed, int seq);
Blob accountPrivateSign (Blob const& message) const;
// Encrypt a message.
Blob accountPrivateEncrypt (
SkywellAddress const& naPublicTo, Blob const& vucPlainText) const;
// Decrypt a message.
Blob accountPrivateDecrypt (
SkywellAddress const& naPublicFrom, Blob const& vucCipherText) const;
static SkywellAddress createAccountPrivate (
SkywellAddress const& generator, SkywellAddress const& seed, int iSeq);
static SkywellAddress createAccountPrivate (Blob const& vPrivate)
{
SkywellAddress naNew;
naNew.setAccountPrivate (vPrivate);
return naNew;
}
//
// Generators
// Use to generate a master or regular family.
//
Blob const& getGenerator () const;
std::string humanGenerator () const;
bool setGenerator (std::string const& strGenerator);
void setGenerator (Blob const& vPublic);
// void setGenerator(SkywellAddress const& seed);
// Create generator for making public deterministic keys.
static SkywellAddress createGeneratorPublic (SkywellAddress const& naSeed);
//
// Seeds
// Clients must disallow reconizable entries from being seeds.
uint128 getSeed () const;
std::string humanSeed () const;
std::string humanSeed1751 () const;
bool setSeed (std::string const& strSeed);
int setSeed1751 (std::string const& strHuman1751);
bool setSeedGeneric (std::string const& strText);
void setSeed (uint128 hash128);
void setSeedRandom ();
static SkywellAddress createSeedRandom ();
static SkywellAddress createSeedGeneric (std::string const& strText);
std::string ToString () const
{return static_cast<CBase58Data const&>(*this).ToString();}
template <class Hasher>
friend
void
hash_append(Hasher& hasher, SkywellAddress const& value)
{
using beast::hash_append;
hash_append(hasher, static_cast<CBase58Data const&>(value));
}
friend
bool
operator==(SkywellAddress const& lhs, SkywellAddress const& rhs)
{
return static_cast<CBase58Data const&>(lhs) ==
static_cast<CBase58Data const&>(rhs);
}
friend
bool
operator <(SkywellAddress const& lhs, SkywellAddress const& rhs)
{
return static_cast<CBase58Data const&>(lhs) <
static_cast<CBase58Data const&>(rhs);
}
};
//------------------------------------------------------------------------------
inline
bool
operator!=(SkywellAddress const& lhs, SkywellAddress const& rhs)
{
return !(lhs == rhs);
}
inline
bool
operator >(SkywellAddress const& lhs, SkywellAddress const& rhs)
{
return rhs < lhs;
}
inline
bool
operator<=(SkywellAddress const& lhs, SkywellAddress const& rhs)
{
return !(rhs < lhs);
}
inline
bool
operator>=(SkywellAddress const& lhs, SkywellAddress const& rhs)
{
return !(lhs < rhs);
}
struct KeyPair
{
SkywellAddress secretKey;
SkywellAddress publicKey;
};
uint256 keyFromSeed (uint128 const& seed);
SkywellAddress getSeedFromRPC (Json::Value const& params);
KeyPair generateKeysFromSeed (KeyType keyType, SkywellAddress const& seed);
} // skywell
#endif
| [
"beautifularea@gmail.com"
] | beautifularea@gmail.com |
f2d14e3c7b0a91b10beafe9a66962d1cd23abf08 | 055f943f2cba917ff71f5db9f2b2b9e963ddb8f4 | /company/Manager_Dev/include/init/ObjectFactoy.h | ddab832dbbcadb9c8ec7d25720257ae28fd74de0 | [] | no_license | zj23564/GitProject | 1c64daf39214d45b5516e48e104b015f5152bd38 | b6e272d47fc68e02db5f696595d8d8c9fdb2e2d2 | refs/heads/master | 2021-01-18T14:02:54.088766 | 2013-01-30T08:11:28 | 2013-01-30T08:11:28 | 7,910,189 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 6,197 | h | #ifndef OBJECTFACTOY_H_INCLUDED
#define OBJECTFACTOY_H_INCLUDED
#include <queue>
#include <semaphore.h>
#include "../data_define/Data_Define.h"
#include "../ThreadPool/Mutex.h"
#include "../ThreadPool/ThreadManage.h"
#include "../../Device_Job.h"
#include "Mem_Data.h"
#include "../../HT_NET_Engine.h"
#include "../devLogin/devLoginManager.h"
using namespace std;
class ObjectFactoy
{
public :
ObjectFactoy();
~ObjectFactoy();
unsigned long PacketType;
static void GetData(conn_t *conn, char *buf, int len, void *context);
static void GetData_Device(conn_t *conn, char *buf, int len, void *context);
static ObjectFactoy * GetFactoryInstance();
CMutex GetqueueMutex(){return m_queueMutex;}
CThreadManage m_ThreadMag;
CThreadManage m_ThreadSend;
CThreadManage m_ThreadRegister;
MEM_DATA m_MemData;
DEVMANAGER m_devManager;
int GetQueueSize();
void DealqueueData();
void DealqueueDeviceData();
CJob* GetJobObject(QueueData * Data);
void GetJob_Send(); //处理发送队列里面的数据
void Gettime(void); //取得系统当前时间
void ReadXml(); //读取xml请求命令文件
void* DealXml(void *arg); //处理XML数据
int Device_Register(void); //设备注册函数
int Ans_Xml(DEVICE_DATA* data); //解析xml的标签内容
int start_epoll(void);
void Change_Device_Status(int ID); //检测到设备掉线了,将内存中设备数据更改为离线状态
void Deal_Device_LineOff(void); //将离线设备信息发送给主控端和报警服务器
conn_t * GetMctSocket() {return fd_mct;}
conn_t * GetTVWallSocket() {return fd_tvwall;}
conn_t * GetAlarmSocket() {return fd_alarm;}
conn_t * GetLogSocket() {return fd_log;}
conn_t * GetStreamSocket() {return fd_stream;}
conn_t * GetStorageSocket() {return fd_storage;}
void SetLogSocket(conn_t* fd){fd_log = fd;}
void SetMctSocket(conn_t* fd){fd_mct = fd;}
void SetTVWallSocket(conn_t* fd){fd_tvwall = fd;}
void SetAlarmSocket(conn_t* fd){fd_alarm = fd;}
void SetStreamSocket(conn_t* fd){fd_stream = fd;}
void SetStorageSocket(conn_t* fd){fd_storage = fd;}
void SetTVWallServerInfo(char* info) { memcpy(&m_TVWallServer,info,sizeof(ServerInfo));}
void SetAlarmServerInfo(char* info) {memcpy(&m_AlarmServer,info,sizeof(ServerInfo));}
void SetLogServerInfo(char* info) {memcpy(&m_LogServer,info,sizeof(ServerInfo));}
void SetStreamServerInfo(char* info) {memcpy(&m_StreamServer,info,sizeof(ServerInfo));}
void SetStorageServerInfo(char* info) {memcpy(&m_StorageServer,info,sizeof(ServerInfo));}
ServerInfo* GetTVWallServerInfo() {return &m_TVWallServer;}
ServerInfo* GetAlarmServerInfo() {return &m_AlarmServer;}
ServerInfo* GetLogServerInfo() {return &m_LogServer;}
ServerInfo* GetStreamServerInfo() {return &m_StreamServer;}
ServerInfo* GetStorageServerInfo() {return &m_StorageServer;}
//SendData* Get_All_Device(){return All_Device;}
//void Get_queue_size(){queue_size = m_queue.size();}
static sem_t sem;
static sem_t sem_deal;
static sem_t start;
static sem_t start_chk_send;
static sem_t sem_deal_send;
static sem_t sem_send;
static sem_t sem_scanf;
static sem_t start_device;
static sem_t sem_deal_device;
static sem_t sem_device;
static CMutex m_sMutex; //用于使用mysql变量的互斥量
static CMutex m_queueMutex;
static CMutex m_queueSendMutex;
static queue<QueueSendData*> m_sendaddr;
int queue_size;
int login_user_sid;
static bool flag;
static bool flag_send;
static bool flag_device;
char read_buff1[1024];
char read_buff2[1024];
char read_buff3[1024];
char read_buff4[1024];
char timebuff[1024];
// map<int,MAP_USER_NAME*> login_user; //sessionID对应登录用户
map<int,USERINFO*> login_user;
map<int,MAP_USER_NAME*>::iterator it_login;
map<int,LOG_DEVICE*> Login_device; //在线设备的map表 套接口对应
map<int,LOG_DEVICE*>::iterator it_device;
MSSINFO mssinfo;
private :
static queue<QueueData* > m_queue; //收到的数据的队列
//数据经过解析处理后需要回馈的数据的地址指针队列,用于发送队列
static queue<DEVICE_DATA* > m_device_data; //收到的设备数据的队列
static DEVICE_DATA* device_data;
static ObjectFactoy * p_Factory;
static QueueData* m_qData;
conn_t * fd_mct; //上线的主控端套接口
conn_t * fd_alarm; //上线的报警服务器套接口
conn_t * fd_log; //上线的log server套接口
conn_t * fd_storage; //存储模块套接口
conn_t * fd_stream; //流媒体模块套接口
conn_t * fd_tvwall; //tv wall
ServerInfo m_AlarmServer;
ServerInfo m_StreamServer;
ServerInfo m_LogServer;
ServerInfo m_TVWallServer;
ServerInfo m_StorageServer;
// SendData* All_Device;
};
#endif // OBJECTFACTOY_H_INCLUDED
| [
"zj23564@gmail.com"
] | zj23564@gmail.com |
a3060e2a61d7ea211c849b3089ba5f1eb8136736 | 6fd3a7c98543145c107b6644b3fbad7775cd1b16 | /hlf-deployment-prod/gatekeeper/node_modules/ibm_db/src/odbc.cpp | 8613717b94d605812e604ef46251376fd60f06f0 | [
"MIT"
] | permissive | genrich9d/GKProject | 147b802ed58bf7e482712f86be454cb469adac9c | a0d1cbf0b968ee7c8fcadc0d8ddff19122fed90a | refs/heads/master | 2023-03-18T02:41:10.943083 | 2020-04-22T13:50:29 | 2020-04-22T13:50:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 44,274 | cpp | /*
Copyright (c) 2013, Dan VerWeire <dverweire@gmail.com>
Copyright (c) 2010, Lee Smith<notwink@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef __MVS__
#define _AE_BIMODAL
#endif
#include <string.h>
#include <v8.h>
#include <node.h>
#include <node_version.h>
#include <time.h>
#include <uv.h>
#include "odbc.h"
#include "odbc_connection.h"
#include "odbc_result.h"
#include "odbc_statement.h"
#ifdef _WIN32
#include "strptime.h"
#endif
#define FILE_PARAM 3
using namespace v8;
using namespace node;
uv_mutex_t ODBC::g_odbcMutex;
uv_async_t ODBC::g_async;
Nan::Persistent<Function> ODBC::constructor;
NAN_MODULE_INIT(ODBC::Init)
{
DEBUG_PRINTF("ODBC::Init\n");
Nan::HandleScope scope;
Local<FunctionTemplate> constructor_template = Nan::New<FunctionTemplate>(New);
// Constructor Template
constructor_template->SetClassName(Nan::New("ODBC").ToLocalChecked());
// Reserve space for one Handle<Value>
constructor_template->InstanceTemplate()->SetInternalFieldCount(1);
PropertyAttribute constant_attributes = static_cast<PropertyAttribute>(ReadOnly | DontDelete);
constructor_template->Set(Nan::New<String>("SQL_CLOSE").ToLocalChecked(), Nan::New<Number>(SQL_CLOSE), constant_attributes);
constructor_template->Set(Nan::New<String>("SQL_DROP").ToLocalChecked(), Nan::New<Number>(SQL_DROP), constant_attributes);
constructor_template->Set(Nan::New<String>("SQL_UNBIND").ToLocalChecked(), Nan::New<Number>(SQL_UNBIND), constant_attributes);
constructor_template->Set(Nan::New<String>("SQL_RESET_PARAMS").ToLocalChecked(), Nan::New<Number>(SQL_RESET_PARAMS), constant_attributes);
constructor_template->Set(Nan::New<String>("SQL_DESTROY").ToLocalChecked(), Nan::New<Number>(SQL_DESTROY), constant_attributes);
constructor_template->Set(Nan::New<String>("FETCH_ARRAY").ToLocalChecked(), Nan::New<Number>(FETCH_ARRAY), constant_attributes);
NODE_ODBC_DEFINE_CONSTANT(constructor_template, FETCH_OBJECT);
// Prototype Methods
Nan::SetPrototypeMethod(constructor_template, "createConnection", CreateConnection);
Nan::SetPrototypeMethod(constructor_template, "createConnectionSync", CreateConnectionSync);
// Attach the Database Constructor to the target object
Local<Function> function = Nan::GetFunction(constructor_template).ToLocalChecked();
constructor.Reset(function);
Nan::Set(target, Nan::New<String>("ODBC").ToLocalChecked(), function);
#if NODE_VERSION_AT_LEAST(0, 7, 9)
// Initialize uv_async so that we can prevent node from exiting
//uv_async_init( uv_default_loop(),
// &ODBC::g_async,
// ODBC::WatcherCallback);
// Not sure if the init automatically calls uv_ref() because there is weird
// behavior going on. When ODBC::Init is called which initializes the
// uv_async_t g_async above, there seems to be a ref which will keep it alive
// but we only want this available so that we can uv_ref() later on when
// we have a connection.
// so to work around this, I am possibly mistakenly calling uv_unref() once
// so that there are no references on the loop.
//uv_unref((uv_handle_t *)&ODBC::g_async);
#endif
// Initialize the cross platform mutex provided by libuv
uv_mutex_init(&ODBC::g_odbcMutex);
}
ODBC::~ODBC()
{
DEBUG_PRINTF("ODBC::~ODBC\n");
this->Free();
}
void ODBC::Free()
{
DEBUG_PRINTF("ODBC::Free: m_hEnv = %X\n", m_hEnv);
if (m_hEnv) {
SQLFreeHandle(SQL_HANDLE_ENV, m_hEnv);
m_hEnv = (SQLHENV)NULL;
}
}
NAN_METHOD(ODBC::New)
{
DEBUG_PRINTF("ODBC::New - Entry\n");
Nan::HandleScope scope;
ODBC* dbo = new ODBC();
dbo->Wrap(info.Holder());
dbo->m_hEnv = (SQLHENV)NULL;
// Initialize the Environment handle
int ret = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &dbo->m_hEnv);
if (!SQL_SUCCEEDED(ret)) {
DEBUG_PRINTF("ODBC::New - ERROR ALLOCATING ENV HANDLE!!\n");
Local<Value> objError = ODBC::GetSQLError(SQL_HANDLE_ENV, dbo->m_hEnv);
return Nan::ThrowError(objError);
}
// Use ODBC 3.x behavior
SQLSetEnvAttr(dbo->m_hEnv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER);
info.GetReturnValue().Set(info.Holder());
DEBUG_PRINTF("ODBC::New - Exit\n");
}
//void ODBC::WatcherCallback(uv_async_t *w, int revents) {
// DEBUG_PRINTF("ODBC::WatcherCallback\n");
// //i don't know if we need to do anything here
//}
/*
* CreateConnection
*/
NAN_METHOD(ODBC::CreateConnection)
{
DEBUG_PRINTF("ODBC::CreateConnection - Entry\n");
Nan::HandleScope scope;
Local<Function> cb = Nan::To<v8::Function>(info[0]).ToLocalChecked();
Nan::Callback *callback = new Nan::Callback(cb);
//REQ_FUN_ARG(0, cb);
ODBC* dbo = Nan::ObjectWrap::Unwrap<ODBC>(info.Holder());
//initialize work request
uv_work_t* work_req = (uv_work_t *) (calloc(1, sizeof(uv_work_t)));
MEMCHECK( work_req );
//initialize our data
create_connection_work_data* data =
(create_connection_work_data *) (calloc(1, sizeof(create_connection_work_data)));
MEMCHECK( data );
data->cb = callback;
data->dbo = dbo;
work_req->data = data;
uv_queue_work(uv_default_loop(), work_req, UV_CreateConnection, (uv_after_work_cb)UV_AfterCreateConnection);
dbo->Ref();
info.GetReturnValue().Set(Nan::Undefined());
DEBUG_PRINTF("ODBC::CreateConnection - Exit\n");
}
void ODBC::UV_CreateConnection(uv_work_t* req)
{
DEBUG_PRINTF("ODBC::UV_CreateConnection - Entry\n");
//get our work data
create_connection_work_data* data = (create_connection_work_data *)(req->data);
//allocate a new connection handle
data->result = SQLAllocHandle(SQL_HANDLE_DBC, data->dbo->m_hEnv, &data->hDBC);
DEBUG_PRINTF("ODBC::UV_CreateConnection - Exit: hDBC = %X\n", data->hDBC);
}
void ODBC::UV_AfterCreateConnection(uv_work_t* req, int status)
{
DEBUG_PRINTF("ODBC::UV_AfterCreateConnection - Entry\n");
Nan::HandleScope scope;
create_connection_work_data* data = (create_connection_work_data *)(req->data);
Nan::TryCatch try_catch;
if (!SQL_SUCCEEDED(data->result)) {
Local<Value> info[1];
info[0] = ODBC::GetSQLError(SQL_HANDLE_ENV, data->dbo->m_hEnv);
data->cb->Call(1, info);
}
else {
Local<Value> info[2];
info[0] = Nan::New<External>((void*)(intptr_t)data->dbo->m_hEnv);
info[1] = Nan::New<External>((void*)(intptr_t)data->hDBC);
Local<Object> js_result = Nan::NewInstance(Nan::New(ODBCConnection::constructor), 2, info).ToLocalChecked();
info[0] = Nan::Null();
info[1] = js_result;
data->cb->Call(2, info);
}
if (try_catch.HasCaught()) {
Nan::FatalException(try_catch);
}
data->dbo->Unref();
delete data->cb;
free(data);
free(req);
DEBUG_PRINTF("ODBC::UV_AfterCreateConnection - Exit\n");
}
/*
* CreateConnectionSync
*/
NAN_METHOD(ODBC::CreateConnectionSync)
{
DEBUG_PRINTF("ODBC::CreateConnectionSync - Entry\n");
Nan::HandleScope scope;
ODBC* dbo = Nan::ObjectWrap::Unwrap<ODBC>(info.Holder());
SQLHDBC hDBC;
//allocate a new connection handle
SQLRETURN ret = SQLAllocHandle(SQL_HANDLE_DBC, dbo->m_hEnv, &hDBC);
if (!SQL_SUCCEEDED(ret)) {
//TODO: do something!
}
Local<Value> params[2];
params[0] = Nan::New<External>((void*)(intptr_t)dbo->m_hEnv);
params[1] = Nan::New<External>((void*)(intptr_t)hDBC);
Local<Object> js_result = Nan::NewInstance(Nan::New(ODBCConnection::constructor), 2, params).ToLocalChecked();
DEBUG_PRINTF("ODBC::CreateConnectionSync - Exit: hDBC = %X\n", hDBC);
info.GetReturnValue().Set(js_result);
}
/*
* GetColumns
*/
Column* ODBC::GetColumns(SQLHSTMT hStmt, short* colCount)
{
SQLRETURN ret;
SQLSMALLINT buflen;
SQLSMALLINT typebuflen;
DEBUG_PRINTF("ODBC::GetColumns - Entry\n");
//always reset colCount for the current result set to 0;
*colCount = 0;
//get the number of columns in the result set
ret = SQLNumResultCols(hStmt, colCount);
if (!SQL_SUCCEEDED(ret)) {
return new Column[0];
}
Column *columns = new Column[*colCount];
char colname[MAX_FIELD_SIZE];
for (int i = 0; i < *colCount; i++) {
//save the index number of this column
columns[i].index = i + 1;
colname[0] = '\0';
buflen = 0;
//get the column name
ret = SQLColAttribute( hStmt,
columns[i].index,
#ifdef STRICT_COLUMN_NAMES
SQL_DESC_NAME,
#else
SQL_DESC_LABEL,
#endif
colname,
(SQLSMALLINT) MAX_FIELD_SIZE,
&buflen,
NULL);
//store the len attribute
columns[i].name_len = buflen;
if(buflen> 0)
{
columns[i].name = new unsigned char[buflen+2];
memcpy(columns[i].name, colname, buflen);
columns[i].name[buflen] = '\0';
columns[i].name[buflen+1] = '\0';
}
DEBUG_PRINTF("ODBC::GetColumns index = %i, buflen=%i\n", columns[i].index, buflen);
//get max column length
ret = SQLColAttribute( hStmt,
columns[i].index,
SQL_DESC_DISPLAY_SIZE,
NULL,
0,
NULL,
&columns[i].max_display_len);
//get column precision
ret = SQLColAttribute( hStmt,
columns[i].index,
SQL_DESC_PRECISION,
NULL,
0,
NULL,
&columns[i].precision);
//get column scale
ret = SQLColAttribute( hStmt,
columns[i].index,
SQL_DESC_SCALE,
NULL,
0,
NULL,
&columns[i].scale);
//get column length
ret = SQLColAttribute( hStmt,
columns[i].index,
SQL_DESC_LENGTH,
NULL,
0,
NULL,
&columns[i].field_len);
//get the column type and store it directly in column[i].type
ret = SQLColAttribute( hStmt,
columns[i].index,
SQL_DESC_CONCISE_TYPE,
NULL,
0,
NULL,
&columns[i].type);
columns[i].type_name = new unsigned char[(MAX_FIELD_SIZE)];
//set the first byte of type_name to \0 instead of memsetting the entire buffer
columns[i].type_name[0] = '\0';
ret = SQLColAttribute( hStmt,
columns[i].index,
SQL_DESC_TYPE_NAME,
columns[i].type_name,
(SQLSMALLINT) (MAX_FIELD_SIZE),
&typebuflen,
NULL);
}
DEBUG_PRINTF("ODBC::GetColumns - Exit\n");
return columns;
}
/*
* FreeColumns
*/
void ODBC::FreeColumns(Column* columns, short* colCount)
{
for(int i = 0; i < *colCount; i++) {
delete [] columns[i].name;
delete [] columns[i].type_name;
}
delete [] columns;
*colCount = 0;
}
/*
* GetColumnValue
*/
Local<Value> ODBC::GetColumnValue( SQLHSTMT hStmt, Column column,
uint16_t* buffer, int bufferLength)
{
Nan::EscapableHandleScope scope;
SQLLEN len = 0;
int ret;
Local<String> str;
SQLSMALLINT ctype = SQL_C_TCHAR;
char * errmsg = (char *) "[node-odbc] Error in ODBC::GetColumnValue";
#ifdef UNICODE
int terCharLen = 2;
#else
int terCharLen = 1;
#endif
DEBUG_PRINTF("Column Type : %i\t%i\t%i\t%i\n",column.type, SQL_DATETIME,
SQL_TIMESTAMP, SQL_TYPE_TIME);
switch ((int) column.type)
{
case SQL_INTEGER :
case SQL_SMALLINT :
case SQL_TINYINT :
{
SQLINTEGER value;
ret = SQLGetData( hStmt,
column.index,
SQL_C_SLONG,
&value,
sizeof(value),
&len);
DEBUG_PRINTF("ODBC::GetColumnValue - Integer: index=%i name=%s type=%i len=%i ret=%i\n",
column.index, column.name, column.type, len, ret);
if ((int)len == SQL_NULL_DATA) {
return scope.Escape(Nan::Null());
}
else if((int)len == sizeof(int)){
return scope.Escape(Nan::New<Number>((int)value));
}
else if((int)len == sizeof(short)){
return scope.Escape(Nan::New<Number>((short)value));
}
else if((int)len == sizeof(long)){
return scope.Escape(Nan::New<Number>((long)value));
}
else {
return scope.Escape(Nan::New<Number>(value));
}
}
break;
case SQL_FLOAT :
case SQL_REAL :
case SQL_DECFLOAT :
case SQL_DOUBLE :
{
double value;
ret = SQLGetData( hStmt,
column.index,
SQL_C_DOUBLE,
&value,
sizeof(value),
&len);
DEBUG_PRINTF("ODBC::GetColumnValue - Number: index=%i name=%s type=%i len=%i ret=%i val=%f\n",
column.index, column.name, column.type, len, ret, value);
if((int)len == SQL_NULL_DATA) {
return scope.Escape(Nan::Null());
}
else {
return scope.Escape(Nan::New<Number>(value));
}
}
break;
case SQL_DATETIME :
case SQL_TIMESTAMP :
{
SQL_TIMESTAMP_STRUCT odbcTime;
#ifdef _WIN32
struct tm timeInfo = {};
ret = SQLGetData(hStmt, column.index, SQL_C_CHAR,
&odbcTime, sizeof(odbcTime), &len);
#else
#if defined(_AIX) || defined (__MVS__)
struct tm timeInfo = {0,0,0,0,0,0,0,0,0};
#else
struct tm timeInfo = {0,0,0,0,0,0,0,0,0,0,0};
#endif
ret = SQLGetData(hStmt, column.index, SQL_C_TYPE_TIMESTAMP,
&odbcTime, sizeof(odbcTime), &len);
#endif
DEBUG_PRINTF("ODBC::GetColumnValue - Unix Timestamp: index=%i name=%s "
"type=%i len=%i\n", column.index, column.name, column.type, len);
if((int)len == SQL_NULL_DATA) {
return scope.Escape(Nan::Null());
}
else {
timeInfo.tm_year = odbcTime.year - 1900;
timeInfo.tm_mon = odbcTime.month - 1;
timeInfo.tm_mday = odbcTime.day;
timeInfo.tm_hour = odbcTime.hour;
timeInfo.tm_min = odbcTime.minute;
timeInfo.tm_sec = odbcTime.second;
//a negative value means that mktime() should use timezone information
//and system databases to attempt to determine whether DST is in effect
//at the specified time.
timeInfo.tm_isdst = -1;
#ifdef TIMEGM
return scope.Escape(Nan::New<Date>((double(timegm(&timeInfo)) * 1000) +
(odbcTime.fraction / 1000000)).ToLocalChecked());
#else
return scope.Escape(Nan::New<Date>((double(mktime(&timeInfo)) * 1000) +
(odbcTime.fraction / 1000000)).ToLocalChecked());
#endif
}
}
break;
case SQL_BIT :
{
char bit[4] = {'\0'};
ret = SQLGetData( hStmt,
column.index,
SQL_C_CHAR,
&bit,
4,
&len);
DEBUG_PRINTF("ODBC::GetColumnValue - Bit: index=%i name=%s type=%i len=%i\n",
column.index, column.name, column.type, len);
if((int)len == SQL_NULL_DATA) {
return scope.Escape(Nan::Null());
}
else {
return scope.Escape(Nan::New((*bit == '0') ? false : true));
}
}
break;
/*
case SQL_NUMERIC :
case SQL_DECIMAL :
case SQL_BIGINT :
case SQL_BLOB :
*/
case SQL_TYPE_TIME:
DEBUG_PRINTF("SQL_TIME SELECTED\n");
case SQL_NUMERIC :
if((int) column.type == SQL_NUMERIC)
DEBUG_PRINTF("NUMERIC DATA SELECTED\n");
case SQL_DECIMAL :
if((int) column.type == SQL_DECIMAL)
DEBUG_PRINTF("DECIMAL DATA SELECTED\n");
case SQL_BIGINT :
if((int) column.type == SQL_BIGINT)
DEBUG_PRINTF("BIGINT DATA SELECTED\n");
case SQL_DBCLOB:
if((int) column.type == SQL_DBCLOB)
{
ctype = SQL_C_CHAR;
terCharLen = 2;
DEBUG_PRINTF("DBCLOB DATA SELECTED\n");
}
case SQL_BLOB :
if((int) column.type == SQL_BLOB)
{
terCharLen = 0;
ctype = SQL_C_BINARY;
DEBUG_PRINTF("BLOB DATA SELECTED\n");
}
default :
uint16_t * tmp_out_ptr = NULL;
int newbufflen = bufferLength + terCharLen;
int secondGetData = 0;
len = 0;
buffer = (uint16_t*)malloc(newbufflen);
memset(buffer, '\0', newbufflen);
ret = SQLGetData( hStmt,
column.index,
ctype,
(char *) buffer,
newbufflen,
&len);
DEBUG_PRINTF("ODBC::GetColumnValue - String: index=%i name=%s type=%i len=%i "
"ret=%i bufferLength=%i\n", column.index, column.name,
column.type, len, ret, bufferLength);
newbufflen = len;
if( ret == SQL_SUCCESS_WITH_INFO )
{
newbufflen = len + terCharLen;
if(newbufflen > 0x3fffffff) {
newbufflen = 0x3fffffff;
}
tmp_out_ptr = (uint16_t *)malloc( newbufflen );
if(tmp_out_ptr == NULL)
{
ret = -3;
errmsg = (char*)"Failed to allocate memory buffer for column data.";
DEBUG_PRINTF("Failed to allocate memory buffer of size %d\n", newbufflen);
}
else
{
memcpy(tmp_out_ptr, (char *) buffer, bufferLength);
free((uint8_t *)buffer);
buffer = tmp_out_ptr;
len = 0;
ret = SQLGetData( hStmt,
column.index,
ctype,
(char *) buffer + bufferLength,
newbufflen,
&len);
DEBUG_PRINTF("ODBC::GetColumnValue - String: index=%i name=%s type=%i len=%i "
"ret=%i bufferLength=%i\n", column.index, column.name,
column.type, len, ret, newbufflen);
newbufflen = len + bufferLength;
secondGetData = 1;
}
}
if((int)len == SQL_NULL_DATA) {
return scope.Escape(Nan::Null());
}
// In case of secondGetData, we already have result from first getdata
// so return the result irrespective of ret as we already have some data.
else if (SQL_SUCCEEDED(ret) || secondGetData)
{
if(ctype == SQL_C_BINARY)
str = Nan::NewOneByteString((uint8_t *) buffer, newbufflen).ToLocalChecked();
else {
#ifdef UNICODE
str = Nan::New((uint16_t *) buffer).ToLocalChecked();
#else
str = Nan::New((char *) buffer).ToLocalChecked();
#endif
}
if(tmp_out_ptr) free(tmp_out_ptr);
//return scope.Escape(Nan::CopyBuffer((char*)buffer, 39767).ToLocalChecked());
}
else
{
DEBUG_PRINTF("ODBC::GetColumnValue - An error has occurred, ret = %i\n", ret);
//an error has occured
//possible values for ret are SQL_ERROR (-1) and SQL_INVALID_HANDLE (-2)
//If we have an invalid handle, then stuff is way bad and we should abort
//immediately. Memory errors are bound to follow as we must be in an
//inconsisant state.
if(ret == SQL_INVALID_HANDLE)
{
#ifdef __MVS__
// Workaround(zOS): The ascii conversion tool has issues with %i in the following
// fprintf string. Forcing it to __fprintf_a and setting _AE_BIMODAL
__fprintf_a(stdout, "Invalid Handle: SQLGetData retrun code = %i, stmt handle = %ld:%ld"
", columnType = %i, index = %i\n", ret, (long)(hStmt) >> 16 & 0x0000ffff,
(long)(hStmt) & 0x0000ffff, (int) column.type, column.index);
#else
fprintf(stdout, "Invalid Handle: SQLGetData retrun code = %i, stmt handle = %ld:%ld"
", columnType = %i, index = %i\n", ret, (long)(hStmt) >> 16 & 0x0000ffff,
(long)(hStmt) & 0x0000ffff, (int) column.type, column.index);
#endif
assert(ret != SQL_INVALID_HANDLE);
}
Nan::ThrowError(ODBC::GetSQLError( SQL_HANDLE_STMT, hStmt, errmsg));
return scope.Escape(Nan::Undefined());
break;
}
return scope.Escape(str);
}
}
/*
* GetOutputParameter
*/
Local<Value> ODBC::GetOutputParameter( Parameter prm )
{
Nan::EscapableHandleScope scope;
Local<String> str;
DEBUG_PRINTF("SQL Type of parameter: %i\n",prm.type);
switch ((int) prm.type)
{
case SQL_INTEGER :
case SQL_SMALLINT :
case SQL_TINYINT :
case SQL_NUMERIC :
if((int) prm.type == SQL_NUMERIC)
DEBUG_PRINTF("NUMERIC DATA SELECTED\n");
case SQL_BIGINT :
if((int) prm.type == SQL_BIGINT)
DEBUG_PRINTF("BIGINT DATA SELECTED\n");
{
if((int)prm.length == SQL_NULL_DATA)
{
DEBUG_PRINTF("ODBC::GetOutputParameter - Integer: paramtype=%i "
"c_type=%i type=%i buf_len=%i len=%i val=%i\n",
prm.paramtype, prm.c_type, prm.type, prm.buffer_length,
prm.length, prm.buffer);
return scope.Escape(Nan::Null());
}
else if((int)prm.length == sizeof(int)){
DEBUG_PRINTF("ODBC::GetOutputParameter - Integer: paramtype=%i "
"c_type=%i type=%i buf_len=%i len=%i intval=%i\n",
prm.paramtype, prm.c_type, prm.type, prm.buffer_length,
prm.length, *(int*)prm.buffer);
return scope.Escape(Nan::New<Number>(*(int*)prm.buffer));
}
else if((int)prm.length == sizeof(short)){
DEBUG_PRINTF("ODBC::GetOutputParameter - Integer: paramtype=%i "
"c_type=%i type=%i buf_len=%i len=%i shortval=%i\n",
prm.paramtype, prm.c_type, prm.type, prm.buffer_length,
prm.length, *(short*)prm.buffer);
return scope.Escape(Nan::New<Number>(*(short*)prm.buffer));
}
else if((int)prm.length == sizeof(long)){
DEBUG_PRINTF("ODBC::GetOutputParameter - Integer: paramtype=%i "
"c_type=%i type=%i buf_len=%i len=%i longval=%i\n",
prm.paramtype, prm.c_type, prm.type, prm.buffer_length,
prm.length, *(long*)prm.buffer);
return scope.Escape(Nan::New<Number>(*(long*)prm.buffer));
}
else {
DEBUG_PRINTF("ODBC::GetOutputParameter - Integer: paramtype=%i "
"c_type=%i type=%i buf_len=%i len=%i charval=%s\n",
prm.paramtype, prm.c_type, prm.type, prm.buffer_length,
prm.length, *(char*)prm.buffer);
return scope.Escape(Nan::New<Number>(*(char *)prm.buffer));
}
}
break;
case SQL_DECIMAL :
if((int) prm.type == SQL_DECIMAL)
DEBUG_PRINTF("DECIMAL DATA SELECTED\n");
case SQL_FLOAT :
case SQL_REAL :
case SQL_DOUBLE :
{
if((int)prm.length == SQL_NULL_DATA)
{
DEBUG_PRINTF("ODBC::GetOutputParameter - Number: paramtype=%i c_type=%i "
"type=%i buf_len=%i len=%i nullval=%f\n",
prm.paramtype, prm.c_type, prm.type, prm.buffer_length,
prm.length, prm.buffer);
return scope.Escape(Nan::Null());
}
else {
DEBUG_PRINTF("ODBC::GetOutputParameter - Number: paramtype=%i c_type=%i "
"type=%i buf_len=%i len=%i floatval=%f\n",
prm.paramtype, prm.c_type, prm.type, prm.buffer_length,
prm.length, *(double*)prm.buffer);
return scope.Escape(Nan::New<Number>(*(double*)prm.buffer));
}
}
break;
case SQL_BIT :
{
DEBUG_PRINTF("ODBC::GetOutputParameter - Bit: paramtype=%i c_type=%i type=%i buf_len=%i len=%i val=%f\n",
prm.paramtype, prm.c_type, prm.type, prm.buffer_length,
prm.length, prm.buffer);
if((int)prm.length == SQL_NULL_DATA) {
return scope.Escape(Nan::Null());
}
else {
return scope.Escape(Nan::New((*((char*)prm.buffer) == '0') ? false : true));
}
}
break;
/*
case SQL_BLOB :
case SQL_DATETIME :
case SQL_TIMESTAMP :
*/
case SQL_TYPE_TIME:
DEBUG_PRINTF("SQL_TIME SELECTED\n");
case SQL_DBCLOB:
if((int) prm.type == SQL_DBCLOB)
{
DEBUG_PRINTF("DBCLOB DATA SELECTED\n");
}
case SQL_BLOB :
if((int) prm.type == SQL_BLOB)
{
DEBUG_PRINTF("BLOB DATA SELECTED\n");
}
default :
DEBUG_PRINTF("ODBC::GetOutputParameter - String: paramtype=%i c_type=%i type=%i buf_len=%i len=%i val=%s\n",
prm.paramtype, prm.c_type, prm.type, prm.buffer_length,
prm.length, prm.buffer);
if((int)prm.length == SQL_NULL_DATA) {
return scope.Escape(Nan::Null());
}
if(prm.c_type == SQL_C_BINARY)
str = Nan::NewOneByteString((uint8_t *) prm.buffer, prm.length).ToLocalChecked();
else {
#ifdef UNICODE
str = Nan::New((uint16_t *) prm.buffer).ToLocalChecked();
#else
str = Nan::New((char *) prm.buffer).ToLocalChecked();
#endif
}
return scope.Escape(str);
}
}
/*
* GetRecordTuple
*/
Local<Object> ODBC::GetRecordTuple ( SQLHSTMT hStmt, Column* columns,
short* colCount, uint16_t* buffer,
int bufferLength)
{
Nan::EscapableHandleScope scope;
Local<Object> tuple = Nan::New<Object>();
for(int i = 0; i < *colCount; i++) {
#ifdef UNICODE
Nan::Set(tuple, Nan::New((uint16_t *) columns[i].name).ToLocalChecked(),
GetColumnValue( hStmt, columns[i], buffer, bufferLength));
#else
Nan::Set(tuple, Nan::New((const char *) columns[i].name).ToLocalChecked(),
GetColumnValue( hStmt, columns[i], buffer, bufferLength));
#endif
}
return scope.Escape(tuple);
}
/*
* GetRecordArray
*/
Local<Value> ODBC::GetRecordArray ( SQLHSTMT hStmt, Column* columns,
short* colCount, uint16_t* buffer,
int bufferLength)
{
Nan::EscapableHandleScope scope;
Local<Array> array = Nan::New<Array>();
for(int i = 0; i < *colCount; i++) {
Nan::TryCatch try_catch;
Nan::Set(array, Nan::New(i),
GetColumnValue( hStmt, columns[i], buffer, bufferLength));
if (try_catch.HasCaught()) {
FatalException(try_catch);
break;
}
}
return scope.Escape(array);
}
/*
* GetParametersFromArray
*/
Parameter* ODBC::GetParametersFromArray (Local<Array> values, int *paramCount)
{
DEBUG_PRINTF("ODBC::GetParametersFromArray\n");
*paramCount = values->Length();
Parameter* params = (Parameter *) malloc(*paramCount * sizeof(Parameter));
if(*paramCount != 0 && !params ) {
Nan::LowMemoryNotification();
Nan::ThrowError("Could not allocate enough memory for params in ODBC::GetParametersFromArray.");
return params;
}
memset(params, '\0', *paramCount * sizeof(Parameter));
Local<Value> value;
Local<Value> val;
Local<Array> paramArray;
int arrlen = 0;
for (int i = 0; i < *paramCount; i++) {
value = Nan::Get(values, i).ToLocalChecked();
params[i].paramtype = SQL_PARAM_INPUT;
params[i].size = 0;
params[i].length = SQL_NULL_DATA;
params[i].buffer_length = 0;
params[i].decimals = 0;
DEBUG_PRINTF("ODBC::GetParametersFromArray - param[%i].length = %d\n",
i, params[i].length);
if (value->IsArray())
{
paramArray = Local<Array>::Cast(value);
arrlen = paramArray->Length();
if(arrlen < 4)
{
DEBUG_PRINTF("ODBC::GetParametersFromArray - arrlen = %i\n", arrlen);
Nan::ThrowError("Wrong param format!");
return params;
}
val = Nan::Get(paramArray, 0).ToLocalChecked();
if(val->IsInt32())
params[i].paramtype = Nan::To<int32_t>(val).FromJust();
val = Nan::Get(paramArray, 1).ToLocalChecked();
if(val->IsInt32())
params[i].c_type = Nan::To<int32_t>(val).FromJust();
else
params[i].c_type = SQL_C_CHAR;
val = Nan::Get(paramArray, 2).ToLocalChecked();
if(val->IsInt32())
params[i].type = Nan::To<int32_t>(val).FromJust();
else
params[i].type = SQL_CHAR;
if(arrlen == 5)
{
val = Nan::Get(paramArray, 4).ToLocalChecked();
if(val->IsInt32())
params[i].buffer_length = Nan::To<int32_t>(val).FromJust();
}
val = Nan::Get(paramArray, 3).ToLocalChecked();
if (val->IsNull()) {
GetNullParam(¶ms[i], i+1);
}
else if (val->IsInt32()) {
GetInt32Param(val, ¶ms[i], i+1);
}
else if (val->IsNumber()) {
GetNumberParam(val, ¶ms[i], i+1);
}
else if (val->IsBoolean()) {
GetBoolParam(val, ¶ms[i], i+1);
}
else
{
GetStringParam(val, ¶ms[i], i+1);
}
}
else if (value->IsString()) {
GetStringParam(value, ¶ms[i], i+1);
}
else if (value->IsNull()) {
GetNullParam(¶ms[i], i+1);
}
else if (value->IsInt32()) {
GetInt32Param(value, ¶ms[i], i+1);
}
else if (value->IsNumber()) {
GetNumberParam(value, ¶ms[i], i+1);
}
else if (value->IsBoolean()) {
GetBoolParam(value, ¶ms[i], i+1);
}
}
return params;
}
void ODBC::GetStringParam(Local<Value> value, Parameter * param, int num)
{
Nan::Utf8String string(value);
int length = string.length();
int bufflen = length;
param->length = length;
if(!param->c_type || (param->c_type == SQL_CHAR))
param->c_type = SQL_C_TCHAR;
#ifdef UNICODE
param->length = SQL_NTS; // Required for unicode string.
if(!param->type || (param->type == SQL_CHAR))
param->type = (length >= 8000) ? SQL_WLONGVARCHAR : SQL_WVARCHAR;
if(param->c_type != SQL_C_BINARY)
bufflen = (length + 1) * sizeof(uint16_t);
#else
if(!param->type || (param->type == SQL_CHAR))
param->type = (length >= 8000) ? SQL_LONGVARCHAR : SQL_VARCHAR;
if(param->c_type != SQL_C_BINARY)
bufflen = length + 1;
#endif
if(param->c_type == SQL_C_BINARY)
{
bufflen = length + 1;
}
if(bufflen < param->buffer_length && (param->paramtype % 2 == 0))
bufflen = param->buffer_length;
param->buffer_length = bufflen;
param->size = bufflen;
param->buffer = malloc(param->buffer_length);
MEMCHECK( param->buffer );
memcpy(param->buffer, *string, param->buffer_length);
#ifdef UNICODE
((char*)param->buffer)[param->buffer_length - 2] = '\0';
#endif
((char*)param->buffer)[param->buffer_length - 1] = '\0';
if(param->paramtype == FILE_PARAM) // For SQLBindFileToParam()
{
/*
SQLRETURN SQLBindFileToParam (
SQLHSTMT StatementHandle, // hstmt
SQLUSMALLINT TargetType, // i
SQLSMALLINT DataType, // type
SQLCHAR *FileName, // buffer
SQLSMALLINT *FileNameLength, // NULL
SQLUINTEGER *FileOptions, // SQL_FILE_READ = 2 -> fileOption
SQLSMALLINT MaxFileNameLength, // buffer_length -> decimals
SQLINTEGER *IndicatorValue); // 0 -> fileIndicator
*/
param->decimals = param->buffer_length;
param->fileOption = SQL_FILE_READ;
param->fileIndicator = 0;
}
DEBUG_PRINTF("ODBC::GetStringParam: param%u : paramtype=%u, c_type=%i, "
"type=%i, size=%i, decimals=%i, buffer=%s, buffer_length=%i, "
"length=%i\n", num, param->paramtype, param->c_type,
param->type, param->size, param->decimals,
(char *)param->buffer, param->buffer_length, param->length);
}
void ODBC::GetNullParam(Parameter * param, int num)
{
param->c_type = SQL_C_DEFAULT;
param->type = SQL_VARCHAR;
param->length = SQL_NULL_DATA;
DEBUG_PRINTF("ODBC::GetNullParam: param%u : paramtype=%u, c_type=%i, "
"type=%i, size=%i, decimals=%i, buffer_length=%i, length=%i\n",
num, param->paramtype, param->c_type, param->type, param->size,
param->decimals, param->buffer_length, param->length);
}
void ODBC::GetInt32Param(Local<Value> value, Parameter * param, int num)
{
int64_t *number = new int64_t(Nan::To<int32_t>(value).FromJust());
param->c_type = SQL_C_SBIGINT;
if(!param->type || (param->type == 1))
param->type = SQL_BIGINT;
param->buffer = number;
param->length = sizeof(number);
DEBUG_PRINTF("ODBC::GetInt32Param: param%u : paramtype=%u, c_type=%i, "
"type=%i, size=%i, decimals=%i, buffer=%lld, buffer_length=%i, "
"length=%i\n",
num, param->paramtype, param->c_type, param->type, param->size,
param->decimals, *number, param->buffer_length, param->length);
}
void ODBC::GetNumberParam(Local<Value> value, Parameter * param, int num)
{
double *number = new double(Nan::To<double>(value).FromJust());
if(!param->c_type || (param->c_type == SQL_C_CHAR))
param->c_type = SQL_C_DOUBLE;
if(!param->type || (param->type == SQL_CHAR))
param->type = SQL_DECIMAL;
param->buffer = number;
param->buffer_length = sizeof(double);
param->length = param->buffer_length;
param->decimals = 7;
param->size = sizeof(double);
DEBUG_PRINTF("ODBC::GetNumberParam: param%u : paramtype=%u, c_type=%i, "
"type=%i, size=%i, decimals=%i, buffer=%f, buffer_length=%i, "
"length=%i\n",
num, param->paramtype, param->c_type, param->type, param->size,
param->decimals, *number, param->buffer_length, param->length);
}
void ODBC::GetBoolParam(Local<Value> value, Parameter * param, int num)
{
bool boolean = Nan::To<bool>(value).FromJust();
int64_t *number = new int64_t(0);
if(boolean == true) {
delete number;
number = new int64_t(1);
}
// Db2 stores boolean data in the form of 0 or 1 only.
// So overwrite the intered true or fase with 1 or 0 as bigint
param->c_type = SQL_C_SBIGINT;
if(!param->type || (param->type == 1))
param->type = SQL_BIGINT;
param->buffer = number;
param->length = sizeof(number);
DEBUG_PRINTF("ODBC::GetBoolParam: param%u : paramtype=%u, c_type=%i, "
"type=%i, size=%i, decimals=%i, buffer=%lld, buffer_length=%i, length=%i\n",
num, param->paramtype, param->c_type, param->type, param->size,
param->decimals, *number, param->buffer_length, param->length);
}
SQLRETURN ODBC::BindParameters(SQLHSTMT hSTMT, Parameter params[], int count)
{
SQLRETURN ret = SQL_SUCCESS;
Parameter prm;
for (int i = 0; i < count; i++)
{
prm = params[i];
DEBUG_PRINTF(
"ODBC::BindParameters - param[%i]: c_type=%i type=%i "
"buffer_length=%i size=%i length=%i length=%i\n", i, prm.c_type, prm.type,
prm.buffer_length, prm.size, prm.length, params[i].length);
if(prm.paramtype == FILE_PARAM) // FILE
{
ret = SQLBindFileToParam (
hSTMT, // StatementHandle,
i + 1, // TargetType,
prm.type, // DataType,
(SQLCHAR *)prm.buffer, // *FileName,
NULL, // *FileNameLength, // NULL or SQL_NTS
¶ms[i].fileOption, // *FileOptions, // SQL_FILE_READ = 2
prm.decimals, // MaxFileNameLength,
¶ms[i].fileIndicator); // *IndicatorValue); // 0
}
else
ret = SQLBindParameter(
hSTMT, //StatementHandle
i + 1, //ParameterNumber
prm.paramtype, //InputOutputType
prm.c_type, //ValueType
prm.type, //ParameterType
prm.size, //ColumnSize
prm.decimals, //DecimalDigits
prm.buffer, //ParameterValuePtr
prm.buffer_length, //BufferLength
//using &prm.length did not work here...
¶ms[i].length); //StrLen_or_IndPtr
if (ret == SQL_ERROR) {break;}
}
return ret;
}
/*
* CallbackSQLError
*/
Local<Value> ODBC::CallbackSQLError (
SQLSMALLINT handleType,
SQLHANDLE handle,
Nan::Callback* cb)
{
Nan::EscapableHandleScope scope;
Local<Value> objError = CallbackSQLError(
handleType,
handle,
(char *) "[node-odbc] SQL_ERROR",
cb);
return scope.Escape(objError);
}
Local<Value> ODBC::CallbackSQLError (SQLSMALLINT handleType,
SQLHANDLE handle,
char* message,
Nan::Callback* cb)
{
Nan::EscapableHandleScope scope;
Local<Value> objError = ODBC::GetSQLError(
handleType,
handle,
message
);
Local<Value> info[1];
info[0] = objError;
cb->Call(1, info);
return scope.Escape(Nan::Undefined());
}
/*
* GetSQLError
*/
Local<Value> ODBC::GetSQLError (SQLSMALLINT handleType, SQLHANDLE handle)
{
Nan::EscapableHandleScope scope;
return scope.Escape(GetSQLError(
handleType,
handle,
(char *) "[node-ibm_db] SQL_ERROR"));
}
Local<Value> ODBC::GetSQLError (SQLSMALLINT handleType, SQLHANDLE handle, char* message)
{
Nan::EscapableHandleScope scope;
DEBUG_PRINTF("ODBC::GetSQLError : handleType=%i, handle=%X\n", handleType, handle);
Local<Object> objError = Nan::New<Object>();
SQLINTEGER i = 0;
SQLINTEGER native;
SQLSMALLINT len;
SQLRETURN ret;
char errorSQLState[14];
char errorMessage[SQL_MAX_MESSAGE_LENGTH];
// Windows seems to define SQLINTEGER as long int, unixodbc as just int... %i should cover both
//Local<Array> errors = Nan::New<Array>();
//objError->Set(Nan::New("errors").ToLocalChecked(), errors);
do {
DEBUG_PRINTF("ODBC::GetSQLError : calling SQLGetDiagRec; i=%i\n", i);
ret = SQLGetDiagRec(
handleType,
handle,
i + 1,
(SQLTCHAR *) errorSQLState,
&native,
(SQLTCHAR *) errorMessage,
sizeof(errorMessage),
&len);
DEBUG_PRINTF("ODBC::GetSQLError : after SQLGetDiagRec; i=%i, ret=%i\n", i,ret);
if (ret == -2 && i == 0)
{
strcpy(errorMessage, "CLI0600E Invalid connection handle or connection is closed. SQLSTATE=S1000");
strcpy(errorSQLState, "S1000");
native = -1;
ret = 0;
}
if (SQL_SUCCEEDED(ret)) {
if (i == 0) {
DEBUG_TPRINTF(SQL_T("ODBC::GetSQLError : errorMessage=%s, errorSQLState=%s\n"), errorMessage, errorSQLState);
Nan::Set(objError, Nan::New("error").ToLocalChecked(), Nan::New(message).ToLocalChecked());
Nan::Set(objError, Nan::New("sqlcode").ToLocalChecked(), Nan::New(native));
#ifdef UNICODE
Nan::SetPrototype(objError, Exception::Error(Nan::New((uint16_t *) errorMessage).ToLocalChecked()));
Nan::Set(objError, Nan::New("message").ToLocalChecked(), Nan::New((uint16_t *) errorMessage).ToLocalChecked());
Nan::Set(objError, Nan::New("state").ToLocalChecked(), Nan::New((uint16_t *) errorSQLState).ToLocalChecked());
#else
Nan::SetPrototype(objError, Exception::Error(Nan::New(errorMessage).ToLocalChecked()));
Nan::Set(objError, Nan::New("message").ToLocalChecked(), Nan::New(errorMessage).ToLocalChecked());
Nan::Set(objError, Nan::New("state").ToLocalChecked(), Nan::New(errorSQLState).ToLocalChecked());
#endif
}
if (native == -1) { break; }
} else {
break;
}
i++;
} while (ret != SQL_NO_DATA);
return scope.Escape(objError);
}
/*
* GetAllRecordsSync
*/
Local<Array> ODBC::GetAllRecordsSync (SQLHENV hENV,
SQLHDBC hDBC,
SQLHSTMT hSTMT,
uint16_t* buffer,
int bufferLength)
{
DEBUG_PRINTF("ODBC::GetAllRecordsSync\n");
Nan::EscapableHandleScope scope;
Local<Value> objError = Nan::New<Object>();
int count = 0;
int errorCount = 0;
short colCount = 0;
Column* columns = GetColumns(hSTMT, &colCount);
Local<Array> rows = Nan::New<Array>();
//loop through all records
while (true) {
SQLRETURN ret = SQLFetch(hSTMT);
//check to see if there was an error
if (ret == SQL_ERROR) {
//TODO: what do we do when we actually get an error here...
//should we throw??
errorCount++;
objError = ODBC::GetSQLError(
SQL_HANDLE_STMT,
hSTMT,
(char *) "[node-odbc] Error in ODBC::GetAllRecordsSync"
);
break;
}
//check to see if we are at the end of the recordset
if (ret == SQL_NO_DATA) {
ODBC::FreeColumns(columns, &colCount);
break;
}
Nan::Set(rows,
Nan::New(count),
ODBC::GetRecordTuple(
hSTMT,
columns,
&colCount,
buffer,
bufferLength)
);
count++;
}
//TODO: what do we do about errors!?!
//we throw them
return scope.Escape(rows);
}
extern "C" NODE_MODULE_EXPORT void NODE_MODULE_INITIALIZER(Local<Object> exports, Local<Value> module, Local<Context> context) {
ODBC::Init(exports);
ODBCResult::Init(exports);
ODBCConnection::Init(exports);
ODBCStatement::Init(exports);
}
extern "C" NAN_MODULE_INIT(init)
{
ODBC::Init(target);
ODBCResult::Init(target);
ODBCConnection::Init(target);
ODBCStatement::Init(target);
}
NODE_MODULE(odbc_bindings, init)
| [
"savitri.sonnad@inetframe.com"
] | savitri.sonnad@inetframe.com |
6b5da1dc5353ece76821792f47c8cb6fd2659e93 | 32e43c3cce09f4659035644e70a4e2e88b021c15 | /abc160/e.cpp | 2ca3b3befaaad2121195ebc21ffedf1c0f429b6a | [] | no_license | sp4ghet/comp | 22c7453bcd4aff56970f3ee465e0c66ca0ab697f | 222911d45ab513c88d5450919d8c803cb0f7da1c | refs/heads/master | 2020-12-04T15:59:34.368399 | 2020-09-19T15:00:31 | 2020-09-19T15:00:31 | 231,827,088 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,136 | cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < n; ++i)
int main()
{
int x, y, ac, bc, cc;
cin >> x >> y >> ac >> bc >> cc;
vector<int> a(ac), b(bc), c(cc);
rep(i, ac) cin >> a[i];
rep(i, bc) cin >> b[i];
rep(i, cc) cin >> c[i];
sort(a.begin(), a.end(), greater<int>());
sort(b.begin(), b.end(), greater<int>());
sort(c.begin(), c.end(), greater<int>());
ll ans = 0;
int ci = 0, ai = 0, bi = 0;
rep(i, x + y)
{
if (bi >= y || a[ai] > b[bi] && ai < x)
{
if (ci < cc && c[ci] > a[ai])
{
ans += c[ci];
ci++;
}
else
{
ans += a[ai];
ai++;
}
}
else
{
if (ci < cc && c[ci] > b[bi])
{
ans += c[ci];
ci++;
}
else
{
ans += b[bi];
bi++;
}
}
}
cout << ans << endl;
return 0;
} | [
"8775460+sp4ghet@users.noreply.github.com"
] | 8775460+sp4ghet@users.noreply.github.com |
506ab03a203a9317abd987d121997aa115db101a | 407ef711d5cbea34b6f37c510f0edaa73143c225 | /CardData.h | 034b0119ca3a2fb6a3f7ab5962defb569de5a7ac | [] | no_license | odewdney/KeyLock | b9c8f3d5570d001eeb5deac0457f5a47ebf6850b | bd1e143ace207c83338ba09df79088be30b2a3fd | refs/heads/master | 2021-01-19T14:52:22.478849 | 2017-09-01T05:54:04 | 2017-09-01T05:54:04 | 100,932,821 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 698 | h | // CardData.h
#ifndef _CARDDATA_h
#define _CARDDATA_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
class CodeStore
{
uint16_t offset;
uint8_t maxCode;
public:
CodeStore(uint16_t offset, uint8_t maxCode);
uint8_t GetCount();
void SetCount(uint8_t count);
void Clear();
uint32_t GetCode(uint8_t card);
void PutCode(uint8_t card, uint32_t cardId);
uint8_t GetCodeIndex(uint32_t cardId);
void AddCode(unsigned long cardId);
void RemoveCode(unsigned long cardId);
bool CheckCode(unsigned long cardId);
};
extern CodeStore CardStore;
extern CodeStore KeyStore;
void SavePass(uint32_t code);
bool CheckPass(uint32_t code);
#endif
| [
"oliver.dewdney@lbi.com"
] | oliver.dewdney@lbi.com |
9303b7204bf9bd449d607e4e22abc22ff3f50e29 | 5a075cc56820038a97d225b9f4a17a003021fa78 | /light oj/loj-1097.cpp | 6415bfc11b6f947efdd418d46cc4e7941b9cbeb1 | [] | no_license | nahid0335/Problem-solving | e5f1fc9d70c10992655c8dceceec6eb89da953c0 | 89c1e94048b9f8fb7259294b8f5a3176723041e7 | refs/heads/master | 2020-11-26T07:02:56.944184 | 2019-12-19T09:33:58 | 2019-12-19T09:33:58 | 228,997,106 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,459 | cpp | #include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<algorithm>
#include<set>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<bitset>
#include<utility>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include<functional>
using namespace std;
#define ll long long int
#define du double
#define read freopen("input.txt","r",stdin)
#define write freopen("output.txt","w",stdout)
#define fi(j,k,n) for(j=k;j<n;j++)
#define fd(j,k,n) for(j=k;j<n;j--)
#define vc(a) vector<a>
#define pb push_back
#define mset(a) memset(a,0,sizeof(a))
#define pr(a,s) pair<a,s>
#define st(a) sort(a.begin(),a.end())
#define mp(a,b) make_pair(a,b)
list<int>v;
vector<int>vc;
void prime()
{
for(ll i=1;i<100005;i+=2)
{
v.pb(i);
}
vc.pb(1);
list<int>::iterator it=v.begin();
advance(it,1);
cout<<*it<<endl;
for(;it!=v.end();++it)
{
vc.pb(*it);
list<int>::iterator itr,itr1=v.begin();
itr=v.begin();
advance(itr,(*it));
advance(itr1,(*it));
for(;itr1!=v.end();itr=itr1)
{
advance(itr1,(*it));
v.erase(itr);
}
}
}
int main()
{
prime();
ll t;
cin>>t;
ll i=0;
while(i<t)
{
i++;
ll n;
cin>>n;
cout<<"Case "<<i<<": "<<vc[n]<<endl;
}
}
| [
"nahid0335@gmail.com"
] | nahid0335@gmail.com |
439640cec97de1f38dfa2904a68366115dcc89fe | 6a09f7bae5068c506709f76fbba59d8feb4f7a38 | /evs/include/huaweicloud/evs/v2/model/Tag.h | 5111a3e6e1f42ee3f220c0a64f506eb809d3e3cd | [
"Apache-2.0"
] | permissive | chenkun4417/huaweicloud-sdk-cpp-v3 | b7078653517e925101b4b0dffd79273739517fc1 | d8929c05ba4e2c190d07593e09a71665a1f90a7a | refs/heads/master | 2023-06-05T16:13:15.090879 | 2021-03-19T12:46:15 | 2021-03-19T12:46:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,670 | h |
#ifndef HUAWEICLOUD_SDK_EVS_V2_MODEL_Tag_H_
#define HUAWEICLOUD_SDK_EVS_V2_MODEL_Tag_H_
#include <huaweicloud/evs/v2/EvsExport.h>
#include <huaweicloud/core/utils/ModelBase.h>
#include <huaweicloud/core/http/HttpResponse.h>
#include <string>
namespace HuaweiCloud {
namespace Sdk {
namespace Evs {
namespace V2 {
namespace Model {
using namespace HuaweiCloud::Sdk::Core::Utils;
using namespace HuaweiCloud::Sdk::Core::Http;
/// <summary>
///
/// </summary>
class HUAWEICLOUD_EVS_V2_EXPORT Tag
: public ModelBase
{
public:
Tag();
virtual ~Tag();
/////////////////////////////////////////////
/// ModelBase overrides
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
/////////////////////////////////////////////
/// Tag members
/// <summary>
/// 标签键。同一资源的key值不能重复。 最大长度36个字符。 字符集:A-Z,a-z , 0-9,‘-’,‘_’,UNICODE字符(\\u4E00-\\u9FFF)。
/// </summary>
std::string getKey() const;
bool keyIsSet() const;
void unsetkey();
void setKey(const std::string& value);
/// <summary>
/// 标签值。 最大长度43个字符。 字符集:A-Z,a-z , 0-9,‘.’,‘-’,‘_’,UNICODE字符(\\u4E00-\\u9FFF)。
/// </summary>
std::string getValue() const;
bool valueIsSet() const;
void unsetvalue();
void setValue(const std::string& value);
protected:
std::string key_;
bool keyIsSet_;
std::string value_;
bool valueIsSet_;
};
}
}
}
}
}
#endif // HUAWEICLOUD_SDK_EVS_V2_MODEL_Tag_H_
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
8ce7855ac8a9bee6102f6832f31b4fa3cfa614d2 | 5cd49a6bee8f815b8f91f8b871d59ab6adbbc867 | /src/game/gamestate.cpp | df6b4b89f623a1760963125834b4bb6039683fe6 | [
"Zlib",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | illogica/Qtesseract | ef7c6c12e32dc3224c6038f449c20768be6f0028 | 8575735f053711412579353d6bc95bb9e908104e | refs/heads/master | 2021-01-20T17:20:08.856010 | 2016-07-03T16:05:57 | 2016-07-03T16:05:57 | 61,361,505 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 970 | cpp | #include "gamestate.h"
#include "game.h"
gamestate::gamestate() : maxhealth(1), aitype(AI_NONE), skill(0)
{
}
//gamestate::~gamestate(){}
bool gamestate::canpickup(int type)
{
return validitem(type);
}
void gamestate::pickup(int type)
{
}
void gamestate::respawn()
{
health = maxhealth;
gunselect = GUN_RAIL;
gunwait = 0;
loopi(NUMGUNS) ammo[i] = 0;
}
void gamestate::spawnstate(int gamemode)
{
if(m_rail)
{
gunselect = GUN_RAIL;
ammo[GUN_RAIL] = 1;
}
else if(m_pulse)
{
gunselect = GUN_PULSE;
ammo[GUN_PULSE] = 1;
}
else if(m_edit)
{
gunselect = GUN_RAIL;
loopi(NUMGUNS) ammo[i] = 1;
}
}
// just subtract damage here, can set death, etc. later in code calling this
int gamestate::dodamage(int damage)
{
health -= damage;
return damage;
}
int gamestate::hasammo(int gun, int exclude)
{
return validgun(gun) && gun != exclude && ammo[gun] > 0;
}
| [
"loris@localhost.localdomain"
] | loris@localhost.localdomain |
d6702052b077f9d6ad3abbc3534bb39c305e3149 | c3442c04fa2d739a3fbd6ac93a7119c1d18fc873 | /cie_sign_sdk/src/ASN1/TSTInfo.cpp | ddc32b493a1639ba0e2fe3c8bafbf1d190d5a6c7 | [
"BSD-3-Clause"
] | permissive | italia/cie-middleware-macos | 47542b2cde1e98cdf35d0e7d0ad91744530e0110 | e26910245026dc091c6c1dec6999395e8669ce63 | refs/heads/master | 2023-06-23T16:10:05.809155 | 2023-06-05T13:02:56 | 2023-06-05T13:02:56 | 147,847,859 | 16 | 4 | BSD-3-Clause | 2023-06-15T09:09:17 | 2018-09-07T16:20:45 | C++ | UTF-8 | C++ | false | false | 3,519 | cpp | // TSTInfo.cpp: implementation of the CTSTInfo class.
//
//////////////////////////////////////////////////////////////////////
#include "TSTInfo.h"
#include "ASN1OptionalField.h"
#include "ASN1Exception.h"
#include "ASN1UTCTime.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CTSTInfo::CTSTInfo(UUCBufferedReader& reader)
:CASN1Sequence(reader)
{
/*
addElement(new CVersion(reader));
addElement(new CASN1ObjectIdentifier(reader));
addElement(new CMessageImprint(reader));
addElement(new CASN1Integer(reader)); // serial number
addElement(new CASN1UTCTime(reader)); // time
// Optional Field
CASN1OptionalField* pAccuracy = NULL;
if (CASN1OptionalField::isOptionaField(0x04, reader))
{
try
{
pAccuracy = new CASN1OptionalField(new CAccuracy(reader), 0x04);
}
catch(CASN1ObjectNotFoundException* ex)
{
delete ex;
}
}
addElement(pAccuracy);
addElement(new CASN1Boolean(reader));
reader.mark();
// Optional Field
CASN1OptionalField* pNonce = NULL;
if (CASN1OptionalField::isOptionaField(0x00, reader))
{
try
{
pNonce = new CASN1OptionalField(new CASN1Integer(reader), 0x06);
}
catch(CASN1ObjectNotFoundException* ex)
{
reader.reset();
delete ex;
}
}
addElement(pNonce);
/*
reader.mark();
// Optional tsa
// Currently treated as Ignored
CASN1OptionalField* pTsa = NULL;
if (CASN1OptionalField::isOptionaField(0x00, reader))
{
try
{
pTsa
= new CASN1OptionalField(new CASN1Ignored(reader), 0x00);
}
catch(CASN1ObjectNotFoundException* ex)
{
reader.reset();
delete ex;
}
}
addElement(pTsa);
reader.mark();
// Optional extensions
// Currently treated as Ignored
CASN1OptionalField* pExtensions = NULL;
if (CASN1OptionalField::isOptionaField(0x01, reader))
{
try
{
pExtensions
= new CASN1OptionalField(new CASN1Ignored(reader), 0x01);
}
catch(CASN1ObjectNotFoundException* ex)
{
reader.reset();
delete ex;
}
}
addElement(pExtensions);
*/
}
/*
CTSTInfo::CTSTInfo(const CASN1ObjectIdentifier& policyID, const CMessageImprint& messImprint,const CASN1Integer& serialNumber,const CASN1UTCTime& genTime)
{
addElement(new CVersion(1));
addElement(new CASN1ObjectIdentifier(policyID));
addElement(new CMessageImprint(messImprint));
addElement(new CASN1Integer(serialNumber));
addElement(new CASN1UTCTime(genTime));
addElement(NULL);
addElement(new CASN1Boolean(FALSE));
addElement(NULL);
// addElement(NULL);
// addElement(NULL);
}
*/
CTSTInfo::CTSTInfo(const CASN1Object& tstInfo)
:CASN1Sequence(tstInfo)
{
}
CTSTInfo::~CTSTInfo()
{
}
CASN1Sequence CTSTInfo::getMessageImprint()
{
return elementAt(2);
}
CASN1UTCTime CTSTInfo::getUTCTime()
{
return elementAt(4);
}
CAlgorithmIdentifier CTSTInfo::getDigestAlgorithn()
{
CASN1Sequence messageImprint(elementAt(2));
return (CAlgorithmIdentifier)messageImprint.elementAt(0);
}
CASN1Integer CTSTInfo::getSerialNumber()
{
return elementAt(3);
}
CName CTSTInfo::getTSAName()
{
int siz = size();
for(int i = 1; i < siz; i++)
{
CASN1Object obj = elementAt(i);
if(obj.getTag() == 0xA0)
{
CASN1Sequence val(obj);
CASN1Sequence val1(val.elementAt(0));
return val1.elementAt(0);
}
}
throw -1;
}
| [
"bitpdg@bit4id.com"
] | bitpdg@bit4id.com |
602bb55503b705daf09fd7d1df0ce786ba5dd0a2 | c1e2314acac67a35381f6c99fd7513a480be716b | /leetcode/139.cpp | 5a4536978ed3279c709ef08dd303b8c6be5d0ac9 | [] | no_license | syslot/leetcode | cc7fb0f9296a11520508e41556b29ab10d4fe070 | 5f4964ea834c46fb80e7c5102d88d0d880baa148 | refs/heads/master | 2020-04-15T02:21:23.759912 | 2019-11-12T08:00:10 | 2019-11-12T08:00:10 | 164,311,724 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,206 | cpp | #include "../common.h"
class Solution {
public:
bool wordBreak(string s, vector<string>& wordDict) {
for(auto & prefix : wordDict){
int len = prefix.length();
int pos1 =0, pos2=0;
while(pos1 < s.length() && pos2 < prefix.length()){
if(s[pos1] == prefix[pos2]){
pos1++;
pos2++;
}else
break;
}
if(pos1 == s.length() && pos2 == s.length() && s[pos1] == prefix[pos2])
return true;
else{
if(pos1==s.length() && pos2 != prefix.length() || pos1 != s.length() && pos2 != prefix.length()){
continue;
}else{
bool flag = wordBreak(s.substr(pos2, s.length()-pos2), wordDict);
if(flag)
return true;
}
}
}
return false;
}
};
int main(){
Solution s;
string str = "catsandog";
vector<string> wd = {
"cats",
"dog",
"sand",
"and",
"cat"
};
cout << s.wordBreak(str, wd)<< endl;
}
| [
"xiaoaozaoyuan@gmail.com"
] | xiaoaozaoyuan@gmail.com |
a7f8f7ef07f3d6f2248f8008142ff03a9f1e47ef | 30c90385e30b6caa0bfa425fd05dc5431be4b568 | /src/Node.cpp | 913b20b37fb8f4819838ee0ef32f7faa95024e5a | [] | no_license | damonwy/SoftBodySimulation | 3cf429761bb471e24ee393d4c34c0c013cab4fa0 | 98d8e54a6a566c006056a37ce830ef1103b123dd | refs/heads/master | 2021-07-15T14:55:10.706469 | 2018-11-30T05:12:55 | 2018-11-30T05:12:55 | 136,100,171 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,188 | cpp | #include <iostream>
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "Node.h"
#include "Shape.h"
#include "Program.h"
#include "MatrixStack.h"
using namespace std;
using namespace Eigen;
Node::Node() :
r(1.0),
m(1.0),
i(-1),
x(0.0, 0.0, 0.0),
v(0.0, 0.0, 0.0),
fixed(true)
{
}
Node::Node(const shared_ptr<Shape> s) :
r(1.0),
m(1.0),
i(-1),
x(0.0, 0.0, 0.0),
v(0.0, 0.0, 0.0),
fixed(true),
sphere(s)
{
}
Node::~Node()
{
}
void Node::tare()
{
x0 = x;
v0 = v;
}
void Node::reset()
{
x = x0;
v = v0;
}
void Node::clearForce() {
this->f.setZero();
}
void Node::clearForceDifferential() {
this->df.setZero();
}
void Node::addForce(Vector3d force) {
this->f += force;
}
void Node::addForceDifferential(Vector3d dforce) {
this->df += dforce;
}
void Node::draw(shared_ptr<MatrixStack> MV, const shared_ptr<Program> prog) const
{
if(sphere) {
MV->pushMatrix();
MV->translate(x(0), x(1), x(2));
MV->scale(r);
glUniformMatrix4fv(prog->getUniform("MV"), 1, GL_FALSE, glm::value_ptr(MV->topMatrix()));
sphere->draw(prog);
MV->popMatrix();
}
}
| [
"ying.wang@tamu.edu"
] | ying.wang@tamu.edu |
c69c2953c59d1f1a014e278069845b27d2aedb44 | 63145ec19700f23b8e2cf77839182009f40b5a38 | /contoh2.CPP | 0e4ca4aeed52fcf2b4a8fdeafe6ad9f7bcc2f21b | [] | no_license | gracezylia51017010/praktikum11 | d68e40f3c16134bd2ac2fdba98a910f41870e98f | 91ab56f462b6c9058e5c173ba9da49102aa58778 | refs/heads/master | 2020-06-13T21:14:16.323840 | 2019-07-02T04:47:16 | 2019-07-02T04:47:16 | 194,789,566 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 620 | cpp | #include <iostream.h>
#include <conio.h>
void main()
{
struct data_tanggal
{
int tanggal;
int bulan;
int tahun;
};
data_tanggal tgl1 , tgl2;
tgl1.tanggal = 1;
tgl1.bulan = 9;
tgl1.tahun = 1979;
tgl2 = tgl1;
// atau
tgl2.tanggal = tgl1.tanggal;
tgl2.bulan = tgl1.bulan;
tgl2.tahun = tgl2.tahun;
cout << tgl1.tanggal << "/" << tgl1.bulan << "/" << tgl1.tahun <<
endl;
cout << tgl2.tanggal << "/" << tgl2.bulan << "/" << tgl2.tahun <<
endl;
getch();
}
typedef struct
{
char kode [5];
char nama [20];
int jml;
float harga;
} psd;
//pendefinisian nama variabel baru
psd persediaan_barang; | [
"noreply@github.com"
] | noreply@github.com |
7b1dce1aa4343f02822cdf7461b97f9471c11454 | 593aad08a470c6c7faa971db9619c4e8b12b2ce8 | /cpp/ardrone_slam/ardrone_slam/slam_elevation_map.cpp | 6dc899866fab433c88326bf992ef5fdd6b4caefa | [] | no_license | Flysilica/mscthesis-ndijkshoorn | 8ee72ed079eabb65bca0d76809026275a7c6cc31 | a02235cb5334ade067b026aab0a8d5dfe2fe1727 | refs/heads/master | 2021-01-20T03:29:18.624041 | 2013-04-05T18:47:21 | 2013-04-05T18:47:21 | 34,560,282 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,115 | cpp | #include "global.h"
#include "slam_elevation_map.h"
#include <math.h>
slam_elevation_map::slam_elevation_map(void):
map(2 * SLAM_ELEVATION_MAP_DEFAULT_SIZE, 2 * SLAM_ELEVATION_MAP_DEFAULT_SIZE, CV_16S),
map_p(2 * SLAM_ELEVATION_MAP_DEFAULT_SIZE, 2 * SLAM_ELEVATION_MAP_DEFAULT_SIZE, CV_8U)
{
map = 0;
map_p = 0;
map_updated = false;
memset(roi, -1, 4 * sizeof(int));
resolution = 0.02f; // 1 cell is 50x50mm
w = 2 * SLAM_ELEVATION_MAP_DEFAULT_SIZE;
h = 2 * SLAM_ELEVATION_MAP_DEFAULT_SIZE;
origin_x = SLAM_ELEVATION_MAP_DEFAULT_SIZE;
origin_y = SLAM_ELEVATION_MAP_DEFAULT_SIZE;
}
slam_elevation_map::~slam_elevation_map(void)
{
}
/* accepts world coordinates */
void slam_elevation_map::update(float w_x, float w_y, float w_h, unsigned char conf)
{
int p[2];
short h = (short) -w_h;
worldpos_to_cell(w_x, w_y, p);
update_cell(p[0], p[1], h, conf);
}
void slam_elevation_map::update(float w_x, float w_y, float w_h, unsigned char conf, float r_mm)
{
int p[2];
int x, y;
short h = (short) -w_h;
worldpos_to_cell(w_x, w_y, p);
x = p[0];
y = p[1];
// convert mm to cell radius
int r = (int) floor(r_mm * resolution);
int r2 = r * r;
for (int y2 = -r; y2 <= r; y2++)
{
for (int x2 = -r; x2 <= r; x2++)
{
if (conf == 2 || (x2*x2*y2*y2 <= r2))
update_cell(x+x2, y+y2, h, conf);
}
}
}
void slam_elevation_map::update_cell(int x, int y, short h, unsigned char conf)
{
// tmp
if (x < 0 || y < 0
||
x >= 2 * SLAM_ELEVATION_MAP_DEFAULT_SIZE || y >= 2 * SLAM_ELEVATION_MAP_DEFAULT_SIZE)
return;
if (map.at<short>(x, y) == h || map_p.at<char>(x, y) > conf)
return;
map.at<short>(x, y) = h;
map_p.at<char>(x, y) = conf;
update_roi(x, y);
map_updated = true;
}
short* slam_elevation_map::get_array()
{
return (short*) map.data;
}
bool slam_elevation_map::is_updated(int* roi, bool reset_roi)
{
if (!map_updated)
return false;
memcpy_s(roi, 4 * sizeof(int), this->roi, 4 * sizeof(int));
if (reset_roi)
{
memset(this->roi, -1, 4 * sizeof(int));
map_updated = false;
}
return true;
}
void slam_elevation_map::worldpos_to_cell(float x, float y, int *cellxy)
{
// round: add 0.5 and floor
cellxy[0] = (int) floor(x * resolution + 0.5f) + origin_x;
cellxy[1] = (int) floor(y * resolution + 0.5f) + origin_y;
}
void slam_elevation_map::worldpos_to_cell(float *pos)
{
pos[0] *= resolution;
pos[1] *= resolution;
pos[2] = -pos[2];
}
void slam_elevation_map::update_roi(int x, int y)
{
if (roi[0] == -1 || x < roi[0])
roi[0] = x;
if (roi[1] == -1 || x > roi[1])
roi[1] = x;
if (roi[2] == -1 || y < roi[2])
roi[2] = y;
if (roi[3] == -1 || y > roi[3])
roi[3] = y;
}
void slam_elevation_map::save_map()
{
FILE *log;
fopen_s (&log, "dataset/elevation_log.txt" , "w");
for (unsigned int y = 0; y < w; y++)
{
for (unsigned int x = 0; x < h; x++)
{
fprintf(log, "%i", map.at<short>(x, y));
if (x < 399)
fprintf(log, ",");
}
fprintf(log, "\n");
}
} | [
"nickemanz@d4a371cc-1ec7-9fdb-5528-915157eee335"
] | nickemanz@d4a371cc-1ec7-9fdb-5528-915157eee335 |
ec99a148b0216b8c83855701e5ec63c6711e22dc | d85fba0c3b782398f47bfc79a4aeec65fc02e69b | /cpp/Source/operation_array.cpp | ebe4025544eb005d7a2da927bbaa1d768c5f824a | [] | no_license | ChangTao1994/Automatic-Exposure | c17edb6ecc1166a323c607bd96c18202294a8153 | 8b489e2e2ff5e56489ac3b6deae1054211b55067 | refs/heads/main | 2023-01-21T10:36:47.244415 | 2020-11-26T03:30:56 | 2020-11-26T03:30:56 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,667 | cpp | // -*- coding: utf-8 -*-
/******************************************************************************
Created on Mon Oct 19 14:51:37 2020
@author: Wei Huajing
@company: KAMERAWERK
@e-mail: wei@kamerawerk.cn
@title: Source-Operation on Array
******************************************************************************/
#include "..\Header\operation_array.h"
//Calculate length of array
//overloaded function 1: pointer array of int type
size_t ArrayLength(int* which_array) {
size_t length = _msize(which_array) / sizeof(which_array[0]);
return length;
}
//overloaded function 2: pointer array of float type
size_t ArrayLength(float* which_array) {
size_t length = _msize(which_array) / sizeof(which_array[0]);
return length;
}
//overloaded function 3: array pointer of double type
size_t ArrayLength(double* which_array) {
size_t length = _msize(which_array) / sizeof(which_array[0]);
return length;
}
//overloaded function 4: pointer array of char type
//char could be the pointer variable
size_t ArrayLength(char* which_array) {
size_t length = _msize(which_array) / sizeof(which_array[0]);
return length;
}
//Calculate sum of array
//overloaded function 1: pointer array of int type
int ArraySum(int* which_array) {
//final result
int sum = 0;
for (int i = 0; i < ArrayLength(which_array); i++) {
sum += which_array[i];
}
return sum;
}
//overloaded function 2: pointer array of float type
float ArraySum(float* which_array) {
//final result
float sum = 0;
for (int i = 0; i < ArrayLength(which_array); i++) {
sum += which_array[i];
}
return sum;
}
//overloaded function 3: pointer array of double type
double ArraySum(double* which_array) {
//final result
double sum = 0;
for (int i = 0; i < ArrayLength(which_array); i++) {
sum += which_array[i];
}
return sum;
}
//Calculate average of array
//overloaded function 1: pointer array of int type
double ArrayAverage(int* which_array) {
int sum = ArraySum(which_array);
return double(sum) / ArrayLength(which_array);
}
//overloaded function 1: pointer array of float type
double ArrayAverage(float* which_array) {
float sum = ArraySum(which_array);
return double(sum) / ArrayLength(which_array);
}
//overloaded function 1: pointer array of double type
double ArrayAverage(double* which_array) {
double sum = ArraySum(which_array);
return double(sum) / ArrayLength(which_array);
}
//The array elements are multiplied
//overloaded function 1: both array of int
int ArrayMultiplication(int* array_A, int* array_B) {
//judge if the length is the same
if (ArrayLength(array_A) == ArrayLength(array_B)) {
//final result
int sum = 0;
for (int i = 0; i < ArrayLength(array_A); i++) {
sum += array_A[i] * array_B[i];
}
return sum;
}
else {
cout << "--> ERROR: Incorrct size of array";
return 0;
}
}
//overloaded function 2: array of int and float
float ArrayMultiplication(int* array_A, float* array_B) {
//judge if the length is the same
if (ArrayLength(array_A) == ArrayLength(array_B)) {
//final result
float sum = 0;
for (int i = 0; i < ArrayLength(array_A); i++) {
sum += array_A[i] * array_B[i];
}
return sum;
}
else {
cout << "--> ERROR: Incorrct size of array";
return 0;
}
}
//overloaded function 3: array of int and double
double ArrayMultiplication(int* array_A, double* array_B) {
//judge if the length is the same
if (ArrayLength(array_A) == ArrayLength(array_B)) {
//final result
double sum = 0;
for (int i = 0; i < ArrayLength(array_A); i++) {
sum += array_A[i] * array_B[i];
}
return sum;
}
else {
cout << "--> ERROR: Incorrct size of array";
return 0;
}
}
| [
"jerryweihuajing@126.com"
] | jerryweihuajing@126.com |
d20290c9e67d476d9a76c7d2ba6773883a20cfc1 | 50d559c1c3d1d50960ff3cddbdc7745de69dfa83 | /Prata_S/Prata_S/pr94.cpp | f6ae71fdbda8309142f5ced32251ac8cdabc2538 | [] | no_license | phoenix76/teach_projects | 467a562d223ab3e8815581f003a911dbab707a09 | fface4b34b00e477d70ec0e3a296aa6e9fbca221 | refs/heads/master | 2021-01-10T06:18:14.683697 | 2016-03-27T14:39:54 | 2016-03-27T14:39:54 | 53,208,350 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 352 | cpp | #include <iostream>
#include "nmsales.h"
int main()
{
SALES::Sales objects[2];
double arr[2][4] = { { 10.0, 43.23, 11.9, 23.6 }, { 45.11, 45.76, 54.8, 23.76 } };
SALES::set_sales(objects[0], &arr[0][0], 4);
SALES::set_sales(objects[1], &arr[1][0], 4);
SALES::show_sales(objects[0]);
SALES::show_sales(objects[1]);
std::cin.get();
return 0;
} | [
"djokerxx2013@mail.ru"
] | djokerxx2013@mail.ru |
428ae8201ba2aefaac9a001989c85a72674b5c1f | de9fc84483a349107ddfb79fd21ff1bf0419a87a | /trabajofinalgrupo01.cpp | 82675936f3704f93837036a9316494b792f3f32a | [] | no_license | kristyangerman/trabajoFinal | 888b5b1022e4049fe79559b5ddf0113e93831be3 | 2c3a3c5f3d6c63de5961f2d090e7d99b6e13130d | refs/heads/master | 2021-03-12T23:10:50.475744 | 2015-01-30T15:45:50 | 2015-01-30T15:45:50 | 29,598,730 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,627 | cpp | # include <conio.h>
#include <iostream.h>
#include <fstream>
main()
{
int s,r=1;
char seleccion,repetir;
while (r==1)
{
clrscr();
textcolor(YELLOW);
gotoxy(15,1), cprintf(" PROYECTO FINAL");
gotoxy(15,3), cprintf("ESCUELA SUPERIOR POLITECNICA DE CHIMBORAZO");
gotoxy(15,5), cprintf(" LENGUJAE DE PROGRAMACION");
gotoxy(15,7), cprintf(" INTEGRANTES:");
textcolor(WHITE);
gotoxy(1,8), cprintf(" CRISTIAN CHAFLA (691)");
gotoxy(1,9), cprintf(" SEBASTIAN ARCOS (685)");
gotoxy(1,10), cprintf(" PATRICIO GALLEGOS (676)");
gotoxy(1,12), cprintf("1. GENERAR TABLAS DE VERDAD CON DOS ENTRADAS");
gotoxy(1,13), cprintf("2. VER TABLAS CON DOS ENTRADAS");
gotoxy(1,14), cprintf("3. GENERAR Y VER TABLAS CON N ENTRADAS");
gotoxy(1,15), cprintf("4. Salir ");
textcolor(GREEN);
gotoxy(15,18), cprintf("OPERACION A REALIZAR");
gotoxy(15,20);
seleccion=getche();
textcolor(YELLOW);
gotoxy(10,23);
switch(seleccion)
{
case '1':
{
ofstream almacenamiento("C:/Users/Kristyan/LITERAL 1/TABLAS DE VERDAD.txt",ios::app) ;
almacenamiento<<"OR"<< "\n";
almacenamiento<<" A B S"<< "\n"<< "\n";
almacenamiento<<" 0 0 0 "<< "\n";
almacenamiento<<" 0 1 1"<< "\n";
almacenamiento<<" 1 0 1"<< "\n";
almacenamiento<<" 1 1 1"<< "\n";
almacenamiento<<"AND"<< "\n";
almacenamiento<<" A B S"<< "\n"<< "\n";
almacenamiento<<" 0 0 0 "<< "\n";
almacenamiento<<" 0 1 0"<< "\n";
almacenamiento<<" 1 0 0"<< "\n";
almacenamiento<<" 1 1 1"<< "\n";
almacenamiento<<"XOR"<< "\n";
almacenamiento<<" A B S"<< "\n"<< "\n";
almacenamiento<<" 0 0 0 "<< "\n";
almacenamiento<<" 0 1 1"<< "\n";
almacenamiento<<" 1 0 1"<< "\n";
almacenamiento<<" 1 1 0"<< "\n";
almacenamiento<<"NAND"<< "\n";
almacenamiento<<" A B S"<< "\n"<< "\n";
almacenamiento<<" 0 0 1 "<< "\n";
almacenamiento<<" 0 1 1"<< "\n";
almacenamiento<<" 1 0 1"<< "\n";
almacenamiento<<" 1 1 0"<< "\n";
almacenamiento<<"NOR"<< "\n";
almacenamiento<<" A B S"<< "\n"<< "\n";
almacenamiento<<" 0 0 1 "<< "\n";
almacenamiento<<" 0 1 0"<< "\n";
almacenamiento<<" 1 0 0"<< "\n";
almacenamiento<<" 1 1 0"<< "\n";
almacenamiento<<"NOT"<< "\n";
almacenamiento<<" A S"<< "\n"<< "\n";
almacenamiento<<" 0 1 "<< "\n";
almacenamiento<<" 0 1"<< "\n";
almacenamiento<<" 1 0"<< "\n";
almacenamiento<<" 1 0"<< "\n";
almacenamiento<<"BUFFER"<< "\n";
almacenamiento<<" A S"<< "\n"<< "\n";
almacenamiento<<" 0 0 "<< "\n";
almacenamiento<<" 1 1"<< "\n";
almacenamiento.close();
getch();
}break;
case '2':
{
int n;
cout<<"INGRESAR EL NUMERO DE LA TABLA REQUERIDA "<< "\n";
cout<<" 1 --------OR "<< "\n";
cout<<" 2 --------AND "<< "\n";
cout<<" 3 --------XOR "<< "\n";
cout<<" 4 --------NAND "<< "\n";
cout<<" 5 --------NOR "<< "\n";
cout<<" 6 --------NOT "<< "\n";
cout<<" 7 --------BUFFER "<< "\n";
cin>>n;
if(n == 1)
{
cout<<"OR"<< "\n";
cout<<" A B S"<< "\n"<< "\n";
cout<<" 0 0 0 "<< "\n";
cout<<" 0 1 1"<< "\n";
cout<<" 1 0 1"<< "\n";
cout<<" 1 1 1"<< "\n";
}
else if(n == 2)
{
cout<<"AND"<< "\n";
cout<<" A B S"<< "\n"<< "\n";
cout<<" 0 0 0 "<< "\n";
cout<<" 0 1 0"<< "\n";
cout<<" 1 0 0"<< "\n";
cout<<" 1 1 1"<< "\n";
}
else if(n == 3)
{
cout<<"XOR"<< "\n";
cout<<" A B S"<< "\n"<< "\n";
cout<<" 0 0 0 "<< "\n";
cout<<" 0 1 1"<< "\n";
cout<<" 1 0 1"<< "\n";
cout<<" 1 1 0"<< "\n";
}
else if(n == 4)
{
cout<<"NAND"<< "\n";
cout<<" A B S"<< "\n"<< "\n";
cout<<" 0 0 1 "<< "\n";
cout<<" 0 1 1"<< "\n";
cout<<" 1 0 1"<< "\n";
cout<<" 1 1 0"<< "\n";
}
else if(n == 5)
{
cout<<"NOR"<< "\n";
cout<<" A B S"<< "\n"<< "\n";
cout<<" 0 0 1 "<< "\n";
cout<<" 0 1 0"<< "\n";
cout<<" 1 0 0"<< "\n";
cout<<" 1 1 0"<< "\n";
}
else if(n == 6)
{
cout<<"NOT"<< "\n";
cout<<" A S"<< "\n"<< "\n";
cout<<" 0 1 "<< "\n";
cout<<" 0 1"<< "\n";
cout<<" 1 0"<< "\n";
cout<<" 1 0"<< "\n";
}
else if(n == 7)
{
cout<<"BUFFER"<< "\n";
cout<<" A S"<< "\n"<< "\n";
cout<<" 0 0 "<< "\n";
cout<<" 1 1"<< "\n";
}
getch();
}
break;
case '3':
{
char s;
int n,e;
cout<<" 1 --------OR "<< "\n";
cout<<" 2 --------AND "<< "\n";
cout<<" 3 --------XOR "<< "\n";
cout<<" 4 --------NAND "<< "\n";
cout<<" 5 --------NOR "<< "\n";
cout<<" 6 --------NOT "<< "\n";
cout<<" 7 --------BUFFER "<< "\n";
cout<<" Seleccionar la tabla de verdad "<< "\n";
cin>>n;
cout<<" INGRESAR EL NUMERO DE VARIABLES "<< "\n";
cin>>e;
if (n==1) {
if(e==2){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/OR2.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==3){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/OR3.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==4){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/OR4.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==5){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/OR5.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
}
// PARA LA OTRA TABLA
if (n==2) {
if(e==2){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/AND2.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==3){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/AND3.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==4){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/AND4.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==5){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/AND5.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
}
//TABLAS DE LA XOR
if (n==3) {
if(e==2){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/XOR2.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==3){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/XOR3.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==4){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/XOR4.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==5){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/XOR5.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
}
// TABLA NAND
if (n==4) {
if(e==2){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/NAND2.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==3){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/NAND3.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==4){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/NAND4.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==5){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/NAND5.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
}
//TABLA NOR
if (n==5) {
if(e==2){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/NOR2.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==3){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/NOR3.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==4){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/NOR4.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
if(e==5){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/NOR5.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
}
//TABLA NOT
if(e==6){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/NOT.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
//TABLA BUFFER
if(e==7){
ifstream ver ("C:/Users/Kristyan/LITERAL 1/BUFER.txt");
while (!ver.eof())
{
ver.get(s);
cout<<s;
}
}
getch();
}
break;
case '4': r=0;break;
default:
{
cprintf("Opcion Invalida");
getch();
}
}
}
}
| [
"kis.ger_94@hotmail.com"
] | kis.ger_94@hotmail.com |
8f25f88706b407d08f4a499ed83db38de26be2d8 | 629330e0607d78026a99850a8184f3924af60f05 | /examples/TreeBenchmark/header.cpp | b6b03db57e715d66ebc48e3467a6740fdac669ca | [] | no_license | prophile/crisscross | 682092c8e87e4b948f934cd62f29b10cca000de6 | 1882aff64193627b58258861fb5b240e643254c1 | refs/heads/master | 2016-09-10T00:13:50.150868 | 2009-06-19T21:42:22 | 2009-06-19T22:30:21 | 108,875 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 207 | cpp | /*
* CrissCross
* A multi-purpose cross-platform library.
*
* A product of IO.IN Research.
*
* (c) 2006-2008 Steven Noonan.
* Licensed under the New BSD License.
*
*/
#include "header.h"
| [
"steven@uplinklabs.net"
] | steven@uplinklabs.net |
c5970562f442d81f70f82e0b9b03ef5c42646c0f | 115d443b5f704e1205add5f4326688de07ad467f | /Project/misc_recognition.h | f7813ea52a9475c0b0f772eb7630664166ac7b15 | [] | no_license | Porkbutts/Vespidae-Wasp-Classification | f61ef818b17770311874170eda765f7473e97df3 | c35b012c4898a6c2060ed1cb3b9cf65f9ffe0cc5 | refs/heads/master | 2021-01-18T18:12:35.514690 | 2017-03-09T18:39:38 | 2017-03-09T18:39:38 | 84,360,651 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,260 | h | #ifndef PRIME_PROJECT_2011_MISC_RECOGNITION_H
#define PRIME_PROJECT_2011_MISC_RECOGNITION_H
#include <cv.h>
#include <ml.h>
// Image Processing
void binarize( const cv::Mat& src, cv::Mat& dst );
cv::Rect getBoundingRect( const cv::Mat& bin );
// Color Feature extraction
cv::Mat calcColorWindow( const cv::Mat& src, int blockLength, int blockStride );
void calcColorFeature( const cv::Mat& src, cv::Mat& dst, const cv::Mat& mask = cv::Mat() );
// Machine learning
int getNumLabels( const cv::Mat& labels );
cv::Mat mergeAllExcept( const std::vector<cv::Mat>& indexSets, int fold );
std::vector<cv::Mat> splitData( const cv::Mat& labels, int k );
std::vector<cv::SVM> oneVsAllSVM_train( const cv::Mat& features, const cv::Mat& labels,
const cv::Mat& varIdx, const cv::Mat& sampleIdx, cv::SVMParams params );
float oneVsAllSVM_predict( const std::vector<cv::SVM>& svms,
const cv::Mat& feature, cv::Mat& confidenceVector );
float predictFromJointProb( const cv::Mat& colorProbs,
const cv::Mat& hogProbs, bool returnConfidence = false );
float calculateAcc( const cv::Mat& confusionMatrix,
float* correct = 0, float* total = 0, int cl = -1 );
void printResults( const cv::Mat& confusionMatrix );
#endif | [
"atamnuay@inauth.com"
] | atamnuay@inauth.com |
c9830b05e148a34589533dd72b33a998dfa41f72 | 631ac917e8d5318aefc1764e3dde5b6bbd2302c1 | /Entities/FlyingEnemy.cpp | a66299efcadfddc17e865a2948737b3605e32c77 | [] | no_license | jjheaton99/PlatformGameSDL2 | 0548fc606e14cf8f30e52b463d03a310e437d43d | c9b0a963c77fee50e988d9c77397f568db4cdbb6 | refs/heads/master | 2023-07-16T13:22:51.669405 | 2021-04-04T15:06:16 | 2021-04-04T15:06:16 | 259,125,961 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,132 | cpp | #include "FlyingEnemy.h"
#include "Player.h"
FlyingEnemy::FlyingEnemy(std::string fileName, double xStartPos, double yStartPos, double xVel, double yVel, double colliderWidth, double colliderHeight, int hitPoints, int spriteSheetCount, int damage)
: FlyingCharacter(fileName, xStartPos, yStartPos, xVel, yVel, colliderWidth, colliderHeight, hitPoints, spriteSheetCount), m_damage{ damage }
{}
void FlyingEnemy::update(const std::vector<std::vector<Tile>>& map, const Camera& camera, std::shared_ptr<Character> player)
{
if (!m_killed)
{
if (m_hitPoints <= 0)
{
kill();
}
//only update when within certain distance from camera for performance
if (m_position.getx() > 1.0 * camera.getx() - m_updateRange && m_position.getx() < 1.0 * camera.getx() + 1.0 * camera.getw() + m_updateRange
&& m_position.gety() > 1.0 * camera.gety() - m_updateRange && m_position.gety() < 1.0 * camera.gety() + 1.0 * camera.geth() + m_updateRange)
{
if (!m_immobilised)
{
enemyControls(player);
}
//edge check goes before map collision check to prevent vector subcript error when going off the edge
if (edgeCheck(camera))
{
//collider position is moved after each function that can change character position
setCollider();
}
bool collided{ false };
if (!m_immobilised)
{
collided = sweepMapCollideCheck(map) || attackPlayer(player);
}
else
{
collided = immobilisedSweepMapCollideCheck(map) || attackPlayer(player);
}
if (collided)
{
setCollider();
}
else
{
m_position.add(m_velocity);
setCollider();
}
m_dstRect.x = static_cast<int>(m_position.getx());
m_dstRect.y = static_cast<int>(m_position.gety());
animateSprite();
cycleDamageFlash();
m_inUpdateRange = true;
}
else
{
m_inUpdateRange = false;
}
}
else
{
killAnimation();
}
}
bool FlyingEnemy::attackPlayer(std::shared_ptr<Character> player)
{
if (!dynamic_cast<Player&>(*player).isInvincible() && (m_velocity.magnitude() < (m_position - player->getPos()).magnitude()))
{
Collider::sweptObstacleTuple sweptCollider{ player->getCollider(), Collider::xOverlap(m_collider, player->getCollider()), Collider::yOverlap(m_collider, player->getCollider()) };
if (m_collider.sweptAABBDeflect(1.5, sweptCollider, m_position, m_velocity, player->getVel()))
{
dynamic_cast<Player&>(*player).removeHP(m_damage);
return true;
}
else if (m_collider.collideCheck(player->getCollider()))
{
dynamic_cast<Player&>(*player).removeHP(m_damage);
m_velocity.scale(-1.5);
return true;
}
}
return false;
} | [
"jj_heaton@yahoo.co.uk"
] | jj_heaton@yahoo.co.uk |
58edf9dcbda27ddc31be8a97ec5022953574aaa3 | d0fb46aecc3b69983e7f6244331a81dff42d9595 | /mse/include/alibabacloud/mse/model/GetTagsBySwimmingLaneGroupIdResult.h | 21f480ce978c5aeaa59779aad61186dc3392e200 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-cpp-sdk | 3d8d051d44ad00753a429817dd03957614c0c66a | e862bd03c844bcb7ccaa90571bceaa2802c7f135 | refs/heads/master | 2023-08-29T11:54:00.525102 | 2023-08-29T03:32:48 | 2023-08-29T03:32:48 | 115,379,460 | 104 | 82 | NOASSERTION | 2023-09-14T06:13:33 | 2017-12-26T02:53:27 | C++ | UTF-8 | C++ | false | false | 1,656 | h | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_MSE_MODEL_GETTAGSBYSWIMMINGLANEGROUPIDRESULT_H_
#define ALIBABACLOUD_MSE_MODEL_GETTAGSBYSWIMMINGLANEGROUPIDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mse/MseExport.h>
namespace AlibabaCloud
{
namespace Mse
{
namespace Model
{
class ALIBABACLOUD_MSE_EXPORT GetTagsBySwimmingLaneGroupIdResult : public ServiceResult
{
public:
GetTagsBySwimmingLaneGroupIdResult();
explicit GetTagsBySwimmingLaneGroupIdResult(const std::string &payload);
~GetTagsBySwimmingLaneGroupIdResult();
std::string getMessage()const;
std::vector<std::string> getData()const;
std::string getErrorCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<std::string> data_;
std::string errorCode_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MSE_MODEL_GETTAGSBYSWIMMINGLANEGROUPIDRESULT_H_ | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
482e8222bfda688f710066673e993024b09bf647 | 9494ac09c78d7b6cb17e1b30bad80d7b60da7d96 | /p1050StringSubtraction.cpp | 1bb249a1c7ea0644fd230007227643f84b885281 | [
"MIT"
] | permissive | yangyueren/PAT | 24547ea71c2a1e05326e99d9813dbd972c1aea1d | 950d820ec9174c5e2d74adafeb2abde4acdc635f | refs/heads/master | 2020-09-12T07:42:19.826678 | 2019-11-18T03:45:44 | 2019-11-18T03:45:44 | 222,358,172 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 615 | cpp | //
// Created by yryang on 2019/9/13.
//
#include "iostream"
#include "string.h"
#include "string"
#include "stdlib.h"
#include "stdio.h"
#include "map"
#include "vector"
#include "set"
#include "math.h"
#include "queue"
#include "algorithm"
using namespace std;
char ss[10005];
char aa[10005];
set<char> st;
int main(){
string s,a;
getline(cin ,s);
getline(cin, a);
for (int i = 0; i < a.size(); ++i) {
st.insert(a[i]);
}
for (int j = 0; j < s.size(); ++j) {
if(st.find(s[j]) == st.end()){
printf("%c", s[j]);
}
}
printf("\n");
return 0;
} | [
"to_wx@outlook.com"
] | to_wx@outlook.com |
059dc047aa515a6dd8ee638f504b93f2d5cb6ff1 | c634dd60873f7f8264e8d9eba4b3fb5ec80a8e26 | /include/Pixel.h | d9a4677cf6cf4e68261861fc9842ccfba67af729 | [
"MIT"
] | permissive | haskaan/Snake2D | 60a51a80e7c0b72dd888dac0a3d0d8fb455339b3 | 8c638cfc0ee30ebf03bdec8df19887c18e96dae4 | refs/heads/master | 2021-06-08T06:02:14.794920 | 2016-12-19T06:36:14 | 2016-12-19T06:36:14 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 386 | h | #ifndef PIXEL_H
#define PIXEL_H
#include "Shape.h"
const int LEFT = 1;
const int RIGHT = 2;
const int UP = 3;
const int DOWN = 4;
class Pixel : public Shape {
private:
int distance;
int direction;
public:
Pixel();
Dot getFrontDot();
void move();
int getDistance();
int getDirection();
void setPosition(float x, float y);
void setDirection(int direction);
};
#endif | [
"kaanhas.52@gmail.com"
] | kaanhas.52@gmail.com |
d26a68b26c1b79df6aadd9ab3a778704d0b6549e | bcf7a8f7594a955159fe41586a490790827fc229 | /Utils/StatisticsCalculator/StatisticsCalculator.cpp | f888758046fb3609c7d378aa1a7e63f18241d60c | [] | no_license | mazurekm/QAP | e147a01fa70ce33b20a3b6c1059a570e31752d1d | 838d42285751491980f272fbf5eb2789ea58c8ce | refs/heads/master | 2021-01-10T07:29:20.224828 | 2015-12-03T11:26:12 | 2015-12-03T11:26:12 | 44,010,737 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 716 | cpp | #include "StatisticsCalculator.h"
#include <cmath>
CStatisticsCalculator::CStatisticsCalculator() : quantitySum(0), quantitySquareSum(0), samples(0) {
}
void CStatisticsCalculator::update(double quantity) {
quantitySum += quantity;
quantitySquareSum += quantity * quantity;
++samples;
}
void CStatisticsCalculator::reset() {
quantitySum = 0;
quantitySquareSum = 0;
samples = 0;
}
double CStatisticsCalculator::getMean() const {
return quantitySum / samples;
}
double CStatisticsCalculator::getStdDev() const {
double mean = getMean();
return std::sqrt(quantitySquareSum/samples - mean*mean);
}
double CStatisticsCalculator::getQuantitySum() const {
return quantitySum;
} | [
"piotr.t.ptaszynski@student.put.poznan.pl"
] | piotr.t.ptaszynski@student.put.poznan.pl |
64c22ea26b3a0c38bf6f672fb728bbdac5dddc6f | e13860ecc8ff1d295bc61a6d119a3a83da2e022d | /branches/cbitmap/Game/UI/GuiHandler.cpp | 25a73976e6b38c3e6cc0e0de3738a8e545b3abcd | [] | no_license | spring/svn-spring-archive | 9c45714c6ea8c3166b5678209aea4b7a126028ea | 538e90585ed767ee713955221bfdd89410321447 | refs/heads/master | 2020-12-30T09:58:08.400276 | 2014-10-15T00:46:52 | 2014-10-15T00:46:52 | 25,232,864 | 2 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 115,571 | cpp | #include "StdAfx.h"
// GuiHandler.cpp: implementation of the CGuiHandler class.
//
//////////////////////////////////////////////////////////////////////
#include "GuiHandler.h"
#include <map>
#include <set>
#include "SDL_keysym.h"
#include "SDL_mouse.h"
#include "CommandColors.h"
#include "InfoConsole.h"
#include "KeyBindings.h"
#include "KeyCodes.h"
#include "LuaUI.h"
#include "MiniMap.h"
#include "MouseHandler.h"
#include "OutlineFont.h"
#include "SimpleParser.h"
#include "Game/Camera.h"
#include "Game/Game.h"
#include "Game/GameHelper.h"
#include "Game/SelectedUnits.h"
#include "Map/BaseGroundDrawer.h"
#include "Map/Ground.h"
#include "Rendering/glFont.h"
#include "Rendering/GL/glList.h"
#include "Rendering/GL/myGL.h"
#include "Rendering/Textures/Bitmap.h"
#include "Rendering/Textures/TextureHandler.h"
#include "Rendering/UnitModels/3DOParser.h"
#include "Rendering/UnitModels/UnitDrawer.h"
#include "Sim/Misc/Feature.h"
#include "Sim/Misc/LosHandler.h"
#include "Sim/Units/CommandAI/CommandAI.h"
#include "Sim/Units/CommandAI/BuilderCAI.h"
#include "Sim/Units/UnitDefHandler.h"
#include "Sim/Units/Unit.h"
#include "Sim/Units/UnitHandler.h"
#include "Sim/Units/UnitLoader.h"
#include "Sim/Weapons/WeaponDefHandler.h"
#include "Sim/Weapons/Weapon.h"
#include "System/LogOutput.h"
#include "System/Platform/ConfigHandler.h"
#include "mmgr.h"
extern Uint8 *keys;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CGuiHandler* guihandler = NULL;
const char* CGuiHandler::luaUiFile = "gui.lua";
CGuiHandler::CGuiHandler()
: firstLayout(true),
inCommand(-1),
activeMousePress(false),
forceLayoutUpdate(false),
defaultCmdMemory(-1),
needShift(false),
maxPage(0),
activePage(0),
showingMetal(false),
buildSpacing(0),
buildFacing(0),
actionOffset(0),
luaUI(NULL),
luaUIClick(false),
gatherMode(false)
{
icons = SAFE_NEW IconInfo[16];
iconsSize = 16;
iconsCount = 0;
LoadConfig("ctrlpanel.txt");
miniMapMarker = !!configHandler.GetInt("MiniMapMarker", 1);
invertQueueKey = !!configHandler.GetInt("InvertQueueKey", 0);
readmap->mapDefParser.GetDef(autoShowMetal, "1", "MAP\\autoShowMetal");
useStencil = false;
if (GLEW_NV_depth_clamp && !!configHandler.GetInt("StencilBufferBits", 1)) {
GLint stencilBits;
glGetIntegerv(GL_STENCIL_BITS, &stencilBits);
useStencil = (stencilBits >= 1);
}
}
CGuiHandler::~CGuiHandler()
{
delete[] icons;
delete luaUI;
std::map<std::string, unsigned int>::iterator it;
for (it = textureMap.begin(); it != textureMap.end(); ++it) {
const GLuint texID = it->second;
glDeleteTextures (1, &texID);
}
}
void CGuiHandler::UnitCreated(CUnit* unit)
{
if (luaUI != NULL) {
luaUI->UnitCreated(unit);
}
}
void CGuiHandler::UnitReady(CUnit* unit, CUnit* builder)
{
if (luaUI != NULL) {
luaUI->UnitReady(unit, builder);
}
}
void CGuiHandler::UnitDestroyed(CUnit* victim, CUnit* attacker)
{
if (luaUI != NULL) {
luaUI->UnitDestroyed(victim, attacker);
}
}
void CGuiHandler::AddConsoleLine(const std::string& line, int priority)
{
if (luaUI != NULL) {
luaUI->AddConsoleLine(line, priority);
}
}
void CGuiHandler::GroupChanged(int groupID)
{
changedGroups.insert(groupID);
}
bool CGuiHandler::GetQueueKeystate() const
{
return (!invertQueueKey && keys[SDLK_LSHIFT]) ||
(invertQueueKey && !keys[SDLK_LSHIFT]);
}
void CGuiHandler::LoadDefaults()
{
xIcons = 2;
yIcons = 8;
xPos = 0.000f;
yPos = 0.175f;
xIconSize = 0.060f;
yIconSize = 0.060f;
textBorder = 0.003f;
iconBorder = 0.003f;
frameBorder = 0.003f;
xSelectionPos = 0.018f;
ySelectionPos = 0.127f;
frameAlpha = -1.0f;
textureAlpha = 0.8f;
dropShadows = true;
useOptionLEDs = true;
selectGaps = true;
selectThrough = false;
menuName = "";
outlineFont.Enable(false);
attackRect = true;
newAttackMode = true;
invColorSelect = true;
}
static bool SafeAtoF(float& var, const string& value)
{
char* endPtr;
const char* startPtr = value.c_str();
const float tmp = (float)strtod(startPtr, &endPtr);
if (endPtr == startPtr) {
return false;
}
var = tmp;
return true;
}
bool CGuiHandler::LoadConfig(const std::string& filename)
{
LoadDefaults();
CFileHandler ifs(filename);
SimpleParser::Init();
string deadStr = "";
string prevStr = "";
string nextStr = "";
string fillOrderStr = "";
while (true) {
const string line = SimpleParser::GetCleanLine(ifs);
if (line.empty()) {
break;
}
vector<string> words = SimpleParser::Tokenize(line, 1);
const string command = StringToLower(words[0]);
if ((command == "dropshadows") && (words.size() > 1)) {
dropShadows = !!atoi(words[1].c_str());
}
else if ((command == "useoptionleds") && (words.size() > 1)) {
useOptionLEDs = !!atoi(words[1].c_str());
}
else if ((command == "selectgaps") && (words.size() > 1)) {
selectGaps = !!atoi(words[1].c_str());
}
else if ((command == "selectthrough") && (words.size() > 1)) {
selectThrough = !!atoi(words[1].c_str());
}
else if ((command == "deadiconslot") && (words.size() > 1)) {
deadStr = StringToLower(words[1]);
}
else if ((command == "prevpageslot") && (words.size() > 1)) {
prevStr = StringToLower(words[1]);
}
else if ((command == "nextpageslot") && (words.size() > 1)) {
nextStr = StringToLower(words[1]);
}
else if ((command == "fillorder") && (words.size() > 1)) {
fillOrderStr = StringToLower(words[1]);
}
else if ((command == "xicons") && (words.size() > 1)) {
xIcons = atoi(words[1].c_str());
}
else if ((command == "yicons") && (words.size() > 1)) {
yIcons = atoi(words[1].c_str());
}
else if ((command == "xiconsize") && (words.size() > 1)) {
SafeAtoF(xIconSize, words[1]);
}
else if ((command == "yiconsize") && (words.size() > 1)) {
SafeAtoF(yIconSize, words[1]);
}
else if ((command == "xpos") && (words.size() > 1)) {
SafeAtoF(xPos, words[1]);
}
else if ((command == "ypos") && (words.size() > 1)) {
SafeAtoF(yPos, words[1]);
}
else if ((command == "textborder") && (words.size() > 1)) {
SafeAtoF(textBorder, words[1]);
}
else if ((command == "iconborder") && (words.size() > 1)) {
SafeAtoF(iconBorder, words[1]);
}
else if ((command == "frameborder") && (words.size() > 1)) {
SafeAtoF(frameBorder, words[1]);
}
else if ((command == "xselectionpos") && (words.size() > 1)) {
SafeAtoF(xSelectionPos, words[1]);
}
else if ((command == "yselectionpos") && (words.size() > 1)) {
SafeAtoF(ySelectionPos, words[1]);
}
else if ((command == "framealpha") && (words.size() > 1)) {
SafeAtoF(frameAlpha, words[1]);
}
else if ((command == "texturealpha") && (words.size() > 1)) {
SafeAtoF(textureAlpha, words[1]);
}
else if ((command == "outlinefont") && (words.size() > 1)) {
outlineFont.Enable(!!atoi(words[1].c_str()));
}
else if ((command == "attackrect") && (words.size() > 1)) {
attackRect = !!atoi(words[1].c_str());
}
else if ((command == "newattackmode") && (words.size() > 1)) {
newAttackMode = !!atoi(words[1].c_str());
}
else if ((command == "invcolorselect") && (words.size() > 1)) {
invColorSelect = !!atoi(words[1].c_str());
}
}
// sane clamps
xIcons = max(2, xIcons);
yIcons = max(2, yIcons);
xIconSize = max(0.010f, xIconSize);
yIconSize = max(0.010f, yIconSize);
iconBorder = max(0.0f, iconBorder);
frameBorder = max(0.0f, frameBorder);
xIconStep = xIconSize + (iconBorder * 2.0f);
yIconStep = yIconSize + (iconBorder * 2.0f);
iconsPerPage = (xIcons * yIcons);
buttonBox.x1 = xPos;
buttonBox.x2 = xPos + (frameBorder * 2.0f) + (xIcons * xIconStep);
buttonBox.y1 = yPos;
buttonBox.y2 = yPos + (frameBorder * 2.0f) + (yIcons * yIconStep);
if (!deadStr.empty()) {
deadIconSlot = ParseIconSlot(deadStr);
} else {
deadIconSlot = -1;
}
if (!prevStr.empty() && (prevStr != "auto")) {
if (prevStr == "none") {
prevPageSlot = -1;
} else {
prevPageSlot = ParseIconSlot(prevStr);
}
} else {
prevPageSlot = iconsPerPage - 2;
}
if (!nextStr.empty() && (nextStr != "auto")) {
if (nextStr == "none") {
nextPageSlot = -1;
} else {
nextPageSlot = ParseIconSlot(nextStr);
}
} else {
nextPageSlot = iconsPerPage - 1;
}
if (deadIconSlot >= 0) {
const float fullBorder = frameBorder + iconBorder;
const float fx = (float)(deadIconSlot % xIcons);
const float fy = (float)(deadIconSlot / xIcons);
xBpos = buttonBox.x1 + (fullBorder + (0.5 * xIconSize) + (fx * xIconStep));
yBpos = buttonBox.y2 - (fullBorder + (0.5 * yIconSize) + (fy * yIconStep));
}
else if ((prevPageSlot >= 0) && (nextPageSlot >= 0)) {
// place in the middle of adjacent paging icons
const int delta = abs(prevPageSlot - nextPageSlot);
if ((delta == 1) || (delta == xIcons)) {
const float fullBorder = frameBorder + iconBorder;
const float fxp = (float)(prevPageSlot % xIcons);
const float fyp = (float)(prevPageSlot / xIcons);
const float fxn = (float)(nextPageSlot % xIcons);
const float fyn = (float)(nextPageSlot / xIcons);
const float fx = 0.5f * (fxp + fxn);
const float fy = 0.5f * (fyp + fyn);
xBpos = buttonBox.x1 + (fullBorder + (0.5 * xIconSize) + (fx * xIconStep));
yBpos = buttonBox.y2 - (fullBorder + (0.5 * yIconSize) + (fy * yIconStep));
}
else {
xBpos = yBpos = -1.0f; // off screen
}
}
else {
xBpos = yBpos = -1.0f; // off screen
}
ParseFillOrder(fillOrderStr);
return true;
}
void CGuiHandler::ParseFillOrder(const std::string& text)
{
// setup the default order
fillOrder.clear();
for (int i = 0; i < iconsPerPage; i++) {
fillOrder.push_back(i);
}
// split the string into slot names
std::vector<std::string> slotNames = SimpleParser::Tokenize(text, 0);
if ((int)slotNames.size() != iconsPerPage) {
return;
}
std::set<int> slotSet;
std::vector<int> slotVec;
for (int s = 0; s < iconsPerPage; s++) {
const int slotNumber = ParseIconSlot(slotNames[s]);
if ((slotNumber < 0) || (slotNumber >= iconsPerPage) ||
(slotSet.find(slotNumber) != slotSet.end())) {
return;
}
slotSet.insert(slotNumber);
slotVec.push_back(slotNumber);
}
fillOrder = slotVec;
}
int CGuiHandler::ParseIconSlot(const std::string& text) const
{
const char rowLetter = tolower(text[0]);
if ((rowLetter < 'a') || (rowLetter > 'z')) {
return -1;
}
const int row = rowLetter - 'a';
if (row >= yIcons) {
return -1;
}
char* endPtr;
const char* startPtr = text.c_str() + 1;
int column = strtol(startPtr, &endPtr, 10);
if ((endPtr == startPtr) || (column < 0) || (column >= xIcons)) {
return -1;
}
return (row * xIcons) + column;
}
bool CGuiHandler::ReloadConfig(const string& filename)
{
LoadConfig(filename);
activePage = 0;
selectedUnits.SetCommandPage(activePage);
LayoutIcons(false);
return true;
}
void CGuiHandler::ResizeIconArray(unsigned int size)
{
int minIconsSize = iconsSize;
while (minIconsSize < size) {
minIconsSize *= 2;
}
if (iconsSize < minIconsSize) {
iconsSize = minIconsSize;
delete[] icons;
icons = SAFE_NEW IconInfo[iconsSize];
}
}
void CGuiHandler::AppendPrevAndNext(vector<CommandDescription>& cmds)
{
CommandDescription cd;
cd.id=CMD_INTERNAL;
cd.action="prevmenu";
cd.type=CMDTYPE_PREV;
cd.name="";
cd.tooltip = "Previous menu";
cmds.push_back(cd);
cd.id=CMD_INTERNAL;
cd.action="nextmenu";
cd.type=CMDTYPE_NEXT;
cd.name="";
cd.tooltip = "Next menu";
cmds.push_back(cd);
}
int CGuiHandler::FindInCommandPage()
{
if ((inCommand < 0) || (inCommand >= commands.size())) {
return -1;
}
for (int ii = 0; ii < iconsCount; ii++) {
const IconInfo& icon = icons[ii];
if (icon.commandsID == inCommand) {
return (ii / iconsPerPage);
}
}
return -1;
}
void CGuiHandler::RevertToCmdDesc(const CommandDescription& cmdDesc,
bool samePage)
{
for (int a = 0; a < commands.size(); ++a) {
if (commands[a].id == cmdDesc.id) {
inCommand = a;
if (commands[a].type == CMDTYPE_ICON_BUILDING) {
UnitDef* ud = unitDefHandler->GetUnitByID(-commands[a].id);
SetShowingMetal(ud->extractsMetal > 0);
} else {
SetShowingMetal(false);
}
if (samePage) {
for (int ii = 0; ii < iconsCount; ii++) {
if (inCommand == icons[ii].commandsID) {
activePage = min(maxPage, (ii / iconsPerPage));;
selectedUnits.SetCommandPage(activePage);
}
}
}
return;
}
}
}
void CGuiHandler::LayoutIcons(bool useSelectionPage)
{
// copy the current command state
const bool validInCommand = (inCommand >= 0) && (inCommand < commands.size());
CommandDescription cmdDesc;
if (validInCommand) {
cmdDesc = commands[inCommand];
}
const bool samePage = validInCommand && (activePage == FindInCommandPage());
useSelectionPage = useSelectionPage && !samePage;
// reset some of our state
inCommand = -1;
commands.clear();
forceLayoutUpdate = false;
// try using the custom layout handler
if (firstLayout) {
firstLayout = false;
if (!!configHandler.GetInt("LuaUI", 0)) {
luaUI = CLuaUI::GetHandler(luaUiFile);
}
}
if (luaUI != NULL) {
if (LayoutCustomIcons(useSelectionPage)) {
if (validInCommand) {
RevertToCmdDesc(cmdDesc, samePage);
}
return; // we're done here
}
else {
delete luaUI;
luaUI = NULL;
LoadConfig("ctrlpanel.txt");
}
}
// get the commands to process
CSelectedUnits::AvailableCommandsStruct ac;
ac = selectedUnits.GetAvailableCommands();
ConvertCommands(ac.commands);
vector<CommandDescription> hidden;
vector<CommandDescription>::const_iterator cdi;
// separate the visible/hidden icons
for (cdi = ac.commands.begin(); cdi != ac.commands.end(); ++cdi){
if (cdi->onlyKey) {
hidden.push_back(*cdi);
} else {
commands.push_back(*cdi);
}
}
// assign extra icons for internal commands
int extraIcons = 0;
if (deadIconSlot >= 0) { extraIcons++; }
if (prevPageSlot >= 0) { extraIcons++; }
if (nextPageSlot >= 0) { extraIcons++; }
const int cmdCount = (int)commands.size();
const int cmdIconsPerPage = (iconsPerPage - extraIcons);
const int pageCount = ((cmdCount + (cmdIconsPerPage - 1)) / cmdIconsPerPage);
const bool multiPage = (pageCount > 1);
const int prevPageCmd = cmdCount + 0;
const int nextPageCmd = cmdCount + 1;
maxPage = max(0, pageCount - 1);
iconsCount = pageCount * iconsPerPage;
// resize the icon array if required
ResizeIconArray(iconsCount);
int ci = 0; // command index
for (int ii = 0; ii < iconsCount; ii++) {
// map the icon order
const int tmpSlot = (ii % iconsPerPage);
const int mii = ii - tmpSlot + fillOrder[tmpSlot]; // mapped icon index
IconInfo& icon = icons[mii];
const int slot = (mii % iconsPerPage);
if (slot == deadIconSlot) {
icon.commandsID = -1;
}
else if (slot == nextPageSlot) {
icon.commandsID = multiPage ? nextPageCmd : -1;
}
else if (slot == prevPageSlot) {
icon.commandsID = multiPage ? prevPageCmd : -1;
}
else if (ci >= cmdCount) {
icon.commandsID = -1;
}
else {
icon.commandsID = ci;
ci++;
}
// setup the geometry
if (icon.commandsID >= 0) {
const float fx = (float)(slot % xIcons);
const float fy = (float)(slot / xIcons);
const float fullBorder = frameBorder + iconBorder;
icon.visual.x1 = buttonBox.x1 + (fullBorder + (fx * xIconStep));
icon.visual.x2 = icon.visual.x1 + xIconSize;
icon.visual.y1 = buttonBox.y2 - (fullBorder + (fy * yIconStep));
icon.visual.y2 = icon.visual.y1 - yIconSize;
const float noGap = selectGaps ? 0.0f : (iconBorder + 0.0005f);
icon.selection.x1 = icon.visual.x1 - noGap;
icon.selection.x2 = icon.visual.x2 + noGap;
icon.selection.y1 = icon.visual.y1 + noGap;
icon.selection.y2 = icon.visual.y2 - noGap;
}
else {
// make sure this icon does not get selected
icon.selection.x1 = icon.selection.x2 = -1.0f;
icon.selection.y1 = icon.selection.y2 = -1.0f;
}
}
// append the Prev and Next commands (if required)
if (multiPage) {
AppendPrevAndNext(commands);
}
// append the hidden commands
for (cdi = hidden.begin(); cdi != hidden.end(); ++cdi) {
commands.push_back(*cdi);
}
// try to setup the old command state
// (inCommand, activePage, showingMetal)
if (validInCommand) {
RevertToCmdDesc(cmdDesc, samePage);
} else if (useSelectionPage) {
activePage = min(maxPage, ac.commandPage);
}
activePage = min(maxPage, activePage);
}
bool CGuiHandler::LayoutCustomIcons(bool useSelectionPage)
{
if (luaUI == NULL) {
return false;
}
// get the commands to process
CSelectedUnits::AvailableCommandsStruct ac;
ac = selectedUnits.GetAvailableCommands();
vector<CommandDescription> cmds = ac.commands;
if (cmds.size() > 0) {
ConvertCommands(cmds);
AppendPrevAndNext(cmds);
}
// call for a custom layout
int tmpXicons = xIcons;
int tmpYicons = yIcons;
vector<int> removeCmds;
vector<CommandDescription> customCmds;
vector<int> onlyTextureCmds;
vector<CLuaUI::ReStringPair> reTextureCmds;
vector<CLuaUI::ReStringPair> reNamedCmds;
vector<CLuaUI::ReStringPair> reTooltipCmds;
vector<CLuaUI::ReParamsPair> reParamsCmds;
map<int, int> iconMap;
if (!luaUI->LayoutButtons(tmpXicons, tmpYicons, cmds,
removeCmds, customCmds,
onlyTextureCmds, reTextureCmds,
reNamedCmds, reTooltipCmds, reParamsCmds,
iconMap, menuName)) {
return false;
}
if ((tmpXicons < 2) || (tmpYicons < 2)) {
logOutput.Print("LayoutCustomIcons() bad xIcons or yIcons (%i, %i)\n",
tmpXicons, tmpYicons);
return false;
}
unsigned int i;
const int tmpIconsPerPage = (tmpXicons * tmpYicons);
// build a set to better find unwanted commands
set<int> removeIDs;
for (i = 0; i < removeCmds.size(); i++) {
const int index = removeCmds[i];
if ((index >= 0) || (index < cmds.size())) {
removeIDs.insert(index);
} else {
logOutput.Print("LayoutCustomIcons() skipping bad removeCmd (%i)\n",
index);
}
}
// remove unwanted commands (and mark all as onlyKey)
vector<CommandDescription> tmpCmds;
for (i = 0; i < cmds.size(); i++) {
if (removeIDs.find(i) == removeIDs.end()) {
cmds[i].onlyKey = true;
tmpCmds.push_back(cmds[i]);
}
}
cmds = tmpCmds;
// add the custom commands
for (i = 0; i < customCmds.size(); i++) {
customCmds[i].onlyKey = true;
cmds.push_back(customCmds[i]);
}
const int cmdCount = (int)cmds.size();
// set commands to onlyTexture
for (i = 0; i < onlyTextureCmds.size(); i++) {
const int index = onlyTextureCmds[i];
if ((index >= 0) && (index < cmdCount)) {
cmds[index].onlyTexture = true;
} else {
logOutput.Print("LayoutCustomIcons() skipping bad onlyTexture (%i)\n",
index);
}
}
// retexture commands
for (i = 0; i < reTextureCmds.size(); i++) {
const int index = reTextureCmds[i].cmdIndex;
if ((index >= 0) && (index < cmdCount)) {
cmds[index].iconname = reTextureCmds[i].texture;
} else {
logOutput.Print("LayoutCustomIcons() skipping bad reTexture (%i)\n",
index);
}
}
// reNamed commands
for (i = 0; i < reNamedCmds.size(); i++) {
const int index = reNamedCmds[i].cmdIndex;
if ((index >= 0) && (index < cmdCount)) {
cmds[index].name = reNamedCmds[i].texture;
} else {
logOutput.Print("LayoutCustomIcons() skipping bad reNamed (%i)\n",
index);
}
}
// reTooltip commands
for (i = 0; i < reTooltipCmds.size(); i++) {
const int index = reTooltipCmds[i].cmdIndex;
if ((index >= 0) && (index < cmdCount)) {
cmds[index].tooltip = reTooltipCmds[i].texture;
} else {
logOutput.Print("LayoutCustomIcons() skipping bad reNamed (%i)\n",
index);
}
}
// reParams commands
for (i = 0; i < reParamsCmds.size(); i++) {
const int index = reParamsCmds[i].cmdIndex;
if ((index >= 0) && (index < cmdCount)) {
const map<int, string>& params = reParamsCmds[i].params;
map<int, string>::const_iterator pit;
for (pit = params.begin(); pit != params.end(); ++pit) {
const int p = pit->first;
if ((p >= 0) && (p < (int)cmds[index].params.size())) {
cmds[index].params[p] = pit->second;
}
}
} else {
logOutput.Print("LayoutCustomIcons() skipping bad reParams (%i)\n",
index);
}
}
// build the iconList from the map
vector<int> iconList;
int nextPos = 0;
map<int, int>::iterator mit;
for (mit = iconMap.begin(); mit != iconMap.end(); ++mit) {
const int iconPos = mit->first;
if (iconPos < nextPos) {
continue;
}
else if (iconPos > nextPos) {
// fill in the blanks
for (int p = nextPos; p < iconPos; p++) {
iconList.push_back(-1);
}
}
iconList.push_back(mit->second); // cmdIndex
nextPos = iconPos + 1;
}
const int iconListCount = (int)iconList.size();
const int pageCount = ((iconListCount + (tmpIconsPerPage - 1)) / tmpIconsPerPage);
const int tmpIconsCount = (pageCount * tmpIconsPerPage);
// resize the icon array if required
ResizeIconArray(tmpIconsCount);
// build the iconList
for (int ii = 0; ii < tmpIconsCount; ii++) {
IconInfo& icon = icons[ii];
const int index = (ii < (int)iconList.size()) ? iconList[ii] : -1;
if ((index >= 0) && (index < cmdCount)) {
icon.commandsID = index;
cmds[index].onlyKey = false;
const int slot = (ii % tmpIconsPerPage);
const float fx = (float)(slot % tmpXicons);
const float fy = (float)(slot / tmpXicons);
const float fullBorder = frameBorder + iconBorder;
icon.visual.x1 = buttonBox.x1 + (fullBorder + (fx * xIconStep));
icon.visual.x2 = icon.visual.x1 + xIconSize;
icon.visual.y1 = buttonBox.y2 - (fullBorder + (fy * yIconStep));
icon.visual.y2 = icon.visual.y1 - yIconSize;
const float noGap = selectGaps ? 0.0f : (iconBorder + 0.0005f);
icon.selection.x1 = icon.visual.x1 - noGap;
icon.selection.x2 = icon.visual.x2 + noGap;
icon.selection.y1 = icon.visual.y1 + noGap;
icon.selection.y2 = icon.visual.y2 - noGap;
}
else {
// make sure this icon does not get selected
icon.commandsID = -1;
icon.selection.x1 = icon.selection.x2 = -1.0f;
icon.selection.y1 = icon.selection.y2 = -1.0f;
}
}
commands = cmds;
xIcons = tmpXicons;
yIcons = tmpYicons;
iconsCount = tmpIconsCount;
iconsPerPage = tmpIconsPerPage;
maxPage = max(0, pageCount - 1);
if (useSelectionPage) {
activePage = min(maxPage, ac.commandPage);
} else {
activePage = min(maxPage, activePage);
}
buttonBox.x1 = xPos;
buttonBox.x2 = xPos + (frameBorder * 2.0f) + (xIcons * xIconStep);
buttonBox.y1 = yPos;
buttonBox.y2 = yPos + (frameBorder * 2.0f) + (yIcons * yIconStep);
return true;
}
void CGuiHandler::GiveCommand(const Command& cmd, bool fromUser) const
{
if (luaUI != NULL) {
if (luaUI->CommandNotify(cmd)) {
return;
}
}
selectedUnits.GiveCommand(cmd, fromUser);
if (gatherMode) {
if ((cmd.id == CMD_MOVE) || (cmd.id == CMD_FIGHT)) {
Command gatherCmd;
gatherCmd.id = CMD_GATHERWAIT;
GiveCommand(gatherCmd, false);
}
}
}
void CGuiHandler::ConvertCommands(vector<CommandDescription>& cmds)
{
if (newAttackMode) {
const int count = (int)cmds.size();
for (int i = 0; i < count; i++) {
CommandDescription& cd = cmds[i];
if ((cd.id == CMD_ATTACK) && (cd.type == CMDTYPE_ICON_UNIT_OR_MAP)) {
if (attackRect) {
cd.type = CMDTYPE_ICON_UNIT_OR_RECTANGLE;
} else {
cd.type = CMDTYPE_ICON_UNIT_OR_AREA;
}
}
}
}
}
void CGuiHandler::SetShowingMetal(bool show)
{
CBaseGroundDrawer* gd = readmap->GetGroundDrawer();
if (!show) {
if (showingMetal) {
gd->DisableExtraTexture();
showingMetal = false;
}
}
else {
if (autoShowMetal) {
if (gd->drawMode != CBaseGroundDrawer::drawMetal) {
CMetalMap* mm = readmap->metalMap;
gd->SetMetalTexture(mm->metalMap, mm->extractionMap, mm->metalPal, false);
showingMetal = true;
}
}
}
}
void CGuiHandler::Update()
{
SetCursorIcon();
// Notify LuaUI about groups that have changed
if (!changedGroups.empty()) {
if (luaUI != NULL) {
set<int>::const_iterator it;
for (it = changedGroups.begin(); it != changedGroups.end(); ++it) {
luaUI->GroupChanged(*it);
}
}
changedGroups.clear();
}
if (!invertQueueKey && (needShift && !keys[SDLK_LSHIFT])) {
SetShowingMetal(false);
inCommand=-1;
needShift=false;
}
const bool commandsChanged = selectedUnits.CommandsChanged();
bool handlerUpdate = false;
if (luaUI != NULL) {
handlerUpdate = luaUI->UpdateLayout(commandsChanged, activePage);
}
if (commandsChanged) {
defaultCmdMemory = -1;
SetShowingMetal(false);
LayoutIcons(true);
fadein = 100;
}
else if (forceLayoutUpdate || handlerUpdate) {
LayoutIcons(false);
}
if (fadein > 0) {
fadein -= 5;
}
}
/******************************************************************************/
/******************************************************************************/
void CGuiHandler::SetCursorIcon() const
{
mouse->cursorText = "";
mouse->cursorScale = 1.0f;
CInputReceiver* ir = NULL;
if (!game->hideInterface) {
ir = GetReceiverAt(mouse->lastx, mouse->lasty);
}
if ((ir != NULL) && (ir != minimap)) {
return;
}
if (ir == minimap) {
mouse->cursorScale = minimap->CursorScale();
}
const bool useMinimap =
(minimap->ProxyMode() ||
((mouse->activeReceiver != this) && (ir == minimap)));
if ((inCommand >= 0) && (inCommand<commands.size())) {
const CommandDescription& cmdDesc = commands[inCommand];
if (!cmdDesc.mouseicon.empty()) {
mouse->cursorText = cmdDesc.mouseicon;
} else {
mouse->cursorText = cmdDesc.name;
}
if (useMinimap && (cmdDesc.id < 0)) {
BuildInfo bi;
bi.pos = minimap->GetMapPosition(mouse->lastx, mouse->lasty);
bi.buildFacing = bi.buildFacing;
bi.def = unitDefHandler->GetUnitByID(-cmdDesc.id);
bi.pos = helper->Pos2BuildPos(bi);
// if an unit (enemy), is not in LOS, then TestUnitBuildSquare()
// does not consider it when checking for position blocking
CFeature* feature;
if(!uh->TestUnitBuildSquare(bi, feature, gu->myAllyTeam)) {
mouse->cursorText = "BuildBad";
} else {
mouse->cursorText = "BuildGood";
}
}
}
else if (!useMinimap || minimap->FullProxy()) {
int defcmd;
if (mouse->buttons[SDL_BUTTON_RIGHT].pressed &&
((mouse->activeReceiver == this) || (minimap->ProxyMode()))) {
defcmd = defaultCmdMemory;
} else {
defcmd = GetDefaultCommand(mouse->lastx, mouse->lasty);
}
if ((defcmd >= 0) && (defcmd < commands.size())) {
const CommandDescription& cmdDesc = commands[defcmd];
if (!cmdDesc.mouseicon.empty()) {
mouse->cursorText = cmdDesc.mouseicon;
} else {
mouse->cursorText = cmdDesc.name;
}
}
}
if (gatherMode && (mouse->cursorText == "Move")) {
mouse->cursorText = "GatherWait";
}
}
bool CGuiHandler::MousePress(int x,int y,int button)
{
if (luaUI != NULL) {
luaUIClick = luaUI->MousePress(x, y, button);
if (luaUIClick) {
return true;
}
}
if (button < 0) {
// proxied click from the minimap
button = -button;
activeMousePress=true;
}
else if (AboveGui(x,y)) {
activeMousePress=true;
return true;
}
if (inCommand >= 0) {
if (invertQueueKey && (button == SDL_BUTTON_RIGHT) &&
!mouse->buttons[SDL_BUTTON_LEFT].pressed) { // for rocker gestures
SetShowingMetal(false);
inCommand = -1;
needShift = false;
return false;
}
activeMousePress = true;
return true;
}
if (button == SDL_BUTTON_RIGHT) {
activeMousePress = true;
defaultCmdMemory = GetDefaultCommand(x, y);
return true;
}
return false;
}
void CGuiHandler::MouseMove(int x, int y, int dx, int dy, int button)
{
if (luaUI != NULL) {
luaUI->MouseMove(x, y, dx, dy, button);
}
}
void CGuiHandler::MouseRelease(int x, int y, int button)
{
int iconCmd = -1;
if (luaUIClick) {
luaUIClick = false;
if (luaUI != NULL) {
iconCmd = luaUI->MouseRelease(x, y, button);
}
if ((iconCmd < 0) || (iconCmd >= commands.size())) {
return;
} else {
activeMousePress = true;
}
}
if (activeMousePress) {
activeMousePress=false;
} else {
return;
}
if (!invertQueueKey && needShift && !keys[SDLK_LSHIFT]) {
SetShowingMetal(false);
inCommand=-1;
needShift=false;
}
if (button < 0) {
button = -button; // proxied click from the minimap
} else {
// setup iconCmd
if ((iconCmd < 0) && !game->hideInterface) {
const int iconPos = IconAtPos(x, y);
if (iconPos >= 0) {
iconCmd = icons[iconPos].commandsID;
}
}
}
// logOutput << x << " " << y << " " << mouse->lastx << " " << mouse->lasty << "\n";
if ((button == SDL_BUTTON_RIGHT) && (iconCmd == -1)) {
// right click -> set the default cmd
inCommand = defaultCmdMemory;
defaultCmdMemory = -1;
}
if ((iconCmd >= 0) && (iconCmd < commands.size())) {
SetShowingMetal(false);
lastKeySet.Reset();
switch(commands[iconCmd].type){
case CMDTYPE_ICON:{
Command c;
c.id = commands[iconCmd].id;
if (c.id != CMD_STOP) {
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
if (invertQueueKey && ((c.id < 0) || (c.id == CMD_STOCKPILE))) {
c.options = c.options ^ SHIFT_KEY;
}
}
GiveCommand(c);
inCommand=-1;
break;}
case CMDTYPE_ICON_MODE:{
int newMode = atoi(commands[iconCmd].params[0].c_str())+1;
if (newMode>commands[iconCmd].params.size()-2) {
newMode = 0;
}
// not really required
char t[10];
SNPRINTF(t, 10, "%d", newMode);
commands[iconCmd].params[0]=t;
Command c;
c.id=commands[iconCmd].id;
c.params.push_back(newMode);
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
GiveCommand(c);
inCommand=-1;
forceLayoutUpdate = true;
break;}
case CMDTYPE_NUMBER:
case CMDTYPE_ICON_MAP:
case CMDTYPE_ICON_AREA:
case CMDTYPE_ICON_UNIT:
case CMDTYPE_ICON_UNIT_OR_MAP:
case CMDTYPE_ICON_FRONT:
case CMDTYPE_ICON_UNIT_OR_AREA:
case CMDTYPE_ICON_UNIT_OR_RECTANGLE:
case CMDTYPE_ICON_UNIT_FEATURE_OR_AREA:
inCommand=iconCmd;
break;
case CMDTYPE_ICON_BUILDING:{
UnitDef* ud=unitDefHandler->GetUnitByID(-commands[iconCmd].id);
SetShowingMetal(ud->extractsMetal > 0);
inCommand=iconCmd;
break;}
case CMDTYPE_COMBO_BOX:
if (GetInputReceivers().empty() || dynamic_cast<CglList*>(GetInputReceivers().front()) == NULL) {
inCommand=iconCmd;
CommandDescription& cd=commands[iconCmd];
list=SAFE_NEW CglList(cd.name.c_str(),MenuSelection);
list->cancelPlace = 0;
list->tooltip = "Choose the AI you want to assign to this group.\n"
"Select \"None\" to cancel or \"default\" to create a group without an AI\n"
"assigned.";
for(vector<string>::iterator pi=++cd.params.begin();pi!=cd.params.end();++pi)
list->AddItem(pi->c_str(),"");
list->place=atoi(cd.params[0].c_str());
return;
}
inCommand=-1;
break;
case CMDTYPE_NEXT:
{
++activePage;
if(activePage>maxPage)
activePage=0;
}
selectedUnits.SetCommandPage(activePage);
inCommand=-1;
break;
case CMDTYPE_PREV:
{
--activePage;
if(activePage<0)
activePage=maxPage;
}
selectedUnits.SetCommandPage(activePage);
inCommand=-1;
break;
case CMDTYPE_CUSTOM:
const bool rmb = (button == SDL_BUTTON_LEFT)? false : true;
RunCustomCommands(commands[iconCmd].params, rmb);
break;
}
return;
}
Command c = GetCommand(x, y, button, false);
// if cmd_stop is returned it indicates that no good command could be found
if (c.id != CMD_STOP) {
GiveCommand(c);
lastKeySet.Reset();
}
FinishCommand(button);
}
int CGuiHandler::IconAtPos(int x, int y)
{
const float fx = MouseX(x);
const float fy = MouseY(y);
if ((fx < buttonBox.x1) || (fx > buttonBox.x2) ||
(fy < buttonBox.y1) || (fy > buttonBox.y2)) {
return -1;
}
int xSlot = int((fx - (buttonBox.x1 + frameBorder)) / xIconStep);
int ySlot = int(((buttonBox.y2 - frameBorder) - fy) / yIconStep);
xSlot = min(max(xSlot, 0), xIcons - 1);
ySlot = min(max(ySlot, 0), yIcons - 1);
const int ii = (activePage * iconsPerPage) + (ySlot * xIcons) + xSlot;
if ((ii >= 0) && (ii < iconsCount)) {
if ((fx > icons[ii].selection.x1) && (fx < icons[ii].selection.x2) &&
(fy > icons[ii].selection.y2) && (fy < icons[ii].selection.y1)) {
return ii;
}
}
return -1;
}
enum ModState {
DontCare, Required, Forbidden
};
struct ModGroup {
ModGroup()
: alt(DontCare),
ctrl(DontCare),
meta(DontCare),
shift(DontCare),
right(DontCare) {}
ModState alt, ctrl, meta, shift, right;
};
static bool ParseCustomCmdMods(string& cmd, ModGroup& in, ModGroup& out)
{
const char* c = cmd.c_str();
if (*c != '@') {
return false;
}
c++;
bool neg = false;
while ((*c != 0) && (*c != '@')) {
char ch = *c;
if (ch == '-') {
neg = true;
}
else if (ch == '+') {
neg = false;
}
else if (ch == 'a') { in.alt = neg ? Forbidden : Required; neg = false; }
else if (ch == 'c') { in.ctrl = neg ? Forbidden : Required; neg = false; }
else if (ch == 'm') { in.meta = neg ? Forbidden : Required; neg = false; }
else if (ch == 's') { in.shift = neg ? Forbidden : Required; neg = false; }
else if (ch == 'r') { in.right = neg ? Forbidden : Required; neg = false; }
else if (ch == 'A') { out.alt = neg ? Forbidden : Required; neg = false; }
else if (ch == 'C') { out.ctrl = neg ? Forbidden : Required; neg = false; }
else if (ch == 'M') { out.meta = neg ? Forbidden : Required; neg = false; }
else if (ch == 'S') { out.shift = neg ? Forbidden : Required; neg = false; }
else if (ch == 'R') { out.right = neg ? Forbidden : Required; neg = false; }
c++;
}
if (*c == 0) {
return false;
}
cmd = cmd.substr((c + 1) - cmd.c_str());
return true;
}
static bool CheckCustomCmdMods(bool rmb, ModGroup& inMods)
{
if (((inMods.alt == Required) && !keys[SDLK_LALT]) ||
((inMods.alt == Forbidden) && keys[SDLK_LALT]) ||
((inMods.ctrl == Required) && !keys[SDLK_LCTRL]) ||
((inMods.ctrl == Forbidden) && keys[SDLK_LCTRL]) ||
((inMods.meta == Required) && !keys[SDLK_LMETA]) ||
((inMods.meta == Forbidden) && keys[SDLK_LMETA]) ||
((inMods.shift == Required) && !keys[SDLK_LSHIFT]) ||
((inMods.shift == Forbidden) && keys[SDLK_LSHIFT]) ||
((inMods.right == Required) && !rmb) ||
((inMods.right == Forbidden) && rmb)) {
return false;
}
return true;
}
void CGuiHandler::RunCustomCommands(const vector<string>& cmds, bool rmb)
{
static int depth = 0;
if (depth > 8) {
return; // recursion protection
}
depth++;
for (int p = 0; p < (int)cmds.size(); p++) {
string copy = cmds[p];
ModGroup inMods; // must match for the action to execute
ModGroup outMods; // controls the state of the modifiers (ex: "group1")
if (ParseCustomCmdMods(copy, inMods, outMods)) {
if (CheckCustomCmdMods(rmb, inMods)) {
const bool tmpAlt = keys[SDLK_LALT];
const bool tmpCtrl = keys[SDLK_LCTRL];
const bool tmpMeta = keys[SDLK_LMETA];
const bool tmpShift = keys[SDLK_LSHIFT];
if (outMods.alt == Required) { keys[SDLK_LALT] = 1; }
if (outMods.alt == Forbidden) { keys[SDLK_LALT] = 0; }
if (outMods.ctrl == Required) { keys[SDLK_LCTRL] = 1; }
if (outMods.ctrl == Forbidden) { keys[SDLK_LCTRL] = 0; }
if (outMods.meta == Required) { keys[SDLK_LMETA] = 1; }
if (outMods.meta == Forbidden) { keys[SDLK_LMETA] = 0; }
if (outMods.shift == Required) { keys[SDLK_LSHIFT] = 1; }
if (outMods.shift == Forbidden) { keys[SDLK_LSHIFT] = 0; }
CKeyBindings::Action action(copy);
if (!ProcessLocalActions(action)) {
CKeySet ks;
game->ActionPressed(action, ks, false /*isRepeat*/);
}
keys[SDLK_LALT] = tmpAlt;
keys[SDLK_LCTRL] = tmpCtrl;
keys[SDLK_LMETA] = tmpMeta;
keys[SDLK_LSHIFT] = tmpShift;
}
}
}
depth--;
}
bool CGuiHandler::AboveGui(int x, int y)
{
if (iconsCount <= 0) {
return false;
}
if (!selectThrough) {
const float fx = MouseX(x);
const float fy = MouseY(y);
if ((fx > buttonBox.x1) && (fx < buttonBox.x2) &&
(fy > buttonBox.y1) && (fy < buttonBox.y2)) {
return true;
}
}
return (IconAtPos(x,y) >= 0);
}
void CGuiHandler::CreateOptions(Command& c,bool rmb)
{
c.options = 0;
if (rmb) {
c.options |= RIGHT_MOUSE_KEY;
}
if (GetQueueKeystate()) {
// allow mouse button 'rocker' movements to force
// immediate mode (when queuing is the default mode)
if (!invertQueueKey ||
(!mouse->buttons[SDL_BUTTON_LEFT].pressed &&
!mouse->buttons[SDL_BUTTON_RIGHT].pressed)) {
c.options |= SHIFT_KEY;
}
}
if (keys[SDLK_LCTRL]) {
c.options |= CONTROL_KEY;
}
if (keys[SDLK_LALT] || keys[SDLK_LMETA]) {
c.options |= ALT_KEY;
}
//logOutput << (int)c.options << "\n";
}
float CGuiHandler::GetNumberInput(const CommandDescription& cd) const
{
float minV = 0.0f;
float maxV = 100.0f;
if (cd.params.size() >= 1) { minV = atof(cd.params[0].c_str()); }
if (cd.params.size() >= 2) { maxV = atof(cd.params[1].c_str()); }
const int minX = (gu->viewSizeX * 1) / 4;
const int maxX = (gu->viewSizeX * 3) / 4;
const int effX = max(min(mouse->lastx, maxX), minX);
const float factor = float(effX - minX) / float(maxX - minX);
return (minV + (factor * (maxV - minV)));
}
int CGuiHandler::GetDefaultCommand(int x,int y) const
{
CInputReceiver* ir = NULL;
if (!game->hideInterface) {
ir = GetReceiverAt(x, y);
}
if ((ir != NULL) && (ir != minimap)) {
return -1;
}
CUnit* unit = NULL;
CFeature* feature = NULL;
if ((ir == minimap) && (minimap->FullProxy())) {
unit = minimap->GetSelectUnit(minimap->GetMapPosition(x, y));
}
else {
const float3 camPos = camera->pos;
const float3 camDir = mouse->dir;
const float viewRange = gu->viewRange*1.4f;
const float dist = helper->GuiTraceRay(camPos, camDir, viewRange, unit, 20, true);
const float dist2 = helper->GuiTraceRayFeature(camPos, camDir, viewRange, feature);
if ((dist > viewRange - 300) && (dist2 > viewRange - 300) && (unit == NULL)) {
return -1;
}
if (dist > dist2) {
unit = NULL;
} else {
feature = NULL;
}
}
// make sure the command is currently available
const int cmd_id = selectedUnits.GetDefaultCmd(unit, feature);
for (int c = 0; c < (int)commands.size(); c++) {
if (cmd_id == commands[c].id) {
return c;
}
}
return -1;
}
bool CGuiHandler::ProcessLocalActions(const CKeyBindings::Action& action)
{
// do not process these actions if the control panel is not visible
if (iconsCount <= 0) {
return false;
}
// only process the build options while building
// (conserve the keybinding space where we can)
if ((inCommand >= 0) && (inCommand < commands.size()) &&
(commands[inCommand].type == CMDTYPE_ICON_BUILDING)) {
if (ProcessBuildActions(action)) {
return true;
}
}
if (action.command == "buildiconsfirst") {
activePage = 0;
selectedUnits.SetCommandPage(activePage);
selectedUnits.ToggleBuildIconsFirst();
LayoutIcons(false);
return true;
}
else if (action.command == "firstmenu") {
activePage = 0;
selectedUnits.SetCommandPage(activePage);
return true;
}
else if (action.command == "hotbind") {
const int iconPos = IconAtPos(mouse->lastx, mouse->lasty);
const int iconCmd = (iconPos >= 0) ? icons[iconPos].commandsID : -1;
if ((iconCmd >= 0) && (iconCmd < commands.size())) {
game->SetHotBinding(commands[iconCmd].action);
}
return true;
}
else if (action.command == "hotunbind") {
const int iconPos = IconAtPos(mouse->lastx, mouse->lasty);
const int iconCmd = (iconPos >= 0) ? icons[iconPos].commandsID : -1;
if ((iconCmd >= 0) && (iconCmd < commands.size())) {
string cmd = "unbindaction " + commands[iconCmd].action;
keyBindings->Command(cmd);
logOutput.Print("%s", cmd.c_str());
}
return true;
}
else if (action.command == "showcommands") {
// bonus command for debugging
logOutput.Print("Available Commands:\n");
for(int i = 0; i < commands.size(); ++i){
logOutput.Print(" command: %i, id = %i, action = %s\n",
i, commands[i].id, commands[i].action.c_str());
}
// show the icon/command linkage
logOutput.Print("Icon Linkage:\n");
for(int ii = 0; ii < iconsCount; ++ii){
logOutput.Print(" icon: %i, commandsID = %i\n",
ii, icons[ii].commandsID);
}
logOutput.Print("maxPage = %i\n", maxPage);
logOutput.Print("activePage = %i\n", activePage);
logOutput.Print("iconsSize = %i\n", iconsSize);
logOutput.Print("iconsCount = %i\n", iconsCount);
logOutput.Print("commands.size() = %i\n", commands.size());
return true;
}
else if (action.command == "luaui") {
RunLayoutCommand(action.extra);
return true;
}
else if (action.command == "invqueuekey") {
if (action.extra.empty()) {
invertQueueKey = !invertQueueKey;
} else {
invertQueueKey = !!atoi(action.extra.c_str());
}
needShift = false;
configHandler.SetInt("InvertQueueKey", invertQueueKey ? 1 : 0);
return true;
}
return false;
}
void CGuiHandler::RunLayoutCommand(const string& command)
{
if (command == "reload") {
if (luaUI == NULL) {
logOutput.Print("Loading: \"%s\"\n", luaUiFile);
luaUI = CLuaUI::GetHandler(luaUiFile);
if (luaUI == NULL) {
LoadConfig("ctrlpanel.txt");
logOutput.Print("Loading failed\n");
}
} else {
logOutput.Print("Reloading: \"%s\"\n", luaUiFile);
delete luaUI;
luaUI = CLuaUI::GetHandler(luaUiFile);
if (luaUI == NULL) {
LoadConfig("ctrlpanel.txt");
logOutput.Print("Reloading failed\n");
}
}
}
else if (command == "disable") {
if (luaUI != NULL) {
delete luaUI;
luaUI = NULL;
LoadConfig("ctrlpanel.txt");
logOutput.Print("Disabled layout handler\n");
}
}
else {
if (luaUI != NULL) {
luaUI->ConfigCommand(command);
} else {
logOutput.Print("LuaUI is not loaded\n");
}
}
LayoutIcons(false);
return;
}
bool CGuiHandler::ProcessBuildActions(const CKeyBindings::Action& action)
{
const string arg = StringToLower(action.extra);
if (action.command == "buildspacing") {
if (arg == "inc") {
buildSpacing++;
return true;
}
else if (arg == "dec") {
if (buildSpacing > 0) {
buildSpacing--;
}
return true;
}
}
else if (action.command == "buildfacing") {
const char* buildFaceDirs[] = { "South", "East", "North", "West" };
if (arg == "inc") {
buildFacing++;
if (buildFacing > 3) {
buildFacing = 0;
}
logOutput.Print("Buildings set to face %s", buildFaceDirs[buildFacing]);
return true;
}
else if (arg == "dec") {
buildFacing--;
if (buildFacing < 0) {
buildFacing = 3;
}
logOutput.Print("Buildings set to face %s", buildFaceDirs[buildFacing]);
return true;
}
else if (arg == "south") {
buildFacing = 0;
logOutput.Print("Buildings set to face South");
return true;
}
else if (arg == "east") {
buildFacing = 1;
logOutput.Print("Buildings set to face East");
return true;
}
else if (arg == "north") {
buildFacing = 2;
logOutput.Print("Buildings set to face North");
return true;
}
else if (arg == "west") {
buildFacing = 3;
logOutput.Print("Buildings set to face West");
return true;
}
}
return false;
}
int CGuiHandler::GetIconPosCommand(int slot) const
{
if (slot < 0) {
return -1;
}
const int iconPos = slot + (activePage * iconsPerPage);
if (iconPos < iconsCount) {
return icons[iconPos].commandsID;
}
return -1;
}
bool CGuiHandler::KeyPressed(unsigned short key, bool isRepeat)
{
if (luaUI != NULL) {
if (luaUI->KeyPress(key, isRepeat)) {
return true;
}
}
if(key==SDLK_ESCAPE && activeMousePress){
activeMousePress=false;
inCommand=-1;
SetShowingMetal(false);
return true;
}
if(key==SDLK_ESCAPE && inCommand>0){
inCommand=-1;
SetShowingMetal(false);
return true;
}
CKeySet ks(key, false);
const CKeyBindings::ActionList& al = keyBindings->GetActionList(ks);
// setup actionOffset
int tmpActionOffset = actionOffset;
if ((inCommand < 0) || (lastKeySet.Key() < 0)){
actionOffset = 0;
tmpActionOffset = 0;
lastKeySet.Reset();
}
else if (!keyCodes->IsModifier(ks.Key()) &&
(ks.Key() != keyBindings->GetFakeMetaKey())) {
// not a modifier
if ((ks == lastKeySet) && (ks.Key() >= 0)) {
actionOffset++;
tmpActionOffset = actionOffset;
} else {
tmpActionOffset = 0;
}
}
for (int ali = 0; ali < (int)al.size(); ++ali) {
const int actionIndex = (ali + tmpActionOffset) % (int)al.size();
const CKeyBindings::Action& action = al[actionIndex];
if (ProcessLocalActions(action)) {
return true;
}
// See if we have a positional icon command
int iconCmd = -1;
if (!action.extra.empty() && (action.command == "iconpos")) {
const int iconSlot = ParseIconSlot(action.extra);
iconCmd = GetIconPosCommand(iconSlot);
}
for (int a = 0; a < commands.size(); ++a) {
if ((a != iconCmd) && (commands[a].action != action.command)) {
continue; // not a match
}
const int cmdType = commands[a].type;
// set the activePage
if (!commands[a].onlyKey &&
(((cmdType == CMDTYPE_ICON) &&
((commands[a].id < 0) ||
(commands[a].id == CMD_STOCKPILE))) ||
(cmdType == CMDTYPE_ICON_MODE) ||
(cmdType == CMDTYPE_ICON_BUILDING))) {
for (int ii = 0; ii < iconsCount; ii++) {
if (icons[ii].commandsID == a) {
activePage = min(maxPage, (ii / iconsPerPage));
selectedUnits.SetCommandPage(activePage);
}
}
}
switch (cmdType) {
case CMDTYPE_ICON:{
Command c;
c.options = 0;
c.id = commands[a].id;
if ((c.id < 0) || (c.id == CMD_STOCKPILE)) {
if (action.extra == "+5") {
c.options = SHIFT_KEY;
} else if (action.extra == "+20") {
c.options = CONTROL_KEY;
} else if (action.extra == "+100") {
c.options = SHIFT_KEY | CONTROL_KEY;
} else if (action.extra == "-1") {
c.options = RIGHT_MOUSE_KEY;
} else if (action.extra == "-5") {
c.options = RIGHT_MOUSE_KEY | SHIFT_KEY;
} else if (action.extra == "-20") {
c.options = RIGHT_MOUSE_KEY | CONTROL_KEY;
} else if (action.extra == "-100") {
c.options = RIGHT_MOUSE_KEY | SHIFT_KEY | CONTROL_KEY;
}
}
else if ((c.id == CMD_WAIT) || (c.id == CMD_SELFD)) {
if (action.extra == "queued") {
c.options = SHIFT_KEY;
}
}
GiveCommand(c);
break;
}
case CMDTYPE_ICON_MODE: {
int newMode;
if (!action.extra.empty() && (iconCmd < 0)) {
newMode = atoi(action.extra.c_str());
} else {
newMode = atoi(commands[a].params[0].c_str()) + 1;
}
if ((newMode < 0) || (newMode > (commands[a].params.size() - 2))) {
newMode = 0;
}
// not really required
char t[10];
SNPRINTF(t, 10, "%d", newMode);
commands[a].params[0] = t;
Command c;
c.options = 0;
c.id = commands[a].id;
c.params.push_back(newMode);
GiveCommand(c);
forceLayoutUpdate = true;
break;
}
case CMDTYPE_NUMBER:{
if (!action.extra.empty()) {
const CommandDescription& cd = commands[a];
float value = atof(action.extra.c_str());
float minV = 0.0f;
float maxV = 100.0f;
if (cd.params.size() >= 1) { minV = atof(cd.params[0].c_str()); }
if (cd.params.size() >= 2) { maxV = atof(cd.params[1].c_str()); }
value = max(min(value, maxV), minV);
Command c;
c.options = 0;
if (action.extra.find("queued") != string::npos) {
c.options = SHIFT_KEY;
}
c.id = cd.id;
c.params.push_back(value);
GiveCommand(c);
break;
}
else {
// fall through
}
}
case CMDTYPE_ICON_MAP:
case CMDTYPE_ICON_AREA:
case CMDTYPE_ICON_UNIT:
case CMDTYPE_ICON_UNIT_OR_MAP:
case CMDTYPE_ICON_FRONT:
case CMDTYPE_ICON_UNIT_OR_AREA:
case CMDTYPE_ICON_UNIT_OR_RECTANGLE:
case CMDTYPE_ICON_UNIT_FEATURE_OR_AREA: {
SetShowingMetal(false);
actionOffset = actionIndex;
lastKeySet = ks;
inCommand=a;
break;
}
case CMDTYPE_ICON_BUILDING: {
UnitDef* ud=unitDefHandler->GetUnitByID(-commands[a].id);
SetShowingMetal(ud->extractsMetal > 0);
actionOffset = actionIndex;
lastKeySet = ks;
inCommand=a;
break;
}
case CMDTYPE_COMBO_BOX:
if (GetInputReceivers().empty() || dynamic_cast<CglList*>(GetInputReceivers().front()) == NULL) {
CommandDescription& cd = commands[a];
vector<string>::iterator pi;
// check for an action bound to a specific entry
if (!action.extra.empty() && (iconCmd < 0)) {
int p = 0;
for (pi = ++cd.params.begin(); pi != cd.params.end(); ++pi) {
if (action.extra == *pi) {
Command c;
c.options = 0;
c.id = cd.id;
c.params.push_back(p);
GiveCommand(c);
return true;
}
p++;
}
}
inCommand = a;
list = SAFE_NEW CglList(cd.name.c_str(), MenuSelection);
list->cancelPlace = 0;
list->tooltip = "Choose the AI you want to assign to this group.\n"
"Select \"None\" to cancel or \"default\" to create a group without an AI\n"
"assigned.";
for (pi = ++cd.params.begin(); pi != cd.params.end(); ++pi) {
list->AddItem(pi->c_str(), "");
}
list->place = atoi(cd.params[0].c_str());
lastKeySet.Reset();
SetShowingMetal(false);
break;
}
case CMDTYPE_NEXT: {
++activePage;
if(activePage > maxPage)
activePage=0;
selectedUnits.SetCommandPage(activePage);
break;
}
case CMDTYPE_PREV:{
--activePage;
if(activePage<0)
activePage = maxPage;
selectedUnits.SetCommandPage(activePage);
break;
}
case CMDTYPE_CUSTOM: {
RunCustomCommands(commands[a].params, false);
break;
}
default:{
lastKeySet.Reset();
SetShowingMetal(false);
inCommand = a;
}
}
return true; // we used the command
}
}
return false;
}
bool CGuiHandler::KeyReleased(unsigned short key)
{
if (luaUI != NULL) {
return luaUI->KeyRelease(key);
}
return false;
}
void CGuiHandler::MenuSelection(std::string s)
{
guihandler->MenuChoice(s);
}
void CGuiHandler::MenuChoice(string s)
{
delete list;
if (inCommand>=0 && inCommand<commands.size()) {
CommandDescription& cd=commands[inCommand];
switch (cd.type) {
case CMDTYPE_COMBO_BOX: {
inCommand=-1;
vector<string>::iterator pi;
int a=0;
for (pi=++cd.params.begin();pi!=cd.params.end();++pi) {
if (*pi==s) {
Command c;
c.id=cd.id;
c.params.push_back(a);
CreateOptions(c,0);
GiveCommand(c);
break;
}
++a;
}
break;
}
}
}
}
void CGuiHandler::FinishCommand(int button)
{
if ((button == SDL_BUTTON_LEFT) && (keys[SDLK_LSHIFT] || invertQueueKey)) {
needShift=true;
} else {
SetShowingMetal(false);
inCommand=-1;
}
}
bool CGuiHandler::IsAbove(int x, int y)
{
if (luaUI != NULL) {
if (luaUI->IsAbove(x, y)) {
return true;
}
}
return AboveGui(x, y);
}
std::string CGuiHandler::GetTooltip(int x, int y)
{
string s;
if (luaUI != NULL) {
s = luaUI->GetTooltip(x, y);
if (!s.empty()) {
return s;
}
}
const int iconPos = IconAtPos(x, y);
const int iconCmd = (iconPos >= 0) ? icons[iconPos].commandsID : -1;
if ((iconCmd >= 0) && (iconCmd < (int)commands.size())) {
if (commands[iconCmd].tooltip != "") {
s = commands[iconCmd].tooltip;
}else{
s = commands[iconCmd].name;
}
const CKeyBindings::HotkeyList& hl =
keyBindings->GetHotkeys(commands[iconCmd].action);
if(!hl.empty()){
s+="\nHotkeys:";
for (int i = 0; i < (int)hl.size(); ++i) {
s+=" ";
s+=hl[i];
}
}
}
return s;
}
std::string CGuiHandler::GetBuildTooltip() const
{
if ((inCommand >= 0) && (inCommand < commands.size()) &&
(commands[inCommand].type == CMDTYPE_ICON_BUILDING)) {
return commands[inCommand].tooltip;
}
return std::string("");
}
Command CGuiHandler::GetOrderPreview(void)
{
return GetCommand(mouse->lastx, mouse->lasty, -1, true);
}
Command CGuiHandler::GetCommand(int mousex, int mousey, int buttonHint, bool preview)
{
Command defaultRet;
defaultRet.id=CMD_STOP;
int button;
if (buttonHint >= SDL_BUTTON_LEFT) {
button = buttonHint;
} else if (inCommand != -1) {
button = SDL_BUTTON_LEFT;
} else if (mouse->buttons[SDL_BUTTON_RIGHT].pressed) {
button = SDL_BUTTON_RIGHT;
} else {
return defaultRet;
}
int tempInCommand = inCommand;
if (button == SDL_BUTTON_RIGHT && preview) {
// right click -> default cmd
// (in preview we might not have default cmd memory set)
if (mouse->buttons[SDL_BUTTON_RIGHT].pressed) {
tempInCommand = defaultCmdMemory;
} else {
tempInCommand = GetDefaultCommand(mousex, mousey);
}
}
if(tempInCommand>=0 && tempInCommand<commands.size()){
switch(commands[tempInCommand].type){
case CMDTYPE_NUMBER:{
const float value = GetNumberInput(commands[tempInCommand]);
Command c;
c.id = commands[tempInCommand].id;;
c.params.push_back(value);
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
return c;}
case CMDTYPE_ICON:{
Command c;
c.id=commands[tempInCommand].id;
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
if(button==SDL_BUTTON_LEFT && !preview)
logOutput.Print("CMDTYPE_ICON left button press in incommand test? This shouldnt happen");
return c;}
case CMDTYPE_ICON_MAP:{
float dist=ground->LineGroundCol(camera->pos,camera->pos+mouse->dir*gu->viewRange*1.4f);
if(dist<0){
return defaultRet;
}
float3 pos=camera->pos+mouse->dir*dist;
Command c;
c.id=commands[tempInCommand].id;
c.params.push_back(pos.x);
c.params.push_back(pos.y);
c.params.push_back(pos.z);
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
return c;}
case CMDTYPE_ICON_BUILDING:{
float dist=ground->LineGroundCol(camera->pos,camera->pos+mouse->dir*gu->viewRange*1.4f);
if(dist<0){
return defaultRet;
}
UnitDef* unitdef = unitDefHandler->GetUnitByID(-commands[inCommand].id);
if(!unitdef){
return defaultRet;
}
float3 pos=camera->pos+mouse->dir*dist;
std::vector<BuildInfo> buildPos;
BuildInfo bi(unitdef, pos, buildFacing);
if(GetQueueKeystate() && button==SDL_BUTTON_LEFT){
float dist=ground->LineGroundCol(mouse->buttons[SDL_BUTTON_LEFT].camPos,mouse->buttons[SDL_BUTTON_LEFT].camPos+mouse->buttons[SDL_BUTTON_LEFT].dir*gu->viewRange*1.4f);
float3 pos2=mouse->buttons[SDL_BUTTON_LEFT].camPos+mouse->buttons[SDL_BUTTON_LEFT].dir*dist;
buildPos=GetBuildPos(BuildInfo(unitdef,pos2,buildFacing),bi);
} else
buildPos=GetBuildPos(bi,bi);
if(buildPos.empty()){
return defaultRet;
}
int a=0; //limit the number of max commands possible to send to avoid overflowing the network buffer
for(std::vector<BuildInfo>::iterator bpi=buildPos.begin();bpi!=--buildPos.end() && a<200;++bpi){
++a;
Command c;
bpi->FillCmd(c);
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
if(!preview)
GiveCommand(c);
}
Command c;
buildPos.back().FillCmd(c);
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
return c;}
case CMDTYPE_ICON_UNIT: {
CUnit* unit=0;
Command c;
c.id=commands[tempInCommand].id;
float dist2=helper->GuiTraceRay(camera->pos,mouse->dir,gu->viewRange*1.4f,unit,20,true);
if (!unit){
return defaultRet;
}
c.params.push_back(unit->id);
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
return c;}
case CMDTYPE_ICON_UNIT_OR_MAP: {
Command c;
c.id=commands[tempInCommand].id;
CUnit* unit=0;
float dist2=helper->GuiTraceRay(camera->pos,mouse->dir,gu->viewRange*1.4f,unit,20,true);
if(dist2>gu->viewRange*1.4f-300){
return defaultRet;
}
if (unit!=0) { // clicked on unit
c.params.push_back(unit->id);
} else { // clicked in map
float3 pos=camera->pos+mouse->dir*dist2;
c.params.push_back(pos.x);
c.params.push_back(pos.y);
c.params.push_back(pos.z);
}
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
return c;}
case CMDTYPE_ICON_FRONT:{
Command c;
float dist = ground->LineGroundCol(
mouse->buttons[button].camPos,
mouse->buttons[button].camPos + mouse->buttons[button].dir * gu->viewRange * 1.4f);
if(dist<0){
return defaultRet;
}
float3 pos=mouse->buttons[button].camPos+mouse->buttons[button].dir*dist;
c.id=commands[tempInCommand].id;
c.params.push_back(pos.x);
c.params.push_back(pos.y);
c.params.push_back(pos.z);
if(mouse->buttons[button].movement>30){ //only create the front if the mouse has moved enough
dist=ground->LineGroundCol(camera->pos,camera->pos+mouse->dir*gu->viewRange*1.4f);
if(dist<0){
return defaultRet;
}
float3 pos2=camera->pos+mouse->dir*dist;
if(!commands[tempInCommand].params.empty() && pos.distance2D(pos2)>atoi(commands[tempInCommand].params[0].c_str())){
float3 dif=pos2-pos;
dif.Normalize();
pos2=pos+dif*atoi(commands[tempInCommand].params[0].c_str());
}
c.params.push_back(pos2.x);
c.params.push_back(pos2.y);
c.params.push_back(pos2.z);
}
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
return c;}
case CMDTYPE_ICON_UNIT_OR_AREA:
case CMDTYPE_ICON_UNIT_FEATURE_OR_AREA:
case CMDTYPE_ICON_AREA:{
float maxRadius=100000;
if(commands[tempInCommand].params.size()==1)
maxRadius=atof(commands[tempInCommand].params[0].c_str());
Command c;
c.id=commands[tempInCommand].id;
if(mouse->buttons[button].movement<4){
CUnit* unit=0;
CFeature* feature=0;
float dist2=helper->GuiTraceRay(camera->pos,mouse->dir,gu->viewRange*1.4f,unit,20,true);
float dist3=helper->GuiTraceRayFeature(camera->pos,mouse->dir,gu->viewRange*1.4f,feature);
if(dist2>gu->viewRange*1.4f-300 && (commands[tempInCommand].type!=CMDTYPE_ICON_UNIT_FEATURE_OR_AREA || dist3>gu->viewRange*1.4f-300)){
return defaultRet;
}
if (feature!=0 && dist3<dist2 && commands[tempInCommand].type==CMDTYPE_ICON_UNIT_FEATURE_OR_AREA) { // clicked on feature
c.params.push_back(MAX_UNITS+feature->id);
} else if (unit!=0 && commands[tempInCommand].type!=CMDTYPE_ICON_AREA) { // clicked on unit
c.params.push_back(unit->id);
} else { // clicked in map
float3 pos=camera->pos+mouse->dir*dist2;
c.params.push_back(pos.x);
c.params.push_back(pos.y);
c.params.push_back(pos.z);
c.params.push_back(0);//zero radius
}
} else { //created area
float dist=ground->LineGroundCol(mouse->buttons[button].camPos,mouse->buttons[button].camPos+mouse->buttons[button].dir*gu->viewRange*1.4f);
if(dist<0){
return defaultRet;
}
float3 pos=mouse->buttons[button].camPos+mouse->buttons[button].dir*dist;
c.params.push_back(pos.x);
c.params.push_back(pos.y);
c.params.push_back(pos.z);
dist=ground->LineGroundCol(camera->pos,camera->pos+mouse->dir*gu->viewRange*1.4f);
if(dist<0){
return defaultRet;
}
float3 pos2=camera->pos+mouse->dir*dist;
c.params.push_back(min(maxRadius,pos.distance2D(pos2)));
}
CreateOptions(c,(button==SDL_BUTTON_LEFT?0:1));
return c;}
case CMDTYPE_ICON_UNIT_OR_RECTANGLE:{
Command c;
c.id=commands[tempInCommand].id;
if (mouse->buttons[button].movement < 16) {
CUnit* unit=0;
CFeature* feature=0;
float dist2=helper->GuiTraceRay(
camera->pos, mouse->dir, gu->viewRange*1.4f, unit, 20, true);
if(dist2>gu->viewRange*1.4f-300) {
return defaultRet;
}
if (unit != 0) {
// clicked on unit
c.params.push_back(unit->id);
} else { // clicked in map
float3 pos = camera->pos + (mouse->dir * dist2);
c.params.push_back(pos.x);
c.params.push_back(pos.y);
c.params.push_back(pos.z);
}
} else { //created rectangle
float dist = ground->LineGroundCol(
mouse->buttons[button].camPos,
mouse->buttons[button].camPos + mouse->buttons[button].dir * gu->viewRange*1.4f);
if(dist<0){
return defaultRet;
}
float3 startPos = mouse->buttons[button].camPos + mouse->buttons[button].dir * dist;
dist = ground->LineGroundCol(camera->pos, camera->pos + mouse->dir*gu->viewRange * 1.4f);
if(dist<0){
return defaultRet;
}
float3 endPos=camera->pos+mouse->dir*dist;
c.params.push_back(startPos.x);
c.params.push_back(startPos.y);
c.params.push_back(startPos.z);
c.params.push_back(endPos.x);
c.params.push_back(endPos.y);
c.params.push_back(endPos.z);
}
CreateOptions(c, (button == SDL_BUTTON_LEFT) ? 0 : 1);
return c;}
default:
return defaultRet;
}
} else {
if(!preview)
inCommand=-1;
}
return defaultRet;
}
// Assuming both builds have the same unitdef
std::vector<BuildInfo> CGuiHandler::GetBuildPos(const BuildInfo& startInfo, const BuildInfo& endInfo)
{
std::vector<BuildInfo> ret;
float3 start=helper->Pos2BuildPos(startInfo);
float3 end=helper->Pos2BuildPos(endInfo);
BuildInfo other; // the unit around which buildings can be circled
if(GetQueueKeystate() && keys[SDLK_LCTRL])
{
CUnit* unit=0;
float dist2=helper->GuiTraceRay(camera->pos,mouse->dir,gu->viewRange*1.4f,unit,20,true);
if(unit){
other.def = unit->unitDef;
other.pos = unit->pos;
other.buildFacing = unit->buildFacing;
} else {
Command c = uh->GetBuildCommand(camera->pos,mouse->dir);
if(c.id < 0){
assert(c.params.size()==4);
other.pos = float3(c.params[0],c.params[1],c.params[2]);
other.def = unitDefHandler->GetUnitByID(-c.id);
other.buildFacing = int(c.params[3]);
}
}
}
if(other.def && GetQueueKeystate() && keys[SDLK_LCTRL]){ //circle build around building
Command c;
start=end=helper->Pos2BuildPos(other);
start.x-=(other.GetXSize()/2)*SQUARE_SIZE;
start.z-=(other.GetYSize()/2)*SQUARE_SIZE;
end.x+=(other.GetXSize()/2)*SQUARE_SIZE;
end.z+=(other.GetYSize()/2)*SQUARE_SIZE;
float3 pos=start;
int xsize=startInfo.GetXSize();
int ysize=startInfo.GetYSize();
for(;pos.x<=end.x;pos.x+=xsize*SQUARE_SIZE){
BuildInfo bi(startInfo.def,pos,startInfo.buildFacing);
bi.pos.x+=(xsize/2)*SQUARE_SIZE;
bi.pos.z-=(ysize/2)*SQUARE_SIZE;
bi.pos=helper->Pos2BuildPos(bi);
bi.FillCmd(c);
bool cancel = false;
std::set<CUnit*>::iterator ui = selectedUnits.selectedUnits.begin();
for(;ui != selectedUnits.selectedUnits.end() && !cancel; ++ui)
{
if((*ui)->commandAI->WillCancelQueued(c))
cancel = true;
}
if(!cancel)
ret.push_back(bi);
}
pos=end;
pos.x=start.x;
for(;pos.z>=start.z;pos.z-=ysize*SQUARE_SIZE){
BuildInfo bi(startInfo.def,pos,(startInfo.buildFacing+1)%4);
bi.pos.x-=(xsize/2)*SQUARE_SIZE;
bi.pos.z-=(ysize/2)*SQUARE_SIZE;
bi.pos=helper->Pos2BuildPos(bi);
bi.FillCmd(c);
bool cancel = false;
std::set<CUnit*>::iterator ui = selectedUnits.selectedUnits.begin();
for(;ui != selectedUnits.selectedUnits.end() && !cancel; ++ui){
if((*ui)->commandAI->WillCancelQueued(c))
cancel = true;
}
if(!cancel)
ret.push_back(bi);
}
pos=end;
for(;pos.x>=start.x;pos.x-=xsize*SQUARE_SIZE) {
BuildInfo bi(startInfo.def,pos,(startInfo.buildFacing+2)%4);
bi.pos.x-=(xsize/2)*SQUARE_SIZE;
bi.pos.z+=(ysize/2)*SQUARE_SIZE;
bi.pos=helper->Pos2BuildPos(bi);
bi.FillCmd(c);
bool cancel = false;
std::set<CUnit*>::iterator ui = selectedUnits.selectedUnits.begin();
for(;ui != selectedUnits.selectedUnits.end() && !cancel; ++ui)
{
if((*ui)->commandAI->WillCancelQueued(c))
cancel = true;
}
if(!cancel)
ret.push_back(bi);
}
pos=start;
pos.x=end.x;
for(;pos.z<=end.z;pos.z+=ysize*SQUARE_SIZE){
BuildInfo bi(startInfo.def,pos,(startInfo.buildFacing+3)%4);
bi.pos.x+=(xsize/2)*SQUARE_SIZE;
bi.pos.z+=(ysize/2)*SQUARE_SIZE;
bi.pos=helper->Pos2BuildPos(bi);
bi.FillCmd(c);
bool cancel = false;
std::set<CUnit*>::iterator ui = selectedUnits.selectedUnits.begin();
for(;ui != selectedUnits.selectedUnits.end() && !cancel; ++ui)
{
if((*ui)->commandAI->WillCancelQueued(c))
cancel = true;
}
if(!cancel)
ret.push_back(bi);
}
} else if(keys[SDLK_LALT]){ //build a rectangle
float xsize=startInfo.GetXSize()*8+buildSpacing*16;
int xnum=(int)((fabs(end.x-start.x)+xsize*1.4f)/xsize);
int xstep=(int)xsize;
if(start.x>end.x)
xstep*=-1;
float zsize=startInfo.GetYSize()*8+buildSpacing*16;
int znum=(int)((fabs(end.z-start.z)+zsize*1.4f)/zsize);
int zstep=(int)zsize;
if(start.z>end.z)
zstep*=-1;
int zn=0;
for(float z=start.z;zn<znum;++zn){
int xn=0;
for(float x=start.x;xn<xnum;++xn){
if(!keys[SDLK_LCTRL] || zn==0 || xn==0 || zn==znum-1 || xn==xnum-1){
BuildInfo bi = startInfo;
bi.pos = float3(x,0,z);
bi.pos=helper->Pos2BuildPos(bi);
ret.push_back(bi);
}
x+=xstep;
}
z+=zstep;
}
} else { //build a line
BuildInfo bi=startInfo;
if(fabs(start.x-end.x)>fabs(start.z-end.z)){
float step=startInfo.GetXSize()*8+buildSpacing*16;
float3 dir=end-start;
if(dir.x==0){
bi.pos = start;
ret.push_back(bi);
return ret;
}
dir/=fabs(dir.x);
if(keys[SDLK_LCTRL])
dir.z=0;
for(float3 p=start;fabs(p.x-start.x)<fabs(end.x-start.x)+step*0.4f;p+=dir*step) {
bi.pos=p;
ret.push_back(bi);
}
} else {
float step=startInfo.GetYSize()*8+buildSpacing*16;
float3 dir=end-start;
if(dir.z==0){
bi.pos=start;
ret.push_back(bi);
return ret;
}
dir/=fabs(dir.z);
if(keys[SDLK_LCTRL])
dir.x=0;
for(float3 p=start;fabs(p.z-start.z)<fabs(end.z-start.z)+step*0.4f;p+=dir*step) {
bi.pos=p;
ret.push_back(bi);
}
}
}
return ret;
}
/******************************************************************************/
/******************************************************************************/
void CGuiHandler::Draw()
{
DrawButtons();
}
bool CGuiHandler::BindNamedTexture(const std::string& texName)
{
if (texName.empty()) {
return false;
}
std::map<std::string, unsigned int>::iterator it = textureMap.find(texName);
if (it != textureMap.end()) {
const GLuint texID = it->second;
if (texID == 0) {
glBindTexture(GL_TEXTURE_2D, 0);
return false;
} else {
glBindTexture(GL_TEXTURE_2D, it->second);
return true;
}
}
// strip off the qualifiers
string filename = texName;
bool border = false;
bool clamped = false;
bool nearest = false;
if (filename[0] == ':') {
int p;
for (p = 1; p < (int)filename.size(); p++) {
const char ch = filename[p];
if (ch == ':') { break; }
else if (ch == 'b') { border = true; }
else if (ch == 'c') { clamped = true; }
else if (ch == 'n') { nearest = true; }
}
if (p < (int)filename.size()) {
filename = filename.substr(p + 1);
} else {
filename.clear();
}
}
// get the image
CBitmap bitmap;
if (!bitmap.Load(filename)) {
textureMap[texName] = 0;
glBindTexture(GL_TEXTURE_2D, 0);
return false;
}
// make the texture
GLuint texID;
glGenTextures(1, &texID);
glBindTexture(GL_TEXTURE_2D, texID);
if (clamped) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
}
if (nearest) {
if (border) {
GLfloat white[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, white);
}
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
if (GLEW_ARB_texture_non_power_of_two) {
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8,
bitmap.xsize, bitmap.ysize, border ? 1 : 0,
GL_RGBA, GL_UNSIGNED_BYTE, bitmap.mem);
} else {
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA8, bitmap.xsize, bitmap.ysize,
GL_RGBA, GL_UNSIGNED_BYTE, bitmap.mem);
}
} else {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA8, bitmap.xsize, bitmap.ysize,
GL_RGBA, GL_UNSIGNED_BYTE, bitmap.mem);
}
textureMap[texName] = texID;
return true;
}
bool CGuiHandler::FreeNamedTexture(const std::string& texName)
{
if (texName.empty()) {
return false;
}
std::map<std::string, unsigned int>::iterator it = textureMap.find(texName);
if (it != textureMap.end()) {
const GLuint texID = it->second;
glDeleteTextures(1, &texID);
textureMap.erase(it);
return true;
}
return false;
}
static string StripColorCodes(const string& text)
{
std::string nocolor;
const int len = (int)text.size();
for (int i = 0; i < len; i++) {
if ((unsigned char)text[i] == 255) {
i = i + 3;
} else {
nocolor += text[i];
}
}
return nocolor;
}
static string FindCornerText(const string& corner, const vector<string>& params)
{
for (int p = 0; p < (int)params.size(); p++) {
if (params[p].find(corner) == 0) {
return params[p].substr(corner.length());
}
}
return string("");
}
void CGuiHandler::DrawCustomButton(const IconInfo& icon, bool highlight)
{
const CommandDescription& cmdDesc = commands[icon.commandsID];
const bool usedTexture = DrawTexture(icon, cmdDesc.iconname);
// highlight overlay before text is applied
if (highlight) {
DrawHilightQuad(icon);
}
if (!usedTexture || !cmdDesc.onlyTexture) {
DrawName(icon, cmdDesc.name, false);
}
DrawNWtext(icon, FindCornerText("$nw$", cmdDesc.params));
DrawSWtext(icon, FindCornerText("$sw$", cmdDesc.params));
DrawNEtext(icon, FindCornerText("$ne$", cmdDesc.params));
DrawSEtext(icon, FindCornerText("$se$", cmdDesc.params));
if (!usedTexture) {
glColor4f(1.0f, 1.0f, 1.0f, 0.1f);
DrawIconFrame(icon);
}
}
bool CGuiHandler::DrawUnitBuildIcon(const IconInfo& icon, int unitDefID)
{
// UnitDefHandler's array size is (numUnits + 1)
if ((unitDefID <= 0) || (unitDefID > unitDefHandler->numUnits)) {
return false;
}
UnitDef* ud = unitDefHandler->GetUnitByID(unitDefID);
if (ud != NULL) {
const Box& b = icon.visual;
glEnable(GL_TEXTURE_2D);
glColor4f(1.0f, 1.0f, 1.0f, textureAlpha);
glBindTexture(GL_TEXTURE_2D, unitDefHandler->GetUnitImage(ud));
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex2f(b.x1, b.y1);
glTexCoord2f(1.0f, 0.0f); glVertex2f(b.x2, b.y1);
glTexCoord2f(1.0f, 1.0f); glVertex2f(b.x2, b.y2);
glTexCoord2f(0.0f, 1.0f); glVertex2f(b.x1, b.y2);
glEnd();
return true;
}
return false;
}
bool CGuiHandler::DrawTexture(const IconInfo& icon, const std::string& texName)
{
if (texName.empty()) {
return false;
}
// plain texture
if (texName[0] != '#') {
if (BindNamedTexture(texName)) {
const Box& b = icon.visual;
glEnable(GL_TEXTURE_2D);
glColor4f(1.0f, 1.0f, 1.0f, textureAlpha);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex2f(b.x1, b.y1);
glTexCoord2f(1.0f, 0.0f); glVertex2f(b.x2, b.y1);
glTexCoord2f(1.0f, 1.0f); glVertex2f(b.x2, b.y2);
glTexCoord2f(0.0f, 1.0f); glVertex2f(b.x1, b.y2);
glEnd();
return true;
}
return false;
}
// unit build picture
char* endPtr;
const char* startPtr = texName.c_str() + 1; // skip the '#'
const int unitDefID = (int)strtol(startPtr, &endPtr, 10);
if (endPtr == startPtr) {
return false; // bad unitID spec
}
if (endPtr[0] == '\0') {
return DrawUnitBuildIcon(icon, unitDefID);
}
// texture and unit build picture
if (endPtr[0] != ',') {
return false;
}
startPtr = endPtr + 1; // skip the ','
const float xscale = (float)strtod(startPtr, &endPtr);
if (endPtr == startPtr) {
return false;
}
float yscale;
if (endPtr[0] == ',') {
endPtr++; // setup for the texture name
yscale = xscale;
}
else if (endPtr[0] != 'x') {
return false;
}
else {
startPtr = endPtr + 1;
yscale = (float)strtod(startPtr, &endPtr);
if ((endPtr == startPtr) || (endPtr[0] != ',')) {
return false;
}
endPtr++; // setup for the texture name
}
const Box& iv = icon.visual;
IconInfo tmpIcon;
Box& tv = tmpIcon.visual;
tv.x1 = iv.x1 + (xIconSize * xscale);
tv.x2 = iv.x2 - (xIconSize * xscale);
tv.y1 = iv.y1 - (yIconSize * yscale);
tv.y2 = iv.y2 + (yIconSize * yscale);
if (!BindNamedTexture(endPtr)) {
return DrawUnitBuildIcon(icon, unitDefID);
}
else {
const Box& b = icon.visual;
glEnable(GL_TEXTURE_2D);
glColor4f(1.0f, 1.0f, 1.0f, textureAlpha);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex2f(b.x1, b.y1);
glTexCoord2f(1.0f, 0.0f); glVertex2f(b.x2, b.y1);
glTexCoord2f(1.0f, 1.0f); glVertex2f(b.x2, b.y2);
glTexCoord2f(0.0f, 1.0f); glVertex2f(b.x1, b.y2);
glEnd();
return DrawUnitBuildIcon(tmpIcon, unitDefID);
}
return false; // safety
}
void CGuiHandler::DrawIconFrame(const IconInfo& icon)
{
const Box& b = icon.visual;
glDisable(GL_TEXTURE_2D);
glBegin(GL_LINE_LOOP);
const float fudge = 0.001f; // avoids getting creamed if iconBorder == 0.0
glVertex2f(b.x1 + fudge, b.y1 - fudge);
glVertex2f(b.x2 - fudge, b.y1 - fudge);
glVertex2f(b.x2 - fudge, b.y2 + fudge);
glVertex2f(b.x1 + fudge, b.y2 + fudge);
glEnd();
}
void CGuiHandler::DrawName(const IconInfo& icon, const std::string& text,
bool offsetForLEDs)
{
if (text.empty()) {
return;
}
const Box& b = icon.visual;
const float yShrink = offsetForLEDs ? (0.125f * yIconSize) : 0.0f;
const float tWidth = font->CalcTextWidth(text.c_str());
const float tHeight = font->CalcTextHeight(text.c_str());
const float textBorder2 = (2.0f * textBorder);
float xScale = (xIconSize - textBorder2) / tWidth;
float yScale = (yIconSize - textBorder2 - yShrink) / tHeight;
const float yRatio = xScale * gu->aspectRatio;
if (yRatio < yScale) {
yScale = yRatio;
} else {
const float xRatio = yScale / gu->aspectRatio;
if (xRatio < xScale) {
xScale = xRatio;
}
}
const float xCenter = 0.5f * (b.x1 + b.x2);
const float yCenter = 0.5f * (b.y1 + (b.y2 + yShrink));
const float xStart = xCenter - (0.5f * xScale * tWidth);
const float yStart = yCenter - (0.5f * yScale * (1.25f * tHeight));
const float dShadow = 0.002f;
if (dropShadows) {
glPushMatrix();
glColor4f(0.0f, 0.0f, 0.0f, 0.8f);
glTranslatef(xStart + dShadow, yStart - dShadow, 0.0f);
glScalef(xScale, yScale, 1.0f);
font->glPrintRaw(StripColorCodes(text).c_str());
glPopMatrix();
}
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glTranslatef(xStart, yStart, 0.0f);
glScalef(xScale, yScale, 1.0f);
font->glPrintColor("%s",text.c_str());
glLoadIdentity();
}
void CGuiHandler::DrawNWtext(const IconInfo& icon, const std::string& text)
{
if (text.empty()) {
return;
}
const Box& b = icon.visual;
const float tHeight = font->CalcTextHeight(text.c_str());
const float yScale = (yIconSize * 0.2f) / tHeight;
const float xScale = yScale / gu->aspectRatio;
const float xPos = b.x1 + textBorder + 0.002f;
const float yPos = b.y1 - textBorder - (yScale * tHeight) - 0.006f;
glTranslatef(xPos, yPos, 0.0f);
glScalef(xScale, yScale, 1.0f);
font->glPrintColor("%s", text.c_str());
glLoadIdentity();
}
void CGuiHandler::DrawSWtext(const IconInfo& icon, const std::string& text)
{
if (text.empty()) {
return;
}
const Box& b = icon.visual;
const float tHeight = font->CalcTextHeight(text.c_str());
const float yScale = (yIconSize * 0.2f) / tHeight;
const float xScale = yScale / gu->aspectRatio;
const float xPos = b.x1 + textBorder + 0.002f;
const float yPos = b.y2 + textBorder + 0.002f;
glTranslatef(xPos, yPos, 0.0f);
glScalef(xScale, yScale, 1.0f);
font->glPrintColor("%s", text.c_str());
glLoadIdentity();
}
void CGuiHandler::DrawNEtext(const IconInfo& icon, const std::string& text)
{
if (text.empty()) {
return;
}
const Box& b = icon.visual;
const float tWidth = font->CalcTextWidth(text.c_str());
const float tHeight = font->CalcTextHeight(text.c_str());
const float yScale = (yIconSize * 0.2f) / tHeight;
const float xScale = yScale / gu->aspectRatio;
const float xPos = b.x2 - textBorder - (xScale * tWidth) - 0.002f;
const float yPos = b.y1 - textBorder - (yScale * tHeight) - 0.006f;
glTranslatef(xPos, yPos, 0.0f);
glScalef(xScale, yScale, 1.0f);
font->glPrintColor("%s", text.c_str());
glLoadIdentity();
}
void CGuiHandler::DrawSEtext(const IconInfo& icon, const std::string& text)
{
if (text.empty()) {
return;
}
const Box& b = icon.visual;
const float tWidth = font->CalcTextWidth(text.c_str());
const float tHeight = font->CalcTextHeight(text.c_str());
const float yScale = (yIconSize * 0.2f) / tHeight;
const float xScale = yScale / gu->aspectRatio;
const float xPos = b.x2 - textBorder - (xScale * tWidth) - 0.002f;
const float yPos = b.y2 + textBorder + 0.002f;
glTranslatef(xPos, yPos, 0.0f);
glScalef(xScale, yScale, 1.0f);
font->glPrintColor("%s", text.c_str());
glLoadIdentity();
}
void CGuiHandler::DrawHilightQuad(const IconInfo& icon)
{
if (icon.commandsID == inCommand) {
glColor4f(0.3f, 0.0f, 0.0f, 1.0f);
} else if (mouse->buttons[SDL_BUTTON_LEFT].pressed) {
glColor4f(0.2f, 0.0f, 0.0f, 1.0f);
} else {
glColor4f(0.0f, 0.0f, 0.2f, 1.0f);
}
const Box& b = icon.visual;
glDisable(GL_TEXTURE_2D);
glBlendFunc(GL_ONE, GL_ONE); // additive blending
glBegin(GL_QUADS);
glVertex2f(b.x1, b.y1);
glVertex2f(b.x2, b.y1);
glVertex2f(b.x2, b.y2);
glVertex2f(b.x1, b.y2);
glVertex2f(b.x1, b.y1);
glEnd();
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
void CGuiHandler::DrawButtons()
{
Update();
if (iconsCount <= 0) {
return;
}
glPushAttrib(GL_ENABLE_BIT);
glDisable(GL_FOG);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GEQUAL, 0.01f);
// frame box
const float alpha = (frameAlpha < 0.0f) ? guiAlpha : frameAlpha;
if (alpha > 0.0f) {
glColor4f(0.2f, 0.2f, 0.2f, alpha);
glBegin(GL_QUADS);
const GLfloat fx = 0.0f; //-.2f*(1-fadein/100.0f)+.2f;
glVertex2f(buttonBox.x1 - fx, buttonBox.y1);
glVertex2f(buttonBox.x1 - fx, buttonBox.y2);
glVertex2f(buttonBox.x2 - fx, buttonBox.y2);
glVertex2f(buttonBox.x2 - fx, buttonBox.y1);
glVertex2f(buttonBox.x1 - fx, buttonBox.y1);
glEnd();
}
const int mouseIcon = IconAtPos(mouse->lastx, mouse->lasty);
const int buttonStart = min(iconsCount, activePage * iconsPerPage);
const int buttonEnd = min(iconsCount, buttonStart + iconsPerPage);
for (int ii = buttonStart; ii < buttonEnd; ii++) {
const IconInfo& icon = icons[ii];
if (icon.commandsID < 0) {
continue; // inactive icon
}
const CommandDescription& cmdDesc = commands[icon.commandsID];
const bool customCommand = (cmdDesc.id == CMD_INTERNAL) &&
(cmdDesc.type == CMDTYPE_CUSTOM);
const bool highlight = ((mouseIcon == ii) ||
(icon.commandsID == inCommand)) &&
(!customCommand || !cmdDesc.params.empty());
if (customCommand) {
DrawCustomButton(icon, highlight);
}
else {
bool usedTexture = false;
bool onlyTexture = cmdDesc.onlyTexture;
// specified texture
if (DrawTexture(icon, cmdDesc.iconname)) {
usedTexture = true;
}
// unit buildpic
if (!usedTexture) {
if (cmdDesc.id < 0) {
UnitDef* ud = unitDefHandler->GetUnitByID(-cmdDesc.id);
if (ud != NULL) {
DrawUnitBuildIcon(icon, -cmdDesc.id);
usedTexture = true;
onlyTexture = true;
}
}
}
// highlight background before text is applied
if (highlight) {
DrawHilightQuad(icon);
}
// build count text
if ((cmdDesc.id < 0) && !cmdDesc.params.empty()) {
DrawSWtext(icon, cmdDesc.params[0]);
}
// draw arrows, or a frame for text
if (!usedTexture || !onlyTexture) {
if ((cmdDesc.type == CMDTYPE_PREV) || (cmdDesc.type == CMDTYPE_NEXT)) {
// pick the color for the arrow
if (highlight) {
glColor4f(1.0f, 1.0f, 0.0f, 1.0f); // selected
} else {
glColor4f(0.7f, 0.7f, 0.7f, 1.0f); // normal
}
if (cmdDesc.type == CMDTYPE_PREV) {
DrawPrevArrow(icon);
} else {
DrawNextArrow(icon);
}
}
else if (!usedTexture) {
// no texture, no arrow, ... draw a frame
glColor4f(1.0f, 1.0f, 1.0f, 0.1f);
DrawIconFrame(icon);
}
}
const bool useLEDs = useOptionLEDs && (cmdDesc.type == CMDTYPE_ICON_MODE);
// draw the text
if (!usedTexture || !onlyTexture) {
// command name (or parameter)
string toPrint = cmdDesc.name;
if (cmdDesc.type == CMDTYPE_ICON_MODE) {
const int opt = atoi(cmdDesc.params[0].c_str()) + 1;
if (opt < cmdDesc.params.size()) {
toPrint = cmdDesc.params[opt];
}
}
DrawName(icon, toPrint, useLEDs);
}
// draw the mode indicators
if (useLEDs) {
DrawOptionLEDs(icon);
}
}
// highlight outline
if (highlight) {
if (icon.commandsID == inCommand) {
glColor4f(1.0f, 1.0f, 0.0f, 0.75f);
} else if (mouse->buttons[SDL_BUTTON_LEFT].pressed) {
glColor4f(1.0f, 0.0f, 0.0f, 0.50f);
} else {
glColor4f(1.0f, 1.0f, 1.0f, 0.50f);
}
glLineWidth(1.49f);
DrawIconFrame(icon);
glLineWidth(1.0f);
}
}
// active page indicator
if (luaUI == NULL) {
char buf[64];
SNPRINTF(buf, 64, "%i", activePage + 1);
if (selectedUnits.BuildIconsFirst()) {
glColor4fv(cmdColors.build);
} else {
glColor4f(0.7f, 0.7f, 0.7f, 1.0f);
}
const float textSize = 1.2f;
const float yBbot =
yBpos - (textSize * 0.5f * (font->CalcTextHeight(buf) / 32.0f));
font->glPrintCentered(xBpos, yBbot, textSize, buf);
}
DrawMenuName();
DrawSelectionInfo();
DrawNumberInput();
if (luaUI != NULL) {
luaUI->DrawScreenItems();
}
glPopAttrib();
}
void CGuiHandler::DrawMenuName()
{
if (!menuName.empty() && (iconsCount > 0)) {
const char* text = menuName.c_str();
const float xScale = 0.0225f;
const float yScale = xScale * gu->aspectRatio;
const float textWidth = xScale * font->CalcTextWidth(text);
const float textHeight = yScale * font->CalcTextHeight(text);
const float xp = 0.5f * (buttonBox.x1 + buttonBox.x2 - textWidth);
const float yp = buttonBox.y2 + (yIconSize * 0.125f);
if (!outlineFont.IsEnabled()) {
glDisable(GL_TEXTURE_2D);
glColor4f(0.2f, 0.2f, 0.2f, guiAlpha);
glRectf(buttonBox.x1,
buttonBox.y2,
buttonBox.x2,
buttonBox.y2 + (textHeight * 1.25f) + (yIconSize * 0.250f));
glTranslatef(xp, yp, 0.0f);
glScalef(xScale, yScale, 1.0f);
font->glPrintColor("%s", text);
}
else {
glTranslatef(xp, yp, 0.0f);
glScalef(xScale, yScale, 1.0f);
const float xPixel = 1.0f / (xScale * (float)gu->viewSizeX);
const float yPixel = 1.0f / (yScale * (float)gu->viewSizeY);
// use (alpha == 0.0) so that we only get the outline
const float white[4] = { 1.0f, 1.0f, 1.0f, 0.0f };
outlineFont.print(xPixel, yPixel, white, StripColorCodes(text).c_str());
font->glPrintColor("%s", text); // draw with color
}
glLoadIdentity();
}
}
void CGuiHandler::DrawSelectionInfo()
{
if (!selectedUnits.selectedUnits.empty()) {
char buf[64];
if(selectedUnits.selectedGroup!=-1){
SNPRINTF(buf, 64, "Selected units %i [Group %i]",
selectedUnits.selectedUnits.size(),
selectedUnits.selectedGroup);
} else {
SNPRINTF(buf, 64, "Selected units %i",
selectedUnits.selectedUnits.size());
}
const float xScale = 0.015f;
const float yScale = xScale * gu->aspectRatio;
const float textWidth = xScale * font->CalcTextWidth(buf);
const float textHeight = yScale * font->CalcTextHeight(buf);
if (!outlineFont.IsEnabled()) {
glDisable(GL_TEXTURE_2D);
glColor4f(0.2f, 0.2f, 0.2f, guiAlpha);
glRectf(xSelectionPos - frameBorder,
ySelectionPos - frameBorder,
xSelectionPos + frameBorder + textWidth,
ySelectionPos + frameBorder + (textHeight * 1.2f));
glColor4f(1.0f, 1.0f, 1.0f, 0.8f);
glTranslatef(xSelectionPos, ySelectionPos, 0.0f);
glScalef(xScale, yScale, 1.0f);
font->glPrintRaw(buf);
}
else {
glTranslatef(xSelectionPos, ySelectionPos, 0.0f);
glScalef(xScale, yScale, 1.0f);
const float xPixel = 1.0f / (xScale * (float)gu->viewSizeX);
const float yPixel = 1.0f / (yScale * (float)gu->viewSizeY);
const float white[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
outlineFont.print(xPixel, yPixel, white, buf);
}
glLoadIdentity();
}
}
void CGuiHandler::DrawNumberInput()
{
// draw the value for CMDTYPE_NUMBER commands
if ((inCommand >= 0) && (inCommand < commands.size())) {
const CommandDescription& cd = commands[inCommand];
if (cd.type == CMDTYPE_NUMBER) {
const float value = GetNumberInput(cd);
glDisable(GL_TEXTURE_2D);
glColor4f(1.0f, 1.0f, 1.0f, 0.8f);
const float mouseX = (float)mouse->lastx / (float)gu->viewSizeX;
const float slideX = min(max(mouseX, 0.25f), 0.75f);
const float mouseY = 1.0f - (float)(mouse->lasty - 16) / (float)gu->viewSizeY;
glColor4f(1.0f, 1.0f, 0.0f, 0.8f);
glRectf(0.235f, 0.45f, 0.25f, 0.55f);
glRectf(0.75f, 0.45f, 0.765f, 0.55f);
glColor4f(0.0f, 0.0f, 1.0f, 0.8f);
glRectf(0.25f, 0.49f, 0.75f, 0.51f);
glBegin(GL_TRIANGLES);
glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
glVertex2f(slideX + 0.015f, 0.55f);
glVertex2f(slideX - 0.015f, 0.55f);
glVertex2f(slideX, 0.50f);
glVertex2f(slideX - 0.015f, 0.45f);
glVertex2f(slideX + 0.015f, 0.45f);
glVertex2f(slideX, 0.50f);
glEnd();
glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
font->glPrintCentered(slideX, 0.56f, 2.0f, "%i", (int)value);
}
}
}
void CGuiHandler::DrawPrevArrow(const IconInfo& icon)
{
const Box& b = icon.visual;
const float yCenter = 0.5f * (b.y1 + b.y2);
const float xSize = 0.166f * fabs(b.x2 - b.x1);
const float ySize = 0.125f * fabs(b.y2 - b.y1);
const float xSiz2 = 2.0f * xSize;
glDisable(GL_TEXTURE_2D);
glBegin(GL_POLYGON);
glVertex2f(b.x2 - xSize, yCenter - ySize);
glVertex2f(b.x1 + xSiz2, yCenter - ySize);
glVertex2f(b.x1 + xSize, yCenter);
glVertex2f(b.x1 + xSiz2, yCenter + ySize);
glVertex2f(b.x2 - xSize, yCenter + ySize);
glEnd();
}
void CGuiHandler::DrawNextArrow(const IconInfo& icon)
{
const Box& b = icon.visual;
const float yCenter = 0.5f * (b.y1 + b.y2);
const float xSize = 0.166f * fabs(b.x2 - b.x1);
const float ySize = 0.125f * fabs(b.y2 - b.y1);
const float xSiz2 = 2.0f * xSize;
glDisable(GL_TEXTURE_2D);
glBegin(GL_POLYGON);
glVertex2f(b.x1 + xSize, yCenter - ySize);
glVertex2f(b.x2 - xSiz2, yCenter - ySize);
glVertex2f(b.x2 - xSize, yCenter);
glVertex2f(b.x2 - xSiz2, yCenter + ySize);
glVertex2f(b.x1 + xSize, yCenter + ySize);
glEnd();
}
void CGuiHandler::DrawOptionLEDs(const IconInfo& icon)
{
const CommandDescription& cmdDesc = commands[icon.commandsID];
const int pCount = (int)cmdDesc.params.size() - 1;
if (pCount < 2) {
return;
}
const int option = atoi(cmdDesc.params[0].c_str());
glLoadIdentity();
glDisable(GL_TEXTURE_2D);
const float xs = xIconSize / float(1 + (pCount * 2));
const float ys = yIconSize * 0.125f;
const float x1 = icon.visual.x1;
const float y1 = icon.visual.y1;
const float x2 = icon.visual.x2;
const float y2 = icon.visual.y2;
const float yp = 1.0f / float(gu->viewSizeY);
for (int x = 0; x < pCount; x++) {
if (x != option) {
glColor4f(0.25f, 0.25f, 0.25f, 0.50f); // dark
} else {
if (pCount == 2) {
if (option == 0) {
glColor4f(1.0f, 0.0f, 0.0f, 0.75f); // red
} else {
glColor4f(0.0f, 1.0f, 0.0f, 0.75f); // green
}
} else if (pCount == 3) {
if (option == 0) {
glColor4f(1.0f, 0.0f, 0.0f, 0.75f); // red
} else if (option == 1) {
glColor4f(1.0f, 1.0f, 0.0f, 0.75f); // yellow
} else {
glColor4f(0.0f, 1.0f, 0.0f, 0.75f); // green
}
} else {
glColor4f(0.75f, 0.75f, 0.75f, 0.75f); // light
}
}
const float startx = x1 + (xs * float(1 + (2 * x)));
const float starty = y2 + (3.0f * yp) + textBorder;
glRectf(startx, starty, startx + xs, starty + ys);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glColor4f(1.0f, 1.0f, 1.0f, 0.5f);
glRectf(startx, starty, startx + xs, starty + ys);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
}
/******************************************************************************/
/******************************************************************************/
void CGuiHandler::DrawMapStuff(void)
{
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_FALSE);
glDisable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_ALPHA_TEST);
// setup for minimap proxying
float3 tmpCamPos, tmpMouseDir;
const bool useMinimap =
(minimap->ProxyMode() ||
((mouse->activeReceiver != this) && !game->hideInterface &&
(GetReceiverAt(mouse->lastx, mouse->lasty) == minimap)));
if (useMinimap) {
tmpCamPos = camera->pos;
tmpMouseDir = mouse->dir;
camera->pos = minimap->GetMapPosition(mouse->lastx, mouse->lasty);
mouse->dir = float3(0.0f, -1.0f, 0.0f);
if (miniMapMarker && minimap->FullProxy() && !minimap->GetMinimized()) {
DrawMiniMapMarker();
}
}
if (activeMousePress) {
int cc=-1;
int button=SDL_BUTTON_LEFT;
if(inCommand!=-1){
cc=inCommand;
} else {
if (mouse->buttons[SDL_BUTTON_RIGHT].pressed &&
((mouse->activeReceiver == this) || (minimap->ProxyMode()))) {
cc = defaultCmdMemory;
button = SDL_BUTTON_RIGHT;
}
}
if(cc>=0 && cc<commands.size()){
switch(commands[cc].type){
case CMDTYPE_ICON_FRONT:
if(mouse->buttons[button].movement>30){
if(commands[cc].params.size()>0)
if(commands[cc].params.size()>1)
DrawFront(button,atoi(commands[cc].params[0].c_str()),atof(commands[cc].params[1].c_str()));
else
DrawFront(button,atoi(commands[cc].params[0].c_str()),0);
else
DrawFront(button,1000,0);
}
break;
case CMDTYPE_ICON_UNIT_OR_AREA:
case CMDTYPE_ICON_UNIT_FEATURE_OR_AREA:
case CMDTYPE_ICON_AREA:{
float maxRadius=100000;
if(commands[cc].params.size()==1)
maxRadius=atof(commands[cc].params[0].c_str());
if(mouse->buttons[button].movement>4){
float dist=ground->LineGroundCol(mouse->buttons[button].camPos,mouse->buttons[button].camPos+mouse->buttons[button].dir*gu->viewRange*1.4f);
if(dist<0){
break;
}
float3 pos=mouse->buttons[button].camPos+mouse->buttons[button].dir*dist;
dist=ground->LineGroundCol(camera->pos,camera->pos+mouse->dir*gu->viewRange*1.4f);
if(dist<0){
break;
}
float3 pos2=camera->pos+mouse->dir*dist;
const float* color;
switch (commands[cc].id) {
case CMD_ATTACK:
case CMD_AREA_ATTACK: { color = cmdColors.attack; break; }
case CMD_REPAIR: { color = cmdColors.repair; break; }
case CMD_RECLAIM: { color = cmdColors.reclaim; break; }
case CMD_RESTORE: { color = cmdColors.restore; break; }
case CMD_RESURRECT: { color = cmdColors.resurrect; break; }
case CMD_LOAD_UNITS: { color = cmdColors.load; break; }
case CMD_UNLOAD_UNIT:
case CMD_UNLOAD_UNITS: { color = cmdColors.unload; break; }
case CMD_CAPTURE: { color = cmdColors.capture; break; }
default: {
static const float grey[4] = { 0.5f, 0.5f, 0.5f, 0.5f };
color = grey;
}
}
DrawArea(pos, min(maxRadius, pos.distance2D(pos2)), color);
}
break;}
case CMDTYPE_ICON_UNIT_OR_RECTANGLE:{
if(mouse->buttons[button].movement>=16){
float dist=ground->LineGroundCol(mouse->buttons[button].camPos,mouse->buttons[button].camPos+mouse->buttons[button].dir*gu->viewRange*1.4f);
if(dist<0){
break;
}
float3 pos=mouse->buttons[button].camPos+mouse->buttons[button].dir*dist;
dist=ground->LineGroundCol(camera->pos,camera->pos+mouse->dir*gu->viewRange*1.4f);
if(dist<0){
break;
}
float3 pos2=camera->pos+mouse->dir*dist;
DrawSelectBox(pos, pos2);
}
break;}
default:
break;
}
}
}
glBlendFunc((GLenum)cmdColors.SelectedBlendSrc(),
(GLenum)cmdColors.SelectedBlendDst());
glEnable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
glLineWidth(cmdColors.SelectedLineWidth());
// draw the ranges for the unit that is being pointed at
CUnit* pointedAt = 0;
if(GetQueueKeystate()){
CUnit* unit = 0;
float dist2=helper->GuiTraceRay(camera->pos,mouse->dir,gu->viewRange*1.4f,unit,20,false);
if(unit && ((unit->losStatus[gu->myAllyTeam] & LOS_INLOS) || gu->spectatingFullView)){
pointedAt = unit;
//draw weapon range
if(unit->maxRange>0){
glColor4fv(cmdColors.rangeAttack); glBegin(GL_LINE_STRIP);
float h=unit->pos.y;
for(int a=0;a<=40;++a){
float3 pos(cos(a*2*PI/40)*unit->maxRange,0,sin(a*2*PI/40)*unit->maxRange);
pos+=unit->pos;
float dh=ground->GetHeight(pos.x,pos.z)-h;
pos=float3(cos(a*2*PI/40)*(unit->maxRange-dh*unit->weapons.front()->heightMod),0,sin(a*2*PI/40)*(unit->maxRange-dh*unit->weapons.front()->heightMod));
pos+=unit->pos;
pos.y=ground->GetHeight(pos.x,pos.z)+8;
glVertexf3(pos);
}
glEnd();
}
//draw decloak distance
if(unit->unitDef->decloakDistance > 0){
glColor4fv(cmdColors.rangeDecloak);
glBegin(GL_LINE_STRIP);
for(int a=0;a<=40;++a){
float3 pos(cos(a*2*PI/40)*unit->unitDef->decloakDistance,0,sin(a*2*PI/40)*unit->unitDef->decloakDistance);
pos+=unit->pos;
pos.y=ground->GetHeight(pos.x,pos.z)+8;
glVertexf3(pos);
}
glEnd();
}
//draw self destruct and damage distance
if(unit->unitDef->kamikazeDist > 0){
glColor4fv(cmdColors.rangeKamikaze);
glBegin(GL_LINE_STRIP);
for(int a=0;a<=40;++a){
float3 pos(cos(a*2*PI/40)*unit->unitDef->kamikazeDist,0,sin(a*2*PI/40)*unit->unitDef->kamikazeDist);
pos+=unit->pos;
pos.y=ground->GetHeight(pos.x,pos.z)+8;
glVertexf3(pos);
}
glEnd();
if(!unit->unitDef->selfDExplosion.empty()){
glColor4fv(cmdColors.rangeSelfDestruct);
WeaponDef* wd=weaponDefHandler->GetWeapon(unit->unitDef->selfDExplosion);
glBegin(GL_LINE_STRIP);
for(int a=0;a<=40;++a){
float3 pos(cos(a*2*PI/40)*wd->areaOfEffect,0,sin(a*2*PI/40)*wd->areaOfEffect);
pos+=unit->pos;
pos.y=ground->GetHeight(pos.x,pos.z)+8;
glVertexf3(pos);
}
glEnd();
}
}
// draw build distance for immobile builders
if(unit->unitDef->builder && !unit->unitDef->canmove) {
const float radius = unit->unitDef->buildDistance;
if (radius > 0.0f) {
glColor4fv(cmdColors.rangeBuild);
glBegin(GL_LINE_STRIP);
for(int a = 0; a <= 40; ++a){
const float radians = a * (2.0f * PI) / 40.0f;
float3 pos(cos(radians)*radius, 0.0f, sin(radians)*radius);
pos += unit->pos;
pos.y = ground->GetHeight(pos.x, pos.z) + 8.0f;
glVertexf3(pos);
}
glEnd();
}
}
}
}
// draw buildings we are about to build
if ((inCommand >= 0) && (inCommand < commands.size()) &&
(commands[inCommand].type == CMDTYPE_ICON_BUILDING)) {
// draw build distance for all immobile builders during build commands
set<CBuilderCAI*>::const_iterator bi;
for (bi = uh->builderCAIs.begin(); bi != uh->builderCAIs.end(); ++bi) {
const CUnit* unit = (*bi)->owner;
if (unit == pointedAt || unit->team!=gu->myTeam) {
continue;
}
const UnitDef* unitdef = unit->unitDef;
if (unitdef->builder && !unitdef->canmove) {
const float radius = unitdef->buildDistance;
if (radius > 0.0f) {
glDisable(GL_TEXTURE_2D);
const float* color = cmdColors.rangeBuild;
glColor4f(color[0], color[1], color[2], color[3] * 0.333f);
glBegin(GL_LINE_LOOP);
for(int a = 0; a < 40; ++a){
const float radians = a * (2.0f * PI) / 40.0f;
float3 pos(cos(radians)*radius, 0.0f, sin(radians)*radius);
pos += unit->pos;
pos.y = ground->GetHeight(pos.x, pos.z) + 8.0f;
glVertexf3(pos);
}
glEnd();
}
}
}
float dist=ground->LineGroundCol(camera->pos,camera->pos+mouse->dir*gu->viewRange*1.4f);
if(dist>0){
UnitDef* unitdef = unitDefHandler->GetUnitByID(-commands[inCommand].id);
if(unitdef){
// get the build information
float3 pos=camera->pos+mouse->dir*dist;
std::vector<BuildInfo> buildPos;
if(GetQueueKeystate() && mouse->buttons[SDL_BUTTON_LEFT].pressed){
float dist=ground->LineGroundCol(mouse->buttons[SDL_BUTTON_LEFT].camPos,mouse->buttons[SDL_BUTTON_LEFT].camPos+mouse->buttons[SDL_BUTTON_LEFT].dir*gu->viewRange*1.4f);
float3 pos2=mouse->buttons[SDL_BUTTON_LEFT].camPos+mouse->buttons[SDL_BUTTON_LEFT].dir*dist;
buildPos=GetBuildPos(BuildInfo(unitdef, pos2,buildFacing), BuildInfo(unitdef,pos, buildFacing));
} else {
BuildInfo bi(unitdef, pos, buildFacing);
buildPos=GetBuildPos(bi,bi);
}
for(std::vector<BuildInfo>::iterator bpi=buildPos.begin();bpi!=buildPos.end();++bpi)
{
const float3& buildpos = bpi->pos;
if(unitdef->weapons.size() > 0){ // draw weapon range
glColor4fv(cmdColors.rangeAttack);
glBegin(GL_LINE_STRIP);
for(int a=0;a<=40;++a){
float3 pos(cos(a*2*PI/40)*unitdef->weapons[0].def->range,0,sin(a*2*PI/40)*unitdef->weapons[0].def->range);
pos+=buildpos;
float dh=ground->GetHeight(pos.x,pos.z)-buildpos.y;
float modRange=unitdef->weapons[0].def->range-dh*unitdef->weapons[0].def->heightmod;
pos=float3(cos(a*2*PI/40)*(modRange),0,sin(a*2*PI/40)*(modRange));
pos+=buildpos;
pos.y=ground->GetHeight(pos.x,pos.z)+8;
glVertexf3(pos);
}
glEnd();
}
if(unitdef->extractRange > 0){ // draw extraction range
glDisable(GL_TEXTURE_2D);
glColor4fv(cmdColors.rangeExtract);
glBegin(GL_LINE_STRIP);
for(int a=0;a<=40;++a){
float3 pos(cos(a*2*PI/40)*unitdef->extractRange,0,sin(a*2*PI/40)*unitdef->extractRange);
pos+=buildpos;
pos.y=ground->GetHeight(pos.x,pos.z)+8;
glVertexf3(pos);
}
glEnd();
}
if (unitdef->builder && !unitdef->canmove) { // draw build range
const float radius = unitdef->buildDistance;
if (radius > 0.0f) {
glDisable(GL_TEXTURE_2D);
glColor4fv(cmdColors.rangeBuild);
glBegin(GL_LINE_STRIP);
for(int a = 0; a <= 40; ++a){
const float radians = a * (2.0f * PI) / 40.0f;
float3 pos(cos(radians)*radius, 0.0f, sin(radians)*radius);
pos += buildpos;
pos.y = ground->GetHeight(pos.x, pos.z) + 8.0f;
glVertexf3(pos);
}
glEnd();
}
}
std::vector<Command> cv;
if(GetQueueKeystate()){
Command c;
bpi->FillCmd(c);
std::vector<Command> temp;
std::set<CUnit*>::iterator ui = selectedUnits.selectedUnits.begin();
for(; ui != selectedUnits.selectedUnits.end(); ui++){
temp = (*ui)->commandAI->GetOverlapQueued(c);
std::vector<Command>::iterator ti = temp.begin();
for(; ti != temp.end(); ti++)
cv.insert(cv.end(),*ti);
}
}
if(uh->ShowUnitBuildSquare(*bpi, cv))
glColor4f(0.7f,1,1,0.4f);
else
glColor4f(1,0.5f,0.5f,0.4f);
unitDrawer->DrawBuildingSample(bpi->def, gu->myTeam, buildpos, bpi->buildFacing);
glBlendFunc((GLenum)cmdColors.SelectedBlendSrc(),
(GLenum)cmdColors.SelectedBlendDst());
}
}
}
}
//draw range circles if attack orders are imminent
int defcmd = GetDefaultCommand(mouse->lastx, mouse->lasty);
if((inCommand>=0 && inCommand<commands.size() && commands[inCommand].id==CMD_ATTACK) ||
(inCommand==-1 && defcmd>0 && commands[defcmd].id==CMD_ATTACK)){
for(std::set<CUnit*>::iterator si=selectedUnits.selectedUnits.begin();si!=selectedUnits.selectedUnits.end();++si){
CUnit* unit = *si;
if (unit == pointedAt) {
continue;
}
if(unit->maxRange>0 && ((unit->losStatus[gu->myAllyTeam] & LOS_INLOS) || gu->spectatingFullView)){
glColor4fv(cmdColors.rangeAttack);
glBegin(GL_LINE_STRIP);
float h=unit->pos.y;
for(int a=0;a<=40;++a){
float3 pos(cos(a*2*PI/40)*unit->maxRange,0,sin(a*2*PI/40)*unit->maxRange);
pos+=unit->pos;
float dh=ground->GetHeight(pos.x,pos.z)-h;
pos=float3(cos(a*2*PI/40)*(unit->maxRange-dh*unit->weapons.front()->heightMod), 0,
sin(a*2*PI/40)*(unit->maxRange-dh*unit->weapons.front()->heightMod));
pos+=unit->pos;
pos.y=ground->GetHeight(pos.x,pos.z)+8;
glVertexf3(pos);
}
glEnd();
}
}
}
glLineWidth(1.0f);
if (luaUI != NULL) {
luaUI->DrawWorldItems();
}
if (useMinimap) {
camera->pos = tmpCamPos;
mouse->dir = tmpMouseDir;
}
}
void CGuiHandler::DrawMiniMapMarker()
{
const float w = 10.0f;
const float h = 30.0f;
const float bc[4] = { 0.1f, 0.333f, 1.0f, 0.75f }; // base color
const float d[8] = { 0.4f, 0.8f, 0.6f, 1.0f, 0.3f, 0.7f, 0.5f, 0.9f };
const float colors[8][4] = {
{ bc[0] * d[0], bc[1] * d[0], bc[2] * d[0], bc[3] },
{ bc[0] * d[1], bc[1] * d[1], bc[2] * d[1], bc[3] },
{ bc[0] * d[2], bc[1] * d[2], bc[2] * d[2], bc[3] },
{ bc[0] * d[3], bc[1] * d[3], bc[2] * d[3], bc[3] },
{ bc[0] * d[4], bc[1] * d[4], bc[2] * d[4], bc[3] },
{ bc[0] * d[5], bc[1] * d[5], bc[2] * d[5], bc[3] },
{ bc[0] * d[6], bc[1] * d[6], bc[2] * d[6], bc[3] },
{ bc[0] * d[7], bc[1] * d[7], bc[2] * d[7], bc[3] },
};
const float groundLevel = ground->GetHeight(camera->pos.x, camera->pos.z);
static float spinTime = 0.0f;
spinTime = fmodf(spinTime + gu->lastFrameTime, 60.0f);
glPushMatrix();
glTranslatef(camera->pos.x, groundLevel, camera->pos.z);
glRotatef(360.0f * (spinTime / 2.0f), 0.0f, 1.0f, 0.0f);
glEnable(GL_BLEND);
glShadeModel(GL_FLAT);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glBegin(GL_TRIANGLE_FAN);
glVertex3f(0.0f, 0.0f, 0.0f);
glVertex3f( +w, +h, 0.0f);
glColor4fv(colors[4]); glVertex3f(0.0f, +h, +w);
glColor4fv(colors[5]); glVertex3f( -w, +h, 0.0f);
glColor4fv(colors[6]); glVertex3f(0.0f, +h, -w);
glColor4fv(colors[7]); glVertex3f( +w, +h, 0.0f);
glEnd();
glBegin(GL_TRIANGLE_FAN);
glVertex3f(0.0f, h * 2.0f, 0.0f);
glVertex3f( +w, +h, 0.0f);
glColor4fv(colors[3]); glVertex3f(0.0f, +h, -w);
glColor4fv(colors[2]); glVertex3f( -w, +h, 0.0f);
glColor4fv(colors[1]); glVertex3f(0.0f, +h, +w);
glColor4fv(colors[0]); glVertex3f( +w, +h, 0.0f);
glEnd();
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glShadeModel(GL_SMOOTH);
glPopMatrix();
}
void CGuiHandler::DrawCentroidCursor()
{
const set<CUnit*>& selUnits = selectedUnits.selectedUnits;
if (selUnits.size() < 2) {
return;
}
int cmd = -1;
if ((inCommand >= 0) && (inCommand < commands.size())) {
cmd = commands[inCommand].id;
} else {
int defcmd;
if (mouse->buttons[SDL_BUTTON_RIGHT].pressed &&
((mouse->activeReceiver == this) || (minimap->ProxyMode()))) {
defcmd = defaultCmdMemory;
} else {
defcmd = GetDefaultCommand(mouse->lastx, mouse->lasty);
}
if ((defcmd >= 0) && (defcmd < commands.size())) {
cmd = commands[defcmd].id;
}
}
if ((cmd == CMD_MOVE) || (cmd == CMD_GATHERWAIT)) {
if (!keys[SDLK_LCTRL] && !keys[SDLK_LALT] && !keys[SDLK_LMETA]) {
return;
}
} else if ((cmd == CMD_FIGHT) || (cmd == CMD_PATROL)) {
if (!keys[SDLK_LCTRL]) {
return;
}
} else {
return;
}
float3 pos(0.0f, 0.0f, 0.0f);
set<CUnit*>::const_iterator it;
for (it = selUnits.begin(); it != selUnits.end(); ++it) {
pos += (*it)->midPos;
}
pos /= (float)selUnits.size();
const float3 winPos = camera->CalcWindowCoordinates(pos);
if (winPos.z <= 1.0f) {
std::map<std::string, CMouseCursor*>::const_iterator mcit;
mcit = mouse->cursorCommandMap.find("Centroid");
if (mcit != mouse->cursorCommandMap.end()) {
CMouseCursor* mc = mcit->second;
if (mc != NULL) {
glDisable(GL_DEPTH_TEST);
mc->Draw((int)winPos.x, gu->viewSizeY - (int)winPos.y, 1.0f);
glEnable(GL_DEPTH_TEST);
}
}
}
}
void CGuiHandler::DrawArea(float3 pos, float radius, const float* color)
{
if (useStencil) {
DrawSelectCircle(pos, radius, color);
return;
}
glDisable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glColor4f(color[0], color[1], color[2], 0.25f);
glDisable(GL_DEPTH_TEST);
glDisable(GL_FOG);
glBegin(GL_TRIANGLE_FAN);
glVertexf3(pos);
for(int a=0;a<=40;++a){
float3 p(cos(a*2*PI/40)*radius,0,sin(a*2*PI/40)*radius);
p+=pos;
p.y=ground->GetHeight(p.x,p.z);
glVertexf3(p);
}
glEnd();
glEnable(GL_DEPTH_TEST);
glEnable(GL_FOG);
}
void CGuiHandler::DrawFront(int button,float maxSize,float sizeDiv)
{
glDisable(GL_TEXTURE_2D);
glColor4f(0.5f,1,0.5f,0.5f);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
CMouseHandler::ButtonPress& bp=mouse->buttons[button];
if(bp.movement<5)
return;
float dist=ground->LineGroundCol(bp.camPos,bp.camPos+bp.dir*gu->viewRange*1.4f);
if(dist<0)
return;
float3 pos1=bp.camPos+bp.dir*dist;
dist=ground->LineGroundCol(camera->pos,camera->pos+mouse->dir*gu->viewRange*1.4f);
if(dist<0)
return;
float3 pos2=camera->pos+mouse->dir*dist;
float3 forward=(pos1-pos2).cross(UpVector);
forward.Normalize();
float3 side=forward.cross(UpVector);
if(pos1.distance2D(pos2)>maxSize){
pos2=pos1+side*maxSize;
pos2.y=ground->GetHeight(pos2.x,pos2.z);
}
glDisable(GL_DEPTH_TEST);
glBegin(GL_QUADS);
glVertexf3(pos1+side*25);
glVertexf3(pos1-side*25);
glVertexf3(pos1-side*25+forward*50);
glVertexf3(pos1+side*25+forward*50);
glVertexf3(pos1+side*40+forward*50);
glVertexf3(pos1-side*40+forward*50);
glVertexf3(pos1+forward*100);
glVertexf3(pos1+forward*100);
glEnd();
glEnable(GL_DEPTH_TEST);
pos1+=pos1-pos2;
glDisable(GL_FOG);
glBegin(GL_QUADS);
glVertexf3(pos1-float3(0,-100,0));
glVertexf3(pos1+float3(0,-100,0));
glVertexf3(pos2+float3(0,-100,0));
glVertexf3(pos2-float3(0,-100,0));
glEnd();
if(sizeDiv!=0){
char c[40];
SNPRINTF(c, 40, "%d", (int)(pos1.distance2D(pos2)/sizeDiv) );
mouse->cursorTextRight=c;
}
glEnable(GL_FOG);
}
/******************************************************************************/
typedef void (*DrawShapeFunc)(const void* data);
static void DrawVolume(DrawShapeFunc drawShapeFunc, const void* data);
/******************************************************************************/
struct BoxData {
float3 mins;
float3 maxs;
};
static void DrawBoxShape(const void* data)
{
const BoxData* boxData = (const BoxData*)data;
const float3& mins = boxData->mins;
const float3& maxs = boxData->maxs;
glBegin(GL_QUADS);
// the top
glVertex3f(mins.x, maxs.y, mins.z);
glVertex3f(mins.x, maxs.y, maxs.z);
glVertex3f(maxs.x, maxs.y, maxs.z);
glVertex3f(maxs.x, maxs.y, mins.z);
// the bottom
glVertex3f(mins.x, mins.y, mins.z);
glVertex3f(maxs.x, mins.y, mins.z);
glVertex3f(maxs.x, mins.y, maxs.z);
glVertex3f(mins.x, mins.y, maxs.z);
glEnd();
glBegin(GL_QUAD_STRIP);
// the sides
glVertex3f(mins.x, maxs.y, mins.z);
glVertex3f(mins.x, mins.y, mins.z);
glVertex3f(mins.x, maxs.y, maxs.z);
glVertex3f(mins.x, mins.y, maxs.z);
glVertex3f(maxs.x, maxs.y, maxs.z);
glVertex3f(maxs.x, mins.y, maxs.z);
glVertex3f(maxs.x, maxs.y, mins.z);
glVertex3f(maxs.x, mins.y, mins.z);
glVertex3f(mins.x, maxs.y, mins.z);
glVertex3f(mins.x, mins.y, mins.z);
glEnd();
}
static void DrawCornerPosts(const float3& pos0, const float3& pos1)
{
const float3 lineVector(0.0f, 128.0f, 0.0f);
const float3 corner0(pos0.x, ground->GetHeight(pos0.x, pos0.z), pos0.z);
const float3 corner1(pos1.x, ground->GetHeight(pos1.x, pos1.z), pos1.z);
const float3 corner2(pos0.x, ground->GetHeight(pos0.x, pos1.z), pos1.z);
const float3 corner3(pos1.x, ground->GetHeight(pos1.x, pos0.z), pos0.z);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glLineWidth(2.0f);
glBegin(GL_LINES);
glColor4f(1.0f, 1.0f, 0.0f, 0.9f);
glVertexf3(corner0); glVertexf3(corner0 + lineVector);
glColor4f(0.0f, 1.0f, 0.0f, 0.9f);
glVertexf3(corner1); glVertexf3(corner1 + lineVector);
glColor4f(0.0f, 0.0f, 1.0f, 0.9f);
glVertexf3(corner2); glVertexf3(corner2 + lineVector);
glVertexf3(corner3); glVertexf3(corner3 + lineVector);
glEnd();
glLineWidth(1.0f);
}
static void StencilDrawSelectBox(const float3& pos0, const float3& pos1,
bool invColorSelect)
{
BoxData boxData;
boxData.mins = float3(min(pos0.x, pos1.x), readmap->minheight - 250.0f,
min(pos0.z, pos1.z));
boxData.maxs = float3(max(pos0.x, pos1.x), readmap->maxheight + 10000.0f,
max(pos0.z, pos1.z));
glDisable(GL_TEXTURE_2D);
glDisable(GL_FOG);
glEnable(GL_BLEND);
if (!invColorSelect) {
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glColor4f(1.0f, 0.0f, 0.0f, 0.25f);
DrawVolume(DrawBoxShape, &boxData);
} else {
glEnable(GL_COLOR_LOGIC_OP);
glLogicOp(GL_INVERT);
DrawVolume(DrawBoxShape, &boxData);
glDisable(GL_COLOR_LOGIC_OP);
}
// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// glColor4f(1.0f, 0.0f, 0.0f, 0.25f);
// DrawBoxShape(&boxData); // FIXME
DrawCornerPosts(pos0, pos1);
glEnable(GL_FOG);
}
static void FullScreenDraw()
{
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glPushMatrix();
glRectf(-1.0f, -1.0f, +1.0f, +1.0f);
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
}
static void DrawMinMaxBox(const float3& mins, const float3& maxs)
{
glBegin(GL_QUADS);
// the top
glVertex3f(mins.x, maxs.y, mins.z);
glVertex3f(maxs.x, maxs.y, mins.z);
glVertex3f(maxs.x, maxs.y, maxs.z);
glVertex3f(mins.x, maxs.y, maxs.z);
glEnd();
glBegin(GL_QUAD_STRIP);
// the sides
glVertex3f(mins.x, mins.y, mins.z);
glVertex3f(mins.x, maxs.y, mins.z);
glVertex3f(mins.x, mins.y, maxs.z);
glVertex3f(mins.x, maxs.y, maxs.z);
glVertex3f(maxs.x, mins.y, maxs.z);
glVertex3f(maxs.x, maxs.y, maxs.z);
glVertex3f(maxs.x, mins.y, mins.z);
glVertex3f(maxs.x, maxs.y, mins.z);
glVertex3f(mins.x, mins.y, mins.z);
glVertex3f(mins.x, maxs.y, mins.z);
glEnd();
}
void CGuiHandler::DrawSelectBox(const float3& pos0, const float3& pos1)
{
if (useStencil) {
StencilDrawSelectBox(pos0, pos1, invColorSelect);
return;
}
const float3 mins(min(pos0.x, pos1.x), readmap->minheight - 250.0f,
min(pos0.z, pos1.z));
const float3 maxs(max(pos0.x, pos1.x), readmap->maxheight + 10000.0f,
max(pos0.z, pos1.z));
glDisable(GL_TEXTURE_2D);
glDisable(GL_FOG);
glDisable(GL_BLEND);
glDepthMask(GL_FALSE);
glEnable(GL_CULL_FACE);
glEnable(GL_COLOR_LOGIC_OP);
glLogicOp(GL_INVERT);
// invert the color for objects within the box
glCullFace(GL_FRONT); DrawMinMaxBox(mins, maxs);
glCullFace(GL_BACK); DrawMinMaxBox(mins, maxs);
glDisable(GL_CULL_FACE);
// do a full screen inversion if the camera is within the box
if ((camera->pos.x > mins.x) && (camera->pos.x < maxs.x) &&
(camera->pos.y > mins.y) && (camera->pos.y < maxs.y) &&
(camera->pos.z > mins.z) && (camera->pos.z < maxs.z)) {
glDisable(GL_DEPTH_TEST);
FullScreenDraw();
glEnable(GL_DEPTH_TEST);
}
glDisable(GL_COLOR_LOGIC_OP);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
DrawCornerPosts(pos0, pos1);
// glDepthMask(GL_TRUE);
glEnable(GL_FOG);
}
/******************************************************************************/
struct CylinderData {
int divs;
float xc, zc, yp, yn;
float radius;
};
static void DrawCylinderShape(const void* data)
{
const CylinderData& cyl = *((const CylinderData*)data);
int i;
glBegin(GL_QUAD_STRIP); // the sides
for (i = 0; i <= cyl.divs; i++) {
const float radians =
float(2.0 * PI) * float(i % cyl.divs) / (float)cyl.divs;
const float x = cyl.xc + (cyl.radius * sin(radians));
const float z = cyl.zc + (cyl.radius * cos(radians));
glVertex3f(x, cyl.yp, z);
glVertex3f(x, cyl.yn, z);
}
glEnd();
glBegin(GL_TRIANGLE_FAN); // the top
for (i = 0; i < cyl.divs; i++) {
const float radians = float(2.0 * PI) * float(i) / (float)cyl.divs;
const float x = cyl.xc + (cyl.radius * sin(radians));
const float z = cyl.zc + (cyl.radius * cos(radians));
glVertex3f(x, cyl.yp, z);
}
glEnd();
glBegin(GL_TRIANGLE_FAN); // the bottom
for (i = (cyl.divs - 1); i >= 0; i--) {
const float radians = float(2.0 * PI) * float(i) / (float)cyl.divs;
const float x = cyl.xc + (cyl.radius * sin(radians));
const float z = cyl.zc + (cyl.radius * cos(radians));
glVertex3f(x, cyl.yn, z);
}
glEnd();
}
void CGuiHandler::DrawSelectCircle(const float3& pos, float radius,
const float* color)
{
CylinderData cylData;
cylData.xc = pos.x;
cylData.zc = pos.z;
cylData.yp = readmap->maxheight + 10000.0f;
cylData.yn = readmap->minheight - 250.0f;
cylData.radius = radius;
cylData.divs = 128;
glDisable(GL_TEXTURE_2D);
glDisable(GL_FOG);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glColor4f(color[0], color[1], color[2], 0.25f);
DrawVolume(DrawCylinderShape, &cylData);
// draw the center line
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(color[0], color[1], color[2], 0.9f);
glLineWidth(2.0f);
const float3 base(pos.x, ground->GetHeight(pos.x, pos.z), pos.z);
glBegin(GL_LINES);
glVertexf3(base);
glVertexf3(base + float3(0.0f, 128.0f, 0.0f));
glEnd();
glLineWidth(1.0f);
glEnable(GL_FOG);
}
/******************************************************************************/
static void DrawVolume(DrawShapeFunc drawShapeFunc, const void* data)
{
glDepthMask(GL_FALSE);
glEnable(GL_DEPTH_TEST);
glEnable(GL_DEPTH_CLAMP_NV);
glEnable(GL_STENCIL_TEST);
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
// using zfail method to avoid doing the inside check
if (GLEW_EXT_stencil_two_side && GL_EXT_stencil_wrap) {
glDisable(GL_CULL_FACE);
glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT);
glActiveStencilFaceEXT(GL_BACK);
glStencilMask(~0);
glStencilOp(GL_KEEP, GL_DECR_WRAP, GL_KEEP);
glStencilFunc(GL_ALWAYS, 0, ~0);
glActiveStencilFaceEXT(GL_FRONT);
glStencilMask(~0);
glStencilOp(GL_KEEP, GL_INCR_WRAP, GL_KEEP);
glStencilFunc(GL_ALWAYS, 0, ~0);
drawShapeFunc(data); // draw
glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT);
} else {
glEnable(GL_CULL_FACE);
glStencilMask(~0);
glStencilFunc(GL_ALWAYS, 0, ~0);
glCullFace(GL_FRONT);
glStencilOp(GL_KEEP, GL_INCR, GL_KEEP);
drawShapeFunc(data); // draw
glCullFace(GL_BACK);
glStencilOp(GL_KEEP, GL_DECR, GL_KEEP);
drawShapeFunc(data); // draw
glDisable(GL_CULL_FACE);
}
glDisable(GL_DEPTH_TEST);
glStencilFunc(GL_NOTEQUAL, 0, ~0);
glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO); // clear as we go
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
drawShapeFunc(data); // draw
glDisable(GL_DEPTH_CLAMP_NV);
glDisable(GL_STENCIL_TEST);
glEnable(GL_DEPTH_TEST);
}
/******************************************************************************/
| [
"spring@abma.de"
] | spring@abma.de |
63ad9006fdd1c6dbdf1c92c896bc891981b02640 | 6875cd641d138f052eaf3917b9c26174c37d0540 | /tysoc/src/utils/TCharacterParser.cpp | f240fb2aa38d5167e61196ffbbe1b0ebb3d9e9f3 | [] | no_license | richardyantas/computer_graphics_finalproject | 87dafcb2884b59aba672beb301b1e71366e70260 | 5d3d82d89811ddb2b64a1878b7bbad9b40558e3e | refs/heads/master | 2020-04-20T17:39:00.888128 | 2018-09-03T06:48:37 | 2018-09-03T06:48:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 14,905 | cpp |
#include <utils/TCharacterParser.h>
using namespace std;
namespace tysoc
{
bool TCharacterParser::parseCharacter( TCharacterNode& tree, const string& charFileName )
{
string _fullCharFileName;
_fullCharFileName += TYSOC_RESOURCES_PATH;
_fullCharFileName += TYSOC_RESOURCES_CHARACTERS_SUB_PATH;
_fullCharFileName += charFileName;
ifstream _fStream;
_fStream.open( _fullCharFileName.c_str(), std::ifstream::in );
try
{
json _root;
_fStream >> _root;
_fStream.close();
//cout << "json****" << endl;
//cout << _root.dump( 4 ) << endl;
//cout << "********" << endl;
return _loadJson( tree, _root );
}
catch ( const std::exception& )
{
cout << "TCharacterParser::parseCharacter> failed to parse the character file: " << _fullCharFileName << endl;
}
return false;
}
bool TCharacterParser::_loadJson( TCharacterNode& tree, const json& root )
{
// parse joints - kinematic tree
vector< TCharacterNodeData > _dataResources;
if ( !_parseResources( _dataResources, root ) )
{
cout << "TCharacterParser::_loadSkeleton> error while parsing the skeleton resources" << endl;
return false;
}
if ( !_buildTree( tree, _dataResources ) )
{
cout << "TCharacterParser::_loadSkeleton> error while parsing the skeleton tree" << endl;
return false;
}
return true;
}
bool TCharacterParser::_parseResources( vector< TCharacterNodeData >& dataResources, const json& root )
{
// cout << "foooo" << endl;
// cout << root.dump( 4 ) << endl;
// cout << "******" << endl;
// Parse Joints
if ( root.find( "Skeleton" ) != root.end() )
{
json _skeletonRoot = root["Skeleton"];
if ( _skeletonRoot.find( "Joints" ) != _skeletonRoot.end() )
{
if ( !_parseJoints( dataResources, _skeletonRoot["Joints"] ) )
{
cout << "TCharacterParser::_parseResources> error while parsing 'Joints' node" << endl;
return false;
}
}
else
{
cout << "TCharacterParser::_parseResources> no 'Joints' node in json" << endl;
return false;
}
}
else
{
cout << "TCharacterParser::_parseResources> no 'Skeleton' node in json" << endl;
return false;
}
//cout << "BodyDefs" << endl;
//cout << root["BodyDefs"].dump( 4 ) << endl;
//cout << "******" << endl;
//cout << "DrawShapeDefs" << endl;
//cout << root["DrawShapeDefs"].dump( 4 ) << endl;
//cout << "******" << endl;
//cout << "PDControllers" << endl;
//cout << root["PDControllers"].dump( 4 ) << endl;
//cout << "******" << endl;
// Parse BodyDefs
if ( root.find( "BodyDefs" ) != root.end() )
{
if ( !_parseShapes( dataResources, root["BodyDefs"] ) )
{
cout << "TCharacterParser::_parseResources> error while parsing 'BodyDefs' node" << endl;
return false;
}
}
else
{
cout << "TCharacterParser::_parseResources> no 'BodyDefs' node in json" << endl;
return false;
}
// Parse DrawShapeDefs
if ( root.find( "DrawShapeDefs" ) != root.end() )
{
auto _jsonShapesDefs = root["DrawShapeDefs"];
if ( !_parseGraphics( dataResources, _jsonShapesDefs ) )
{
cout << "TCharacterParser::_parseResources> error while parsing 'DrawShapeDefs' node" << endl;
return false;
}
}
else
{
cout << "TCharacterParser::_parseResources> no 'DrawShapeDefs' node in json" << endl;
return false;
}
// Parse PDControllers
if ( root.find( "PDControllers" ) != root.end() )
{
if ( !_parsePDCdata( dataResources, root["PDControllers"] ) )
{
cout << "TCharacterParser::_parseResources> error while parsing 'PDControllers' node" << endl;
return false;
}
}
else
{
cout << "TCharacterParser::_parseResources> no 'PDControllers' node in json" << endl;
return false;
}
return true;
}
bool TCharacterParser::_parseJoints( vector< TCharacterNodeData >& dataResources, json rootJoints )
{
int _numJoints = rootJoints.size();
cout << "parsing " << _numJoints << " joints" << endl;
for ( int q = 0; q < _numJoints; q++ )
{
// parse the joint
string _jName = rootJoints[ q ]["Name"];
int _jTypeId = rootJoints[ q ]["Type"];
int _jParentId = rootJoints[ q ]["Parent"];
float _jAttachX = rootJoints[ q ]["AttachX"];
float _jAttachY = rootJoints[ q ]["AttachY"];
float _jAttachZ = rootJoints[ q ]["AttachZ"];
float _jLinkStiffness = rootJoints[ q ]["LinkStiffness"];
float _jLimLow = rootJoints[ q ]["LimLow"];
float _jLimHigh = rootJoints[ q ]["LimHigh"];
// if ( _jName == "right_hip" )
// {
// cout << "******" << endl;
// cout << rootJoints.dump( 4 ) << endl;
// cout << "******" << endl;
// }
TCharacterNodeData _nodeData;
_nodeData.name = _jName;
_nodeData.resId = q;
_nodeData.jointData.name = _jName;
_nodeData.jointData.pivot = glm::vec3( WORLD_SCALE * _jAttachX, WORLD_SCALE * _jAttachY, WORLD_SCALE * _jAttachZ );
_nodeData.jointData.axis = glm::vec3( 0, 0, 1 );
_nodeData.jointData.localTransform = glm::translate( glm::vec3( WORLD_SCALE * _jAttachX, WORLD_SCALE * _jAttachY, WORLD_SCALE * _jAttachZ ) );
_nodeData.jointData.jointType = _jTypeId;
_nodeData.jointData.parentId = _jParentId;
_nodeData.jointData.linkStiffness = _jLinkStiffness;
_nodeData.jointData.loLimit = _jLimLow;
_nodeData.jointData.hiLimit = _jLimHigh;
dataResources.push_back( _nodeData );
}
return true;
}
bool TCharacterParser::_parseShapes( vector< TCharacterNodeData >& dataResources, json rootShapes )
{
int _numBodies = rootShapes.size();
cout << "parsing " << _numBodies << " bodies" << endl;
for ( int q = 0; q < _numBodies; q++ )
{
string _bName = rootShapes[ q ][ "Name" ];
string _bShape = rootShapes[ q ][ "Shape" ];
float _bMass = rootShapes[ q ][ "Mass" ];
float _bAttachX = rootShapes[ q ][ "AttachX" ];
float _bAttachY = rootShapes[ q ][ "AttachY" ];
float _bAttachZ = rootShapes[ q ][ "AttachZ" ];
float _bTheta = rootShapes[ q ][ "Theta"];
// if ( _bName == "right_hip" )
// {
// cout << "******" << endl;
// cout << rootShapes.dump( 4 ) << endl;
// cout << "******" << endl;
// }
float _bParam0 = rootShapes[ q ][ "Param0" ];
float _bParam1 = rootShapes[ q ][ "Param1" ];
float _bParam2 = rootShapes[ q ][ "Param2" ];
float _bColorR = rootShapes[ q ][ "ColorR" ];
float _bColorG = rootShapes[ q ][ "ColorG" ];
float _bColorB = rootShapes[ q ][ "ColorB" ];
if ( dataResources[ q ].name != _bName )
{
cout << "bodydef with name: " << _bName << " is not part of the parsed skeletal structure" << endl;
return false;
}
TCharacterNodeData& _nodeData = dataResources[ q ];
_nodeData.shapeData.name = _bName;
_nodeData.shapeData.shape = _bShape;
glm::mat4 _localTransform( 1.0f );
_localTransform = glm::rotate( _bTheta, glm::vec3( 0, 0, 1 ) ) * _localTransform;
_localTransform = glm::translate( glm::vec3( WORLD_SCALE * _bAttachX, WORLD_SCALE * _bAttachY, WORLD_SCALE * _bAttachZ ) ) * _localTransform;
_nodeData.shapeData.localTransform = _localTransform;
_nodeData.shapeData.mass = _bMass;
_nodeData.shapeData.param0 = WORLD_SCALE * _bParam0;
_nodeData.shapeData.param1 = WORLD_SCALE * _bParam1;
_nodeData.shapeData.param2 = WORLD_SCALE * _bParam2;
_nodeData.shapeData.color = TVec3( _bColorR, _bColorG, _bColorB );
}
return true;
}
bool TCharacterParser::_parseGraphics( vector< TCharacterNodeData >& dataResources, json rootGraphics )
{
int _numGraphicsDef = rootGraphics.size();
cout << "parsing " << _numGraphicsDef << " graphics def." << endl;
for ( int q = 0; q < _numGraphicsDef; q++ )
{
string _gName = rootGraphics[ q ][ "Name" ];
string _gShape = rootGraphics[ q ][ "Shape" ];
float _gAttachX = rootGraphics[ q ][ "AttachX" ];
float _gAttachY = rootGraphics[ q ][ "AttachY" ];
float _gAttachZ = rootGraphics[ q ][ "AttachZ" ];
float _gTheta = rootGraphics[ q ][ "Theta"];
// if ( _gName == "right_hip" )
// {
// cout << "******" << endl;
// cout << rootGraphics.dump( 4 ) << endl;
// cout << "******" << endl;
// }
float _gParam0 = rootGraphics[ q ][ "Param0" ];
float _gParam1 = rootGraphics[ q ][ "Param1" ];
float _gParam2 = rootGraphics[ q ][ "Param2" ];
float _gColorR = rootGraphics[ q ][ "ColorR" ];
float _gColorG = rootGraphics[ q ][ "ColorG" ];
float _gColorB = rootGraphics[ q ][ "ColorB" ];
if ( dataResources[ q ].name != _gName )
{
cout << "drawdef with name: " << _gName << " is not part of the parsed skeletal structure" << endl;
return false;
}
TCharacterNodeData& _nodeData = dataResources[ q ];
_nodeData.drawData.name = _gName;
_nodeData.drawData.shape = _gShape;
glm::mat4 _localTransform( 1.0f );
_localTransform = glm::rotate( _gTheta, glm::vec3( 0, 0, 1 ) ) * _localTransform;
_localTransform = glm::translate( glm::vec3( _gAttachX, _gAttachY, _gAttachZ ) ) * _localTransform;
_nodeData.drawData.localTransform = _localTransform;
_nodeData.drawData.param0 = _gParam0;
_nodeData.drawData.param1 = _gParam1;
_nodeData.drawData.param2 = _gParam2;
_nodeData.drawData.color = TVec3( _gColorR, _gColorG, _gColorB );
}
return true;
}
bool TCharacterParser::_parsePDCdata( vector< TCharacterNodeData >& dataResources, json rootPDC )
{
int _numPDCdefs = rootPDC.size();
cout << "parsing " << _numPDCdefs << " PDc def." << endl;
for ( int q = 0; q < _numPDCdefs; q++ )
{
string _cName = rootPDC[q]["Name"];
float _cKp = rootPDC[q]["Kp"];
float _cKd = rootPDC[q]["Kd"];
float _cTorqueLim = rootPDC[q]["TorqueLim"];
float _cTargetTheta = rootPDC[q]["TargetTheta"];
int _cUseWorldCoord = rootPDC[q]["UseWorldCoord"];
if ( dataResources[q].name != _cName )
{
cout << "PDcdef with name: " << _cName << " is not part of the parsed skeletal structure" << endl;
return false;
}
TCharacterNodeData& _nodeData = dataResources[q];
_nodeData.pdcData.name = _cName;
_nodeData.pdcData.Kp = _cKp;
_nodeData.pdcData.Kd = _cKd;
_nodeData.pdcData.torqueLimit = _cTorqueLim;
_nodeData.pdcData.targetAngle = _cTargetTheta;
_nodeData.pdcData.useWorldCoordinates = _cUseWorldCoord;
}
return true;
}
bool TCharacterParser::_buildTree( TCharacterNode& tree, const vector< TCharacterNodeData >& dataResources )
{
int _rootIndx = -1;
int _proccessed = 0;
// Find root of the tree
for ( int q = 0; q < dataResources.size(); q++ )
{
if ( dataResources[q].jointData.parentId == -1 )
{
tree.name = dataResources[q].name;
tree.id = q;
tree.parent = NULL;
tree.data = dataResources[q];
_rootIndx = q;
_proccessed++;
break;
}
}
if ( _rootIndx == -1 )
{
cout << "TCharacterParser::_buildTree> is there are root node?" << endl;
return false;
}
TCharacterNode* _root = &tree;
_processNode( _root, dataResources );
return true;
}
void TCharacterParser::_processNode( TCharacterNode* node, const vector< TCharacterNodeData >& dataResources )
{
for ( int q = 0; q < dataResources.size(); q++ )
{
if ( dataResources[q].jointData.parentId == node->id )
{
TCharacterNode* _child = new TCharacterNode();
_child->id = q;
_child->name = dataResources[q].name;
_child->parent = node;
_child->data = dataResources[q];
node->children.push_back( _child );
}
}
for ( int q = 0; q < node->children.size(); q++ )
{
_processNode( node->children[q], dataResources );
}
}
bool TCharacterParser::parseMotion( vector< TMotionFrame >& motionFrames, const string& motionFilename )
{
string _fullMotionFileName;
_fullMotionFileName += TYSOC_RESOURCES_PATH;
_fullMotionFileName += TYSOC_RESOURCES_MOTIONS_SUB_PATH;
_fullMotionFileName += motionFilename;
ifstream _fStream;
_fStream.open( _fullMotionFileName.c_str(), std::ifstream::in );
try
{
json _root;
_fStream >> _root;
_fStream.close();
// cout << "json****" << endl;
// cout << _root.dump( 4 ) << endl;
// cout << "********" << endl;
json _motionRoot = _root["Motion"];
json _framesRoot = _motionRoot["Frames"];
int _numFrames = _framesRoot.size();
cout << "parsing " << _numFrames << " frames" << endl;
for ( int q = 0; q < _numFrames; q++ )
{
json _frame = _framesRoot[q];
TMotionFrame _mFrame;
_mFrame.dof = _frame.size();
_mFrame.pose = vector< float >( _frame.size(), 0.0f );
_mFrame.duration = 0.5f;
for ( int s = 0; s < _frame.size(); s++ )
{
_mFrame.pose[s] = _frame[s];
}
motionFrames.push_back( _mFrame );
}
return true;
}
catch ( const std::exception& )
{
cout << "TCharacterParser::parseCharacter> failed to parse the motion file: " << motionFilename << endl;
}
return false;
}
} | [
"wpumacay@gmail.com"
] | wpumacay@gmail.com |
c70782c9f79ae2ec4ab4e2d878adbd220771f531 | e8a75835d0ca8b72372257dee41b29bb11f72599 | /src/file.hpp | 377cc9bc6f7c8afe07ccfdd5fee5d511551dd2c6 | [] | no_license | 0x0015/CppConsole | 9f636fbc7c7af9f4f4bf1380120b4b732d16d85d | 9683b7f4a0c66b22fc916ae07ea3d86c63a76a21 | refs/heads/master | 2023-03-25T00:50:43.306787 | 2021-03-18T02:26:18 | 2021-03-18T02:26:18 | 274,785,957 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 88 | hpp | #include <iostream>
using namespace std;
extern void removeDirectory(string directory); | [
"64482595+0x0015@users.noreply.github.com"
] | 64482595+0x0015@users.noreply.github.com |
23ad534e7e48fe1ac91c48897a00f527b3bf6e75 | dd80a584130ef1a0333429ba76c1cee0eb40df73 | /external/chromium/base/third_party/nspr/prtime.cc | f1fcf26cd81842765477a38a90e0f8ceeb58187e | [
"GPL-2.0-or-later",
"LGPL-2.1-or-later",
"MPL-1.1",
"BSD-3-Clause",
"MIT"
] | permissive | karunmatharu/Android-4.4-Pay-by-Data | 466f4e169ede13c5835424c78e8c30ce58f885c1 | fcb778e92d4aad525ef7a995660580f948d40bc9 | refs/heads/master | 2021-03-24T13:33:01.721868 | 2017-02-18T17:48:49 | 2017-02-18T17:48:49 | 81,847,777 | 0 | 2 | MIT | 2020-03-09T00:02:12 | 2017-02-13T16:47:00 | null | UTF-8 | C++ | false | false | 49,302 | cc | /* Portions are Copyright (C) 2011 Google Inc */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape Portable Runtime (NSPR).
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* prtime.cc --
* NOTE: The original nspr file name is prtime.c
*
* NSPR date and time functions
*
* CVS revision 3.37
*/
/*
* The following functions were copied from the NSPR prtime.c file.
* PR_ParseTimeString
* We inlined the new PR_ParseTimeStringToExplodedTime function to avoid
* copying PR_ExplodeTime and PR_LocalTimeParameters. (The PR_ExplodeTime
* and PR_ImplodeTime calls cancel each other out.)
* PR_NormalizeTime
* PR_GMTParameters
* PR_ImplodeTime
* This was modified to use the Win32 SYSTEMTIME/FILETIME structures
* and the timezone offsets are applied to the FILETIME structure.
* All types and macros are defined in the base/third_party/prtime.h file.
* These have been copied from the following nspr files. We have only copied
* over the types we need.
* 1. prtime.h
* 2. prtypes.h
* 3. prlong.h
*/
#include "base/logging.h"
#include "base/third_party/nspr/prtime.h"
#include "build/build_config.h"
#if defined(OS_WIN)
#include <windows.h>
#elif defined(OS_MACOSX)
#include <CoreFoundation/CoreFoundation.h>
#endif
#include <errno.h> /* for EINVAL */
#include <time.h>
/* Implements the Unix localtime_r() function for windows */
#if defined(OS_WIN)
static void localtime_r(const time_t* secs, struct tm* time) {
(void) localtime_s(time, secs);
}
#endif
/*
*------------------------------------------------------------------------
*
* PR_ImplodeTime --
*
* Cf. time_t mktime(struct tm *tp)
* Note that 1 year has < 2^25 seconds. So an PRInt32 is large enough.
*
*------------------------------------------------------------------------
*/
PRTime
PR_ImplodeTime(const PRExplodedTime *exploded)
{
// This is important, we want to make sure multiplications are
// done with the correct precision.
static const PRTime kSecondsToMicroseconds = static_cast<PRTime>(1000000);
#if defined(OS_WIN)
// Create the system struct representing our exploded time.
SYSTEMTIME st = {0};
FILETIME ft = {0};
ULARGE_INTEGER uli = {0};
st.wYear = exploded->tm_year;
st.wMonth = exploded->tm_month + 1;
st.wDayOfWeek = exploded->tm_wday;
st.wDay = exploded->tm_mday;
st.wHour = exploded->tm_hour;
st.wMinute = exploded->tm_min;
st.wSecond = exploded->tm_sec;
st.wMilliseconds = exploded->tm_usec/1000;
// Convert to FILETIME.
if (!SystemTimeToFileTime(&st, &ft)) {
NOTREACHED() << "Unable to convert time";
return 0;
}
// Apply offsets.
uli.LowPart = ft.dwLowDateTime;
uli.HighPart = ft.dwHighDateTime;
// Convert from Windows epoch to NSPR epoch, and 100-nanoseconds units
// to microsecond units.
PRTime result =
static_cast<PRTime>((uli.QuadPart / 10) - 11644473600000000i64);
// Adjust for time zone and dst. Convert from seconds to microseconds.
result -= (exploded->tm_params.tp_gmt_offset +
exploded->tm_params.tp_dst_offset) * kSecondsToMicroseconds;
return result;
#elif defined(OS_MACOSX)
// Create the system struct representing our exploded time.
CFGregorianDate gregorian_date;
gregorian_date.year = exploded->tm_year;
gregorian_date.month = exploded->tm_month + 1;
gregorian_date.day = exploded->tm_mday;
gregorian_date.hour = exploded->tm_hour;
gregorian_date.minute = exploded->tm_min;
gregorian_date.second = exploded->tm_sec;
// Compute |absolute_time| in seconds, correct for gmt and dst
// (note the combined offset will be negative when we need to add it), then
// convert to microseconds which is what PRTime expects.
CFAbsoluteTime absolute_time =
CFGregorianDateGetAbsoluteTime(gregorian_date, NULL);
PRTime result = static_cast<PRTime>(absolute_time);
result -= exploded->tm_params.tp_gmt_offset +
exploded->tm_params.tp_dst_offset;
result += kCFAbsoluteTimeIntervalSince1970; // PRTime epoch is 1970
result *= kSecondsToMicroseconds;
result += exploded->tm_usec;
return result;
#elif defined(OS_POSIX)
struct tm exp_tm = {0};
exp_tm.tm_sec = exploded->tm_sec;
exp_tm.tm_min = exploded->tm_min;
exp_tm.tm_hour = exploded->tm_hour;
exp_tm.tm_mday = exploded->tm_mday;
exp_tm.tm_mon = exploded->tm_month;
exp_tm.tm_year = exploded->tm_year - 1900;
time_t absolute_time = timegm(&exp_tm);
// If timegm returned -1. Since we don't pass it a time zone, the only
// valid case of returning -1 is 1 second before Epoch (Dec 31, 1969).
if (absolute_time == -1 &&
!(exploded->tm_year == 1969 && exploded->tm_month == 11 &&
exploded->tm_mday == 31 && exploded->tm_hour == 23 &&
exploded->tm_min == 59 && exploded->tm_sec == 59)) {
// If we get here, time_t must be 32 bits.
// Date was possibly too far in the future and would overflow. Return
// the most future date possible (year 2038).
if (exploded->tm_year >= 1970)
return INT_MAX * kSecondsToMicroseconds;
// Date was possibly too far in the past and would underflow. Return
// the most past date possible (year 1901).
return INT_MIN * kSecondsToMicroseconds;
}
PRTime result = static_cast<PRTime>(absolute_time);
result -= exploded->tm_params.tp_gmt_offset +
exploded->tm_params.tp_dst_offset;
result *= kSecondsToMicroseconds;
result += exploded->tm_usec;
return result;
#else
#error No PR_ImplodeTime implemented on your platform.
#endif
}
/*
* The COUNT_LEAPS macro counts the number of leap years passed by
* till the start of the given year Y. At the start of the year 4
* A.D. the number of leap years passed by is 0, while at the start of
* the year 5 A.D. this count is 1. The number of years divisible by
* 100 but not divisible by 400 (the non-leap years) is deducted from
* the count to get the correct number of leap years.
*
* The COUNT_DAYS macro counts the number of days since 01/01/01 till the
* start of the given year Y. The number of days at the start of the year
* 1 is 0 while the number of days at the start of the year 2 is 365
* (which is ((2)-1) * 365) and so on. The reference point is 01/01/01
* midnight 00:00:00.
*/
#define COUNT_LEAPS(Y) ( ((Y)-1)/4 - ((Y)-1)/100 + ((Y)-1)/400 )
#define COUNT_DAYS(Y) ( ((Y)-1)*365 + COUNT_LEAPS(Y) )
#define DAYS_BETWEEN_YEARS(A, B) (COUNT_DAYS(B) - COUNT_DAYS(A))
/*
* Static variables used by functions in this file
*/
/*
* The following array contains the day of year for the last day of
* each month, where index 1 is January, and day 0 is January 1.
*/
static const int lastDayOfMonth[2][13] = {
{-1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364},
{-1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}
};
/*
* The number of days in a month
*/
static const PRInt8 nDays[2][12] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};
/*
*-------------------------------------------------------------------------
*
* IsLeapYear --
*
* Returns 1 if the year is a leap year, 0 otherwise.
*
*-------------------------------------------------------------------------
*/
static int IsLeapYear(PRInt16 year)
{
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
return 1;
else
return 0;
}
/*
* 'secOffset' should be less than 86400 (i.e., a day).
* 'time' should point to a normalized PRExplodedTime.
*/
static void
ApplySecOffset(PRExplodedTime *time, PRInt32 secOffset)
{
time->tm_sec += secOffset;
/* Note that in this implementation we do not count leap seconds */
if (time->tm_sec < 0 || time->tm_sec >= 60) {
time->tm_min += time->tm_sec / 60;
time->tm_sec %= 60;
if (time->tm_sec < 0) {
time->tm_sec += 60;
time->tm_min--;
}
}
if (time->tm_min < 0 || time->tm_min >= 60) {
time->tm_hour += time->tm_min / 60;
time->tm_min %= 60;
if (time->tm_min < 0) {
time->tm_min += 60;
time->tm_hour--;
}
}
if (time->tm_hour < 0) {
/* Decrement mday, yday, and wday */
time->tm_hour += 24;
time->tm_mday--;
time->tm_yday--;
if (time->tm_mday < 1) {
time->tm_month--;
if (time->tm_month < 0) {
time->tm_month = 11;
time->tm_year--;
if (IsLeapYear(time->tm_year))
time->tm_yday = 365;
else
time->tm_yday = 364;
}
time->tm_mday = nDays[IsLeapYear(time->tm_year)][time->tm_month];
}
time->tm_wday--;
if (time->tm_wday < 0)
time->tm_wday = 6;
} else if (time->tm_hour > 23) {
/* Increment mday, yday, and wday */
time->tm_hour -= 24;
time->tm_mday++;
time->tm_yday++;
if (time->tm_mday >
nDays[IsLeapYear(time->tm_year)][time->tm_month]) {
time->tm_mday = 1;
time->tm_month++;
if (time->tm_month > 11) {
time->tm_month = 0;
time->tm_year++;
time->tm_yday = 0;
}
}
time->tm_wday++;
if (time->tm_wday > 6)
time->tm_wday = 0;
}
}
void
PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params)
{
int daysInMonth;
PRInt32 numDays;
/* Get back to GMT */
time->tm_sec -= time->tm_params.tp_gmt_offset
+ time->tm_params.tp_dst_offset;
time->tm_params.tp_gmt_offset = 0;
time->tm_params.tp_dst_offset = 0;
/* Now normalize GMT */
if (time->tm_usec < 0 || time->tm_usec >= 1000000) {
time->tm_sec += time->tm_usec / 1000000;
time->tm_usec %= 1000000;
if (time->tm_usec < 0) {
time->tm_usec += 1000000;
time->tm_sec--;
}
}
/* Note that we do not count leap seconds in this implementation */
if (time->tm_sec < 0 || time->tm_sec >= 60) {
time->tm_min += time->tm_sec / 60;
time->tm_sec %= 60;
if (time->tm_sec < 0) {
time->tm_sec += 60;
time->tm_min--;
}
}
if (time->tm_min < 0 || time->tm_min >= 60) {
time->tm_hour += time->tm_min / 60;
time->tm_min %= 60;
if (time->tm_min < 0) {
time->tm_min += 60;
time->tm_hour--;
}
}
if (time->tm_hour < 0 || time->tm_hour >= 24) {
time->tm_mday += time->tm_hour / 24;
time->tm_hour %= 24;
if (time->tm_hour < 0) {
time->tm_hour += 24;
time->tm_mday--;
}
}
/* Normalize month and year before mday */
if (time->tm_month < 0 || time->tm_month >= 12) {
time->tm_year += time->tm_month / 12;
time->tm_month %= 12;
if (time->tm_month < 0) {
time->tm_month += 12;
time->tm_year--;
}
}
/* Now that month and year are in proper range, normalize mday */
if (time->tm_mday < 1) {
/* mday too small */
do {
/* the previous month */
time->tm_month--;
if (time->tm_month < 0) {
time->tm_month = 11;
time->tm_year--;
}
time->tm_mday += nDays[IsLeapYear(time->tm_year)][time->tm_month];
} while (time->tm_mday < 1);
} else {
daysInMonth = nDays[IsLeapYear(time->tm_year)][time->tm_month];
while (time->tm_mday > daysInMonth) {
/* mday too large */
time->tm_mday -= daysInMonth;
time->tm_month++;
if (time->tm_month > 11) {
time->tm_month = 0;
time->tm_year++;
}
daysInMonth = nDays[IsLeapYear(time->tm_year)][time->tm_month];
}
}
/* Recompute yday and wday */
time->tm_yday = time->tm_mday +
lastDayOfMonth[IsLeapYear(time->tm_year)][time->tm_month];
numDays = DAYS_BETWEEN_YEARS(1970, time->tm_year) + time->tm_yday;
time->tm_wday = (numDays + 4) % 7;
if (time->tm_wday < 0) {
time->tm_wday += 7;
}
/* Recompute time parameters */
time->tm_params = params(time);
ApplySecOffset(time, time->tm_params.tp_gmt_offset
+ time->tm_params.tp_dst_offset);
}
/*
*------------------------------------------------------------------------
*
* PR_GMTParameters --
*
* Returns the PRTimeParameters for Greenwich Mean Time.
* Trivially, both the tp_gmt_offset and tp_dst_offset fields are 0.
*
*------------------------------------------------------------------------
*/
PRTimeParameters
PR_GMTParameters(const PRExplodedTime *gmt)
{
#if defined(XP_MAC)
#pragma unused (gmt)
#endif
PRTimeParameters retVal = { 0, 0 };
return retVal;
}
/*
* The following code implements PR_ParseTimeString(). It is based on
* ns/lib/xp/xp_time.c, revision 1.25, by Jamie Zawinski <jwz@netscape.com>.
*/
/*
* We only recognize the abbreviations of a small subset of time zones
* in North America, Europe, and Japan.
*
* PST/PDT: Pacific Standard/Daylight Time
* MST/MDT: Mountain Standard/Daylight Time
* CST/CDT: Central Standard/Daylight Time
* EST/EDT: Eastern Standard/Daylight Time
* AST: Atlantic Standard Time
* NST: Newfoundland Standard Time
* GMT: Greenwich Mean Time
* BST: British Summer Time
* MET: Middle Europe Time
* EET: Eastern Europe Time
* JST: Japan Standard Time
*/
typedef enum
{
TT_UNKNOWN,
TT_SUN, TT_MON, TT_TUE, TT_WED, TT_THU, TT_FRI, TT_SAT,
TT_JAN, TT_FEB, TT_MAR, TT_APR, TT_MAY, TT_JUN,
TT_JUL, TT_AUG, TT_SEP, TT_OCT, TT_NOV, TT_DEC,
TT_PST, TT_PDT, TT_MST, TT_MDT, TT_CST, TT_CDT, TT_EST, TT_EDT,
TT_AST, TT_NST, TT_GMT, TT_BST, TT_MET, TT_EET, TT_JST
} TIME_TOKEN;
/*
* This parses a time/date string into a PRTime
* (microseconds after "1-Jan-1970 00:00:00 GMT").
* It returns PR_SUCCESS on success, and PR_FAILURE
* if the time/date string can't be parsed.
*
* Many formats are handled, including:
*
* 14 Apr 89 03:20:12
* 14 Apr 89 03:20 GMT
* Fri, 17 Mar 89 4:01:33
* Fri, 17 Mar 89 4:01 GMT
* Mon Jan 16 16:12 PDT 1989
* Mon Jan 16 16:12 +0130 1989
* 6 May 1992 16:41-JST (Wednesday)
* 22-AUG-1993 10:59:12.82
* 22-AUG-1993 10:59pm
* 22-AUG-1993 12:59am
* 22-AUG-1993 12:59 PM
* Friday, August 04, 1995 3:54 PM
* 06/21/95 04:24:34 PM
* 20/06/95 21:07
* 95-06-08 19:32:48 EDT
*
* If the input string doesn't contain a description of the timezone,
* we consult the `default_to_gmt' to decide whether the string should
* be interpreted relative to the local time zone (PR_FALSE) or GMT (PR_TRUE).
* The correct value for this argument depends on what standard specified
* the time string which you are parsing.
*/
PRStatus
PR_ParseTimeString(
const char *string,
PRBool default_to_gmt,
PRTime *result_imploded)
{
PRExplodedTime tm;
PRExplodedTime *result = &tm;
TIME_TOKEN dotw = TT_UNKNOWN;
TIME_TOKEN month = TT_UNKNOWN;
TIME_TOKEN zone = TT_UNKNOWN;
int zone_offset = -1;
int dst_offset = 0;
int date = -1;
PRInt32 year = -1;
int hour = -1;
int min = -1;
int sec = -1;
const char *rest = string;
int iterations = 0;
PR_ASSERT(string && result);
if (!string || !result) return PR_FAILURE;
while (*rest)
{
if (iterations++ > 1000)
{
return PR_FAILURE;
}
switch (*rest)
{
case 'a': case 'A':
if (month == TT_UNKNOWN &&
(rest[1] == 'p' || rest[1] == 'P') &&
(rest[2] == 'r' || rest[2] == 'R'))
month = TT_APR;
else if (zone == TT_UNKNOWN &&
(rest[1] == 's' || rest[1] == 'S') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_AST;
else if (month == TT_UNKNOWN &&
(rest[1] == 'u' || rest[1] == 'U') &&
(rest[2] == 'g' || rest[2] == 'G'))
month = TT_AUG;
break;
case 'b': case 'B':
if (zone == TT_UNKNOWN &&
(rest[1] == 's' || rest[1] == 'S') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_BST;
break;
case 'c': case 'C':
if (zone == TT_UNKNOWN &&
(rest[1] == 'd' || rest[1] == 'D') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_CDT;
else if (zone == TT_UNKNOWN &&
(rest[1] == 's' || rest[1] == 'S') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_CST;
break;
case 'd': case 'D':
if (month == TT_UNKNOWN &&
(rest[1] == 'e' || rest[1] == 'E') &&
(rest[2] == 'c' || rest[2] == 'C'))
month = TT_DEC;
break;
case 'e': case 'E':
if (zone == TT_UNKNOWN &&
(rest[1] == 'd' || rest[1] == 'D') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_EDT;
else if (zone == TT_UNKNOWN &&
(rest[1] == 'e' || rest[1] == 'E') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_EET;
else if (zone == TT_UNKNOWN &&
(rest[1] == 's' || rest[1] == 'S') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_EST;
break;
case 'f': case 'F':
if (month == TT_UNKNOWN &&
(rest[1] == 'e' || rest[1] == 'E') &&
(rest[2] == 'b' || rest[2] == 'B'))
month = TT_FEB;
else if (dotw == TT_UNKNOWN &&
(rest[1] == 'r' || rest[1] == 'R') &&
(rest[2] == 'i' || rest[2] == 'I'))
dotw = TT_FRI;
break;
case 'g': case 'G':
if (zone == TT_UNKNOWN &&
(rest[1] == 'm' || rest[1] == 'M') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_GMT;
break;
case 'j': case 'J':
if (month == TT_UNKNOWN &&
(rest[1] == 'a' || rest[1] == 'A') &&
(rest[2] == 'n' || rest[2] == 'N'))
month = TT_JAN;
else if (zone == TT_UNKNOWN &&
(rest[1] == 's' || rest[1] == 'S') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_JST;
else if (month == TT_UNKNOWN &&
(rest[1] == 'u' || rest[1] == 'U') &&
(rest[2] == 'l' || rest[2] == 'L'))
month = TT_JUL;
else if (month == TT_UNKNOWN &&
(rest[1] == 'u' || rest[1] == 'U') &&
(rest[2] == 'n' || rest[2] == 'N'))
month = TT_JUN;
break;
case 'm': case 'M':
if (month == TT_UNKNOWN &&
(rest[1] == 'a' || rest[1] == 'A') &&
(rest[2] == 'r' || rest[2] == 'R'))
month = TT_MAR;
else if (month == TT_UNKNOWN &&
(rest[1] == 'a' || rest[1] == 'A') &&
(rest[2] == 'y' || rest[2] == 'Y'))
month = TT_MAY;
else if (zone == TT_UNKNOWN &&
(rest[1] == 'd' || rest[1] == 'D') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_MDT;
else if (zone == TT_UNKNOWN &&
(rest[1] == 'e' || rest[1] == 'E') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_MET;
else if (dotw == TT_UNKNOWN &&
(rest[1] == 'o' || rest[1] == 'O') &&
(rest[2] == 'n' || rest[2] == 'N'))
dotw = TT_MON;
else if (zone == TT_UNKNOWN &&
(rest[1] == 's' || rest[1] == 'S') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_MST;
break;
case 'n': case 'N':
if (month == TT_UNKNOWN &&
(rest[1] == 'o' || rest[1] == 'O') &&
(rest[2] == 'v' || rest[2] == 'V'))
month = TT_NOV;
else if (zone == TT_UNKNOWN &&
(rest[1] == 's' || rest[1] == 'S') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_NST;
break;
case 'o': case 'O':
if (month == TT_UNKNOWN &&
(rest[1] == 'c' || rest[1] == 'C') &&
(rest[2] == 't' || rest[2] == 'T'))
month = TT_OCT;
break;
case 'p': case 'P':
if (zone == TT_UNKNOWN &&
(rest[1] == 'd' || rest[1] == 'D') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_PDT;
else if (zone == TT_UNKNOWN &&
(rest[1] == 's' || rest[1] == 'S') &&
(rest[2] == 't' || rest[2] == 'T'))
zone = TT_PST;
break;
case 's': case 'S':
if (dotw == TT_UNKNOWN &&
(rest[1] == 'a' || rest[1] == 'A') &&
(rest[2] == 't' || rest[2] == 'T'))
dotw = TT_SAT;
else if (month == TT_UNKNOWN &&
(rest[1] == 'e' || rest[1] == 'E') &&
(rest[2] == 'p' || rest[2] == 'P'))
month = TT_SEP;
else if (dotw == TT_UNKNOWN &&
(rest[1] == 'u' || rest[1] == 'U') &&
(rest[2] == 'n' || rest[2] == 'N'))
dotw = TT_SUN;
break;
case 't': case 'T':
if (dotw == TT_UNKNOWN &&
(rest[1] == 'h' || rest[1] == 'H') &&
(rest[2] == 'u' || rest[2] == 'U'))
dotw = TT_THU;
else if (dotw == TT_UNKNOWN &&
(rest[1] == 'u' || rest[1] == 'U') &&
(rest[2] == 'e' || rest[2] == 'E'))
dotw = TT_TUE;
break;
case 'u': case 'U':
if (zone == TT_UNKNOWN &&
(rest[1] == 't' || rest[1] == 'T') &&
!(rest[2] >= 'A' && rest[2] <= 'Z') &&
!(rest[2] >= 'a' && rest[2] <= 'z'))
/* UT is the same as GMT but UTx is not. */
zone = TT_GMT;
break;
case 'w': case 'W':
if (dotw == TT_UNKNOWN &&
(rest[1] == 'e' || rest[1] == 'E') &&
(rest[2] == 'd' || rest[2] == 'D'))
dotw = TT_WED;
break;
case '+': case '-':
{
const char *end;
int sign;
if (zone_offset != -1)
{
/* already got one... */
rest++;
break;
}
if (zone != TT_UNKNOWN && zone != TT_GMT)
{
/* GMT+0300 is legal, but PST+0300 is not. */
rest++;
break;
}
sign = ((*rest == '+') ? 1 : -1);
rest++; /* move over sign */
end = rest;
while (*end >= '0' && *end <= '9')
end++;
if (rest == end) /* no digits here */
break;
if ((end - rest) == 4)
/* offset in HHMM */
zone_offset = (((((rest[0]-'0')*10) + (rest[1]-'0')) * 60) +
(((rest[2]-'0')*10) + (rest[3]-'0')));
else if ((end - rest) == 2)
/* offset in hours */
zone_offset = (((rest[0]-'0')*10) + (rest[1]-'0')) * 60;
else if ((end - rest) == 1)
/* offset in hours */
zone_offset = (rest[0]-'0') * 60;
else
/* 3 or >4 */
break;
zone_offset *= sign;
zone = TT_GMT;
break;
}
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
int tmp_hour = -1;
int tmp_min = -1;
int tmp_sec = -1;
const char *end = rest + 1;
while (*end >= '0' && *end <= '9')
end++;
/* end is now the first character after a range of digits. */
if (*end == ':')
{
if (hour >= 0 && min >= 0) /* already got it */
break;
/* We have seen "[0-9]+:", so this is probably HH:MM[:SS] */
if ((end - rest) > 2)
/* it is [0-9][0-9][0-9]+: */
break;
else if ((end - rest) == 2)
tmp_hour = ((rest[0]-'0')*10 +
(rest[1]-'0'));
else
tmp_hour = (rest[0]-'0');
/* move over the colon, and parse minutes */
rest = ++end;
while (*end >= '0' && *end <= '9')
end++;
if (end == rest)
/* no digits after first colon? */
break;
else if ((end - rest) > 2)
/* it is [0-9][0-9][0-9]+: */
break;
else if ((end - rest) == 2)
tmp_min = ((rest[0]-'0')*10 +
(rest[1]-'0'));
else
tmp_min = (rest[0]-'0');
/* now go for seconds */
rest = end;
if (*rest == ':')
rest++;
end = rest;
while (*end >= '0' && *end <= '9')
end++;
if (end == rest)
/* no digits after second colon - that's ok. */
;
else if ((end - rest) > 2)
/* it is [0-9][0-9][0-9]+: */
break;
else if ((end - rest) == 2)
tmp_sec = ((rest[0]-'0')*10 +
(rest[1]-'0'));
else
tmp_sec = (rest[0]-'0');
/* If we made it here, we've parsed hour and min,
and possibly sec, so it worked as a unit. */
/* skip over whitespace and see if there's an AM or PM
directly following the time.
*/
if (tmp_hour <= 12)
{
const char *s = end;
while (*s && (*s == ' ' || *s == '\t'))
s++;
if ((s[0] == 'p' || s[0] == 'P') &&
(s[1] == 'm' || s[1] == 'M'))
/* 10:05pm == 22:05, and 12:05pm == 12:05 */
tmp_hour = (tmp_hour == 12 ? 12 : tmp_hour + 12);
else if (tmp_hour == 12 &&
(s[0] == 'a' || s[0] == 'A') &&
(s[1] == 'm' || s[1] == 'M'))
/* 12:05am == 00:05 */
tmp_hour = 0;
}
hour = tmp_hour;
min = tmp_min;
sec = tmp_sec;
rest = end;
break;
}
else if ((*end == '/' || *end == '-') &&
end[1] >= '0' && end[1] <= '9')
{
/* Perhaps this is 6/16/95, 16/6/95, 6-16-95, or 16-6-95
or even 95-06-05...
#### But it doesn't handle 1995-06-22.
*/
int n1, n2, n3;
const char *s;
if (month != TT_UNKNOWN)
/* if we saw a month name, this can't be. */
break;
s = rest;
n1 = (*s++ - '0'); /* first 1 or 2 digits */
if (*s >= '0' && *s <= '9')
n1 = n1*10 + (*s++ - '0');
if (*s != '/' && *s != '-') /* slash */
break;
s++;
if (*s < '0' || *s > '9') /* second 1 or 2 digits */
break;
n2 = (*s++ - '0');
if (*s >= '0' && *s <= '9')
n2 = n2*10 + (*s++ - '0');
if (*s != '/' && *s != '-') /* slash */
break;
s++;
if (*s < '0' || *s > '9') /* third 1, 2, 4, or 5 digits */
break;
n3 = (*s++ - '0');
if (*s >= '0' && *s <= '9')
n3 = n3*10 + (*s++ - '0');
if (*s >= '0' && *s <= '9') /* optional digits 3, 4, and 5 */
{
n3 = n3*10 + (*s++ - '0');
if (*s < '0' || *s > '9')
break;
n3 = n3*10 + (*s++ - '0');
if (*s >= '0' && *s <= '9')
n3 = n3*10 + (*s++ - '0');
}
if ((*s >= '0' && *s <= '9') || /* followed by non-alphanum */
(*s >= 'A' && *s <= 'Z') ||
(*s >= 'a' && *s <= 'z'))
break;
/* Ok, we parsed three 1-2 digit numbers, with / or -
between them. Now decide what the hell they are
(DD/MM/YY or MM/DD/YY or YY/MM/DD.)
*/
if (n1 > 31 || n1 == 0) /* must be YY/MM/DD */
{
if (n2 > 12) break;
if (n3 > 31) break;
year = n1;
if (year < 70)
year += 2000;
else if (year < 100)
year += 1900;
month = (TIME_TOKEN)(n2 + ((int)TT_JAN) - 1);
date = n3;
rest = s;
break;
}
if (n1 > 12 && n2 > 12) /* illegal */
{
rest = s;
break;
}
if (n3 < 70)
n3 += 2000;
else if (n3 < 100)
n3 += 1900;
if (n1 > 12) /* must be DD/MM/YY */
{
date = n1;
month = (TIME_TOKEN)(n2 + ((int)TT_JAN) - 1);
year = n3;
}
else /* assume MM/DD/YY */
{
/* #### In the ambiguous case, should we consult the
locale to find out the local default? */
month = (TIME_TOKEN)(n1 + ((int)TT_JAN) - 1);
date = n2;
year = n3;
}
rest = s;
}
else if ((*end >= 'A' && *end <= 'Z') ||
(*end >= 'a' && *end <= 'z'))
/* Digits followed by non-punctuation - what's that? */
;
else if ((end - rest) == 5) /* five digits is a year */
year = (year < 0
? ((rest[0]-'0')*10000L +
(rest[1]-'0')*1000L +
(rest[2]-'0')*100L +
(rest[3]-'0')*10L +
(rest[4]-'0'))
: year);
else if ((end - rest) == 4) /* four digits is a year */
year = (year < 0
? ((rest[0]-'0')*1000L +
(rest[1]-'0')*100L +
(rest[2]-'0')*10L +
(rest[3]-'0'))
: year);
else if ((end - rest) == 2) /* two digits - date or year */
{
int n = ((rest[0]-'0')*10 +
(rest[1]-'0'));
/* If we don't have a date (day of the month) and we see a number
less than 32, then assume that is the date.
Otherwise, if we have a date and not a year, assume this is the
year. If it is less than 70, then assume it refers to the 21st
century. If it is two digits (>= 70), assume it refers to this
century. Otherwise, assume it refers to an unambiguous year.
The world will surely end soon.
*/
if (date < 0 && n < 32)
date = n;
else if (year < 0)
{
if (n < 70)
year = 2000 + n;
else if (n < 100)
year = 1900 + n;
else
year = n;
}
/* else what the hell is this. */
}
else if ((end - rest) == 1) /* one digit - date */
date = (date < 0 ? (rest[0]-'0') : date);
/* else, three or more than five digits - what's that? */
break;
}
}
/* Skip to the end of this token, whether we parsed it or not.
Tokens are delimited by whitespace, or ,;-/
But explicitly not :+-.
*/
while (*rest &&
*rest != ' ' && *rest != '\t' &&
*rest != ',' && *rest != ';' &&
*rest != '-' && *rest != '+' &&
*rest != '/' &&
*rest != '(' && *rest != ')' && *rest != '[' && *rest != ']')
rest++;
/* skip over uninteresting chars. */
SKIP_MORE:
while (*rest &&
(*rest == ' ' || *rest == '\t' ||
*rest == ',' || *rest == ';' || *rest == '/' ||
*rest == '(' || *rest == ')' || *rest == '[' || *rest == ']'))
rest++;
/* "-" is ignored at the beginning of a token if we have not yet
parsed a year (e.g., the second "-" in "30-AUG-1966"), or if
the character after the dash is not a digit. */
if (*rest == '-' && ((rest > string && isalpha(rest[-1]) && year < 0)
|| rest[1] < '0' || rest[1] > '9'))
{
rest++;
goto SKIP_MORE;
}
}
if (zone != TT_UNKNOWN && zone_offset == -1)
{
switch (zone)
{
case TT_PST: zone_offset = -8 * 60; break;
case TT_PDT: zone_offset = -8 * 60; dst_offset = 1 * 60; break;
case TT_MST: zone_offset = -7 * 60; break;
case TT_MDT: zone_offset = -7 * 60; dst_offset = 1 * 60; break;
case TT_CST: zone_offset = -6 * 60; break;
case TT_CDT: zone_offset = -6 * 60; dst_offset = 1 * 60; break;
case TT_EST: zone_offset = -5 * 60; break;
case TT_EDT: zone_offset = -5 * 60; dst_offset = 1 * 60; break;
case TT_AST: zone_offset = -4 * 60; break;
case TT_NST: zone_offset = -3 * 60 - 30; break;
case TT_GMT: zone_offset = 0 * 60; break;
case TT_BST: zone_offset = 0 * 60; dst_offset = 1 * 60; break;
case TT_MET: zone_offset = 1 * 60; break;
case TT_EET: zone_offset = 2 * 60; break;
case TT_JST: zone_offset = 9 * 60; break;
default:
PR_ASSERT (0);
break;
}
}
/* If we didn't find a year, month, or day-of-the-month, we can't
possibly parse this, and in fact, mktime() will do something random
(I'm seeing it return "Tue Feb 5 06:28:16 2036", which is no doubt
a numerologically significant date... */
if (month == TT_UNKNOWN || date == -1 || year == -1 || year > PR_INT16_MAX)
return PR_FAILURE;
memset(result, 0, sizeof(*result));
if (sec != -1)
result->tm_sec = sec;
if (min != -1)
result->tm_min = min;
if (hour != -1)
result->tm_hour = hour;
if (date != -1)
result->tm_mday = date;
if (month != TT_UNKNOWN)
result->tm_month = (((int)month) - ((int)TT_JAN));
if (year != -1)
result->tm_year = year;
if (dotw != TT_UNKNOWN)
result->tm_wday = (((int)dotw) - ((int)TT_SUN));
/*
* Mainly to compute wday and yday, but normalized time is also required
* by the check below that works around a Visual C++ 2005 mktime problem.
*/
PR_NormalizeTime(result, PR_GMTParameters);
/* The remaining work is to set the gmt and dst offsets in tm_params. */
if (zone == TT_UNKNOWN && default_to_gmt)
{
/* No zone was specified, so pretend the zone was GMT. */
zone = TT_GMT;
zone_offset = 0;
}
if (zone_offset == -1)
{
/* no zone was specified, and we're to assume that everything
is local. */
struct tm localTime;
time_t secs;
PR_ASSERT(result->tm_month > -1 &&
result->tm_mday > 0 &&
result->tm_hour > -1 &&
result->tm_min > -1 &&
result->tm_sec > -1);
/*
* To obtain time_t from a tm structure representing the local
* time, we call mktime(). However, we need to see if we are
* on 1-Jan-1970 or before. If we are, we can't call mktime()
* because mktime() will crash on win16. In that case, we
* calculate zone_offset based on the zone offset at
* 00:00:00, 2 Jan 1970 GMT, and subtract zone_offset from the
* date we are parsing to transform the date to GMT. We also
* do so if mktime() returns (time_t) -1 (time out of range).
*/
/* month, day, hours, mins and secs are always non-negative
so we dont need to worry about them. */
if(result->tm_year >= 1970)
{
PRInt64 usec_per_sec;
localTime.tm_sec = result->tm_sec;
localTime.tm_min = result->tm_min;
localTime.tm_hour = result->tm_hour;
localTime.tm_mday = result->tm_mday;
localTime.tm_mon = result->tm_month;
localTime.tm_year = result->tm_year - 1900;
/* Set this to -1 to tell mktime "I don't care". If you set
it to 0 or 1, you are making assertions about whether the
date you are handing it is in daylight savings mode or not;
and if you're wrong, it will "fix" it for you. */
localTime.tm_isdst = -1;
#if _MSC_VER == 1400 /* 1400 = Visual C++ 2005 (8.0) */
/*
* mktime will return (time_t) -1 if the input is a date
* after 23:59:59, December 31, 3000, US Pacific Time (not
* UTC as documented):
* http://msdn.microsoft.com/en-us/library/d1y53h2a(VS.80).aspx
* But if the year is 3001, mktime also invokes the invalid
* parameter handler, causing the application to crash. This
* problem has been reported in
* http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=266036.
* We avoid this crash by not calling mktime if the date is
* out of range. To use a simple test that works in any time
* zone, we consider year 3000 out of range as well. (See
* bug 480740.)
*/
if (result->tm_year >= 3000) {
/* Emulate what mktime would have done. */
errno = EINVAL;
secs = (time_t) -1;
} else {
secs = mktime(&localTime);
}
#else
secs = mktime(&localTime);
#endif
if (secs != (time_t) -1)
{
PRTime usecs64;
LL_I2L(usecs64, secs);
LL_I2L(usec_per_sec, PR_USEC_PER_SEC);
LL_MUL(usecs64, usecs64, usec_per_sec);
*result_imploded = usecs64;
return PR_SUCCESS;
}
}
/* So mktime() can't handle this case. We assume the
zone_offset for the date we are parsing is the same as
the zone offset on 00:00:00 2 Jan 1970 GMT. */
secs = 86400;
localtime_r(&secs, &localTime);
zone_offset = localTime.tm_min
+ 60 * localTime.tm_hour
+ 1440 * (localTime.tm_mday - 2);
}
result->tm_params.tp_gmt_offset = zone_offset * 60;
result->tm_params.tp_dst_offset = dst_offset * 60;
*result_imploded = PR_ImplodeTime(result);
return PR_SUCCESS;
}
| [
"karun.matharu@gmail.com"
] | karun.matharu@gmail.com |
fdf89fb53bf5dc64ca6f61cd347d8a11ee192317 | 1385c32207e378f47bf2153956825e89228b8de1 | /source/hpp/Win32/berlin/ALFmxStdCtrls.hpp | 19992bb594674757f0c02919c39fbc7c46017359 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-free-unknown"
] | permissive | marlonnardi/alcinoe | 4d5dc32328fff661792f5805a799e16b001688d1 | 5e14b2fca7adcc38e483771055b5623501433334 | refs/heads/master | 2020-08-12T09:38:29.484894 | 2020-05-17T23:17:32 | 2020-05-17T23:17:32 | 163,667,647 | 1 | 0 | Apache-2.0 | 2019-10-12T22:52:31 | 2018-12-31T12:34:34 | Pascal | UTF-8 | C++ | false | false | 24,729 | hpp | // CodeGear C++Builder
// Copyright (c) 1995, 2016 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'ALFmxStdCtrls.pas' rev: 31.00 (Windows)
#ifndef AlfmxstdctrlsHPP
#define AlfmxstdctrlsHPP
#pragma delphiheader begin
#pragma option push
#pragma option -w- // All warnings off
#pragma option -Vx // Zero-length empty class member
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.Classes.hpp>
#include <System.Types.hpp>
#include <System.UITypes.hpp>
#include <System.ImageList.hpp>
#include <System.Math.hpp>
#include <System.Rtti.hpp>
#include <System.Messaging.hpp>
#include <FMX.Types.hpp>
#include <FMX.StdActns.hpp>
#include <FMX.Controls.hpp>
#include <FMX.Graphics.hpp>
#include <FMX.StdCtrls.hpp>
#include <FMX.ActnList.hpp>
#include <FMX.ImgList.hpp>
#include <ALFmxInertialMovement.hpp>
#include <ALFmxObjects.hpp>
#include <FMX.Objects.hpp>
//-- user supplied -----------------------------------------------------------
namespace Alfmxstdctrls
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TALAniIndicator;
class DELPHICLASS TALTrackThumbGlyph;
class DELPHICLASS TALTrackThumb;
class DELPHICLASS TALTrackBackground;
class DELPHICLASS TALTrackHighlight;
class DELPHICLASS TALCustomTrack;
class DELPHICLASS TALTrackBar;
class DELPHICLASS TALScrollBar;
class DELPHICLASS TALRangeTrackBar;
class DELPHICLASS TALCheckBox;
class DELPHICLASS TAlRadioButton;
//-- type declarations -------------------------------------------------------
class PASCALIMPLEMENTATION TALAniIndicator : public Fmx::Controls::TControl
{
typedef Fmx::Controls::TControl inherited;
private:
Fmx::Types::TTimer* fTimer;
int finterval;
int FFrameCount;
int FRowCount;
System::UnicodeString fResourceName;
System::Types::TSmallPoint fFrameIndex;
float FScreenScale;
Fmx::Graphics::TBitmap* fBufBitmap;
System::Types::TRectF fBufBitmapRect;
System::Types::TSizeF fBufSize;
void __fastcall setResourceName(const System::UnicodeString Value);
void __fastcall onTimer(System::TObject* sender);
bool __fastcall ResourceNameStored(void);
protected:
virtual void __fastcall Paint(void);
__property Fmx::Graphics::TBitmap* BufBitmap = {read=fBufBitmap};
virtual bool __fastcall EnabledStored(void);
virtual void __fastcall SetEnabled(const bool Value);
virtual System::Types::TSizeF __fastcall GetDefaultSize(void);
public:
__fastcall virtual TALAniIndicator(System::Classes::TComponent* AOwner);
__fastcall virtual ~TALAniIndicator(void);
virtual Fmx::Graphics::TBitmap* __fastcall MakeBufBitmap(void);
virtual void __fastcall clearBufBitmap(void);
__published:
__property Align = {default=0};
__property Anchors;
__property Cursor = {default=0};
__property DragMode = {default=0};
__property EnableDragHighlight = {default=1};
__property Enabled = {default=0};
__property Locked = {default=0};
__property Height;
__property Hint = {default=0};
__property HitTest = {default=1};
__property Padding;
__property Opacity;
__property Margins;
__property PopupMenu;
__property Position;
__property RotationAngle = {default=0};
__property RotationCenter;
__property Scale;
__property Size;
__property TouchTargetExpansion;
__property Visible = {default=1};
__property Width;
__property int FrameCount = {read=FFrameCount, write=FFrameCount, default=20};
__property int RowCount = {read=FRowCount, write=FRowCount, default=4};
__property int interval = {read=finterval, write=finterval, default=50};
__property System::UnicodeString ResourceName = {read=fResourceName, write=setResourceName, stored=ResourceNameStored};
__property ParentShowHint = {default=1};
__property ShowHint;
__property OnDragEnter;
__property OnDragLeave;
__property OnDragOver;
__property OnDragDrop;
__property OnDragEnd;
__property OnKeyDown;
__property OnKeyUp;
__property OnCanFocus;
__property OnEnter;
__property OnExit;
__property OnClick;
__property OnDblClick;
__property OnMouseDown;
__property OnMouseMove;
__property OnMouseUp;
__property OnMouseWheel;
__property OnMouseEnter;
__property OnMouseLeave;
__property OnPainting;
__property OnPaint;
__property OnResize;
};
class PASCALIMPLEMENTATION TALTrackThumbGlyph : public Alfmxobjects::TalImage
{
typedef Alfmxobjects::TalImage inherited;
public:
__fastcall virtual TALTrackThumbGlyph(System::Classes::TComponent* AOwner);
__published:
__property Align = {default=9};
__property Locked = {default=1};
__property HitTest = {default=0};
public:
/* TalImage.Destroy */ inline __fastcall virtual ~TALTrackThumbGlyph(void) { }
};
class PASCALIMPLEMENTATION TALTrackThumb : public Alfmxobjects::TALRectangle
{
typedef Alfmxobjects::TALRectangle inherited;
private:
Fmx::Stdactns::TValueRange* fValueRange;
TALCustomTrack* FTrack;
TALTrackThumbGlyph* FGlyph;
System::Types::TPointF FDownOffset;
float fTrackDownOffset;
bool FPressed;
int FDeadZoneBeforeAcquireScrolling;
bool fScrollingAcquiredByMe;
bool fScrollingAcquiredByOther;
int fScrollingAcquiredByOtherMessageID;
void __fastcall setScrollingAcquiredByMe(const bool Value);
void __fastcall ScrollingAcquiredByOtherHandler(System::TObject* const Sender, System::Messaging::TMessageBase* const M);
float __fastcall PointToValue(float X, float Y);
public:
__fastcall TALTrackThumb(TALCustomTrack* const ATrack, Fmx::Stdactns::TValueRange* const aValueRange, const bool aWithGlyphObj);
__fastcall virtual ~TALTrackThumb(void);
virtual void __fastcall MouseDown(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
virtual void __fastcall MouseMove(System::Classes::TShiftState Shift, float X, float Y);
virtual void __fastcall MouseUp(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
virtual void __fastcall DoMouseLeave(void);
virtual System::Types::TRectF __fastcall GetDefaultTouchTargetExpansion(void);
__property bool IsPressed = {read=FPressed, nodefault};
__property int DeadZoneBeforeAcquireScrolling = {read=FDeadZoneBeforeAcquireScrolling, write=FDeadZoneBeforeAcquireScrolling, default=5};
__published:
__property TouchTargetExpansion;
__property Locked = {default=1};
__property Position = {stored=false};
__property Size = {stored=false};
__property TALTrackThumbGlyph* Glyph = {read=FGlyph};
__property Cursor = {default=-21};
};
class PASCALIMPLEMENTATION TALTrackBackground : public Alfmxobjects::TALRectangle
{
typedef Alfmxobjects::TALRectangle inherited;
public:
__fastcall virtual TALTrackBackground(System::Classes::TComponent* AOwner);
__published:
__property Locked = {default=1};
__property HitTest = {default=0};
public:
/* TALRectangle.Destroy */ inline __fastcall virtual ~TALTrackBackground(void) { }
};
class PASCALIMPLEMENTATION TALTrackHighlight : public Alfmxobjects::TALRectangle
{
typedef Alfmxobjects::TALRectangle inherited;
public:
__fastcall virtual TALTrackHighlight(System::Classes::TComponent* AOwner);
__published:
__property Locked = {default=1};
__property Position = {stored=false};
__property HitTest = {default=0};
public:
/* TALRectangle.Destroy */ inline __fastcall virtual ~TALTrackHighlight(void) { }
};
class PASCALIMPLEMENTATION TALCustomTrack : public Fmx::Controls::TControl
{
typedef Fmx::Controls::TControl inherited;
private:
Fmx::Stdactns::TValueRange* FValueRange;
Fmx::Stdactns::TBaseValueRange* FDefaultValueRange;
bool __fastcall GetIsTracking(void);
Fmx::Stdactns::TCustomValueRange* __fastcall GetValueRange(void);
void __fastcall SetValueRange(Fmx::Stdactns::TCustomValueRange* const AValue);
void __fastcall SetValueRange_(Fmx::Stdactns::TValueRange* const Value);
bool __fastcall FrequencyStored(void);
bool __fastcall MaxStored(void);
bool __fastcall MinStored(void);
void __fastcall SetThumbSize(const float Value);
bool __fastcall ThumbSizeStored(void);
bool __fastcall ViewportSizeStored(void);
protected:
System::Classes::TNotifyEvent FOnChange;
System::Classes::TNotifyEvent FOnTracking;
bool FIgnoreViewportSize;
Fmx::Controls::TOrientation FOrientation;
bool FTracking;
float FThumbSize;
float FMinThumbSize;
TALTrackThumb* FThumb;
TALTrackBackground* FBackGround;
TALTrackHighlight* FHighlight;
virtual void __fastcall SetViewportSize(const float Value);
virtual float __fastcall GetViewportSize(void);
virtual float __fastcall GetFrequency(void);
virtual void __fastcall SetFrequency(const float Value);
virtual float __fastcall GetMax(void);
virtual void __fastcall SetMax(const float Value);
virtual float __fastcall GetMin(void);
virtual void __fastcall SetMin(const float Value);
virtual float __fastcall GetValue(void);
virtual void __fastcall SetValue(float Value);
virtual bool __fastcall ValueStored(void);
virtual System::Rtti::TValue __fastcall GetData(void);
virtual void __fastcall SetData(const System::Rtti::TValue &Value);
virtual void __fastcall SetOrientation(const Fmx::Controls::TOrientation Value);
virtual System::Types::TRectF __fastcall GetThumbRect(const float Value, TALTrackThumb* const aThumb)/* overload */;
virtual void __fastcall KeyDown(System::Word &Key, System::WideChar &KeyChar, System::Classes::TShiftState Shift);
virtual System::Types::TRectF __fastcall GetDefaultTouchTargetExpansion(void);
virtual int __fastcall GetThumbSize(bool &IgnoreViewportSize);
virtual void __fastcall DoRealign(void);
__property bool IsTracking = {read=GetIsTracking, nodefault};
virtual void __fastcall Loaded(void);
virtual void __fastcall DoChanged(void);
virtual void __fastcall DoTracking(void);
virtual Fmx::Stdactns::TValueRange* __fastcall CreateValueRangeTrack(void);
__property Fmx::Stdactns::TBaseValueRange* DefaultValueRange = {read=FDefaultValueRange};
__property Fmx::Stdactns::TValueRange* ValueRange = {read=FValueRange, write=SetValueRange_, stored=ValueStored};
__property float Value = {read=GetValue, write=SetValue, stored=ValueStored};
__property TALTrackThumb* Thumb = {read=FThumb};
virtual void __fastcall UpdateHighlight(void);
public:
__fastcall virtual TALCustomTrack(System::Classes::TComponent* AOwner);
__fastcall virtual ~TALCustomTrack(void);
virtual void __fastcall AfterConstruction(void);
__property float Min = {read=GetMin, write=SetMin, stored=MinStored};
__property float Max = {read=GetMax, write=SetMax, stored=MaxStored};
__property float Frequency = {read=GetFrequency, write=SetFrequency, stored=FrequencyStored};
__property float ViewportSize = {read=GetViewportSize, write=SetViewportSize, stored=ViewportSizeStored};
__property Fmx::Controls::TOrientation Orientation = {read=FOrientation, write=SetOrientation, nodefault};
__property bool Tracking = {read=FTracking, write=FTracking, default=1};
__property float ThumbSize = {read=FThumbSize, write=SetThumbSize, stored=ThumbSizeStored};
__property TALTrackBackground* BackGround = {read=FBackGround};
__property TALTrackHighlight* Highlight = {read=FHighlight};
__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
__property System::Classes::TNotifyEvent OnTracking = {read=FOnTracking, write=FOnTracking};
private:
void *__IValueRange; // Fmx::Stdactns::IValueRange
public:
#if defined(MANAGED_INTERFACE_OPERATORS)
// {6DFA65EF-A8BF-4D58-9655-664B50C30312}
operator Fmx::Stdactns::_di_IValueRange()
{
Fmx::Stdactns::_di_IValueRange intf;
this->GetInterface(intf);
return intf;
}
#else
operator Fmx::Stdactns::IValueRange*(void) { return (Fmx::Stdactns::IValueRange*)&__IValueRange; }
#endif
};
class PASCALIMPLEMENTATION TALTrackBar : public TALCustomTrack
{
typedef TALCustomTrack inherited;
protected:
virtual System::Types::TSizeF __fastcall GetDefaultSize(void);
public:
__fastcall virtual TALTrackBar(System::Classes::TComponent* AOwner);
__property ValueRange;
__published:
__property ThumbSize = {default=0};
__property Thumb;
__property BackGround;
__property Highlight;
__property Align = {default=0};
__property Anchors;
__property CanFocus = {default=1};
__property CanParentFocus = {default=0};
__property ClipChildren = {default=0};
__property ClipParent = {default=0};
__property Cursor = {default=0};
__property DisableFocusEffect = {default=0};
__property DragMode = {default=0};
__property EnableDragHighlight = {default=1};
__property Enabled;
__property Frequency;
__property Locked = {default=0};
__property Height;
__property Hint = {default=0};
__property HitTest = {default=1};
__property Padding;
__property Min;
__property Max;
__property Orientation;
__property Opacity;
__property Margins;
__property PopupMenu;
__property Position;
__property RotationAngle = {default=0};
__property RotationCenter;
__property Scale;
__property Size;
__property TabOrder = {default=-1};
__property TabStop = {default=1};
__property TouchTargetExpansion;
__property Tracking = {default=1};
__property Value;
__property Visible;
__property Width;
__property ParentShowHint = {default=1};
__property ShowHint;
__property OnChange;
__property OnTracking;
__property OnDragEnter;
__property OnDragLeave;
__property OnDragOver;
__property OnDragDrop;
__property OnDragEnd;
__property OnKeyDown;
__property OnKeyUp;
__property OnCanFocus;
__property OnClick;
__property OnDblClick;
__property OnEnter;
__property OnExit;
__property OnMouseDown;
__property OnMouseMove;
__property OnMouseUp;
__property OnMouseWheel;
__property OnMouseEnter;
__property OnMouseLeave;
__property OnPainting;
__property OnPaint;
__property OnResize;
public:
/* TALCustomTrack.Destroy */ inline __fastcall virtual ~TALTrackBar(void) { }
};
class PASCALIMPLEMENTATION TALScrollBar : public TALCustomTrack
{
typedef TALCustomTrack inherited;
protected:
virtual System::Types::TSizeF __fastcall GetDefaultSize(void);
public:
__fastcall virtual TALScrollBar(System::Classes::TComponent* AOwner);
__property ValueRange;
__published:
__property Thumb;
__property BackGround;
__property Align = {default=0};
__property Anchors;
__property CanFocus = {default=0};
__property CanParentFocus = {default=0};
__property ClipChildren = {default=0};
__property ClipParent = {default=0};
__property Cursor = {default=0};
__property DragMode = {default=0};
__property EnableDragHighlight = {default=1};
__property Enabled;
__property Locked = {default=0};
__property Height;
__property HitTest = {default=1};
__property Padding;
__property Min;
__property Max;
__property Orientation;
__property Opacity;
__property Margins;
__property PopupMenu;
__property Position;
__property RotationAngle = {default=0};
__property RotationCenter;
__property Scale;
__property Size;
__property TabOrder = {default=-1};
__property TabStop = {default=1};
__property TouchTargetExpansion;
__property Value;
__property Visible;
__property Width;
__property ViewportSize;
__property OnChange;
__property OnDragEnter;
__property OnDragLeave;
__property OnDragOver;
__property OnDragDrop;
__property OnDragEnd;
__property OnKeyDown;
__property OnKeyUp;
__property OnCanFocus;
__property OnClick;
__property OnDblClick;
__property OnEnter;
__property OnExit;
__property OnMouseDown;
__property OnMouseMove;
__property OnMouseUp;
__property OnMouseWheel;
__property OnMouseEnter;
__property OnMouseLeave;
__property OnPainting;
__property OnPaint;
__property OnResize;
public:
/* TALCustomTrack.Destroy */ inline __fastcall virtual ~TALScrollBar(void) { }
};
class PASCALIMPLEMENTATION TALRangeTrackBar : public TALCustomTrack
{
typedef TALCustomTrack inherited;
private:
Fmx::Stdactns::TValueRange* FMaxValueRange;
protected:
TALTrackThumb* FMaxThumb;
virtual void __fastcall SetViewportSize(const float Value);
virtual void __fastcall SetFrequency(const float Value);
virtual void __fastcall SetMax(const float Value);
virtual void __fastcall SetMin(const float Value);
virtual bool __fastcall MaxValueStored(void);
virtual System::Types::TSizeF __fastcall GetDefaultSize(void);
virtual void __fastcall SetValue(float Value);
virtual float __fastcall GetMaxValue(void);
virtual void __fastcall SetMaxValue(float Value);
virtual void __fastcall Loaded(void);
virtual void __fastcall DoRealign(void);
virtual void __fastcall UpdateHighlight(void);
public:
__fastcall virtual TALRangeTrackBar(System::Classes::TComponent* AOwner);
__fastcall virtual ~TALRangeTrackBar(void);
__published:
__property ThumbSize = {default=0};
__property TALTrackThumb* MinThumb = {read=FThumb};
__property TALTrackThumb* MaxThumb = {read=FMaxThumb};
__property BackGround;
__property Highlight;
__property Align = {default=0};
__property Anchors;
__property CanFocus = {default=1};
__property CanParentFocus = {default=0};
__property ClipChildren = {default=0};
__property ClipParent = {default=0};
__property Cursor = {default=0};
__property DisableFocusEffect = {default=0};
__property DragMode = {default=0};
__property EnableDragHighlight = {default=1};
__property Enabled;
__property Frequency;
__property Locked = {default=0};
__property Height;
__property Hint = {default=0};
__property HitTest = {default=1};
__property Padding;
__property Min;
__property Max;
__property float MinValue = {read=GetValue, write=SetValue, stored=ValueStored};
__property float MaxValue = {read=GetMaxValue, write=SetMaxValue, stored=MaxValueStored};
__property Orientation;
__property Opacity;
__property Margins;
__property PopupMenu;
__property Position;
__property RotationAngle = {default=0};
__property RotationCenter;
__property Scale;
__property Size;
__property TabOrder = {default=-1};
__property TabStop = {default=1};
__property TouchTargetExpansion;
__property Tracking = {default=1};
__property Value;
__property Visible;
__property Width;
__property ParentShowHint = {default=1};
__property ShowHint;
__property OnChange;
__property OnTracking;
__property OnDragEnter;
__property OnDragLeave;
__property OnDragOver;
__property OnDragDrop;
__property OnDragEnd;
__property OnKeyDown;
__property OnKeyUp;
__property OnCanFocus;
__property OnClick;
__property OnDblClick;
__property OnEnter;
__property OnExit;
__property OnMouseDown;
__property OnMouseMove;
__property OnMouseUp;
__property OnMouseWheel;
__property OnMouseEnter;
__property OnMouseLeave;
__property OnPainting;
__property OnPaint;
__property OnResize;
};
class PASCALIMPLEMENTATION TALCheckBox : public Fmx::Controls::TControl
{
typedef Fmx::Controls::TControl inherited;
private:
float FScreenScale;
Fmx::Graphics::TBitmap* fBufBitmap;
System::Types::TRectF fBufBitmapRect;
System::Types::TSizeF fBufSize;
System::UnicodeString FbufResourceName;
bool FPressing;
System::Classes::TNotifyEvent FOnChange;
bool FIsPressed;
bool FIsChecked;
System::UnicodeString fImageCheckedResourceName;
System::UnicodeString fImageUncheckedResourceName;
Alfmxobjects::TALImageWrapMode FWrapMode;
void __fastcall setImageCheckedResourceName(const System::UnicodeString Value);
void __fastcall setImageUncheckedResourceName(const System::UnicodeString Value);
void __fastcall SetWrapMode(const Alfmxobjects::TALImageWrapMode Value);
protected:
virtual void __fastcall Paint(void);
__property Fmx::Graphics::TBitmap* BufBitmap = {read=fBufBitmap};
virtual void __fastcall DoChanged(void);
virtual System::Types::TSizeF __fastcall GetDefaultSize(void);
virtual bool __fastcall GetIsChecked(void);
virtual void __fastcall SetIsChecked(const bool Value);
virtual bool __fastcall ImageCheckedResourceNameStored(void);
virtual bool __fastcall ImageUncheckedResourceNameStored(void);
public:
__fastcall virtual TALCheckBox(System::Classes::TComponent* AOwner);
__fastcall virtual ~TALCheckBox(void);
virtual Fmx::Graphics::TBitmap* __fastcall MakeBufBitmap(void);
virtual void __fastcall clearBufBitmap(void);
virtual void __fastcall MouseDown(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
virtual void __fastcall MouseMove(System::Classes::TShiftState Shift, float X, float Y);
virtual void __fastcall MouseUp(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
virtual void __fastcall KeyDown(System::Word &Key, System::WideChar &KeyChar, System::Classes::TShiftState Shift);
__published:
__property Action;
__property Align = {default=0};
__property Anchors;
__property CanFocus = {default=1};
__property CanParentFocus = {default=0};
__property ClipChildren = {default=0};
__property ClipParent = {default=0};
__property Cursor = {default=0};
__property DisableFocusEffect = {default=0};
__property DragMode = {default=0};
__property EnableDragHighlight = {default=1};
__property Enabled;
__property Locked = {default=0};
__property Height;
__property Hint = {default=0};
__property HitTest = {default=1};
__property bool IsChecked = {read=GetIsChecked, write=SetIsChecked, default=0};
__property System::UnicodeString ImageCheckedResourceName = {read=fImageCheckedResourceName, write=setImageCheckedResourceName, stored=ImageCheckedResourceNameStored};
__property System::UnicodeString ImageUncheckedResourceName = {read=fImageUncheckedResourceName, write=setImageUncheckedResourceName, stored=ImageUncheckedResourceNameStored};
__property Alfmxobjects::TALImageWrapMode WrapMode = {read=FWrapMode, write=SetWrapMode, default=1};
__property Padding;
__property Opacity;
__property Margins;
__property PopupMenu;
__property Position;
__property RotationAngle = {default=0};
__property RotationCenter;
__property Scale;
__property Size;
__property TabOrder = {default=-1};
__property TabStop = {default=1};
__property TouchTargetExpansion;
__property Visible;
__property Width;
__property ParentShowHint = {default=1};
__property ShowHint;
__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
__property OnDragEnter;
__property OnDragLeave;
__property OnDragOver;
__property OnDragDrop;
__property OnDragEnd;
__property OnKeyDown;
__property OnKeyUp;
__property OnCanFocus;
__property OnClick;
__property OnDblClick;
__property OnEnter;
__property OnExit;
__property OnMouseDown;
__property OnMouseMove;
__property OnMouseUp;
__property OnMouseWheel;
__property OnMouseEnter;
__property OnMouseLeave;
__property OnPainting;
__property OnPaint;
__property OnResize;
};
class PASCALIMPLEMENTATION TAlRadioButton : public TALCheckBox
{
typedef TALCheckBox inherited;
private:
System::UnicodeString FGroupName;
bool fMandatory;
System::UnicodeString __fastcall GetGroupName(void);
void __fastcall SetGroupName(const System::UnicodeString Value);
bool __fastcall GroupNameStored(void);
void __fastcall GroupMessageCall(System::TObject* const Sender, System::Messaging::TMessageBase* const M);
protected:
virtual void __fastcall SetIsChecked(const bool Value);
virtual bool __fastcall ImageCheckedResourceNameStored(void);
virtual bool __fastcall ImageUncheckedResourceNameStored(void);
public:
__fastcall virtual TAlRadioButton(System::Classes::TComponent* AOwner);
__fastcall virtual ~TAlRadioButton(void);
__published:
__property System::UnicodeString GroupName = {read=GetGroupName, write=SetGroupName, stored=GroupNameStored};
__property bool Mandatory = {read=fMandatory, write=fMandatory, default=0};
};
//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE void __fastcall Register(void);
} /* namespace Alfmxstdctrls */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_ALFMXSTDCTRLS)
using namespace Alfmxstdctrls;
#endif
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // AlfmxstdctrlsHPP
| [
"4325047+Zeus5100@users.noreply.github.com"
] | 4325047+Zeus5100@users.noreply.github.com |
e543d103df24b50b70444507b6f194516c26fe48 | 5090b789e9c1ef0ef76ea436eaa6ada0c0a23397 | /src/instructions/ld_n_nn.cpp | 8a98e3b83a0e1e1f899ce1d84542d7a86be64deb | [
"MIT"
] | permissive | Vandise/z80 | f26a96988a0e2eb2f995539b0aa9a265775422ca | 47173fdda7a7ef579572b5bff4e45c5495954249 | refs/heads/master | 2018-12-24T21:21:11.729002 | 2018-10-20T03:38:55 | 2018-10-20T03:38:55 | 118,984,453 | 6 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 500 | cpp | #include "z80/cpu.hpp"
void
Z80::CPU::ld_n_nn()
{
uint8_t n_reg = this->mmu->readByte(
REGISTER(REG_PC).getValue()
);
this->incrementPC(1);
switch(n_reg) {
case 0x21:
REGISTER(REG_HL).setValue(
this->mmu->readWord( REGISTER(REG_PC).getValue() )
);
break;
default:
throw std::string("Invalid register for ld_n_nn: ").append(std::to_string(n_reg)).c_str();
}
// loaded 16bits
this->incrementPC(2);
this->clock.incrementMachineCycles(3);
} | [
"banderson@mashable.com"
] | banderson@mashable.com |
e44e5a2a08be4809541481f168e8127e3042a6ea | f74104c2fadcdd2084a00ee937502b9af0335b7e | /src/terrain/terrain/Cell.cpp | e80798d0b02aaa61726016151a68f915ca275c3b | [] | no_license | wrongway88/soundScape | d7d27e3db982b816f1aae76f9aac23be1456ccc1 | c6ceb14baa04c76aedfa8838e7ec1caec354ca5c | refs/heads/master | 2020-05-14T22:41:41.261729 | 2019-04-26T21:33:47 | 2019-04-26T21:33:47 | 181,983,711 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 28,128 | cpp | #include "Cell.h"
#include "terrain/utility/StlVectorUtility.h"
#include "LookUpTables.h"
Cell::Cell(const ci::vec3& center, const float size):
m_cube(center, size),
m_activeNeighbourCenters()
{
m_cellFaces[0] = CellFace();
m_cellFaces[1] = CellFace();
m_cellFaces[2] = CellFace();
m_cellFaces[3] = CellFace();
m_cellFaces[4] = CellFace();
m_cellFaces[5] = CellFace();
}
Cell::~Cell()
{
}
void Cell::sampleTerrain(IDensityFunction& densityFunction, std::map<int, Edge>& edges, float terrainSize)
{
unsigned int vertexCase = calculateVertexCase(densityFunction);
float densities[8];
if(vertexCase == 0 || vertexCase == 255)
return;
for(unsigned int i = 0; i < 8; i++)
{
densities[i] = densityFunction.getValue(m_cube.getVertex(i));
}
std::vector<VertexOrder> foo = getVertexOrderCase(vertexCase, densities);
//std::cout << foo.size() << std::endl;
/*for(unsigned int i = 0; i < foo.size(); i++)
{
if(foo[i].m_order[0] == 12 || foo[i].m_order[1] == 12 || foo[i].m_order[2] == 12)
{
std::cout << "interior vertex" << std::endl;
return;
}
}*/
calculateActiveNeighbours(densities);
/*calculateFaceSaddlePoints(densities);
calculateBodySaddlePoints(densities);*/
VertexOrderCase vertexOrderCase = TerrainUtility::m_edgeConnectList[vertexCase];
for(unsigned int i = 0; i < foo.size(); i++)
{
for(unsigned int j = 0; j < 3; j++)
{
int edgeIndex = foo[i].m_order[j];
ci::vec3 vertex;
ci::vec3 normal;
if(edgeIndex == 12)
{
vertex = calculateInnerVertex(densities);
normal = calculateNormal(vertex, densityFunction);
}
else
{
EdgeIndex edge = Cube::getEdgeIndices((unsigned int)edgeIndex);
ci::vec3 v0 = m_cube.getVertex((unsigned int)edge.m_v0);
ci::vec3 v1 = m_cube.getVertex((unsigned int)edge.m_v1);
int hashValue = calculateEdgeHashValue(v0, v1, terrainSize, int(terrainSize/m_cube.getSize())+1);
if(edges.find(hashValue) != edges.end())
{
Edge vEdge = edges[hashValue];
vertex = vEdge.m_intersection;
normal = vEdge.m_normal;
edges[hashValue].m_timesVisited++;
}
else
{
float d0 = densities[edge.m_v0];
float d1 = densities[edge.m_v1];
vertex = interpolateVertexPosition(v0, d0, v1, d1);
normal = calculateNormal(vertex, densityFunction);
Edge newEdge;
newEdge.m_v0 = v0;
newEdge.m_v1 = v1;
newEdge.m_intersection = vertex;
newEdge.m_normal = normal;
newEdge.m_timesVisited++;
edges[hashValue] = newEdge;
}
}
int idx = StlVectorUtility::find<ci::vec3>(m_vertices, vertex);
if(idx != -1)
{
m_indices.push_back(idx);
}
else
{
m_vertices.push_back(vertex);
m_normals.push_back(normal);
if(m_indices.size() <= 0)
{
m_indices.push_back(0);
}
else
{
m_indices.push_back(m_vertices.size() - 1);
}
}
}
}
}
unsigned int Cell::calculateVertexCase(IDensityFunction& densityFunction)
{
unsigned int vertexCase = 0;
float densities[8];
for(unsigned int i = 0; i < 8; i++)
{
ci::vec3 vec = m_cube.getVertex(i);
densities[i] = densityFunction.getValue(vec);
if(densities[i] > 0.0f)
{
vertexCase += (int)std::powf(2.0f, (float)i);
}
}
return vertexCase;
}
std::vector<ci::vec3> Cell::getVertices()
{
return m_vertices;
}
std::vector<unsigned int> Cell::getIndices()
{
return m_indices;
}
std::vector<ci::vec3> Cell::getNormals()
{
return m_normals;
}
std::vector<ci::vec3> Cell::getActiveNeighbourCenters()
{
return m_activeNeighbourCenters;
}
ci::vec3 Cell::interpolateVertexPosition(ci::vec3 vector0, float weight0, ci::vec3 vector1, float weight1)
{
float dist = std::fabs(weight0) + std::fabs(weight1);
float w0 = 1.0f - (std::fabs(weight0) / dist);
float w1 = 1.0f - w0;
return vector0*w0 + vector1*w1;
}
ci::vec3 Cell::calculateNormal(ci::vec3& position, IDensityFunction& densityFunction)
{
ci::vec3 normal;
float cellSize = m_cube.getSize();// * 0.01f;
normal.x = densityFunction.getValue(ci::vec3(position.x + cellSize, position.y, position.z)) -
densityFunction.getValue(ci::vec3(position.x - cellSize, position.y, position.z));
normal.y = densityFunction.getValue(ci::vec3(position.x, position.y + cellSize, position.z)) -
densityFunction.getValue(ci::vec3(position.x, position.y - cellSize, position.z));
normal.z = densityFunction.getValue(ci::vec3(position.x, position.y, position.z + cellSize)) -
densityFunction.getValue(ci::vec3(position.x, position.y, position.z - cellSize));
return (ci::normalize(normal) * -1.0f);
}
void Cell::calculateFaceSaddlePoints(float densities[])
{
std::vector<ci::vec2> faceVertices;
std::vector<unsigned int> faceIndices;
for(unsigned int i = 0; i < 6; i++)
{
faceIndices = m_cube.getFaceIndices(i);
faceVertices = m_cube.getFaceVertices(i);
m_cellFaces[i].m_vertices[0] = faceVertices[0];
m_cellFaces[i].m_vertices[1] = faceVertices[1];
m_cellFaces[i].m_vertices[2] = faceVertices[2];
m_cellFaces[i].m_vertices[3] = faceVertices[3];
faceVertices.push_back(m_cellFaces[i].m_vertices[0]);
faceVertices.push_back(m_cellFaces[i].m_vertices[1]);
faceVertices.push_back(m_cellFaces[i].m_vertices[2]);
faceVertices.push_back(m_cellFaces[i].m_vertices[3]);
m_cellFaces[i].m_saddlePoint = TerrainUtility::calculateFaceSaddlePoint(faceVertices[0], faceVertices[2], densities[faceIndices[0]], densities[faceIndices[1]], densities[faceIndices[2]], densities[faceIndices[3]]);
/*if((m_cellFaces[i].m_saddlePoint.x > 0.0f && m_cellFaces[i].m_saddlePoint.x < 1.0f) &&
(m_cellFaces[i].m_saddlePoint.y > 0.0f && m_cellFaces[i].m_saddlePoint.y < 1.0f))
{
std::cout << m_cellFaces[i].m_saddlePoint.x << ", " << m_cellFaces[i].m_saddlePoint.y << std::endl;
}*/
}
}
void Cell::calculateBodySaddlePoints(float densities[])
{
CubeCornerValues cubeCornerValues(densities[0], densities[1], densities[2], densities[3], densities[4], densities[5], densities[6], densities[7]);
std::vector<ci::vec3> saddlePoints = TerrainUtility::calculateBodySaddlePoints(m_cube.getVertex(0), m_cube.getVertex(6), cubeCornerValues);
for(unsigned int i = 0;i < saddlePoints.size(); i++)
{
if((saddlePoints[i].x > 0.0f && saddlePoints[i].x < 1.0f) &&
(saddlePoints[i].y > 0.0f && saddlePoints[i].y < 1.0f) &&
(saddlePoints[i].z > 0.0f && saddlePoints[i].z < 1.0f))
{
m_bodySaddlePoints.push_back(saddlePoints[i]);
}
}
}
void Cell::calculateActiveNeighbours(float densities[])
{
std::vector<ci::vec3> neighbourCenters;
std::vector<unsigned int> faceIndices;
for(unsigned int i = 0; i < 6; i++)
{
faceIndices = m_cube.getFaceIndices(i);
unsigned int vertexCase = 0;
for(unsigned int j = 0; j < faceIndices.size(); j++)
{
if(densities[faceIndices[j]] > 0.0f)
{
vertexCase += (int)std::powf(2.0f, (float)j);
}
}
if(vertexCase != 0 && vertexCase != 15 && vertexCase != 1)
{
switch(i)
{
case 0:
m_activeNeighbourCenters.push_back(m_cube.getCenter() + ci::vec3(0.0f, 0.0f, -m_cube.getSize()));
break;
case 1:
m_activeNeighbourCenters.push_back(m_cube.getCenter() + ci::vec3(m_cube.getSize(), 0.0f, 0.0f));
break;
case 2:
m_activeNeighbourCenters.push_back(m_cube.getCenter() + ci::vec3(0.0f, 0.0f, m_cube.getSize()));
break;
case 3:
m_activeNeighbourCenters.push_back(m_cube.getCenter() + ci::vec3(-m_cube.getSize(), 0.0f, 0.0f));
break;
case 4:
m_activeNeighbourCenters.push_back(m_cube.getCenter() + ci::vec3(0.0f, -m_cube.getSize(), 0.0f));
break;
case 5:
m_activeNeighbourCenters.push_back(m_cube.getCenter() + ci::vec3(0.0f, m_cube.getSize(), 0.0f));
break;
}
}
}
}
int Cell::calculateEdgeHashValue(const ci::vec3& v0, const ci::vec3& v1, float terrainSize, int vertexCount1d)
{
float cubeSize = m_cube.getSize();
int x0 = int((v0.x + (terrainSize * 0.5f) + (cubeSize*0.5f)) / cubeSize);
int y0 = int((v0.y + (terrainSize * 0.5f) + (cubeSize*0.5f)) / cubeSize);
int z0 = int((v0.z + (terrainSize * 0.5f) + (cubeSize*0.5f)) / cubeSize);
int x1 = int((v1.x + (terrainSize * 0.5f) + (cubeSize*0.5f)) / cubeSize);
int y1 = int((v1.y + (terrainSize * 0.5f) + (cubeSize*0.5f)) / cubeSize);
int z1 = int((v1.z + (terrainSize * 0.5f) + (cubeSize*0.5f)) / cubeSize);
int result = 0;
if(x0+y0+z0 < x1+y1+z1)
{
result = x0*(vertexCount1d*vertexCount1d) + y0*vertexCount1d + z0;
}
else
{
result = x1*(vertexCount1d*vertexCount1d) + y1*vertexCount1d + z1;
}
result *= 4;
if((x0 - x1) != 0)
{
result += 1;
}
else if((y0 - y1) != 0)
{
result += 2;
}
else
{
result += 3;
}
return result;
}
std::vector<VertexOrder> Cell::getVertexOrderCase(const unsigned int vertexCase, const float densities[8])
{
std::vector<VertexOrder> result;
unsigned int uniqueCase = LookUpTables::m_cases[vertexCase][0];
unsigned int configuration = LookUpTables::m_cases[vertexCase][1];
int subConfig = 0;
/*if(vertexCase != 0 && vertexCase != 255)
std::cout << (int)LookUpTables::m_cases[vertexCase][0] << ", " << (int)LookUpTables::m_cases[vertexCase][1] << std::endl;*/
switch(uniqueCase)
{
case 1:
result = getVertexOrders(LookUpTables::m_tiling1[configuration], 3);
break;
case 2:
result = getVertexOrders(LookUpTables::m_tiling2[configuration], 6);
break;
case 3:
if(testFace(LookUpTables::m_test3[configuration], densities))
{
result = getVertexOrders(LookUpTables::m_tiling3_2[configuration], 12);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling3_1[configuration], 6);
}
break;
case 4:
if(testInterior(vertexCase, configuration, 0, LookUpTables::m_test4[configuration], densities))
{
result = getVertexOrders(LookUpTables::m_tiling4_1[configuration], 6);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling4_2[configuration], 18);
}
break;
case 5:
result = getVertexOrders(LookUpTables::m_tiling5[configuration], 9);
break;
case 6:
if(testFace(LookUpTables::m_test6[configuration][0], densities))
{
result = getVertexOrders(LookUpTables::m_tiling6_2[configuration], 15);
}
else
{
if(testInterior(vertexCase, configuration, 0, LookUpTables::m_test6[configuration][1], densities))
{
result = getVertexOrders(LookUpTables::m_tiling6_1_1[configuration], 9);
}
else
{
//calculate interior vertex in this case...
result = getVertexOrders(LookUpTables::m_tiling6_1_2[configuration], 27); //interior vertex
}
}
break;
case 7:
if(testFace(LookUpTables::m_test7[configuration][0], densities))
subConfig += 1;
if(testFace(LookUpTables::m_test7[configuration][1], densities))
subConfig += 2;
if(testFace(LookUpTables::m_test7[configuration][2], densities))
subConfig += 4;
switch(subConfig)
{
case 0:
result = getVertexOrders(LookUpTables::m_tiling7_1[configuration], 9);
break;
case 1:
result = getVertexOrders(LookUpTables::m_tiling7_2[configuration][0], 15);
break;
case 2:
result = getVertexOrders(LookUpTables::m_tiling7_2[configuration][1], 15);
break;
case 3:
result = getVertexOrders(LookUpTables::m_tiling7_3[configuration][0], 27); //interior vertex
break;
case 4:
result = getVertexOrders(LookUpTables::m_tiling7_2[configuration][2], 15);
break;
case 5:
result = getVertexOrders(LookUpTables::m_tiling7_3[configuration][1], 27); //interior vertex
break;
case 6:
result = getVertexOrders(LookUpTables::m_tiling7_3[configuration][2], 27); //interior vertex
break;
case 7:
if(testInterior(vertexCase, configuration, subConfig, LookUpTables::m_test7[configuration][3], densities))
{
result = getVertexOrders(LookUpTables::m_tiling7_4_2[configuration], 27);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling7_4_1[configuration], 15);
}
break;
}
break;
case 8:
result = getVertexOrders(LookUpTables::m_tiling8[configuration], 6);
break;
case 9:
result = getVertexOrders(LookUpTables::m_tiling9[configuration], 12);
break;
case 10:
if(testFace(LookUpTables::m_test10[configuration][0], densities))
{
if(testFace(LookUpTables::m_test10[configuration][1], densities))
{
result = getVertexOrders(LookUpTables::m_tiling10_1_1_[configuration], 12);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling10_2[configuration], 24); //interior vertex
}
}
else
{
if(testFace(LookUpTables::m_test10[configuration][1], densities))
{
result = getVertexOrders(LookUpTables::m_tiling10_2_[configuration], 24); //interior vertex
}
else
{
if(testInterior(vertexCase, configuration, 0, LookUpTables::m_test10[configuration][2], densities))
{
result = getVertexOrders(LookUpTables::m_tiling10_1_1[configuration], 12); //interior vertex
}
else
{
result = getVertexOrders(LookUpTables::m_tiling10_1_2[configuration], 24); //interior vertex
}
}
}
break;
case 11:
result = getVertexOrders(LookUpTables::m_tiling11[configuration], 12);
break;
case 12:
if(testFace(LookUpTables::m_test12[configuration][0], densities))
{
if(testFace(LookUpTables::m_test12[configuration][1], densities))
{
result = getVertexOrders(LookUpTables::m_tiling12_1_1_[configuration], 12);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling12_2[configuration], 24); //internal vertex
}
}
else
{
if(testFace(LookUpTables::m_test12[configuration][1], densities))
{
result = getVertexOrders(LookUpTables::m_tiling12_2_[configuration], 24); //internal vertex
}
else
{
if(testInterior(vertexCase, configuration, 0, LookUpTables::m_test12[configuration][2], densities))
{
result = getVertexOrders(LookUpTables::m_tiling12_1_1[configuration], 12);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling12_1_2[configuration], 24);
}
}
}
break;
case 13:
if(testFace(LookUpTables::m_test13[configuration][0], densities)) subConfig += 1;
if(testFace(LookUpTables::m_test13[configuration][1], densities)) subConfig += 2;
if(testFace(LookUpTables::m_test13[configuration][2], densities)) subConfig += 4;
if(testFace(LookUpTables::m_test13[configuration][3], densities)) subConfig += 8;
if(testFace(LookUpTables::m_test13[configuration][4], densities)) subConfig += 16;
if(testFace(LookUpTables::m_test13[configuration][5], densities)) subConfig += 32;
switch(LookUpTables::m_subconfig13[subConfig])
{
case 0:
result = getVertexOrders(LookUpTables::m_tiling13_1[configuration], 12);
break;
case 1:
result = getVertexOrders(LookUpTables::m_tiling13_2[configuration][0], 18);
break;
case 2:
result = getVertexOrders(LookUpTables::m_tiling13_2[configuration][1], 18);
break;
case 3:
result = getVertexOrders(LookUpTables::m_tiling13_2[configuration][2], 18);
break;
case 4:
result = getVertexOrders(LookUpTables::m_tiling13_2[configuration][3], 18);
break;
case 5:
result = getVertexOrders(LookUpTables::m_tiling13_2[configuration][4], 18);
break;
case 6:
result = getVertexOrders(LookUpTables::m_tiling13_2[configuration][5], 18);
break;
case 7:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][0], 30); //interior vertex
break;
case 8:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][1], 30); //interior vertex
break;
case 9:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][2], 30); //interior vertex
break;
case 10:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][3], 30); //interior vertex
break;
case 11:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][4], 30); //interior vertex
break;
case 12:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][5], 30); //interior vertex
break;
case 13:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][6], 30); //interior vertex
break;
case 14:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][7], 30); //interior vertex
break;
case 15:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][8], 30); //interior vertex
break;
case 16:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][9], 30); //interior vertex
break;
case 17:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][10], 30); //interior vertex
break;
case 18:
result = getVertexOrders(LookUpTables::m_tiling13_3[configuration][11], 30); //interior vertex
break;
case 19:
result = getVertexOrders(LookUpTables::m_tiling13_4[configuration][0], 36); //interior vertex
break;
case 20:
result = getVertexOrders(LookUpTables::m_tiling13_4[configuration][1], 36); //interior vertex
break;
case 21:
result = getVertexOrders(LookUpTables::m_tiling13_4[configuration][2], 36); //interior vertex
break;
case 22:
result = getVertexOrders(LookUpTables::m_tiling13_4[configuration][3], 36); //interior vertex
break;
case 23:
subConfig = 0;
if(testInterior(vertexCase, configuration, subConfig, LookUpTables::m_test13[configuration][6], densities))
{
result = getVertexOrders(LookUpTables::m_tiling13_5_1[configuration][0], 18);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling13_5_2[configuration][0], 30);
}
break;
case 24:
subConfig = 1;
if(testInterior(vertexCase, configuration, subConfig, LookUpTables::m_test13[configuration][6], densities))
{
result = getVertexOrders(LookUpTables::m_tiling13_5_1[configuration][1], 18);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling13_5_2[configuration][1], 30);
}
case 25:
subConfig = 2;
if(testInterior(vertexCase, configuration, subConfig, LookUpTables::m_test13[configuration][6], densities))
{
result = getVertexOrders(LookUpTables::m_tiling13_5_1[configuration][2], 18);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling13_5_2[configuration][2], 30);
}
case 26:
subConfig = 3;
if(testInterior(vertexCase, configuration, subConfig, LookUpTables::m_test13[configuration][6], densities))
{
result = getVertexOrders(LookUpTables::m_tiling13_5_1[configuration][3], 18);
}
else
{
result = getVertexOrders(LookUpTables::m_tiling13_5_2[configuration][3], 30);
}
break;
case 27:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][0], 30); //interior vertex
break;
case 28:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][1], 30); //interior vertex
break;
case 29:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][2], 30); //interior vertex
break;
case 30:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][3], 30); //interior vertex
break;
case 31:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][4], 30); //interior vertex
break;
case 32:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][5], 30); //interior vertex
break;
case 33:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][6], 30); //interior vertex
break;
case 34:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][7], 30); //interior vertex
break;
case 35:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][8], 30); //interior vertex
break;
case 36:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][9], 30); //interior vertex
break;
case 37:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][10], 30); //interior vertex
break;
case 38:
result = getVertexOrders(LookUpTables::m_tiling13_3_[configuration][11], 30); //interior vertex
break;
case 39:
result = getVertexOrders(LookUpTables::m_tiling13_2_[configuration][0], 18);
break;
case 40:
result = getVertexOrders(LookUpTables::m_tiling13_2_[configuration][1], 18);
break;
case 41:
result = getVertexOrders(LookUpTables::m_tiling13_2_[configuration][2], 18);
break;
case 42:
result = getVertexOrders(LookUpTables::m_tiling13_2_[configuration][3], 18);
break;
case 43:
result = getVertexOrders(LookUpTables::m_tiling13_2_[configuration][4], 18);
break;
case 44:
result = getVertexOrders(LookUpTables::m_tiling13_2_[configuration][5], 18);
break;
case 45:
result = getVertexOrders(LookUpTables::m_tiling13_1_[configuration], 12);
break;
}
break;
case 14:
result = getVertexOrders(LookUpTables::m_tiling14[configuration], 12);
break;
/*default:
break;*/
}
return result;
}
std::vector<VertexOrder> Cell::getVertexOrders(const char indices[], const unsigned int size)
{
if(size % 3 != 0)
{
LOG_ERROR("Invalid indices");
}
std::vector<VertexOrder> result;
for(unsigned int i = 0; i < size-2; i+=3)
{
VertexOrder vertexOrder;
vertexOrder.m_order[0] = (int)indices[i];
vertexOrder.m_order[1] = (int)indices[i+1];
vertexOrder.m_order[2] = (int)indices[i+2];
result.push_back(vertexOrder);
}
return result;
}
bool Cell::testFace(const int faceIndex, const float densities[8])
{
int correctedIndex = 0;
if(faceIndex > 0)
{
correctedIndex = faceIndex-1;
}
else
{
correctedIndex = faceIndex+1;
}
if(correctedIndex > 5 || correctedIndex < -5)
{
LOG_ERROR("Invalid face index");
return false;
}
float a = 0.0f;
float b = 0.0f;
float c = 0.0f;
float d = 0.0f;
std::vector<unsigned int> faceIndices = m_cube.getFaceIndices(std::abs(correctedIndex));
if(faceIndices.size() != 4)
{
LOG_ERROR("Invalid face indices");
return false;
}
a = densities[faceIndices[0]];
b = densities[faceIndices[1]];
c = densities[faceIndices[2]];
d = densities[faceIndices[3]];
if(std::fabs(a*c - b*d) < FLT_EPSILON)
{
return faceIndex >= 0;
}
return faceIndex * a * (a*c - b*d) >= 0;
}
bool Cell::testInterior(const unsigned int vertexCase, const unsigned int configuration, const unsigned int subConfiguration, const int testCase, const float densities[8])
{
float at = 0.0f;
float bt = 0.0f;
float ct = 0.0f;
float dt = 0.0f;
float a = 0.0f;
float b = 0.0f;
float t = 0.0f;
switch(vertexCase)
{
case 4:
case 10:
a = (densities[4]-densities[0])*(densities[6]-densities[2]) - (densities[7]-densities[3])*(densities[5]-densities[1]);
b = densities[2] * (densities[4]-densities[0]) + densities[0] * (densities[6]-densities[2]) -
densities[1] * (densities[7]-densities[3]) - densities[3] * (densities[5]-densities[1]);
t = -b/(2*a);
if(t < 0.0f || t > 1.0f)
{
return testCase > 0;
}
at = densities[0] + (densities[4] - densities[0]) * t;
bt = densities[3] + (densities[7] - densities[3]) * t;
ct = densities[2] + (densities[6] - densities[2]) * t;
dt = densities[1] + (densities[5] - densities[1]) * t;
break;
case 6:
case 7:
case 12:
case 13:
int edge = -1;
switch(vertexCase)
{
case 6: edge = LookUpTables::m_test6[configuration][2]; break;
case 7: edge = LookUpTables::m_test7[configuration][4]; break;
case 12: edge = LookUpTables::m_test12[configuration][3]; break;
case 13: edge = LookUpTables::m_tiling13_5_1[configuration][subConfiguration][0]; break;
}
switch(edge)
{
case 0 :
t = densities[0] / ( densities[0] - densities[1] ) ;
at = 0 ;
bt = densities[3] + ( densities[2] - densities[3] ) * t ;
ct = densities[7] + ( densities[6] - densities[7] ) * t ;
dt = densities[4] + ( densities[5] - densities[4] ) * t ;
break ;
case 1 :
t = densities[1] / ( densities[1] - densities[2] ) ;
at = 0 ;
bt = densities[0] + ( densities[3] - densities[0] ) * t ;
ct = densities[4] + ( densities[7] - densities[4] ) * t ;
dt = densities[5] + ( densities[6] - densities[5] ) * t ;
break ;
case 2 :
t = densities[2] / ( densities[2] - densities[3] ) ;
at = 0 ;
bt = densities[1] + ( densities[0] - densities[1] ) * t ;
ct = densities[5] + ( densities[4] - densities[5] ) * t ;
dt = densities[6] + ( densities[7] - densities[6] ) * t ;
break ;
case 3 :
t = densities[3] / ( densities[3] - densities[0] ) ;
at = 0 ;
bt = densities[2] + ( densities[1] - densities[2] ) * t ;
ct = densities[6] + ( densities[5] - densities[6] ) * t ;
dt = densities[7] + ( densities[4] - densities[7] ) * t ;
break ;
case 4 :
t = densities[4] / ( densities[4] - densities[5] ) ;
at = 0 ;
bt = densities[7] + ( densities[6] - densities[7] ) * t ;
ct = densities[3] + ( densities[2] - densities[3] ) * t ;
dt = densities[0] + ( densities[1] - densities[0] ) * t ;
break ;
case 5 :
t = densities[5] / ( densities[5] - densities[6] ) ;
at = 0 ;
bt = densities[4] + ( densities[7] - densities[4] ) * t ;
ct = densities[0] + ( densities[3] - densities[0] ) * t ;
dt = densities[1] + ( densities[2] - densities[1] ) * t ;
break ;
case 6 :
t = densities[6] / ( densities[6] - densities[7] ) ;
at = 0 ;
bt = densities[5] + ( densities[4] - densities[5] ) * t ;
ct = densities[1] + ( densities[0] - densities[1] ) * t ;
dt = densities[2] + ( densities[3] - densities[2] ) * t ;
break ;
case 7 :
t = densities[7] / ( densities[7] - densities[4] ) ;
at = 0 ;
bt = densities[6] + ( densities[5] - densities[6] ) * t ;
ct = densities[2] + ( densities[1] - densities[2] ) * t ;
dt = densities[3] + ( densities[0] - densities[3] ) * t ;
break ;
case 8 :
t = densities[0] / ( densities[0] - densities[4] ) ;
at = 0 ;
bt = densities[3] + ( densities[7] - densities[3] ) * t ;
ct = densities[2] + ( densities[6] - densities[2] ) * t ;
dt = densities[1] + ( densities[5] - densities[1] ) * t ;
break ;
case 9 :
t = densities[1] / ( densities[1] - densities[5] ) ;
at = 0 ;
bt = densities[0] + ( densities[4] - densities[0] ) * t ;
ct = densities[3] + ( densities[7] - densities[3] ) * t ;
dt = densities[2] + ( densities[6] - densities[2] ) * t ;
break ;
case 10 :
t = densities[2] / ( densities[2] - densities[6] ) ;
at = 0 ;
bt = densities[1] + ( densities[5] - densities[1] ) * t ;
ct = densities[0] + ( densities[4] - densities[0] ) * t ;
dt = densities[3] + ( densities[7] - densities[3] ) * t ;
break ;
case 11 :
t = densities[3] / ( densities[3] - densities[7] ) ;
at = 0 ;
bt = densities[2] + ( densities[6] - densities[2] ) * t ;
ct = densities[1] + ( densities[5] - densities[1] ) * t ;
dt = densities[0] + ( densities[4] - densities[0] ) * t ;
break ;
}
int test = 0;
if( at >= 0 ) test ++ ;
if( bt >= 0 ) test += 2 ;
if( ct >= 0 ) test += 4 ;
if( dt >= 0 ) test += 8 ;
switch( test )
{
case 0 : return testCase>0 ;
case 1 : return testCase>0 ;
case 2 : return testCase>0 ;
case 3 : return testCase>0 ;
case 4 : return testCase>0 ;
case 5 : if( at * ct - bt * dt < FLT_EPSILON ) return testCase>0 ; break ;
case 6 : return testCase>0 ;
case 7 : return testCase<0 ;
case 8 : return testCase>0 ;
case 9 : return testCase>0 ;
case 10 : if( at * ct - bt * dt >= FLT_EPSILON ) return testCase>0 ; break ;
case 11 : return testCase<0 ;
case 12 : return testCase>0 ;
case 13 : return testCase<0 ;
case 14 : return testCase<0 ;
case 15 : return testCase<0 ;
}
break;
/*default:
LOG_ERROR("invalid vertexCase");
break;*/
}
return testCase<0;
}
ci::vec3 Cell::calculateInnerVertex(const float densities[8])
{
std::vector<ci::vec3> edgeVertices;
for(unsigned int i = 0; i < 12; i++)
{
EdgeIndex edge = m_cube.getEdgeIndices(i);
float d0 = densities[edge.m_v0];
float d1 = densities[edge.m_v1];
if((d0 * d1) < 0.0f) //check if only one value is below 0
{
ci::vec3 v0 = m_cube.getVertex(edge.m_v0);
ci::vec3 v1 = m_cube.getVertex(edge.m_v1);
ci::vec3 vertex = interpolateVertexPosition(v0, d0, v1, d1);
edgeVertices.push_back(vertex);
}
}
ci::vec3 result;
for(unsigned int i = 0; i < edgeVertices.size(); i++)
{
result += edgeVertices[i];
}
result /= (float)edgeVertices.size();
return result;
} | [
"McDobusch@gmx.net"
] | McDobusch@gmx.net |
823486454837929b7acbb2b7be93538d9928ffc7 | 45e34a88f9a70f92b17d9e037f7d719dacc94176 | /devel/include/opencv_apps/CornerHarrisConfig.h | a6eb71bb789258dd9154a05b7b029c8ce91f999a | [] | no_license | lipilian/ROS-RealSense | 7f9c40e056b8c9704eee7584cab1bef87874bb59 | df1a717fe78d7d994a7b743911ba4940dfc97c8a | refs/heads/master | 2020-12-15T05:41:06.900613 | 2020-02-09T22:38:07 | 2020-02-09T22:38:07 | 235,009,699 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 20,537 | h | //#line 2 "/opt/ros/kinetic/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template"
// *********************************************************
//
// File autogenerated for the opencv_apps package
// by the dynamic_reconfigure package.
// Please do not edit.
//
// ********************************************************/
#ifndef __opencv_apps__CORNERHARRISCONFIG_H__
#define __opencv_apps__CORNERHARRISCONFIG_H__
#include <dynamic_reconfigure/config_tools.h>
#include <limits>
#include <ros/node_handle.h>
#include <dynamic_reconfigure/ConfigDescription.h>
#include <dynamic_reconfigure/ParamDescription.h>
#include <dynamic_reconfigure/Group.h>
#include <dynamic_reconfigure/config_init_mutex.h>
#include <boost/any.hpp>
namespace opencv_apps
{
class CornerHarrisConfigStatics;
class CornerHarrisConfig
{
public:
class AbstractParamDescription : public dynamic_reconfigure::ParamDescription
{
public:
AbstractParamDescription(std::string n, std::string t, uint32_t l,
std::string d, std::string e)
{
name = n;
type = t;
level = l;
description = d;
edit_method = e;
}
virtual void clamp(CornerHarrisConfig &config, const CornerHarrisConfig &max, const CornerHarrisConfig &min) const = 0;
virtual void calcLevel(uint32_t &level, const CornerHarrisConfig &config1, const CornerHarrisConfig &config2) const = 0;
virtual void fromServer(const ros::NodeHandle &nh, CornerHarrisConfig &config) const = 0;
virtual void toServer(const ros::NodeHandle &nh, const CornerHarrisConfig &config) const = 0;
virtual bool fromMessage(const dynamic_reconfigure::Config &msg, CornerHarrisConfig &config) const = 0;
virtual void toMessage(dynamic_reconfigure::Config &msg, const CornerHarrisConfig &config) const = 0;
virtual void getValue(const CornerHarrisConfig &config, boost::any &val) const = 0;
};
typedef boost::shared_ptr<AbstractParamDescription> AbstractParamDescriptionPtr;
typedef boost::shared_ptr<const AbstractParamDescription> AbstractParamDescriptionConstPtr;
template <class T>
class ParamDescription : public AbstractParamDescription
{
public:
ParamDescription(std::string name, std::string type, uint32_t level,
std::string description, std::string edit_method, T CornerHarrisConfig::* f) :
AbstractParamDescription(name, type, level, description, edit_method),
field(f)
{}
T (CornerHarrisConfig::* field);
virtual void clamp(CornerHarrisConfig &config, const CornerHarrisConfig &max, const CornerHarrisConfig &min) const
{
if (config.*field > max.*field)
config.*field = max.*field;
if (config.*field < min.*field)
config.*field = min.*field;
}
virtual void calcLevel(uint32_t &comb_level, const CornerHarrisConfig &config1, const CornerHarrisConfig &config2) const
{
if (config1.*field != config2.*field)
comb_level |= level;
}
virtual void fromServer(const ros::NodeHandle &nh, CornerHarrisConfig &config) const
{
nh.getParam(name, config.*field);
}
virtual void toServer(const ros::NodeHandle &nh, const CornerHarrisConfig &config) const
{
nh.setParam(name, config.*field);
}
virtual bool fromMessage(const dynamic_reconfigure::Config &msg, CornerHarrisConfig &config) const
{
return dynamic_reconfigure::ConfigTools::getParameter(msg, name, config.*field);
}
virtual void toMessage(dynamic_reconfigure::Config &msg, const CornerHarrisConfig &config) const
{
dynamic_reconfigure::ConfigTools::appendParameter(msg, name, config.*field);
}
virtual void getValue(const CornerHarrisConfig &config, boost::any &val) const
{
val = config.*field;
}
};
class AbstractGroupDescription : public dynamic_reconfigure::Group
{
public:
AbstractGroupDescription(std::string n, std::string t, int p, int i, bool s)
{
name = n;
type = t;
parent = p;
state = s;
id = i;
}
std::vector<AbstractParamDescriptionConstPtr> abstract_parameters;
bool state;
virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &config) const = 0;
virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &config) const =0;
virtual void updateParams(boost::any &cfg, CornerHarrisConfig &top) const= 0;
virtual void setInitialState(boost::any &cfg) const = 0;
void convertParams()
{
for(std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = abstract_parameters.begin(); i != abstract_parameters.end(); ++i)
{
parameters.push_back(dynamic_reconfigure::ParamDescription(**i));
}
}
};
typedef boost::shared_ptr<AbstractGroupDescription> AbstractGroupDescriptionPtr;
typedef boost::shared_ptr<const AbstractGroupDescription> AbstractGroupDescriptionConstPtr;
template<class T, class PT>
class GroupDescription : public AbstractGroupDescription
{
public:
GroupDescription(std::string name, std::string type, int parent, int id, bool s, T PT::* f) : AbstractGroupDescription(name, type, parent, id, s), field(f)
{
}
GroupDescription(const GroupDescription<T, PT>& g): AbstractGroupDescription(g.name, g.type, g.parent, g.id, g.state), field(g.field), groups(g.groups)
{
parameters = g.parameters;
abstract_parameters = g.abstract_parameters;
}
virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &cfg) const
{
PT* config = boost::any_cast<PT*>(cfg);
if(!dynamic_reconfigure::ConfigTools::getGroupState(msg, name, (*config).*field))
return false;
for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
{
boost::any n = &((*config).*field);
if(!(*i)->fromMessage(msg, n))
return false;
}
return true;
}
virtual void setInitialState(boost::any &cfg) const
{
PT* config = boost::any_cast<PT*>(cfg);
T* group = &((*config).*field);
group->state = state;
for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
{
boost::any n = boost::any(&((*config).*field));
(*i)->setInitialState(n);
}
}
virtual void updateParams(boost::any &cfg, CornerHarrisConfig &top) const
{
PT* config = boost::any_cast<PT*>(cfg);
T* f = &((*config).*field);
f->setParams(top, abstract_parameters);
for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
{
boost::any n = &((*config).*field);
(*i)->updateParams(n, top);
}
}
virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &cfg) const
{
const PT config = boost::any_cast<PT>(cfg);
dynamic_reconfigure::ConfigTools::appendGroup<T>(msg, name, id, parent, config.*field);
for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
{
(*i)->toMessage(msg, config.*field);
}
}
T (PT::* field);
std::vector<CornerHarrisConfig::AbstractGroupDescriptionConstPtr> groups;
};
class DEFAULT
{
public:
DEFAULT()
{
state = true;
name = "Default";
}
void setParams(CornerHarrisConfig &config, const std::vector<AbstractParamDescriptionConstPtr> params)
{
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator _i = params.begin(); _i != params.end(); ++_i)
{
boost::any val;
(*_i)->getValue(config, val);
if("use_camera_info"==(*_i)->name){use_camera_info = boost::any_cast<bool>(val);}
if("threshold"==(*_i)->name){threshold = boost::any_cast<int>(val);}
}
}
bool use_camera_info;
int threshold;
bool state;
std::string name;
}groups;
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
bool use_camera_info;
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
int threshold;
//#line 218 "/opt/ros/kinetic/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template"
bool __fromMessage__(dynamic_reconfigure::Config &msg)
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
int count = 0;
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
if ((*i)->fromMessage(msg, *this))
count++;
for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i ++)
{
if ((*i)->id == 0)
{
boost::any n = boost::any(this);
(*i)->updateParams(n, *this);
(*i)->fromMessage(msg, n);
}
}
if (count != dynamic_reconfigure::ConfigTools::size(msg))
{
ROS_ERROR("CornerHarrisConfig::__fromMessage__ called with an unexpected parameter.");
ROS_ERROR("Booleans:");
for (unsigned int i = 0; i < msg.bools.size(); i++)
ROS_ERROR(" %s", msg.bools[i].name.c_str());
ROS_ERROR("Integers:");
for (unsigned int i = 0; i < msg.ints.size(); i++)
ROS_ERROR(" %s", msg.ints[i].name.c_str());
ROS_ERROR("Doubles:");
for (unsigned int i = 0; i < msg.doubles.size(); i++)
ROS_ERROR(" %s", msg.doubles[i].name.c_str());
ROS_ERROR("Strings:");
for (unsigned int i = 0; i < msg.strs.size(); i++)
ROS_ERROR(" %s", msg.strs[i].name.c_str());
// @todo Check that there are no duplicates. Make this error more
// explicit.
return false;
}
return true;
}
// This version of __toMessage__ is used during initialization of
// statics when __getParamDescriptions__ can't be called yet.
void __toMessage__(dynamic_reconfigure::Config &msg, const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__, const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__) const
{
dynamic_reconfigure::ConfigTools::clear(msg);
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->toMessage(msg, *this);
for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i)
{
if((*i)->id == 0)
{
(*i)->toMessage(msg, *this);
}
}
}
void __toMessage__(dynamic_reconfigure::Config &msg) const
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
__toMessage__(msg, __param_descriptions__, __group_descriptions__);
}
void __toServer__(const ros::NodeHandle &nh) const
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->toServer(nh, *this);
}
void __fromServer__(const ros::NodeHandle &nh)
{
static bool setup=false;
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->fromServer(nh, *this);
const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i++){
if (!setup && (*i)->id == 0) {
setup = true;
boost::any n = boost::any(this);
(*i)->setInitialState(n);
}
}
}
void __clamp__()
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
const CornerHarrisConfig &__max__ = __getMax__();
const CornerHarrisConfig &__min__ = __getMin__();
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->clamp(*this, __max__, __min__);
}
uint32_t __level__(const CornerHarrisConfig &config) const
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
uint32_t level = 0;
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->calcLevel(level, config, *this);
return level;
}
static const dynamic_reconfigure::ConfigDescription &__getDescriptionMessage__();
static const CornerHarrisConfig &__getDefault__();
static const CornerHarrisConfig &__getMax__();
static const CornerHarrisConfig &__getMin__();
static const std::vector<AbstractParamDescriptionConstPtr> &__getParamDescriptions__();
static const std::vector<AbstractGroupDescriptionConstPtr> &__getGroupDescriptions__();
private:
static const CornerHarrisConfigStatics *__get_statics__();
};
template <> // Max and min are ignored for strings.
inline void CornerHarrisConfig::ParamDescription<std::string>::clamp(CornerHarrisConfig &config, const CornerHarrisConfig &max, const CornerHarrisConfig &min) const
{
return;
}
class CornerHarrisConfigStatics
{
friend class CornerHarrisConfig;
CornerHarrisConfigStatics()
{
CornerHarrisConfig::GroupDescription<CornerHarrisConfig::DEFAULT, CornerHarrisConfig> Default("Default", "", 0, 0, true, &CornerHarrisConfig::groups);
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.use_camera_info = 0;
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.use_camera_info = 1;
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.use_camera_info = 0;
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(CornerHarrisConfig::AbstractParamDescriptionConstPtr(new CornerHarrisConfig::ParamDescription<bool>("use_camera_info", "bool", 0, "Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.", "", &CornerHarrisConfig::use_camera_info)));
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(CornerHarrisConfig::AbstractParamDescriptionConstPtr(new CornerHarrisConfig::ParamDescription<bool>("use_camera_info", "bool", 0, "Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.", "", &CornerHarrisConfig::use_camera_info)));
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.threshold = 0;
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.threshold = 255;
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.threshold = 200;
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(CornerHarrisConfig::AbstractParamDescriptionConstPtr(new CornerHarrisConfig::ParamDescription<int>("threshold", "int", 0, "Threshold of corner.", "", &CornerHarrisConfig::threshold)));
//#line 280 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(CornerHarrisConfig::AbstractParamDescriptionConstPtr(new CornerHarrisConfig::ParamDescription<int>("threshold", "int", 0, "Threshold of corner.", "", &CornerHarrisConfig::threshold)));
//#line 235 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.convertParams();
//#line 235 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__group_descriptions__.push_back(CornerHarrisConfig::AbstractGroupDescriptionConstPtr(new CornerHarrisConfig::GroupDescription<CornerHarrisConfig::DEFAULT, CornerHarrisConfig>(Default)));
//#line 353 "/opt/ros/kinetic/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template"
for (std::vector<CornerHarrisConfig::AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i)
{
__description_message__.groups.push_back(**i);
}
__max__.__toMessage__(__description_message__.max, __param_descriptions__, __group_descriptions__);
__min__.__toMessage__(__description_message__.min, __param_descriptions__, __group_descriptions__);
__default__.__toMessage__(__description_message__.dflt, __param_descriptions__, __group_descriptions__);
}
std::vector<CornerHarrisConfig::AbstractParamDescriptionConstPtr> __param_descriptions__;
std::vector<CornerHarrisConfig::AbstractGroupDescriptionConstPtr> __group_descriptions__;
CornerHarrisConfig __max__;
CornerHarrisConfig __min__;
CornerHarrisConfig __default__;
dynamic_reconfigure::ConfigDescription __description_message__;
static const CornerHarrisConfigStatics *get_instance()
{
// Split this off in a separate function because I know that
// instance will get initialized the first time get_instance is
// called, and I am guaranteeing that get_instance gets called at
// most once.
static CornerHarrisConfigStatics instance;
return &instance;
}
};
inline const dynamic_reconfigure::ConfigDescription &CornerHarrisConfig::__getDescriptionMessage__()
{
return __get_statics__()->__description_message__;
}
inline const CornerHarrisConfig &CornerHarrisConfig::__getDefault__()
{
return __get_statics__()->__default__;
}
inline const CornerHarrisConfig &CornerHarrisConfig::__getMax__()
{
return __get_statics__()->__max__;
}
inline const CornerHarrisConfig &CornerHarrisConfig::__getMin__()
{
return __get_statics__()->__min__;
}
inline const std::vector<CornerHarrisConfig::AbstractParamDescriptionConstPtr> &CornerHarrisConfig::__getParamDescriptions__()
{
return __get_statics__()->__param_descriptions__;
}
inline const std::vector<CornerHarrisConfig::AbstractGroupDescriptionConstPtr> &CornerHarrisConfig::__getGroupDescriptions__()
{
return __get_statics__()->__group_descriptions__;
}
inline const CornerHarrisConfigStatics *CornerHarrisConfig::__get_statics__()
{
const static CornerHarrisConfigStatics *statics;
if (statics) // Common case
return statics;
boost::mutex::scoped_lock lock(dynamic_reconfigure::__init_mutex__);
if (statics) // In case we lost a race.
return statics;
statics = CornerHarrisConfigStatics::get_instance();
return statics;
}
}
#endif // __CORNERHARRISRECONFIGURATOR_H__
| [
"15018787835@163.com"
] | 15018787835@163.com |
23de15d36a7f7e8abac521fa8e394a0bcf72cb15 | a499fbdd93f85a286505433a08afc25d84c8ff04 | /include/tvm/relay/attrs/function.h | f4f94131da1f53783c57c97026b948b38af12bcf | [
"Apache-2.0",
"Zlib",
"MIT",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense"
] | permissive | elphinkuo/tvm | a81e0ccc5950a1473efdcdbb8263de9adbe36787 | 9df2ae8eaa8b394013182a7ad09ac57fe401f80e | refs/heads/main | 2023-08-05T07:41:18.652097 | 2021-09-28T00:38:26 | 2021-09-28T00:38:26 | 411,311,927 | 2 | 0 | Apache-2.0 | 2021-09-28T14:51:56 | 2021-09-28T14:17:46 | null | UTF-8 | C++ | false | false | 2,332 | h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
/*!
* \file tvm/relay/attrs/function.h
* \brief Attributes for Relay Functions which don't make sense on PrimFuncs.
*/
#ifndef TVM_RELAY_ATTRS_FUNCTION_H_
#define TVM_RELAY_ATTRS_FUNCTION_H_
namespace tvm {
namespace relay {
/*!
* \brief Attributes for Relay function definitions which capture the devices for the
* function parameters and result.
*
* See also OnDeviceAttrs in include/tvm/relay/attrs/annotation.h for the companion "on_device"
* call attributes.
*/
struct FunctionOnDeviceAttrs : public tvm::AttrsNode<FunctionOnDeviceAttrs> {
/*! \brief Device type on which each of the function's arguments already resides. */
Array<Integer> param_device_types;
// TODO(mbs): Replace device types with TargetDevice.
/*! \brief Device type on which function body should be evaluated. */
int result_device_type = kInvalidDeviceType;
TVM_DECLARE_ATTRS(FunctionOnDeviceAttrs, "relay.attrs.FunctionOnDeviceAttrs") {
TVM_ATTR_FIELD(param_device_types)
.describe("The type of the virtual device which holds each function parameters.");
TVM_ATTR_FIELD(result_device_type)
.describe("The type of the virtual device which will hold the function's result.")
.set_default(0);
}
};
namespace attr {
/*!
* \brief Device annotations for function parameters and results.
*
* Type: FunctionOnDeviceAttrs
*/
constexpr static const char* kFunctionAttrsKey = "on_device";
} // namespace attr
} // namespace relay
} // namespace tvm
#endif // TVM_RELAY_ATTRS_FUNCTION_H_
| [
"noreply@github.com"
] | noreply@github.com |
423380d58126eb9d770444f809b984f95b4ddb1f | beb7e10724ea6a0bb9a23feeb03c58e9e7de0e13 | /hazi_2/vector2.cpp | 824f9e88ac817fc64b939729ae2a6f03a87a0977 | [] | no_license | shootingszter/mod_comp_methods_1 | a29ba821aaf444c242a9eefe50f568c5d614bad6 | 3b18b438c83c2642a0d02e773b9b57ec3259875d | refs/heads/main | 2023-04-17T04:58:18.858182 | 2021-05-05T19:46:52 | 2021-05-05T19:46:52 | 345,790,798 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,888 | cpp | #include <iostream>
#include <ostream>
//általam csinált header "" közt
#include "vector2.h"
//meghívom a headerben definiált műveleteket
int main()
{
Vector2<double> v1{}, v2{};
std::cout << "Enter vector 1:\n";
std::cin >> v1;
std::cout << "Enter vector 2:\n";
std::cin >> v2;
Vector2<double> sum = operator+(v1, v2);
std::cout << "vector1 + vector2 = " << sum << "\n";
std::cout << "--\n";
Vector2<double> sub = operator-(v1, v2);
std::cout << "vector1 - vector2 = " << sub << "\n";
std::cout << "--\n";
double scalar;
std::cout << "Enter a scalar:\n";
std::cin >> scalar;
Vector2<double> scalar1 = operator*(v1, scalar);
Vector2<double> scalar2 = operator*(v2, scalar);
Vector2<double> scalar_left1 = operator*(scalar, v1);
Vector2<double> scalar_left2 = operator*(scalar, v2);
std::cout << "scalar1 " << scalar1 << "\n";
std::cout << "scalar2 " << scalar2 << "\n";
std::cout << "--\n";
std::cout << "scalar_left1 " << scalar_left1 << "\n";
std::cout << "scalar_left2 " << scalar_left2 << "\n";
std::cout << "--\n";
double dot_prod = dot(v1, v2);
std::cout << "dot product " << dot_prod << "\n";
std::cout << "--\n";
double length1 = length(v1);
double length2 = length(v2);
std::cout << "length 1 " << length1 << "\n";
std::cout << "length 2 " << length2 << "\n";
std::cout << "--\n";
double sq1 = sqlength(v1);
double sq2 = sqlength(v2);
std::cout << "square length 1 " << sq1 << "\n";
std::cout << "square length 2 " << sq2 << "\n";
std::cout << "--\n";
Vector2<double> norm1 = normalize(v1);
Vector2<double> norm2 = normalize(v2);
std::cout << "first vector normalization " << norm1 << "\n";
std::cout << "second vector normalization " << norm2 << "\n";
return 0;
}
| [
"juharoseszter@gmail.com"
] | juharoseszter@gmail.com |
feaca4ac1e8a94017e5d271850eec0069b810b05 | 016698d5f1c0f1db67d75bc99abfb92623d1e125 | /ChessFiles/Knight.h | 157a887ac08c7aa24026bf538592b6c1fb7a02ca | [] | no_license | nandrews17/C-ChessGame | 4846273711099b9852b139960cb84cdaeb34a105 | e637576930d7c0e567d508515bbea2efacc07f7a | refs/heads/main | 2023-05-13T20:43:26.967918 | 2021-06-08T23:06:23 | 2021-06-08T23:06:23 | 375,166,224 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 761 | h | /**
* Project Chess
* @author Nathan Andrews
* @mastermind Brian R. Snider
*/
#ifndef _KNIGHT_H
#define _KNIGHT_H
#include "Piece.h"
class Knight: public Piece {
public:
/**
* Constructor for a Knight piece in chess
* @param color The color (team) of the piece
* @param location The initial location to place the piece on a board
*/
Knight(string color, Square* location);
/**
* Returns the integer value of the knight
*/
int getValue();
/**
* Checks a given square to see if the knight can move to it
* @param location The location on a board to check
*/
bool canMoveTo(Square* location);
/**
* Displays the individual Knight piece
*/
void display();
/**
* Destructor for a Knight piece in chess
*/
~Knight();
};
#endif //_KNIGHT_H | [
"noreply@github.com"
] | noreply@github.com |
95cce7944a48a9eddf2bcbf908b43796d2b090ff | de8d7892b9745bc3e5cb37e16d703324442b058a | /stack.cpp | 2ba8dee35bb00b1c483ca56a7d5ecdbf90b8a723 | [] | no_license | domitilacrispim/CodingPractice | b7270aa4ef440fe776f29198c76156486ede4d3b | 2b24db5b056fec7c9bd645703a1a6e737ab17e0d | refs/heads/master | 2020-04-03T16:03:44.438803 | 2018-10-30T13:35:25 | 2018-10-30T13:35:25 | 155,389,508 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 622 | cpp | #include<bits/stdc++.h>
int main (){
int stack[100], op, top=0;
while(1){
printf("Press 1 to insert, 2 to remove, 3 to see the lenght and any other number to exit!\n");
printf("The stack supports until 100 elements.\n");
scanf("%d", &op);
if(op==1) {
if(top==99){
printf("The stack is full!\n"); continue;
}
printf("Type an integer!\n");
scanf("%d", &op);
stack[top]=op;
top++;
continue;
}
else if(op==2){
if(top==0) { printf("The stack is empty!\n"); continue;}
printf("Removed : %d \n " , stack[--top]);
}
else if (op==3) printf("%d\n", top);
else return 0;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
92af7e5aa07429bf5ffa04b188512aeacb43cd75 | 9d97f9acd33b8fd6a302ba263ffc73031bc1fbc1 | /CollinsBlink.ino | ba72faadce930688faeb79067bede0a04f727509 | [] | no_license | TheCollo67/BlinkName | 74690c1b7ebdf00473073e99c89dbad434c773f2 | 4bf89e414da83e82ce232b8c8c537fe5709ecf47 | refs/heads/master | 2021-09-09T12:38:19.830099 | 2018-03-16T06:03:05 | 2018-03-16T06:03:05 | 125,470,437 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,552 | ino | int led1 = D0;
int led2 = D7;
void setup() {
// We are going to tell our device that D0 and D7 (which we named led1 and led2 respectively) are going to be output
// (That means that we will be sending voltage to them, rather than monitoring voltage that comes from them)
// It's important you do this here, inside the setup() function rather than outside it or in the loop function.
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
}
void loop() {
// My Last name is: COLLINS
// In Morse: C: -.-. O: --- L: .-.. L: .-.. I: .. N: -. S: ...
// C
longblink(); shortblink(); longblink(); shortblink();
// O
longblink(); longblink(); longblink();
// L
shortblink(); longblink(); shortblink(); shortblink();
// L
shortblink(); longblink(); shortblink(); shortblink();
// I
shortblink(); shortblink();
// N
longblink(); shortblink();
// S
shortblink(); shortblink(); shortblink();
}
void longblink()
{
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
// We'll leave it on for 1 second...
delay(1000);
// Then we'll turn it off...
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
delay(1000);
}
void shortblink()
{
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
// We'll leave it on for 0.5 second...
delay(500);
// Then we'll turn it off...
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
delay(500);
}
| [
"noreply@github.com"
] | noreply@github.com |
a10a771f562536784638f9eb45222bd8cce9d409 | e6dbe2658a3e8d1972c64519228c2235e7cef663 | /tpc-e-tool/src/bucketsimulator.cpp | 3ec982aca78a313fa50078387216f7baa3b64e44 | [] | no_license | nemanjakojic/tpce-benchmark-tools | e4be67916f5710169305d96dc7c8cb394d3645b6 | 4075f0c5a722c26971a4dd42bd80bc176cc4a6de | refs/heads/main | 2023-01-08T12:37:23.342371 | 2020-11-05T08:10:47 | 2020-11-05T08:10:47 | 310,186,981 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,720 | cpp | /*
* Legal Notice
*
* This document and associated source code (the "Work") is a part of a
* benchmark specification maintained by the TPC.
*
* The TPC reserves all right, title, and interest to the Work as provided
* under U.S. and international laws, including without limitation all patent
* and trademark rights therein.
*
* No Warranty
*
* 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION
* CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE
* AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER
* WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
* INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES,
* DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
* PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
* WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE.
* ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
* QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT
* WITH REGARD TO THE WORK.
* 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO
* ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE
* COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS
* OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT,
* INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY,
* OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT
* RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD
* ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
*
* Contributors
* - Christopher Chan-Nui
* - Cecil Reames
*/
#include "../Utilities/inc/threading.h"
#include "../inc/unusedflag.h"
#include <stdexcept>
#include <iomanip>
#include "../inc/bucketsimulator.h"
namespace TPCE
{
BucketSimulator::BucketSimulator(
int iterstart,
int itercount,
TIdent iCustomerCount,
INT64 simorders,
TPCE::RNGSEED base_seed,
BucketProgress& progress)
: m_rnd()
, m_buckets(NULL)
, m_custcount(iCustomerCount)
, m_iterstart(iterstart)
, m_itercount(itercount)
, m_baseseed(base_seed)
, m_simorders(simorders)
, m_maxbucket(static_cast<int>(iCustomerCount/iDefaultLoadUnitSize))
, m_progress(progress)
{
if (iCustomerCount % iDefaultLoadUnitSize != 0) {
throw std::range_error("The customer count must be an integral multiple of the load unit size!");
}
if (m_maxbucket < 2) {
throw std::range_error("Bucket simulator must have at least 2 buckets!");
}
m_buckets = new INT64[m_maxbucket];
}
BucketSimulator::~BucketSimulator() {
delete[] m_buckets;
}
// Calculate the standard deviation of the current bucket
// Use straightforward method rather than sum of squares...
double BucketSimulator::calc_stddev() {
double sum = 0;
for (int i = 0; i < m_maxbucket; ++i) {
sum += m_buckets[i];
}
double mean = sum/(double)m_maxbucket;
double sumdev2 = 0;
for (int i = 0; i < m_maxbucket; ++i) {
sumdev2 += (m_buckets[i] - mean) * (m_buckets[i] - mean);
}
double stddev = sqrt( sumdev2/(double)(m_maxbucket-1) );
return stddev;
}
// Simulates one run and returns the standard deviation of the buckets
// iterations - Number of "orders" to simulate (note that we don't take into
// account the 1% rollbacks)
double BucketSimulator::simulate_onerun(INT64 iorders) {
int bucket;
memset(m_buckets, 0, sizeof(m_buckets[0])*m_maxbucket);
for (INT64 i = 0; i < iorders; ++i) {
bucket = m_rnd.RndIntRange( 0, static_cast<int>((m_custcount - 1) / static_cast<TIdent>(iDefaultLoadUnitSize)) );
m_buckets[bucket] += 1;
}
return calc_stddev();
}
// Perform all of the simulations this instance was constructed with and return
// the maximum standard deviation
double BucketSimulator::simulate() {
double max_stddev = 0;
TPCE::RNGSEED seed = m_rnd.RndNthElement(m_baseseed,
(RNGSEED)(m_iterstart*m_simorders*RND_STEP_PER_ORDER));
m_rnd.SetSeed(seed);
for (int i = 0; i < m_itercount; ++i) {
TPCE::RNGSEED current_seed = m_rnd.GetSeed();
double stddev = simulate_onerun(m_simorders);
std::ostringstream strm;
strm << "StdDev for run " << i+m_iterstart << " is "
<< std::setprecision(3) << std::fixed
<< stddev << ", seed was " << current_seed;
m_progress.message(strm.str(), 1);
if (max_stddev < stddev) {
max_stddev = stddev;
}
if (!m_progress.report(stddev)){
break;
}
}
return max_stddev;
}
// Entry point to be run as a thread
void BucketSimulator::run(void* thread UNUSED) {
simulate();
}
//////////////////////////////////////////////////////////////////////////////
BucketProgress::BucketProgress(double acceptable_stddev, int total_in, int verbosity, std::ostream* output)
: ProgressMeter(total_in, verbosity, output)
, acceptable_stddev_(acceptable_stddev)
, max_stddev_(0)
{
}
void BucketProgress::display_message(std::ostream& out) const
{
ProgressMeter::display_message(out);
out << " stddev=" << max_stddev_;
}
bool BucketProgress::report(double stddev) {
inc();
TPCE::Locker<ProgressMeter> locker(*this);
if (max_stddev_ < stddev) {
max_stddev_ = stddev;
}
return (max_stddev_ < acceptable_stddev_);
}
double BucketProgress::max_stddev() {
TPCE::Locker<ProgressMeter> locker(*this);
return max_stddev_;
}
}
| [
"nemanja.kojic@etf.rs"
] | nemanja.kojic@etf.rs |
156a51a5cf75fede81390c9a88827959a474b7a7 | 53a0fe90066bb5d5d3aefae3cc5420c3473014de | /Programming Methodology & Data Structures/Assignment 1/ContactPerson.h | 96a88fcacbd341b381165dc66a7791ff12988941 | [] | no_license | aaronchongkh/Degree-Year-1 | c59ea0cefa5b72d7cfc087039c506b26b67dfcd9 | b23b3df4e321a4e7ed86137f8e69f4baac787caa | refs/heads/master | 2021-01-01T16:36:09.981318 | 2017-07-20T18:13:49 | 2017-07-20T18:13:49 | 97,862,022 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 387 | h | #ifndef CONTACTPERSON_H
#define CONTACTPERSON_H
#include <string>
using namespace std;
class ContactPerson
{
public:
void receivename(string);
void receivecontactno(string);
void receiveemail(string);
string getname();
string getcontactno();
string getemail();
ContactPerson();
~ContactPerson();
private:
string name;
string contactno;
string email;
};
#endif
| [
"aaronchongkh@gmail.com"
] | aaronchongkh@gmail.com |
c3877b9d224187a4980ee24ee6ba7caffecad1bb | be5b143d80b12a8df07f71e5125a4b9601976ac9 | /COPS/csoc-greedy/s.cpp | c5bf6ac6575c6c3359c7b0e6c9f9b159e01644c4 | [] | no_license | king-11/Competitive-Programming | e523349c9fe33e88356c0646be4999b387d03e0f | ba2ac53fb38ba45733c7d90dc43d161fe97026dc | refs/heads/master | 2023-06-17T18:01:49.757197 | 2021-07-20T18:25:01 | 2021-07-20T18:25:01 | 281,563,160 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,929 | cpp | /**
* @ Author: Lakshya Singh
* @ Create Time: 2020-06-15 20:50:55
* @ Modified by: Target_X
* @ Modified time: 2020-06-16 22:13:41
* @ Description:
*/
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repA(i, a, n) for (int i = a; i <= (n); ++i)
#define repD(i, a, n) for (int i = a; i >= (n); --i)
#define tr(a, x) for (auto &a : x)
#define all(c) c.begin(), c.end()
#define lld long long
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define f first
#define s second
#define sz(a) int((a).size())
#define present(c, x) (c.find(x) != c.end())
#define cpresent(c, x) (find(all(c), x) != c.end())
#define vi vector<lld>
#define si set<lld>
#define endl "\n"
#define int long long
#define pii pair<int, int>
#define minq priority_queue<int, vector<int>, greater<int>>
#define mem(a, val) memset(a, val, sizeof(a))
using namespace std;
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s, t;
cin >> s >> t;
int a = abs(s[0] - t[0]);
int b = abs(s[1] - t[1]);
cout << max(a, b) << "\n";
int diff = min(a, b);
a = abs(a - diff);
b = abs(b - diff);
if (s[1] > t[1])
{
if (s[0] > t[0])
while (diff--)
cout << "LD\n";
else
while (diff--)
cout << "RD\n";
}
else
{
if (s[0] > t[0])
while (diff--)
cout << "LU\n";
else
while (diff--)
cout << "RU\n";
}
if (a != 0 && b == 0)
{
if (s[0] < t[0])
while (a--)
cout << "R\n";
else
while (a--)
cout << "L\n";
}
else if (a == 0 && b != 0)
{
if (s[1] < t[1])
while (b--)
cout << "U\n";
else
while (b--)
cout << "D\n";
}
} | [
"lakshay.singh1108@gmail.com"
] | lakshay.singh1108@gmail.com |
d4d9717226ef0816ef44d45314494d91c2fa162e | 9514843cf268fe0e8fd276ea1d7f58921312076f | /mainwindow.cpp | d69cf3ca1f42e09d1d51067c875cb9bb3e7d93c5 | [] | no_license | mtlsoft/desktop | 19a272648f5acd56345f36f7ca81b9c75ac5be27 | eac3da6d4bcdbca15b923afd2b274994fa9cc656 | refs/heads/master | 2016-09-13T14:20:53.998743 | 2016-05-27T23:54:22 | 2016-05-27T23:54:22 | 58,226,238 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 29,305 | cpp | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDomDocument>
#include <QFile>
#include <QMessageBox>
#include "createpagedialog.h"
#include <QDebug>
#include <qjson/serializer.h>
#include <QInputDialog>
#include <QFileDialog>
#include <QColorDialog>
#include <QUrl>
#include <QSettings>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
connect(ui->treeView,
SIGNAL(doubleClicked(const QModelIndex&)),
SLOT(slotDoubleClicked(const QModelIndex&)));
QSettings settings("settings.ini",
QSettings::IniFormat);
m_configuration.column_width_key =
settings.value("ColumnWidthKey", 100).toInt();
m_configuration.column_width_value =
settings.value("ColumnWidthValue", 100).toInt();
m_configuration.last_opened_dir_save =
settings.value("LastOpenedDirSave", QDir::homePath()).toString();
m_configuration.last_opened_dir_load =
settings.value("LastOpenedDirLoad", QDir::homePath()).toString();
m_configuration.last_opened_dir_icon =
settings.value("LastOpenedDirIcon", QDir::homePath()).toString();
m_configuration.last_opened_dir_file =
settings.value("LastOpenedDirFile", QDir::homePath()).toString();
m_model = 0;
m_pages_root_item = 0;
connect(ui->actionNew_page,
SIGNAL(triggered(bool)),
SLOT(slotTriggered(bool)));
connect(ui->actionPublish,
SIGNAL(triggered(bool)),
SLOT(slotReleasePublish(bool)));
connect(ui->actionSave,
SIGNAL(triggered(bool)),
SLOT(slotSave(bool)));
connect(ui->actionLoad,
SIGNAL(triggered(bool)),
SLOT(slotLoad(bool)));
connect(ui->actionNew,
SIGNAL(triggered(bool)),
SLOT(slotNewProject(bool)));
m_page_counter = 0;
}
MainWindow::~MainWindow()
{
clearModel();
QSettings settings("settings.ini",
QSettings::IniFormat);
settings.setValue("ColumnWidthKey", m_configuration.column_width_key);
settings.setValue("ColumnWidthValue", m_configuration.column_width_value);
settings.setValue("LastOpenedDirSave", m_configuration.last_opened_dir_save);
settings.setValue("LastOpenedDirLoad", m_configuration.last_opened_dir_load);
settings.setValue("LastOpenedDirIcon", m_configuration.last_opened_dir_icon);
settings.setValue("LastOpenedDirFile", m_configuration.last_opened_dir_file);
delete ui;
}
void MainWindow::init()
{
QFile file(":/test_data.xml");
if(file.open(QIODevice::ReadOnly))
{
QDomDocument doc;
if(!doc.setContent(file.readAll()))
QMessageBox::critical(this,
tr("critical"),
tr("Bad format!"));
QDomNode root_node = doc.firstChild().firstChild();
if(!root_node.isNull())
{
while (!root_node.isNull()) {
if(root_node.toElement().tagName() == "modules")
{
QDomNode module_node = root_node.firstChild();
while (!module_node.isNull()) {
if(module_node.toElement().tagName() == "module")
{
Module tmp_mod;
QDomNode module_data = module_node.firstChild();
while (!module_data.isNull()) {
module_data.toElement().tagName();
if(module_data.toElement().tagName() ==
"tag")
{
tmp_mod.tag = module_data.toElement().text();
}
else if(module_data.toElement().tagName() ==
"title")
{
tmp_mod.title = module_data.toElement().text();
}
else if(module_data.toElement().tagName() ==
"description")
{
tmp_mod.description = module_data.toElement().text();
}
else if(module_data.toElement().tagName() ==
"parameters")
{
QDomNode param_node = module_data.firstChild();
while(!param_node.isNull())
{
ModuleParam module_param;
module_param.name =
param_node.toElement().attribute("name");
QString type =
param_node.toElement().attribute("type");
// TypeString,
// TypeReal,
// TypeInt,
// TypeUrl,
// TypeColor,
// TypeAny
if(type == "string")
module_param.type =
ModuleParam::TypeString;
else if(type == "real")
module_param.type =
ModuleParam::TypeReal;
else if(type == "int")
module_param.type =
ModuleParam::TypeInt;
else if(type == "url")
module_param.type =
ModuleParam::TypeUrl;
else if(type == "color")
module_param.type =
ModuleParam::TypeColor;
else if(type == "file")
module_param.type =
ModuleParam::TypeFile;
else if(type == "any" || type == "")
module_param.type =
ModuleParam::TypeAny;
tmp_mod.parameters << module_param;
param_node = param_node.nextSibling();
}
}
module_data = module_data.nextSibling();
}
m_modules_map.insert(tmp_mod.tag, tmp_mod);
module_node = module_node.nextSibling();
}
}
}
root_node = root_node.nextSibling();
}
}
else
{
QMessageBox::critical(this,
tr("Critical!"),
tr("Bad xml file!"));
}
}
else
{
QMessageBox::critical(this,
tr("Critical!"),
tr("Cant open file!"));
}
}
void MainWindow::createPage(PageCreator creator)
{
QStandardItem *page_item = new QStandardItem(creator.title);
page_item->setFlags(page_item->flags() & Qt::ItemIsEnabled);
if(!creator.icon_path.isEmpty())
{
QUrl url(creator.icon_path);
if(url.isValid())
{
QString icon_path = url.toLocalFile();
page_item->setIcon(QIcon(icon_path));
page_item->setData(icon_path,
RolePageIconPath);
}
}
page_item->setData(creator.id, RolePageId);
Module tmp_mod = m_modules_map.value(creator.module_tag);
QStandardItem *module_item = new QStandardItem(tmp_mod.title);
module_item->setData(tmp_mod.tag, RoleModuleTag);
module_item->setData(tmp_mod.description, Qt::ToolTipRole);
module_item->setFlags(module_item->flags() & Qt::ItemIsEnabled);
foreach (ModuleParam param, tmp_mod.parameters) {
QStandardItem *module_key = new QStandardItem(param.name);
module_key->setFlags(module_key->flags() & Qt::ItemIsEnabled);
QStandardItem *module_value = new QStandardItem();
module_value->setData(param.type,
RoleParamType);
// TODO: fail
module_value->setData(creator.module_param.value(param.name).disp_role,
Qt::DisplayRole);
module_value->setData(creator.module_param.value(param.name).data_role,
RoleItemData);
int row = module_item->rowCount();
module_item->setChild(row,
0,
module_key);
module_item->setChild(row,
1,
module_value);
}
page_item->appendRow(module_item);
m_pages_root_item->appendRow(page_item);
}
void MainWindow::slotTriggered(bool)
{
if(m_pages_root_item)
{
bool ok;
CreatePageDialog::PageParam pp =
CreatePageDialog::getCreatePageParam(m_modules_map.keys(),
ok);
if(ok)
{
PageCreator creator;
creator.title = pp.title;
creator.module_tag = pp.module_tag;
creator.icon_path = pp.icon_path;
creator.id = QString::number(m_page_counter);
m_page_counter++;
createPage(creator);
}
}
}
void MainWindow::publishPrivate(bool is_local)
{
QString project_dir =
QFileDialog::getExistingDirectory(this,
tr("Get project directory"),
QDir::homePath()); // TODO
// bool ok;
// QString proj_dir =
// QInputDialog::getText(this,
// tr("Get save project name"),
// tr("Project:"),
// QLineEdit::Normal,
// tr("Project"),
// &ok);
if(!project_dir.isEmpty())
{
QDomDocument doc;
QDomElement rcc_elem = doc.createElement("RCC");
QDomElement qres_elem = doc.createElement("qresource");
qres_elem.setAttribute("prefix", "/modules");
QDomElement qres_not_prefix_elem = doc.createElement("qresource");
qres_not_prefix_elem.setAttribute("prefix", "/");
QDir dir(project_dir);
dir.mkdir("pages");
QVariant result;
QVariantMap result_map;
QVariantMap meta_map;
QVariantList pages_list;
QVariantMap page_map;
for(int i = 0;
i < m_pages_root_item->rowCount();
i++)
{
QStandardItem *page_item = m_pages_root_item->child(i);
page_map.insert("id",
page_item->data(RolePageId));
page_map.insert("title",
page_item->data(Qt::DisplayRole));
QString icon_path;
if(is_local)
{
icon_path = QUrl::fromLocalFile(
page_item->data(RolePageIconPath).toString()).toString();
}
else
{
QString src_path =
QUrl(page_item->data(RolePageIconPath).toString()).toLocalFile();
QString dest_path;
icon_path =
QString("pages") +
QDir::separator() +
page_item->data(RolePageId).toString();
dir.mkpath(icon_path);
icon_path +=
QDir::separator() +
QFileInfo(src_path).fileName();
dest_path =
dir.absolutePath() +
QDir::separator() +
icon_path;
QFile::copy(src_path, dest_path);
}
QDomElement file_elem = doc.createElement("file");
QDomText file_text = doc.createTextNode(icon_path);
file_elem.appendChild(file_text);
qres_not_prefix_elem.appendChild(file_elem);
page_map.insert("icon", icon_path);
for(int j = 0;
j < page_item->rowCount();
j++)
{
QStandardItem *module_item = page_item->child(j);
page_map.insert("module",
module_item->data(RoleModuleTag).toString());
QVariantMap prop_map;
for(int k = 0;
k < module_item->rowCount();
k++)
{
QStandardItem* prop_key = module_item->child(k);
QStandardItem* prop_value = module_item->child(k, 1);
if(is_local)
{
prop_map.insert(prop_key->data(Qt::DisplayRole).toString(),
prop_value->data(RoleItemData).toString());
}
else
{
if(prop_value->data(RoleParamType).toInt() ==
ModuleParam::TypeFile) {
QString src_path =
QUrl(prop_value->data(RoleItemData).toString())
.toLocalFile();
QString dest_path;
QString relative_path =
QString("pages") +
QDir::separator() +
page_item->data(RolePageId).toString() +
QDir::separator() +
module_item->data(RoleModuleTag).toString();
dir.mkpath(relative_path);
relative_path += QDir::separator() +
QFileInfo(src_path).fileName();
dest_path =
dir.absolutePath() +
QDir::separator() +
relative_path;
QFile::copy(src_path, dest_path);
prop_map.insert(prop_key->data(Qt::DisplayRole).toString(),
relative_path);
// TODO: fail
QDomElement file_elem = doc.createElement("file");
QDomText file_text = doc.createTextNode(relative_path);
file_elem.appendChild(file_text);
qres_elem.appendChild(file_elem);
}
else
{
prop_map.insert(prop_key->data(Qt::DisplayRole).toString(),
prop_value->data(RoleItemData).toString());
}
}
}
page_map.insert("module_local_data", prop_map);
}
pages_list << page_map;
}
result_map.insert("meta", meta_map);
result_map.insert("pages", pages_list);
result = result_map;
bool ok;
QByteArray ba = QJson::Serializer().serialize(result, &ok);
if(ok)
{
qDebug() << ba;
QString schema_name = "schema.json";
QString save_file =
dir.absolutePath() +
QDir::separator() +
schema_name;
QFile file(save_file);
if(file.open(QIODevice::WriteOnly))
{
file.write(ba);
QDomElement file_elem = doc.createElement("file");
QDomText file_text = doc.createTextNode(schema_name);
file_elem.appendChild(file_text);
qres_not_prefix_elem.appendChild(file_elem);
}
else
{
QMessageBox::critical(this,
tr("Critical!"),
tr("Can't save file %1!").arg(save_file));
}
rcc_elem.appendChild(qres_not_prefix_elem);
rcc_elem.appendChild(qres_elem);
doc.appendChild(rcc_elem);
QString save_rcc_file =
dir.absolutePath() +
QDir::separator() +
"res.qrc";
QFile rcc_file(save_rcc_file);
if(rcc_file.open(QIODevice::WriteOnly))
{
rcc_file.write(doc.toByteArray());
}
else
{
}
}
}
}
void MainWindow::slotReleasePublish(bool)
{
publishPrivate(false);
}
void MainWindow::slotLocalPublish(bool)
{
}
void MainWindow::slotDoubleClicked(const QModelIndex& index)
{
QVariant role;
role = index.data(RoleParamType);
if(role.isValid())
{
ModuleParam::ModuleParamType type =
(ModuleParam::ModuleParamType)role.toInt();
QVariant disp_role, data_role;
bool ok;
QVariant data;
switch (type) {
case ModuleParam::TypeString:
data = QInputDialog::getText(this,
tr("Input text"),
tr("Text:"),
QLineEdit::Normal,
"",
&ok);
if(ok)
disp_role = data_role = data;
break;
case ModuleParam::TypeReal:
data = QInputDialog::getDouble(this,
tr("Input real value"),
tr("Value:"),
0,
-2147483647,
2147483647,
1,
&ok);
if(ok)
disp_role = data_role = data;
break;
case ModuleParam::TypeInt:
data = QInputDialog::getInt(this,
tr("Input integer value"),
tr("Value:"),
0,
-2147483647,
2147483647,
1,
&ok);
if(ok)
disp_role = data_role = data;
break;
case ModuleParam::TypeUrl:
data = QInputDialog::getText(this,
tr("Input URL"),
tr("URL:"),
QLineEdit::Normal,
"",
&ok);
if(ok)
disp_role = data_role = data;
break;
case ModuleParam::TypeFile:
{
QString file_path = QFileDialog::getOpenFileName(this,
tr("Open file"),
QDir::homePath());
if(!file_path.isEmpty())
{
disp_role = file_path;
data_role = QUrl::fromLocalFile(file_path);
}
}
break;
case ModuleParam::TypeColor:
{
QColor color = QColorDialog::getColor();
if(color.isValid())
{
disp_role = data_role = color.name();
}
}
break;
case ModuleParam::TypeAny:
break;
default:
break;
}
QStandardItem* tmp_item = m_model->itemFromIndex(index);
if(tmp_item)
{
tmp_item->setData(disp_role, Qt::DisplayRole);
tmp_item->setData(data_role, RoleItemData);
}
}
}
void MainWindow::slotSave(bool)
{
if(m_pages_root_item)
{
QDomDocument doc;
QDomElement project_elem = doc.createElement("project");
QDomElement pages_elem = doc.createElement("pages");
for (int i = 0; i < m_pages_root_item->rowCount(); ++i) {
QStandardItem *page_item = m_pages_root_item->child(i);
QDomElement page_elem = doc.createElement("page");
page_elem.setAttribute("id", page_item->data(RolePageId).toString());
QDomElement page_title_elem = doc.createElement("title");
QDomText page_title_text = doc.createTextNode(page_item->data(Qt::DisplayRole).toString());
page_title_elem.appendChild(page_title_text);
QDomElement page_icon_elem = doc.createElement("icon_path");
QDomText page_icon_text = doc.createTextNode(
QUrl::fromLocalFile(page_item->data(RolePageIconPath).toString()).toString());
page_icon_elem.appendChild(page_icon_text);
page_elem.appendChild(page_title_elem);
page_elem.appendChild(page_icon_elem);
for (int j = 0; j < page_item->rowCount(); ++j) {
QStandardItem *module_item = page_item->child(j);
QDomElement module_elem = doc.createElement("module");
module_elem.setAttribute("tag", module_item->data(RoleModuleTag).toString());
for (int k = 0; k < module_item->rowCount(); ++k) {
QStandardItem *module_item_param_key = module_item->child(k);
QStandardItem *module_item_param_val = module_item->child(k, 1);
QDomElement module_param_elem = doc.createElement("param");
QDomText module_param_text = doc.createTextNode(module_item_param_val->data(RoleItemData).toString());
module_param_elem.setAttribute("name",
module_item_param_key->data(Qt::DisplayRole).toString());
module_param_elem.appendChild(module_param_text);
module_elem.appendChild(module_param_elem);
}
page_elem.appendChild(module_elem);
}
pages_elem.appendChild(page_elem);
}
project_elem.appendChild(pages_elem);
doc.appendChild(project_elem);
QString save_file = QFileDialog::getSaveFileName(this,
tr("Save project"),
m_configuration.last_opened_dir_save);
if(!save_file.isEmpty())
{
QByteArray ba = doc.toByteArray();
qDebug() << ba;
QFileInfo fi(save_file);
m_configuration.last_opened_dir_save = fi.absolutePath();
QFile file(save_file);
if(file.open(QIODevice::WriteOnly))
{
file.write(ba);
}
else
{
QMessageBox::critical(this,
tr("Critical!"),
tr("Cant save file %1!").arg(save_file));
}
}
}
}
void MainWindow::slotLoad(bool)
{
QString open_file = QFileDialog::getOpenFileName(this,
tr("Open existing project"),
m_configuration.last_opened_dir_load);
if(!open_file.isEmpty())
{
QFileInfo fi(open_file);
m_configuration.last_opened_dir_load = fi.absolutePath();
QFile file(open_file);
if(file.open(QIODevice::ReadOnly))
{
clearModel();
createModel();
QDomDocument doc;
doc.setContent(file.readAll());
QDomNode root_node = doc.firstChild().firstChild();
while (!root_node.isNull()) {
if(root_node.toElement().tagName() == "pages")
{
QDomNode page_node = root_node.firstChild();
while (!page_node.isNull()) {
PageCreator creator;
if(page_node.toElement().tagName() == "page")
{
creator.id =
page_node.toElement().attribute("id");
QDomNode module_node = page_node.firstChild();
while (!module_node.isNull()) {
if(module_node.toElement().tagName() == "title")
{
creator.title =
module_node.toElement().text();
}
else if(module_node.toElement().tagName() == "icon_path")
{
creator.icon_path =
module_node.toElement().text();
}
else if(module_node.toElement().tagName() == "module")
{
QDomNode module_param_node = module_node.firstChild();
creator.module_tag = module_node.toElement().attribute("tag");
PageCreator::CreatorParamValue val;
while (!module_param_node.isNull()) {
if(module_param_node.toElement().tagName() == "param")
{
val.data_role =
val.disp_role =
module_param_node.toElement().text();
creator.module_param.insert(
module_param_node.toElement().attribute("name"),
val);
}
module_param_node = module_param_node.nextSibling();
}
}
module_node = module_node.nextSibling();
}
}
createPage(creator);
page_node = page_node.nextSibling();
}
}
root_node = root_node.nextSibling();
}
}
}
}
void MainWindow::slotNewProject(bool)
{
clearModel();
createModel();
}
void MainWindow::clearModel()
{
if(m_model)
{
m_page_counter = 0;
m_pages_root_item = 0;
m_configuration.column_width_key = ui->treeView->columnWidth(0);
m_configuration.column_width_value = ui->treeView->columnWidth(1);
ui->treeView->setModel(0);
delete m_model;
}
}
void MainWindow::createModel()
{
m_model = new QStandardItemModel;
m_model->setColumnCount(2);
m_model->setHeaderData(0, Qt::Horizontal, tr("Key"));
m_model->setHeaderData(1, Qt::Horizontal, tr("Value"));
m_pages_root_item = new QStandardItem(tr("Pages"));
m_model->insertRow(0, m_pages_root_item);
m_pages_root_item->setFlags(m_pages_root_item->flags() & Qt::ItemIsEnabled);
ui->treeView->setModel(m_model);
ui->treeView->setColumnWidth(0, m_configuration.column_width_key);
ui->treeView->setColumnWidth(1, m_configuration.column_width_value);
}
| [
"alexey.matal@gmail.com"
] | alexey.matal@gmail.com |
900a6f2ff1b9b6287b1857c2b338f675ad181065 | bf6a6b422d89c14793bd9521e97a33bcaa30a5fe | /datastructure/list/list/main.cpp | 79141e381db7fa88af2239e1daedaac72ce05a61 | [] | no_license | xfdywy/learncpp | f7805aacf06cc243b50ef64eb99143d98ef4f815 | abb842c44d16ee582351bacdf50a4aaad8d8549a | refs/heads/master | 2020-04-13T21:51:58.705826 | 2016-09-13T00:30:17 | 2016-09-13T00:30:17 | 67,985,916 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 444 | cpp | #include<stdlib.h>
#include"List.h"
#include<iostream>
using namespace std;
int main(void)
{
int e1 = 3;
int e2 = 2;
int e3 = 1;
int e4;
List *list1 = new List(10);
list1->ListInsert(0, &e1);
list1->ListInsert(1, &e2);
list1->ListInsert(2, &e3);
list1->ListInsert(0, &e3);
list1->ListTraverse();
cout << list1->ListLength() << endl;
list1->ListDelete(1, &e4);
list1->ListTraverse();
cout << list1->ListLength() << endl;
} | [
"wangyue20100101@126.com"
] | wangyue20100101@126.com |
cb52e9ea2f966cdba74dc3f717138151c8edbdde | aedcfc28cf8ea7d4d9d5bc708c514eb8f49115b1 | /watertank.ino | 29253596ebcbe383e55d01a01146e4ad72b8cb8a | [
"MIT"
] | permissive | mrkalePhotonApp/watertank | 0f54c5fd79e8673c7e34371e58fa926fccf5019e | 1ada5823ff3105aac8597fdec75523cf9d6809b6 | refs/heads/master | 2021-01-11T05:21:23.673703 | 2016-12-05T22:35:06 | 2016-12-05T22:35:06 | 71,826,234 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 22,598 | ino | /*
NAME:
Observing water tank, rain intensity, and ambient light intensity.
DESCRIPTION:
Application for observing water tank, rain intensity, and ambient light
intensity as well as boot count and RSSI.
- The application reads from various sensors and publishes gained values
in order to observe the cottage garden.
- Physical observation:
- Ambient light intensity by analog sensor TEMT6000 in bits within
range 0 ~ 4095 with 12-bit resolution.
- Rain intensity by analog resistive sensor board YL-83 in bits within
range 0 ~ 4095 with 12-bit resolution.
- Water level in water tank by ultrasonic sersor HC-SR04 in centimeters
within range 2 ~ 95 cm with resolution 1 cm.
- For each sensor the trend is calculated in units change per minute.
- For each sensor the status is determined according to the current
value or trend calculation.
- For each sensor the long term minimal and maximal value in units is
calculated.
- System observation:
- Number of boots since recent power-up.
- RSSI wifi signal intensity.
- All measured values are statistically processed:
- A batch (burst) of measured values is statistically smoothed by median
and result is considered as a measured value.
- Smoothed (measured) values is then processed by exponential filter
with individual smoothing factor and result is considered as a final
processed value.
- Hardware watchdog timers built in microcontroller are utilized for
reseting the microcontroller when it freezes in order to ensure
unattended operation.
- Publishing to cloud services:
- ThingSpeak for graphing and further analyzing of smoothed
and filtered values.
- Blynk for mobile application observation and control.
- The application utilizes a separate include credentials file
with credentials to cloud services.
- The credential file contains just placeholder for credentials.
- Replace credential placeholders with real ones only in the Particle
dashboard in order not to share or reveal them.
LICENSE:
This program is free software; you can redistribute it and/or modify
it under the terms of the MIT License (MIT).
CREDENTIALS:
Author: Libor Gabaj
*/
// #define PHOTON_PUBLISH_DEBUG // This publishes debug events to the particle cloud
// #define PHOTON_PUBLISH_VALUE // This publishes regular events to the particle cloud
// #define BLYNK_DEBUG // Optional, this enables lots of prints
#define BLYNK_NOTIFY_LIGHT
#define BLYNK_NOTIFY_RAIN
#define BLYNK_NOTIFY_WATER
// Libraries
#include "watchdogs/watchdogs.h"
#include "smooth-sensor-data/smooth-sensor-data.h"
#include "exponential-filter/exponential-filter.h"
#include "sonar-ping/sonar-ping.h"
#include "ThingSpeak/ThingSpeak.h"
#include "blynk/blynk.h"
#include "math.h"
// Boot
STARTUP(WiFi.selectAntenna(ANT_EXTERNAL));
// STARTUP(WiFi.selectAntenna(ANT_INTERNAL));
STARTUP(System.enableFeature(FEATURE_RETAINED_MEMORY));
//------------------------------------------------------------------------
// Water tank sensing and publishing to clouds (ThinkSpeak, Blynk)
//-------------------------------------------------------------------------
#define SKETCH "WATERTANK 1.6.0"
#include "credentials.h"
const unsigned int TIMEOUT_WATCHDOG = 10000; // Watchdog timeout in milliseconds
const unsigned int REF_VOLTAGE = 3300; // Reference voltage for analog reading in millivolts
const unsigned int COEF_PUBLISH = 12; // The multiplier of measurements for publishing
const unsigned int PERIOD_MEASURE = 5000; // Time between measurements in milliseconds
// Measuring periods (delays) in milliseconds
// Count as multiplier for calculating trends
const unsigned int PERIOD_MEASURE_RSSI = 30000;
//
const unsigned int PERIOD_MEASURE_LIGHT = 30000;
const unsigned int COUNT_TREND_LIGHT = 10;
//
const unsigned int PERIOD_MEASURE_RAIN = 5000;
const unsigned int COUNT_TREND_RAIN = 6;
//
const unsigned int PERIOD_MEASURE_WATER = 5000;
const unsigned int COUNT_TREND_WATER = 12;
// Publishing periods (delays) in milliseconds
const unsigned int PERIOD_PUBLISH_PARTICLE = 15000;
const unsigned int PERIOD_PUBLISH_THINGSPEAK = 60000;
// Hardware configuration
const unsigned char PIN_LIGHT = A0; // Ambient light sensor TEMT6000
const unsigned char PIN_RAIN = A1; // Rain sensor analog YL-83
const unsigned char PIN_SONIC_T = D1; // Ultrasonic sensor HC-SR04 trigger
const unsigned char PIN_SONIC_E = D2; // Ultrasonic sensor HC-SR04 echo
// ThingSpeak
const char* THINGSPEAK_TOKEN = CREDENTIALS_THINGSPEAK_TOKEN;
const unsigned long CHANNEL_NUMBER = CREDENTIALS_THINGSPEAK_CHANNEL;
// #define FIELD_RSSI_VALUE 4
#define FIELD_LIGHT_VALUE 1
#define FIELD_LIGHT_TREND 6
#define FIELD_RAIN_VALUE 2
#define FIELD_RAIN_TREND 5
#define FIELD_WATER_VALUE 3
#define FIELD_WATER_TREND 4
//
TCPClient ThingSpeakClient;
// Blynk
const char* BLYNK_TOKEN = CREDENTIALS_BLYNK_TOKEN;
#define VPIN_BOOT_VALUE V1 // Virtual pin for boot count
#define VPIN_RSSI_VALUE V2
//
#define VPIN_LIGHT_VALUE V3
#define VPIN_LIGHT_TREND V4
#define VPIN_LIGHT_MIN V5
#define VPIN_LIGHT_MAX V6
#define VPIN_LIGHT_PERC V17
#define VPIN_LIGHT_RESET V18
//
#define VPIN_RAIN_VALUE V7
#define VPIN_RAIN_TREND V8
#define VPIN_RAIN_MIN V9
#define VPIN_RAIN_MAX V10
#define VPIN_RAIN_PERC V19
//
#define VPIN_WATER_VALUE V11
#define VPIN_WATER_TREND V12
#define VPIN_WATER_MIN V13
#define VPIN_WATER_MAX V14
#define VPIN_WATER_PUMP V15
#define VPIN_WATER_FILL V16
// Blynk variables
WidgetLED ledWaterPump(VPIN_WATER_PUMP);
WidgetLED ledWaterFill(VPIN_WATER_FILL);
#if defined(BLYNK_NOTIFY_LIGHT) || defined(BLYNK_NOTIFY_RAIN) || defined(BLYNK_NOTIFY_WATER)
String BLYNK_LABEL_GLUE = String(" -- ");
String BLYNK_LABEL_PREFIX = String("Chalupa");
String BLYNK_LABEL_LIGHT = String("Light");
String BLYNK_LABEL_RAIN = String("Rain");
String BLYNK_LABEL_WATER = String("Watertank");
#endif
// Measured values
int rssiValue;
int lightValue, rainValue, waterValue;
float lightTrend, rainTrend, waterTrend;
// Backup variables (long terms statistics)
retained int bootCount, bootTimeLast, bootRunPeriod;
retained char bootFwVersion[9];
retained int lightValueMin = 4096, lightValueMax;
retained int rainValueMin = 4096, rainValueMax;
retained int waterValueMin = 100, waterValueMax;
retained unsigned char lightStatus, rainStatus, waterStatus;
// Statistical smoothing and exponential filtering
const float FACTOR_RSSI = 0.1; // Smoothing factor for RSSI
const float FACTOR_LIGHT = 0.2; // Smoothing factor for light level
const float FACTOR_RAIN = 0.2; // Smoothing factor for rain level
const float FACTOR_WATER = 0.8; // Smoothing factor for water level
ExponentialFilter efRssi = ExponentialFilter(FACTOR_RSSI);
ExponentialFilter efLight = ExponentialFilter(FACTOR_LIGHT);
ExponentialFilter efRain = ExponentialFilter(FACTOR_RAIN);
ExponentialFilter efWater = ExponentialFilter(FACTOR_WATER);
SmoothSensorData smooth;
// Light level
const int LIGHT_VALUE_DARK = 8;
const int LIGHT_VALUE_TWILIGHT = 32;
const int LIGHT_VALUE_CLOUDY = 512;
const int LIGHT_VALUE_CLEAR = 1024;
const int LIGHT_VALUE_MARGIN = 2; // Difference in value for status hysteresis
//
const unsigned char LIGHT_STATUS_DARK = 1;
const unsigned char LIGHT_STATUS_TWILIGHT = 2;
const unsigned char LIGHT_STATUS_CLOUDY = 3;
const unsigned char LIGHT_STATUS_CLEAR = 4;
const unsigned char LIGHT_STATUS_SUNNY = 5;
// Rain level
const int RAIN_VALUE_DRY = 64;
const int RAIN_VALUE_DEW = 128;
const int RAIN_VALUE_RAIN = 512;
const int RAIN_VALUE_SHOWER = 1024;
const int RAIN_VALUE_STORM = 2048;
const int RAIN_VALUE_MARGIN = 4; // Difference in value for status hysteresis
//
const unsigned char RAIN_STATUS_DRY = 1;
const unsigned char RAIN_STATUS_DEW = 2;
const unsigned char RAIN_STATUS_RAIN = 3;
const unsigned char RAIN_STATUS_SHOWER = 4;
const unsigned char RAIN_STATUS_STORM = 5;
const unsigned char RAIN_STATUS_POUR = 6;
// Water level
const int SONAR_DISTANCE_MAX = 95; // Maximal valid measured distance (to tank bottom)
const int WATER_TANK_EMPTY = 89; // Minimal water level (empty tank - to the bottom)
const int WATER_TANK_FULL = 3; // Maximal water level (full tank - to the brink)
const float WATER_TREND_MARGIN = 1.5; // Difference in trend for status hysteresis
//
const unsigned char WATER_STATUS_STABLE = 1; // No rain, no pumping
const unsigned char WATER_STATUS_FILLING = 2;
const unsigned char WATER_STATUS_PUMPING = 3;
//
SonarPing sonar(PIN_SONIC_T, PIN_SONIC_E, SONAR_DISTANCE_MAX);
void setup() {
// Boot process
if (bootCount++ > 0) bootRunPeriod = Time.now() - bootTimeLast;
bootTimeLast = Time.now();
strcpy(bootFwVersion, System.version());
Particle.publish("Boot_Cnt_Run", String::format("%d/%d/%s", bootCount, bootRunPeriod, bootFwVersion));
#ifdef PHOTON_PUBLISH_DEBUG
Particle.publish("Sketch", String(SKETCH));
#endif
// Clouds
ThingSpeak.begin(ThingSpeakClient);
Blynk.begin(BLYNK_TOKEN);
// Start watchdogs
Watchdogs::begin(TIMEOUT_WATCHDOG);
}
void loop() {
Watchdogs::tickle();
Blynk.run();
process();
}
void process() {
measureRssi();
measureLight();
measureRain();
measureWater();
#ifdef PHOTON_PUBLISH_VALUE
publishParticle();
#endif
publishThingspeak();
}
void measureRssi() {
static unsigned long tsMeasure;
if (millis() - tsMeasure >= PERIOD_MEASURE_RSSI || tsMeasure == 0) {
tsMeasure = millis();
rssiValue = efRssi.getValue(WiFi.RSSI());
}
}
void measureLight() {
static unsigned long tsMeasure, tsMeasureOld;
static unsigned int cntMeasure;
static int lightValueOld;
static unsigned char lightStatusOld = lightStatus;
if (millis() - tsMeasure >= PERIOD_MEASURE_LIGHT || tsMeasure == 0) {
tsMeasure = millis();
// Value
while(smooth.registerData(analogRead(PIN_LIGHT)));
lightValue = efLight.getValue(smooth.getMedian());
// Initialize trend and statistics
if (tsMeasureOld == 0 ) {
tsMeasureOld = tsMeasure;
lightValueOld = lightValue;
// Calculate statistics
} else if (tsMeasure > tsMeasureOld) {
if (lightValueMin > lightValue) lightValueMin = lightValue;
if (lightValueMax < lightValue) lightValueMax = lightValue;
// Calculate trend
if (++cntMeasure >= COUNT_TREND_LIGHT) {
int lightDiff = abs(lightValue - lightValueOld);
lightTrend = 6e4 * ((float)lightValue - (float)lightValueOld) / ((float)tsMeasure - (float)tsMeasureOld);
cntMeasure = 0;
tsMeasureOld = tsMeasure;
lightValueOld = lightValue;
// Determine status
if (lightValue <= LIGHT_VALUE_DARK) {
lightStatus = LIGHT_STATUS_DARK;
} else if (lightValue <= LIGHT_VALUE_TWILIGHT) {
lightStatus = LIGHT_STATUS_TWILIGHT;
} else if (lightValue <= LIGHT_VALUE_CLOUDY) {
lightStatus = LIGHT_STATUS_CLOUDY;
} else if (lightValue <= LIGHT_VALUE_CLEAR) {
lightStatus = LIGHT_STATUS_CLEAR;
} else {
lightStatus = LIGHT_STATUS_SUNNY;
}
// Notify at status change
if (lightStatusOld != lightStatus && lightDiff >= LIGHT_VALUE_MARGIN) {
#ifdef BLYNK_NOTIFY_LIGHT
String txtStatus;
switch (lightStatus) {
case LIGHT_STATUS_DARK:
txtStatus = String("Dark");
break;
case LIGHT_STATUS_TWILIGHT:
txtStatus = String("Twilight");
break;
case LIGHT_STATUS_CLOUDY:
txtStatus = String("Cloudy weather");
break;
case LIGHT_STATUS_SUNNY:
txtStatus = String("Sunny weather");
break;
}
Blynk.notify(BLYNK_LABEL_PREFIX + BLYNK_LABEL_GLUE + BLYNK_LABEL_LIGHT + BLYNK_LABEL_GLUE + txtStatus);
#endif
lightStatusOld = lightStatus;
}
}
}
}
}
void measureRain() {
static unsigned long tsMeasure, tsMeasureOld;
static unsigned int cntMeasure;
static int rainValueOld;
static unsigned char rainStatusOld = rainStatus;
if (millis() - tsMeasure >= PERIOD_MEASURE_RAIN || tsMeasure == 0) {
tsMeasure = millis();
// Value
while(smooth.registerData(analogRead(PIN_RAIN)));
rainValue = efRain.getValue(smooth.getMedian());
// Initialize trend and statistics
if (tsMeasureOld == 0 ) {
tsMeasureOld = tsMeasure;
rainValueOld = rainValue;
// Calculate statistics
} else if (tsMeasure > tsMeasureOld) {
if (rainValueMin > rainValue) rainValueMin = rainValue;
if (rainValueMax < rainValue) rainValueMax = rainValue;
// Calculate trend
if (++cntMeasure >= COUNT_TREND_RAIN) {
int rainDiff = abs(rainValue - rainValueOld);
rainTrend = 6e4 * ((float)rainValue - (float)rainValueOld) / ((float)tsMeasure - (float)tsMeasureOld);
cntMeasure = 0;
tsMeasureOld = tsMeasure;
rainValueOld = rainValue;
// Determine status
if (rainValue <= RAIN_VALUE_DRY) {
rainStatus = RAIN_STATUS_DRY;
} else if (rainValue <= RAIN_VALUE_DEW) {
rainStatus = RAIN_STATUS_DEW;
} else if (rainValue <= RAIN_VALUE_RAIN) {
rainStatus = RAIN_STATUS_RAIN;
} else if (rainValue <= RAIN_VALUE_SHOWER) {
rainStatus = RAIN_STATUS_SHOWER;
} else if (rainValue <= RAIN_VALUE_STORM) {
rainStatus = RAIN_STATUS_STORM;
} else {
rainStatus = RAIN_STATUS_POUR;
}
// Notify at status change
if (rainStatusOld != rainStatus && rainDiff >= RAIN_VALUE_MARGIN) {
#ifdef BLYNK_NOTIFY_RAIN
String txtStatus;
switch (rainStatus) {
case RAIN_STATUS_DRY:
txtStatus = String("None");
break;
case RAIN_STATUS_DEW:
txtStatus = String("Dew");
break;
case RAIN_STATUS_RAIN:
txtStatus = String("Still");
break;
case RAIN_STATUS_SHOWER:
txtStatus = String("Heavy");
break;
case RAIN_STATUS_STORM:
txtStatus = String("Storm");
break;
case RAIN_STATUS_POUR:
txtStatus = String("Downpour");
break;
}
Blynk.notify(BLYNK_LABEL_PREFIX + BLYNK_LABEL_GLUE + BLYNK_LABEL_RAIN + BLYNK_LABEL_GLUE + txtStatus);
#endif
rainStatusOld = rainStatus;
}
}
}
}
}
void measureWater() {
static unsigned long tsMeasure, tsMeasureOld;
static unsigned int cntMeasure;
static int waterValueOld;
static unsigned char waterStatusOld = waterStatus;
if (millis() - tsMeasure >= PERIOD_MEASURE_WATER || tsMeasure == 0) {
tsMeasure = millis();
// Value
while(smooth.registerData(sonar.getDistance()));
waterValue = efWater.getValue(WATER_TANK_EMPTY - smooth.getMedian());
// Initialize trend and statistics
if (tsMeasureOld == 0 ) {
tsMeasureOld = tsMeasure;
waterValueOld = waterValue;
// Calculate statistics
} else if (tsMeasure > tsMeasureOld) {
if (waterValueMin < 0) waterValueMin = waterValueMax;
if (waterValueMin > waterValue) waterValueMin = waterValue;
if (waterValueMax < waterValue) waterValueMax = waterValue;
// Calculate trend
if (++cntMeasure >= COUNT_TREND_WATER) {
waterTrend = 6e4 * ((float)waterValue - (float)waterValueOld) / ((float)tsMeasure - (float)tsMeasureOld);
cntMeasure = 0;
tsMeasureOld = tsMeasure;
waterValueOld = waterValue;
// Determine status
if (fabs(waterTrend) <= WATER_TREND_MARGIN) waterStatus = WATER_STATUS_STABLE;
if (waterTrend > WATER_TREND_MARGIN) waterStatus = WATER_STATUS_FILLING;
if (waterTrend < -1 * WATER_TREND_MARGIN) waterStatus = WATER_STATUS_PUMPING;
if (waterStatusOld != waterStatus) {
#ifdef BLYNK_NOTIFY_WATER
// Push notification
String txtStatus;
switch (waterStatus) {
case WATER_STATUS_STABLE:
txtStatus = String("Stabile");
break;
case WATER_STATUS_FILLING:
txtStatus = String("Filling");
break;
case WATER_STATUS_PUMPING:
txtStatus = String("Pumping");
break;
}
Blynk.notify(BLYNK_LABEL_PREFIX + BLYNK_LABEL_GLUE + BLYNK_LABEL_WATER + BLYNK_LABEL_GLUE + txtStatus);
#endif
// LED signaling
if (waterStatus == WATER_STATUS_FILLING) {
ledWaterFill.on();
} else {
ledWaterFill.off();
}
if (waterStatus == WATER_STATUS_PUMPING) {
ledWaterPump.on();
} else {
ledWaterPump.off();
}
waterStatusOld = waterStatus;
}
}
}
}
}
void publishParticle() {
static unsigned long tsPublish;
if (millis() - tsPublish >= PERIOD_PUBLISH_PARTICLE || tsPublish == 0) {
tsPublish = millis();
Particle.publish("RSSI", String::format("%3d", rssiValue));
Particle.publish("Light/Trend", String::format("%4d/%4.1f", lightValue, lightTrend));
Particle.publish("Rain/Trend", String::format("%4d/%4.1f", rainValue, rainTrend));
Particle.publish("Water/Trend", String::format("%4d/%4.1f", waterValue, waterTrend));
}
}
void publishThingspeak() {
static unsigned long tsPublish;
if (millis() - tsPublish >= PERIOD_PUBLISH_THINGSPEAK) {
tsPublish = millis();
bool isField = false;
#ifdef FIELD_RSSI_VALUE
isField = true;
ThingSpeak.setField(FIELD_RSSI_VALUE, rssiValue);
#endif
#ifdef FIELD_LIGHT_VALUE
isField = true;
ThingSpeak.setField(FIELD_LIGHT_VALUE, lightValue);
#endif
#ifdef FIELD_LIGHT_TREND
isField = true;
ThingSpeak.setField(FIELD_LIGHT_TREND, lightTrend);
#endif
#ifdef FIELD_RAIN_VALUE
isField = true;
ThingSpeak.setField(FIELD_RAIN_VALUE, rainValue);
#endif
#ifdef FIELD_RAIN_TREND
isField = true;
ThingSpeak.setField(FIELD_RAIN_TREND, rainTrend);
#endif
#ifdef FIELD_WATER_VALUE
isField = true;
ThingSpeak.setField(FIELD_WATER_VALUE, waterValue);
#endif
#ifdef FIELD_WATER_TREND
isField = true;
ThingSpeak.setField(FIELD_WATER_TREND, waterTrend);
#endif
// Publish if there is something to
if (isField) {
int result = ThingSpeak.writeFields(CHANNEL_NUMBER, THINGSPEAK_TOKEN);
#ifdef PHOTON_PUBLISH_DEBUG
Particle.publish("ThingSpeakResult", String(result));
#endif
}
}
}
// Frequency reading in Blynk mobile application
#ifdef VPIN_BOOT_VALUE
BLYNK_READ(VPIN_BOOT_VALUE)
{
Blynk.virtualWrite(VPIN_BOOT_VALUE, bootCount);
}
#endif
#ifdef VPIN_RSSI_VALUE
BLYNK_READ(VPIN_RSSI_VALUE)
{
Blynk.virtualWrite(VPIN_RSSI_VALUE, rssiValue);
}
#endif
#ifdef VPIN_LIGHT_VALUE
BLYNK_READ(VPIN_LIGHT_VALUE)
{
Blynk.virtualWrite(VPIN_LIGHT_VALUE, lightValue);
}
#endif
#ifdef VPIN_LIGHT_TREND
BLYNK_READ(VPIN_LIGHT_TREND)
{
Blynk.virtualWrite(VPIN_LIGHT_TREND, lightTrend);
}
#endif
#ifdef VPIN_LIGHT_MIN
BLYNK_READ(VPIN_LIGHT_MIN)
{
Blynk.virtualWrite(VPIN_LIGHT_MIN, lightValueMin);
}
#endif
#ifdef VPIN_LIGHT_MAX
BLYNK_READ(VPIN_LIGHT_MAX)
{
Blynk.virtualWrite(VPIN_LIGHT_MAX, lightValueMax);
}
#endif
#ifdef VPIN_LIGHT_PERC
BLYNK_READ(VPIN_LIGHT_PERC)
{
int lightPerc = 0;
if (lightValueMax > lightValueMin) {
lightPerc = map(lightValue, lightValueMin, lightValueMax, 0, 100);
}
Blynk.virtualWrite(VPIN_LIGHT_PERC, lightPerc);
}
#endif
#ifdef VPIN_LIGHT_RESET
BLYNK_WRITE(VPIN_LIGHT_RESET)
{
if (param.asInt() == HIGH) {
lightValueMin = lightValueMax = lightValue;
}
}
#endif
#ifdef VPIN_RAIN_VALUE
BLYNK_READ(VPIN_RAIN_VALUE)
{
Blynk.virtualWrite(VPIN_RAIN_VALUE, rainValue);
}
#endif
#ifdef VPIN_RAIN_TREND
BLYNK_READ(VPIN_RAIN_TREND)
{
Blynk.virtualWrite(VPIN_RAIN_TREND, rainTrend);
}
#endif
#ifdef VPIN_RAIN_MIN
BLYNK_READ(VPIN_RAIN_MIN)
{
Blynk.virtualWrite(VPIN_RAIN_MIN, rainValueMin);
}
#endif
#ifdef VPIN_RAIN_MAX
BLYNK_READ(VPIN_RAIN_MAX)
{
Blynk.virtualWrite(VPIN_RAIN_MAX, rainValueMax);
}
#endif
#ifdef VPIN_RAIN_PERC
BLYNK_READ(VPIN_RAIN_PERC)
{
int rainPerc = 0;
if (rainValueMax > rainValueMin) {
rainPerc = map(rainValue, rainValueMin, rainValueMax, 0, 100);
}
Blynk.virtualWrite(VPIN_RAIN_PERC, rainPerc);
}
#endif
#ifdef VPIN_WATER_VALUE
BLYNK_READ(VPIN_WATER_VALUE)
{
Blynk.virtualWrite(VPIN_WATER_VALUE, waterValue);
}
#endif
#ifdef VPIN_WATER_TREND
BLYNK_READ(VPIN_WATER_TREND)
{
Blynk.virtualWrite(VPIN_WATER_TREND, waterTrend);
}
#endif
#ifdef VPIN_WATER_MIN
BLYNK_READ(VPIN_WATER_MIN)
{
Blynk.virtualWrite(VPIN_WATER_MIN, waterValueMin);
}
#endif
#ifdef VPIN_WATER_MAX
BLYNK_READ(VPIN_WATER_MAX)
{
Blynk.virtualWrite(VPIN_WATER_MAX, waterValueMax);
}
#endif
| [
"libor.gabaj@gmail.com"
] | libor.gabaj@gmail.com |
9cf1fff6e2a5a0f1f602bfa6b692d0547f85ce71 | 6c47b48944a9af413298c9bfecec5b6429893f9d | /MainWindow/color.h | 1e5772ea1d42ac4bdc236c515c56e63976e5e880 | [] | no_license | ChenFengYe/CG_RayTracing | 1a4881af4dc4f46e2e4cfa2d70ec2150e05e9932 | f96ff2e99242bfab20907a12c18b3aabb4088ed9 | refs/heads/master | 2021-06-11T06:21:01.599123 | 2016-12-15T10:48:18 | 2016-12-15T10:48:18 | 75,934,597 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,084 | h | #ifdef _MSC_VER
#pragma once
#endif
#ifndef LW_COLOR_H_
#define LW_COLOR_H_
#include <iostream>
#include "common.h"
namespace lw {
/** RGB color class.
*/
class Color {
public:
/** Black. */
static const Color BLACK;
/** White. */
static const Color WHITE;
/** Red. */
static const Color RED;
/** Green. */
static const Color GREEN;
/** Blue. */
static const Color BLUE;
/** Cyan. */
static const Color CYAN;
/** Yellow. */
static const Color YELLOW;
/** Magenta. */
static const Color MAGENTA;
private:
double _r, _g, _b;
public:
/** The Color constructor. */
Color();
/** The Color constructor
* @param red: Red component.
* @param green: Green component.
* @param blue: Blue component.
*/
Color(double red, double green, double blue);
/** The Color constructor (copy) */
Color(const Color& color);
/** The Color destructor */
~Color();
/** Assignment operator */
Color& operator=(const Color& color);
/** Plus operator */
Color& operator+=(const Color& c);
/** Plus operator.
* @details Add the same value x to each color component.
*/
Color& operator+=(double x);
/** Minus operator. */
Color& operator-=(const Color& c);
/** Minus operator.
* @details Subtract the same value x from each color component
*/
Color& operator-=(double x);
/** Component-wise multiplication. */
Color& operator*=(const Color& c);
/** Scalar multiplication. */
Color& operator*=(double s);
/** Component-wise division */
Color& operator/=(const Color& c);
/** Scalar division */
Color& operator/=(double s);
/** Negation operator */
Color operator-() const;
static Color minimum(const Color& c1, const Color& c2);
static Color maximum(const Color& c1, const Color& c2);
static Color sqrt(const Color& c);
static Color exp(const Color& c);
Color clamp(const Color& lo = Color(0.0, 0.0, 0.0),
const Color& hi = Color(INFTY, INFTY, INFTY)) const;
double dot(const Color& color) const;
double norm() const;
double squaredNorm() const;
double luminance() const;
/** Red component. */
inline double red() const { return _r; }
/** Green component */
inline double green() const { return _g; }
/** Blue component */
inline double blue() const { return _b; }
/** Covert to string. */
std::string toString() const;
};
} // namespace lw
lw::Color operator+(const lw::Color& c1, const lw::Color& c2);
lw::Color operator+(double x, const lw::Color& c);
lw::Color operator+(const lw::Color& c, double x);
lw::Color operator-(const lw::Color& c1, const lw::Color& c2);
lw::Color operator-(double x, const lw::Color& c);
lw::Color operator-(const lw::Color& c, double x);
lw::Color operator*(const lw::Color& c1, const lw::Color& c2);
lw::Color operator*(const lw::Color& c1, double s);
lw::Color operator*(double s, const lw::Color& c2);
lw::Color operator/(const lw::Color& c1, const lw::Color& c2);
lw::Color operator/(const lw::Color& c1, double s);
std::ostream& operator<<(std::ostream& os, const lw::Color& c);
#endif // LW_COLOR_H_
| [
"519396593@qq.com"
] | 519396593@qq.com |
e46f599e8fe1ae966a4f3a6d2cb0fa7abba570a1 | 1b08cfdd3b2d569878a8b7df7ff2a2d3020d0e09 | /src/tests/unit/ip/udp.cpp | df50aabdffb5190dda35c056baea16ea260e1039 | [
"BSL-1.0"
] | permissive | barrbrain/asio | ca55e8a07accbd44b767e86241273cc4db67b8d1 | 97b3114f410b86a4c63d90d7f9312a128acac677 | refs/heads/master | 2020-04-27T05:55:52.523092 | 2010-11-24T06:50:15 | 2011-02-08T00:07:53 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,909 | cpp | //
// udp.cpp
// ~~~~~~~
//
// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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)
//
// Disable autolinking for unit tests.
#if !defined(BOOST_ALL_NO_LIB)
#define BOOST_ALL_NO_LIB 1
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
#include "asio/ip/udp.hpp"
#include <boost/bind.hpp>
#include <cstring>
#include "asio/io_service.hpp"
#include "asio/placeholders.hpp"
#include "../unit_test.hpp"
#include "../archetypes/io_control_command.hpp"
//------------------------------------------------------------------------------
// ip_udp_socket_compile test
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
// The following test checks that all public member functions on the class
// ip::udp::socket compile and link correctly. Runtime failures are ignored.
namespace ip_udp_socket_compile {
void connect_handler(const asio::error_code&)
{
}
void send_handler(const asio::error_code&, std::size_t)
{
}
void receive_handler(const asio::error_code&, std::size_t)
{
}
void test()
{
using namespace asio;
namespace ip = asio::ip;
try
{
io_service ios;
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
socket_base::message_flags in_flags = 0;
socket_base::keep_alive socket_option;
archetypes::io_control_command io_control_command;
asio::error_code ec;
// basic_datagram_socket constructors.
ip::udp::socket socket1(ios);
ip::udp::socket socket2(ios, ip::udp::v4());
ip::udp::socket socket3(ios, ip::udp::v6());
ip::udp::socket socket4(ios, ip::udp::endpoint(ip::udp::v4(), 0));
ip::udp::socket socket5(ios, ip::udp::endpoint(ip::udp::v6(), 0));
int native_socket1 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
ip::udp::socket socket6(ios, ip::udp::v4(), native_socket1);
// basic_io_object functions.
io_service& ios_ref = socket1.io_service();
(void)ios_ref;
// basic_socket functions.
ip::udp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
(void)lowest_layer;
const ip::udp::socket& socket7 = socket1;
const ip::udp::socket::lowest_layer_type& lowest_layer2
= socket7.lowest_layer();
(void)lowest_layer2;
socket1.open(ip::udp::v4());
socket1.open(ip::udp::v6());
socket1.open(ip::udp::v4(), ec);
socket1.open(ip::udp::v6(), ec);
int native_socket2 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
socket1.assign(ip::udp::v4(), native_socket2);
int native_socket3 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
socket1.assign(ip::udp::v4(), native_socket3, ec);
bool is_open = socket1.is_open();
(void)is_open;
socket1.close();
socket1.close(ec);
ip::udp::socket::native_type native_socket4 = socket1.native();
(void)native_socket4;
socket1.cancel();
socket1.cancel(ec);
bool at_mark1 = socket1.at_mark();
(void)at_mark1;
bool at_mark2 = socket1.at_mark(ec);
(void)at_mark2;
std::size_t available1 = socket1.available();
(void)available1;
std::size_t available2 = socket1.available(ec);
(void)available2;
socket1.bind(ip::udp::endpoint(ip::udp::v4(), 0));
socket1.bind(ip::udp::endpoint(ip::udp::v6(), 0));
socket1.bind(ip::udp::endpoint(ip::udp::v4(), 0), ec);
socket1.bind(ip::udp::endpoint(ip::udp::v6(), 0), ec);
socket1.connect(ip::udp::endpoint(ip::udp::v4(), 0));
socket1.connect(ip::udp::endpoint(ip::udp::v6(), 0));
socket1.connect(ip::udp::endpoint(ip::udp::v4(), 0), ec);
socket1.connect(ip::udp::endpoint(ip::udp::v6(), 0), ec);
socket1.async_connect(ip::udp::endpoint(ip::udp::v4(), 0), connect_handler);
socket1.async_connect(ip::udp::endpoint(ip::udp::v6(), 0), connect_handler);
socket1.set_option(socket_option);
socket1.set_option(socket_option, ec);
socket1.get_option(socket_option);
socket1.get_option(socket_option, ec);
socket1.io_control(io_control_command);
socket1.io_control(io_control_command, ec);
ip::udp::endpoint endpoint1 = socket1.local_endpoint();
ip::udp::endpoint endpoint2 = socket1.local_endpoint(ec);
ip::udp::endpoint endpoint3 = socket1.remote_endpoint();
ip::udp::endpoint endpoint4 = socket1.remote_endpoint(ec);
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
// basic_datagram_socket functions.
socket1.send(buffer(mutable_char_buffer));
socket1.send(buffer(const_char_buffer));
socket1.send(null_buffers());
socket1.send(buffer(mutable_char_buffer), in_flags);
socket1.send(buffer(const_char_buffer), in_flags);
socket1.send(null_buffers(), in_flags);
socket1.send(buffer(mutable_char_buffer), in_flags, ec);
socket1.send(buffer(const_char_buffer), in_flags, ec);
socket1.send(null_buffers(), in_flags, ec);
socket1.async_send(buffer(mutable_char_buffer), send_handler);
socket1.async_send(buffer(const_char_buffer), send_handler);
socket1.async_send(null_buffers(), send_handler);
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
socket1.async_send(null_buffers(), in_flags, send_handler);
socket1.send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0));
socket1.send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0));
socket1.send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0));
socket1.send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0));
socket1.send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v4(), 0));
socket1.send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v6(), 0));
socket1.send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), in_flags);
socket1.send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags);
socket1.send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), in_flags);
socket1.send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags);
socket1.send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v4(), 0), in_flags);
socket1.send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags);
socket1.send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), in_flags, ec);
socket1.send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags, ec);
socket1.send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), in_flags, ec);
socket1.send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags, ec);
socket1.send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v4(), 0), in_flags, ec);
socket1.send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags, ec);
socket1.async_send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), send_handler);
socket1.async_send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0), send_handler);
socket1.async_send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), send_handler);
socket1.async_send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0), send_handler);
socket1.async_send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v4(), 0), send_handler);
socket1.async_send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v6(), 0), send_handler);
socket1.async_send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), in_flags, send_handler);
socket1.async_send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags, send_handler);
socket1.async_send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), in_flags, send_handler);
socket1.async_send_to(buffer(const_char_buffer),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags, send_handler);
socket1.async_send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v4(), 0), in_flags, send_handler);
socket1.async_send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags, send_handler);
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(null_buffers());
socket1.receive(buffer(mutable_char_buffer), in_flags);
socket1.receive(null_buffers(), in_flags);
socket1.receive(buffer(mutable_char_buffer), in_flags, ec);
socket1.receive(null_buffers(), in_flags, ec);
socket1.async_receive(buffer(mutable_char_buffer), receive_handler);
socket1.async_receive(null_buffers(), receive_handler);
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler);
socket1.async_receive(null_buffers(), in_flags, receive_handler);
ip::udp::endpoint endpoint;
socket1.receive_from(buffer(mutable_char_buffer), endpoint);
socket1.receive_from(null_buffers(), endpoint);
socket1.receive_from(buffer(mutable_char_buffer), endpoint, in_flags);
socket1.receive_from(null_buffers(), endpoint, in_flags);
socket1.receive_from(buffer(mutable_char_buffer), endpoint, in_flags, ec);
socket1.receive_from(null_buffers(), endpoint, in_flags, ec);
socket1.async_receive_from(buffer(mutable_char_buffer),
endpoint, receive_handler);
socket1.async_receive_from(null_buffers(),
endpoint, receive_handler);
socket1.async_receive_from(buffer(mutable_char_buffer),
endpoint, in_flags, receive_handler);
socket1.async_receive_from(null_buffers(),
endpoint, in_flags, receive_handler);
}
catch (std::exception&)
{
}
}
} // namespace ip_udp_socket_compile
//------------------------------------------------------------------------------
// ip_udp_socket_runtime test
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
// The following test checks the runtime operation of the ip::udp::socket class.
namespace ip_udp_socket_runtime {
void handle_send(size_t expected_bytes_sent,
const asio::error_code& err, size_t bytes_sent)
{
BOOST_CHECK(!err);
BOOST_CHECK(expected_bytes_sent == bytes_sent);
}
void handle_recv(size_t expected_bytes_recvd,
const asio::error_code& err, size_t bytes_recvd)
{
BOOST_CHECK(!err);
BOOST_CHECK(expected_bytes_recvd == bytes_recvd);
}
void test()
{
using namespace std; // For memcmp and memset.
using namespace asio;
namespace ip = asio::ip;
io_service ios;
ip::udp::socket s1(ios, ip::udp::endpoint(ip::udp::v4(), 0));
ip::udp::endpoint target_endpoint = s1.local_endpoint();
target_endpoint.address(ip::address_v4::loopback());
ip::udp::socket s2(ios);
s2.open(ip::udp::v4());
s2.bind(ip::udp::endpoint(ip::udp::v4(), 0));
char send_msg[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
s2.send_to(buffer(send_msg, sizeof(send_msg)), target_endpoint);
char recv_msg[sizeof(send_msg)];
ip::udp::endpoint sender_endpoint;
size_t bytes_recvd = s1.receive_from(buffer(recv_msg, sizeof(recv_msg)),
sender_endpoint);
BOOST_CHECK(bytes_recvd == sizeof(send_msg));
BOOST_CHECK(memcmp(send_msg, recv_msg, sizeof(send_msg)) == 0);
memset(recv_msg, 0, sizeof(recv_msg));
target_endpoint = sender_endpoint;
s1.async_send_to(buffer(send_msg, sizeof(send_msg)), target_endpoint,
boost::bind(handle_send, sizeof(send_msg),
asio::placeholders::error,
asio::placeholders::bytes_transferred));
s2.async_receive_from(buffer(recv_msg, sizeof(recv_msg)), sender_endpoint,
boost::bind(handle_recv, sizeof(recv_msg),
asio::placeholders::error,
asio::placeholders::bytes_transferred));
ios.run();
BOOST_CHECK(memcmp(send_msg, recv_msg, sizeof(send_msg)) == 0);
}
} // namespace ip_udp_socket_runtime
//------------------------------------------------------------------------------
// ip_udp_resolver_compile test
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// The following test checks that all public member functions on the class
// ip::udp::resolver compile and link correctly. Runtime failures are ignored.
namespace ip_udp_resolver_compile {
void resolve_handler(const asio::error_code&,
asio::ip::udp::resolver::iterator)
{
}
void test()
{
using namespace asio;
namespace ip = asio::ip;
try
{
io_service ios;
asio::error_code ec;
ip::udp::resolver::query q(ip::udp::v4(), "localhost", "0");
ip::udp::endpoint e(ip::address_v4::loopback(), 0);
// basic_resolver constructors.
ip::udp::resolver resolver(ios);
// basic_io_object functions.
io_service& ios_ref = resolver.io_service();
(void)ios_ref;
// basic_resolver functions.
resolver.cancel();
ip::udp::resolver::iterator iter1 = resolver.resolve(q);
(void)iter1;
ip::udp::resolver::iterator iter2 = resolver.resolve(q, ec);
(void)iter2;
ip::udp::resolver::iterator iter3 = resolver.resolve(e);
(void)iter3;
ip::udp::resolver::iterator iter4 = resolver.resolve(e, ec);
(void)iter4;
resolver.async_resolve(q, resolve_handler);
resolver.async_resolve(e, resolve_handler);
}
catch (std::exception&)
{
}
}
} // namespace ip_udp_resolver_compile
//------------------------------------------------------------------------------
test_suite* init_unit_test_suite(int, char*[])
{
test_suite* test = BOOST_TEST_SUITE("ip/udp");
test->add(BOOST_TEST_CASE(&ip_udp_socket_compile::test));
test->add(BOOST_TEST_CASE(&ip_udp_socket_runtime::test));
test->add(BOOST_TEST_CASE(&ip_udp_resolver_compile::test));
return test;
}
| [
"david.barr@cordelta.com"
] | david.barr@cordelta.com |
285407ca7736ab69822a08bfc487987b8bcfd2d6 | a550ff2a385e7a7498c02ac831116e4ff38f2a1c | /c++ sol/COCI/2021/vepar.cpp | 430a94d0a5bc759de13eba48b6e099aa51817c75 | [] | no_license | TausifIqbal/CPcode | 28854eca64813bf01369ec553558a8cf87111537 | 23292111132752f4639037ebada288f338101e32 | refs/heads/master | 2023-04-07T19:38:52.373971 | 2021-04-13T23:11:36 | 2021-04-13T23:11:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 880 | cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string.h>
#include <vector>
using namespace std;
#define endl '\n'
#define ll long long
#define pi pair<int, int>
#define f first
#define s second
const int n = 10000001;
int m;
int a, b, c, d;
int f[n], lp[n];
vector<int> p;
void answer(){
cin >> a >> b >> c >> d;
bool ret = 0;
for(int i = 0; i < m; i++){
f[i] = 0;
for(int j = p[i]; j < n; j *= p[i])
for(int l = j; l < n; l += j){
f[i] += (l >= a && l <= b) - (l >= c && l <= d);
}
ret |= f[i] > 0;
}
cout << (ret ? "NE" : "DA") << endl;
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
for(int i = 2; i < n; i++){
if(!lp[i]) p.push_back(lp[i] = i), m++;
for(int j = 0; j < m && p[j] <= lp[i] && i * p[j] < n; j++){
lp[i * p[j]] = p[j];
}
}
int t;
cin >> t;
for(int i = 0; i < t; i++) answer();
return 0;
} | [
"super_j@att.net"
] | super_j@att.net |
07ea588a309f854ca2040ff5fd6f0b9a32e0d125 | 4652840c8fa0d701aaca8de426bf64c340a5e831 | /ui/display/chromeos/test/test_native_display_delegate.h | 10bc64b92bd31c4430b066275ae986d74b2de7ae | [
"BSD-3-Clause"
] | permissive | remzert/BraveBrowser | de5ab71293832a5396fa3e35690ebd37e8bb3113 | aef440e3d759cb825815ae12bd42f33d71227865 | refs/heads/master | 2022-11-07T03:06:32.579337 | 2017-02-28T23:02:29 | 2017-02-28T23:02:29 | 84,563,445 | 1 | 5 | BSD-3-Clause | 2022-10-26T06:28:58 | 2017-03-10T13:38:48 | null | UTF-8 | C++ | false | false | 4,444 | h | // Copyright 2014 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 UI_DISPLAY_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_
#define UI_DISPLAY_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_
#include <stdint.h>
#include <vector>
#include "base/macros.h"
#include "base/observer_list.h"
#include "ui/display/chromeos/test/action_logger.h"
#include "ui/display/chromeos/test/action_logger_util.h"
#include "ui/display/types/native_display_delegate.h"
namespace ui {
class ActionLogger;
class DisplaySnapshot;
class NativeDisplayObserver;
namespace test {
class TestNativeDisplayDelegate : public NativeDisplayDelegate {
public:
// Ownership of |log| remains with the caller.
explicit TestNativeDisplayDelegate(ActionLogger* log);
~TestNativeDisplayDelegate() override;
const std::vector<DisplaySnapshot*>& outputs() const { return outputs_; }
void set_outputs(const std::vector<DisplaySnapshot*>& outputs) {
outputs_ = outputs;
}
void set_max_configurable_pixels(int pixels) {
max_configurable_pixels_ = pixels;
}
void set_get_hdcp_state_expectation(bool success) {
get_hdcp_expectation_ = success;
}
void set_set_hdcp_state_expectation(bool success) {
set_hdcp_expectation_ = success;
}
void set_hdcp_state(HDCPState state) { hdcp_state_ = state; }
void set_run_async(bool run_async) { run_async_ = run_async; }
// NativeDisplayDelegate overrides:
void Initialize() override;
void GrabServer() override;
void UngrabServer() override;
void TakeDisplayControl(const DisplayControlCallback& callback) override;
void RelinquishDisplayControl(
const DisplayControlCallback& callback) override;
void SyncWithServer() override;
void SetBackgroundColor(uint32_t color_argb) override;
void ForceDPMSOn() override;
void GetDisplays(const GetDisplaysCallback& callback) override;
void AddMode(const DisplaySnapshot& output, const DisplayMode* mode) override;
void Configure(const DisplaySnapshot& output,
const DisplayMode* mode,
const gfx::Point& origin,
const ConfigureCallback& callback) override;
void CreateFrameBuffer(const gfx::Size& size) override;
void GetHDCPState(const DisplaySnapshot& output,
const GetHDCPStateCallback& callback) override;
void SetHDCPState(const DisplaySnapshot& output,
HDCPState state,
const SetHDCPStateCallback& callback) override;
std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles(
const DisplaySnapshot& output) override;
bool SetColorCalibrationProfile(
const DisplaySnapshot& output,
ui::ColorCalibrationProfile new_profile) override;
bool SetColorCorrection(const ui::DisplaySnapshot& output,
const std::vector<GammaRampRGBEntry>& degamma_lut,
const std::vector<GammaRampRGBEntry>& gamma_lut,
const std::vector<float>& correction_matrix) override;
void AddObserver(NativeDisplayObserver* observer) override;
void RemoveObserver(NativeDisplayObserver* observer) override;
display::FakeDisplayController* GetFakeDisplayController() override;
private:
bool Configure(const DisplaySnapshot& output,
const DisplayMode* mode,
const gfx::Point& origin);
// Outputs to be returned by GetDisplays().
std::vector<DisplaySnapshot*> outputs_;
// |max_configurable_pixels_| represents the maximum number of pixels that
// Configure will support. Tests can use this to force Configure
// to fail if attempting to set a resolution that is higher than what
// a device might support under a given circumstance.
// A value of 0 means that no limit is enforced and Configure will
// return success regardless of the resolution.
int max_configurable_pixels_;
bool get_hdcp_expectation_;
bool set_hdcp_expectation_;
// Result value of GetHDCPState().
HDCPState hdcp_state_;
// If true, the callbacks are posted on the message loop.
bool run_async_;
ActionLogger* log_; // Not owned.
base::ObserverList<NativeDisplayObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(TestNativeDisplayDelegate);
};
} // namespace test
} // namespace ui
#endif // UI_DISPLAY_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_
| [
"serg.zhukovsky@gmail.com"
] | serg.zhukovsky@gmail.com |
ca5ac98ca377d5a21c7a4a3a62634a3ce8ce6a67 | fe18c0717d9a4e4000021b05c3b342d2eaf692c1 | /src/search_local/index_storage/common/proxy_process.cc | 17dcfff0f3ef6f79187dca283a87e6d48db35d66 | [
"OML",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | jdisearch/isearch | 0c29c972650c36774d58cc10d5dc906deb5bbf18 | 272bd4ab0dc82d9e33c8543474b1294569947bb3 | refs/heads/master | 2023-08-12T10:10:13.850970 | 2021-09-18T08:43:05 | 2021-09-18T08:43:05 | 397,084,210 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,671 | cc | /*
* =====================================================================================
*
* Filename: agent_process.cc
*
* Description: agent task process.
*
* Version: 1.0
* Created: 09/08/2020 10:02:05 PM
* Revision: none
* Compiler: gcc
*
* Author: qiulu, choulu@jd.com
* Company: JD.com, Inc.
*
* =====================================================================================
*/
#include "proxy_process.h"
#include "poll_thread.h"
#include "task_request.h"
#include "log.h"
AgentProcess::AgentProcess(PollThread *o) : TaskDispatcher<TaskRequest>(o),
ownerThread(o),
output(o)
{
}
AgentProcess::~AgentProcess()
{
}
void AgentProcess::task_notify(TaskRequest *curr)
{
curr->copy_reply_for_agent_sub_task();
log_debug("AgentProcess::task_notify start");
//there is a race condition here:
//curr may be deleted during process (in task->reply_notify())
int taskCount = curr->agent_sub_task_count();
log_debug("AgentProcess::task_notify task count is %d", taskCount);
for (int i = 0; i < taskCount; i++)
{
TaskRequest *task = NULL;
if (NULL == (task = curr->curr_agent_sub_task(i)))
continue;
if (curr->is_curr_sub_task_processed(i))
{
log_debug("AgentProcess::task_notify task reply notify");
task->reply_notify();
}
else
{
log_debug("AgentProcess::task_notify task_notify next process");
output.task_notify(task);
}
}
return;
}
| [
"yangshuang68@jd.com"
] | yangshuang68@jd.com |
c919a5a6dea11eef3966c2613b19b652f2cdccad | c2fc4673b511b347b47158be96e6bf1f01e3f167 | /extras/jbcoin-libpp/extras/jbcoind/src/jbcoin/rpc/handlers/AccountObjects.cpp | f165bb46dc83be2f857e615d9fac2730038e439d | [
"MIT-Wu",
"MIT",
"ISC",
"BSL-1.0"
] | permissive | trongnmchainos/validator-keys-tool | 037c7d69149cc9581ddfca3dc93892ebc1e031f1 | cae131d6ab46051c0f47509b79b6efc47a70eec0 | refs/heads/master | 2020-04-07T19:42:10.838318 | 2018-11-22T07:33:26 | 2018-11-22T07:33:26 | 158,658,994 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 4,105 | cpp | //------------------------------------------------------------------------------
/*
This file is part of jbcoind: https://github.com/jbcoin/jbcoind
Copyright (c) 2012-2014 Jbcoin Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#include <BeastConfig.h>
#include <jbcoin/json/json_writer.h>
#include <jbcoin/app/main/Application.h>
#include <jbcoin/ledger/ReadView.h>
#include <jbcoin/net/RPCErr.h>
#include <jbcoin/protocol/ErrorCodes.h>
#include <jbcoin/protocol/Indexes.h>
#include <jbcoin/protocol/JsonFields.h>
#include <jbcoin/protocol/LedgerFormats.h>
#include <jbcoin/resource/Fees.h>
#include <jbcoin/rpc/Context.h>
#include <jbcoin/rpc/impl/RPCHelpers.h>
#include <jbcoin/rpc/impl/Tuning.h>
#include <string>
#include <sstream>
namespace jbcoin {
/** General RPC command that can retrieve objects in the account root.
{
account: <account>|<account_public_key>
ledger_hash: <string> // optional
ledger_index: <string | unsigned integer> // optional
type: <string> // optional, defaults to all account objects types
limit: <integer> // optional
marker: <opaque> // optional, resume previous query
}
*/
Json::Value doAccountObjects (RPC::Context& context)
{
auto const& params = context.params;
if (! params.isMember (jss::account))
return RPC::missing_field_error (jss::account);
std::shared_ptr<ReadView const> ledger;
auto result = RPC::lookupLedger (ledger, context);
if (ledger == nullptr)
return result;
AccountID accountID;
{
auto const strIdent = params[jss::account].asString ();
if (auto jv = RPC::accountFromString (accountID, strIdent))
{
for (auto it = jv.begin (); it != jv.end (); ++it)
result[it.memberName ()] = *it;
return result;
}
}
if (! ledger->exists(keylet::account (accountID)))
return rpcError (rpcACT_NOT_FOUND);
auto type = RPC::chooseLedgerEntryType(params);
if (type.first)
{
result.clear();
type.first.inject(result);
return result;
}
unsigned int limit;
if (auto err = readLimitField(limit, RPC::Tuning::accountObjects, context))
return *err;
uint256 dirIndex;
uint256 entryIndex;
if (params.isMember (jss::marker))
{
auto const& marker = params[jss::marker];
if (! marker.isString ())
return RPC::expected_field_error (jss::marker, "string");
std::stringstream ss (marker.asString ());
std::string s;
if (!std::getline(ss, s, ','))
return RPC::invalid_field_error (jss::marker);
if (! dirIndex.SetHex (s))
return RPC::invalid_field_error (jss::marker);
if (! std::getline (ss, s, ','))
return RPC::invalid_field_error (jss::marker);
if (! entryIndex.SetHex (s))
return RPC::invalid_field_error (jss::marker);
}
if (! RPC::getAccountObjects (*ledger, accountID, type.second,
dirIndex, entryIndex, limit, result))
{
result[jss::account_objects] = Json::arrayValue;
}
result[jss::account] = context.app.accountIDCache().toBase58 (accountID);
context.loadType = Resource::feeMediumBurdenRPC;
return result;
}
} // jbcoin
| [
"trongnm@chainos.vn"
] | trongnm@chainos.vn |
32e825667ff8ef187b0560e3044d4401ac2ea344 | 5fa0e0ba6cd719a856c6e479e90602dfb6bed4ff | /Minigin/BaseComponent.h | 5f3be89f67dc4d71f05f2175fa1b83bdf1e61e2b | [] | no_license | Cem-Alagozlu/MyEngine | a853a2ff23e2dbd02c53e14f2e96605e74718666 | b81ff77ca87266bcdfeccef577c72e54e04d4030 | refs/heads/master | 2022-01-10T18:39:49.902708 | 2019-05-26T21:13:15 | 2019-05-26T21:13:15 | 183,600,565 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 651 | h | #pragma once
namespace cem
{
class GameObject;
class BaseComponent : public std::enable_shared_from_this<BaseComponent>
{
friend GameObject;
public:
BaseComponent();
virtual ~BaseComponent() = default;
std::shared_ptr<GameObject> GetGameObject();
BaseComponent(const BaseComponent& other) = delete;
BaseComponent(BaseComponent&& other) noexcept = delete;
BaseComponent& operator=(const BaseComponent& other) = delete;
BaseComponent& operator=(BaseComponent&& other) noexcept = delete;
protected:
std::weak_ptr<GameObject> m_pGameObject;
virtual void Update(float deltaTime) = 0;
virtual void Draw() const = 0;
};
}
| [
"cem.alagozlu@hotmail.com"
] | cem.alagozlu@hotmail.com |
522a078dc42cc40e5ce04d1d34aaba790fd9bc2e | f8874d8371a7ba29f515176e0253e62438b76457 | /propagators/propagator.cpp | a031fe1c80fabd43c313075842e21dc24d8acc17 | [] | no_license | porcupine18/chessgame | 87d0e867f98a87e28987f06207b01b1142d5fa34 | 60b7e8742060cabafa3237817fdedbb0bd6cf410 | refs/heads/master | 2023-08-11T15:03:28.866624 | 2021-09-29T13:37:35 | 2021-09-29T13:37:35 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,828 | cpp | #include "propagator.hpp"
#include "../board.hpp"
#include "../threatTile.hpp"
#include "verticalPropagator.hpp"
#include "horizontalPropagator.hpp"
#include "positiveDiagonalPropagator.hpp"
#include "negativeDiagonalPropagator.hpp"
Propagator::Propagator(Piece* rootPiece, Move* movePerformed) {
this->rootPiece = rootPiece;
this->movePerformed = movePerformed;
}
void Propagator::openPropagation(Game& game) {
}
void Propagator::closePropagation(Game& game) {
}
void Propagator::updater(Game& game, int xStart, int yStart, int xDir, int yDir, bool threaten) {
int curX = xStart, curY = yStart;
while ((unsigned)curX < Board::width && (unsigned)curY < Board::height) {
if (threaten) {
game.addThreat(rootPiece, curX, curY);
} else {
// if no piece is removed then false is returned
if (!game.removeThreat(rootPiece, curX, curY)) return;
}
// Piece blocks the way so we stop the propergation
if (game.getPieceAt(curX, curY)) return;
curX += xDir;
curY += yDir;
}
}
Propagator* Propagator::fetchPropagator(Piece* queryPiece, Move* queryMove, bool updateFrom) {
int xRef = updateFrom ? queryMove->xFrom : queryMove->xTo;
int yRef = updateFrom ? queryMove->yFrom : queryMove->yTo;
if (xRef == queryPiece->xPos) {
return new VerticalPropagator(queryPiece, queryMove);
}
if (yRef == queryPiece->yPos) {
return new HorizontalPropagator (queryPiece, queryMove);
}
// We need a diagonal updater
int xDistance = xRef - queryPiece->xPos;
int yDistance = yRef - queryPiece->yPos;
if (xDistance > 0 == yDistance > 0) {
return new NegativeDiagonalPropagator (queryPiece, queryMove);
}
return new PositiveDiagonalPropagator (queryPiece, queryMove);
} | [
"hontapner@gmail.com"
] | hontapner@gmail.com |
46289bd83b93cd02d2e4f26fd0348b4fcf4bf3aa | a23b8c5d72e7d01df0dae5f96f0b1a02a4235a3e | /Code/Meerkat/Layers/LinearLayer.cpp | 859a61e485a3720acd1337d419e5146e7eafa846 | [] | no_license | sunnior/Meerkat | 15b0055f327ad6a94a8b054ae7a855ebd972c120 | ac027feff4e642a0db86a0fec2019649c6bb800f | refs/heads/master | 2021-09-05T07:25:41.619093 | 2018-01-25T06:45:47 | 2018-01-25T06:45:47 | 110,552,849 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,429 | cpp | #include "LinearLayer.h"
#include "Common/Blas.h"
namespace DeepLearning
{
DL_REFL_IMPLEMENT(LinearLayer, "layer_linear");
void LinearLayer::FromJson(const rapidjson::Value& layer_json)
{
m_input_num = layer_json["input"].GetInt();
m_output_num = layer_json["output"].GetInt();
}
void LinearLayer::ToJson(rapidjson::PrettyWriter<rapidjson::StringBuffer>& writer)
{
writer.Key("input");
writer.Uint(m_input_num);
writer.Key("output");
writer.Uint(m_output_num);
}
dl_tensor_shape LinearLayer::GetOutputShape(const dl_tensor_shape& input_shape)
{
return dl_tensor_shape(m_bias->GetShape());
}
void LinearLayer::_CreateData()
{
m_weight = _CreateTensor({ m_input_num, m_output_num });
m_bias = _CreateTensor({ m_output_num });
}
void LinearLayer::SerializeData(TensorWriter& writer)
{
writer.Write(m_weight);
writer.Write(m_bias);
}
void LinearLayer::DeserializeData(TensorReader& reader)
{
reader.Read(m_weight);
reader.Read(m_bias);
}
void LinearLayer::CreateTrainData(dl_uint32 batch_size)
{
m_grad_weight = _CreateTensor(m_weight->GetShape());
m_grad_bias = _CreateTensor(m_bias->GetShape());
m_bias_multi = _CreateTensor({ batch_size });
m_bias_multi->FillWith((dl_tensor)1.0f);
}
void LinearLayer::_ForwardCpu(const Tensor* input, Tensor* output)
{
TODO("check dimension");
output->Zeros();
dl_uint32 m_size = input->GetShape(0);//batch_size
dl_uint32 k_size = m_weight->GetShape(0);
dl_uint32 n_size = output->GetShape(1);
const dl_tensor* input_data = input->GetData();
dl_tensor* output_data = output->GetData();
dl_tensor* weight_data = m_weight->GetData();
dl_tensor* bias_data = m_bias->GetData();
dl_memcpy_cpu<dl_tensor>(output_data, bias_data, n_size, m_size);
dl_gemm_cpu<dl_tensor>(CblasRowMajor, CblasNoTrans, CblasTrans,
m_size, n_size, k_size,
1.0f, input_data,
weight_data,
1.0f, output_data);
}
void LinearLayer::_ForwardGpu(const Tensor* input, Tensor* output)
{
}
/*
void LinearLayer::_BackwardCpu(const Tensor* input, const Tensor* grad_input, Tensor* grad_output)
{
dl_uint32 batch_size = input->GetShape(0);
dl_uint32 weight_size = m_weight->GetShape(0);
dl_uint32 bias_size = m_bias->GetShape(0);
_CreateGradParam(batch_size);
const dl_tensor* input_data = input->GetData();
const dl_tensor* grad_input_data = grad_input->GetData();
const dl_tensor* weight_data = m_weight->GetData();
dl_tensor* grad_weight = m_grad_weight->GetData();
const dl_tensor* bias_multi_data = m_bias_multi->GetData();
dl_tensor* grad_bias_data = m_grad_bias->GetData();
dl_gemm_cpu<dl_tensor>(CblasRowMajor, CblasTrans, CblasNoTrans, weight_size, bias_size, batch_size, (dl_tensor)1.0f, input_data, grad_input_data, (dl_tensor)1.0f, grad_weight);
dl_gemm_cpu<dl_tensor>(CblasRowMajor, CblasNoTrans, CblasNoTrans, 1, bias_size, batch_size, (dl_tensor)1.0f, bias_multi_data, grad_input_data, 1.0f, grad_bias_data);
if (grad_output) {
dl_tensor* grad_output_data = grad_output->GetData();
dl_gemm_cpu<dl_tensor>(CblasRowMajor, CblasNoTrans, CblasTrans, batch_size, weight_size, bias_size, (dl_tensor)1.0f, grad_input_data, weight_data, (dl_tensor)0.0f, grad_output_data);
}
}
*/
void LinearLayer::_BackwardCpu(const Tensor* input, const Tensor* grad_input, Tensor* grad_output)
{
dl_uint32 batch_size = input->GetShape(0);
dl_uint32 weight_size = m_weight->GetShape(0);
dl_uint32 bias_size = m_bias->GetShape(0);
const dl_tensor* input_data = input->GetData();
const dl_tensor* grad_input_data = grad_input->GetData();
const dl_tensor* weight_data = m_weight->GetData();
dl_tensor* grad_weight_data = m_grad_weight->GetData();
dl_tensor* grad_bias_data = m_grad_bias->GetData();
for (dl_uint32 bias_idx = 0; bias_idx < bias_size; ++bias_idx)
{
for (dl_uint32 weight_idx = 0; weight_idx < weight_size; ++weight_idx)
{
for (dl_uint32 batch_idx = 0; batch_idx < batch_size; ++batch_idx)
{
*(grad_weight_data + bias_idx*weight_size + weight_idx) += *(input_data + batch_idx*weight_size + weight_idx) * *(grad_input_data + batch_idx*bias_size + bias_idx);
}
}
for (dl_uint32 batch_idx = 0; batch_idx < batch_size; ++batch_idx)
{
*(grad_bias_data + bias_idx) += *(grad_input_data + batch_idx*bias_size + bias_idx);
}
}
if (grad_output)
{
grad_output->Zeros();
dl_tensor* grad_output_data = grad_output->GetData();
for (dl_uint32 batch_idx = 0; batch_idx < batch_size; ++batch_idx)
{
for (dl_uint32 weight_idx = 0; weight_idx < weight_size; ++weight_idx)
{
for (dl_uint32 bias_idx = 0; bias_idx < bias_size; ++bias_idx)
{
*(grad_output_data + batch_idx*weight_size + weight_idx) += *(grad_input_data + batch_idx*bias_size + bias_idx) * *(weight_data + bias_idx*weight_size + weight_idx);
}
}
}
}
}
void LinearLayer::_GetLearnableTensor(dl_vector<::std::pair<Tensor*, Tensor*>>& params)
{
params.push_back(::std::pair<Tensor*, Tensor*>(m_weight, m_grad_weight));
params.push_back(::std::pair<Tensor*, Tensor*>(m_bias, m_grad_bias));
}
void LinearLayer::_BackwardGpu(const Tensor* input, const Tensor* grad_input, Tensor* grad_output)
{
}
}
| [
"sunnior@gmail.com"
] | sunnior@gmail.com |
3fceaee1aa6c5ccedb1485a3b591f0e6eb1ba077 | 8df53ae93b52f48b0a13a15d33ca604034bec41f | /INCLUDE/TModelArray.h | d46de17a43a8db2a6e09541c0489800940d5f413 | [] | no_license | alex3696/wh3 | 244e3561dafe8470657bd3fc5ba8c94eeceb120e | c0b23c0e41959eab23fba9ab144487e87c85fed4 | refs/heads/master | 2021-01-25T12:13:51.181536 | 2020-03-19T05:09:33 | 2020-03-19T05:09:33 | 38,360,404 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,663 | h | #ifndef __TMODELARRAY_H
#define __TMODELARRAY_H
#include "TModel.h"
namespace wh{
//-----------------------------------------------------------------------------
template< typename T_Item >
class TModelArray
: public IModel
{
public:
using ItemType = T_Item;
TModelArray(const char option
= ModelOption::EnableParentNotify
| ModelOption::EnableNotifyFromChild)
:IModel(option)
{
}
virtual std::shared_ptr<IModel> CreateChild()override
{
return std::dynamic_pointer_cast<IModel>(MakeItem());
}
inline std::shared_ptr<T_Item> CreateChild()const
{
return MakeItem();
}
inline std::shared_ptr<T_Item> CreateItem(const typename T_Item::T_Data& data
= T_Item::T_Data(), bool stored=false)const
{
auto child = std::make_shared < T_Item >();
child->SetData(data, stored);
return child;
}
std::shared_ptr<T_Item> at(size_t pos)const
{
return std::dynamic_pointer_cast<T_Item>(GetChild(pos));
}
virtual const std::vector<Field>& GetFieldVector()const override
{
auto tmpChild = std::make_shared<T_Item>();
return tmpChild->GetFieldVector();
}
protected:
virtual bool LoadChildDataFromDb(std::shared_ptr<IModel>& child,
std::shared_ptr<whTable>& table, const size_t pos)override
{
auto childModel = std::dynamic_pointer_cast<T_Item>(child);
return childModel ? childModel->LoadThisDataFromDb(table, pos) : false;
}
protected:
std::shared_ptr<T_Item> MakeItem()const
{
auto child = std::make_shared < T_Item >();
child->SetData(T_Item::T_Data());
return child;
}
};
//-----------------------------------------------------------------------------
}//namespace wh{
#endif // __****_H | [
"alex3696@yandex.ru"
] | alex3696@yandex.ru |
3ba8bd3784e5fdbede5028a1e1da353ba04b1c3e | c216f98d6028148285bdc31a3f78572386502945 | /Tetris/Tetris/Screen.h | 8d17d646dcf395f4192d79a9f48ce4a94ce3a18b | [] | no_license | sa04108/hyunbae | 3a184949d914e8064e1f1f56fd692d4fc2460874 | 2c9c2126d64ba62d80444524dbab1d2b65fd87d0 | refs/heads/main | 2023-07-06T06:11:27.504832 | 2023-07-02T15:07:10 | 2023-07-02T15:07:10 | 84,392,262 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 287 | h | #pragma once
#include <iostream>
#include "Utils.h"
using namespace std;
class Screen
{
public:
Screen(int width = 10, int height = 20);
int getScreenWidth();
int getScreenHeight();
int getScreenSize();
protected:
int width;
int height;
Position initial_pos;
int x;
int y;
}; | [
"sa04108@naver.com"
] | sa04108@naver.com |
5e560464ec1e9e3c1fe88facd39968156eb6af44 | 1dbf007249acad6038d2aaa1751cbde7e7842c53 | /live/include/huaweicloud/live/v2/model/ShowStreamCountResponse.h | 761200cd2a0a69e70c03746b2d25061fa3925d80 | [] | permissive | huaweicloud/huaweicloud-sdk-cpp-v3 | 24fc8d93c922598376bdb7d009e12378dff5dd20 | 71674f4afbb0cd5950f880ec516cfabcde71afe4 | refs/heads/master | 2023-08-04T19:37:47.187698 | 2023-08-03T08:25:43 | 2023-08-03T08:25:43 | 324,328,641 | 11 | 10 | Apache-2.0 | 2021-06-24T07:25:26 | 2020-12-25T09:11:43 | C++ | UTF-8 | C++ | false | false | 1,790 | h |
#ifndef HUAWEICLOUD_SDK_LIVE_V2_MODEL_ShowStreamCountResponse_H_
#define HUAWEICLOUD_SDK_LIVE_V2_MODEL_ShowStreamCountResponse_H_
#include <huaweicloud/live/v2/LiveExport.h>
#include <huaweicloud/core/utils/ModelBase.h>
#include <huaweicloud/core/http/HttpResponse.h>
#include <huaweicloud/live/v2/model/StreamCountData.h>
#include <string>
#include <vector>
namespace HuaweiCloud {
namespace Sdk {
namespace Live {
namespace V2 {
namespace Model {
using namespace HuaweiCloud::Sdk::Core::Utils;
using namespace HuaweiCloud::Sdk::Core::Http;
/// <summary>
/// Response Object
/// </summary>
class HUAWEICLOUD_LIVE_V2_EXPORT ShowStreamCountResponse
: public ModelBase, public HttpResponse
{
public:
ShowStreamCountResponse();
virtual ~ShowStreamCountResponse();
/////////////////////////////////////////////
/// ModelBase overrides
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
/////////////////////////////////////////////
/// ShowStreamCountResponse members
/// <summary>
/// 采样数据列表。
/// </summary>
std::vector<StreamCountData>& getDataList();
bool dataListIsSet() const;
void unsetdataList();
void setDataList(const std::vector<StreamCountData>& value);
/// <summary>
///
/// </summary>
std::string getXRequestId() const;
bool xRequestIdIsSet() const;
void unsetxRequestId();
void setXRequestId(const std::string& value);
protected:
std::vector<StreamCountData> dataList_;
bool dataListIsSet_;
std::string xRequestId_;
bool xRequestIdIsSet_;
#ifdef RTTR_FLAG
RTTR_ENABLE()
#endif
};
}
}
}
}
}
#endif // HUAWEICLOUD_SDK_LIVE_V2_MODEL_ShowStreamCountResponse_H_
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
26b4b02b6f1a84f28b57fde62166b181818f0361 | 67768a66ed30720ef79c83a7750c385d7e2f3db6 | /named-pipes/tests/client.cpp | c855ad9be2cb03e71ea11eb934b20f3c370616cc | [] | no_license | konstantin89/linux-ipc-wrapper | 7b668cb27648f4a43fa3d20c15179d21bf9073d0 | aee50ee29769dfc64c8128c26c0e80c37908cf67 | refs/heads/master | 2020-04-01T23:52:37.651486 | 2018-12-08T19:07:25 | 2018-12-08T19:07:25 | 153,777,176 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,133 | cpp | /**
* @brief: Client side program for testing named pipes IPC.
*/
#include <iostream>
#include <thread>
#include <chrono>
#include "./../src/NamedPipeWrapper.h"
#include "testCommon.h"
// Delay in seconds
#define DELAY_BETWEEN_MESSAGES 1
int sendTestMessage()
{
int retVal = 0;
NamedPipeWrapper namedPipe;
retVal = namedPipe.OpenWriter(TEST_PIPE_NAME);
if(retVal)
{
std::cout << "[X] Open failed with error " << retVal << std::endl;
return ERROR;
}
Buffer<uint8_t*> buf;
uint8_t message[] = {'M','E','S','S','A','G','E'};
buf.Insert(message, 7);
while(1)
{
retVal = namedPipe.Write(buf);
if(retVal)
{
std::cout << "[X] Write failed with error " << retVal << std::endl;
return ERROR;
}
std::this_thread::sleep_for (std::chrono::seconds(DELAY_BETWEEN_MESSAGES));
}
retVal = namedPipe.Close();
if(retVal)
{
std::cout << "[X] Close failed with error " << retVal << std::endl;
return ERROR;
}
return SUCCESS;
}
int main()
{
return sendTestMessage();
} | [
"kostabulgakov89@gmail.com"
] | kostabulgakov89@gmail.com |
9b1867deebfa4fbccd05aaca5e1d76c6b2379a0b | 6132bda46225bec2901cb9768eb80ef799aaab8e | /src/rpcnet.cpp | 1b769986543acf7583b678e210b7572884fa1825 | [
"MIT"
] | permissive | BiflexCryptocurrency/BLXcore | 57f5da27e3350db1f7a19bf1f78698aaf4429751 | 47fee670e1c4f5ac8d7488f43e9a3b7f8c952d1f | refs/heads/master | 2022-12-26T22:17:23.031515 | 2020-10-06T16:38:26 | 2020-10-06T16:38:26 | 300,451,034 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,297 | cpp | // Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2019 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpcserver.h"
#include "clientversion.h"
#include "main.h"
#include "net.h"
#include "netbase.h"
#include "protocol.h"
#include "sync.h"
#include "timedata.h"
#include "util.h"
#include "version.h"
#include <boost/foreach.hpp>
#include "json/json_spirit_value.h"
using namespace json_spirit;
using namespace std;
Value getconnectioncount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getconnectioncount\n"
"\nReturns the number of connections to other nodes.\n"
"\nbResult:\n"
"n (numeric) The connection count\n"
"\nExamples:\n" +
HelpExampleCli("getconnectioncount", "") + HelpExampleRpc("getconnectioncount", ""));
LOCK(cs_vNodes);
return (int)vNodes.size();
}
Value ping(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"ping\n"
"\nRequests that a ping be sent to all other nodes, to measure ping time.\n"
"Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.\n"
"Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.\n"
"\nExamples:\n" +
HelpExampleCli("ping", "") + HelpExampleRpc("ping", ""));
// Request that each node send a ping during next message processing pass
LOCK(cs_vNodes);
BOOST_FOREACH (CNode* pNode, vNodes) {
pNode->fPingQueued = true;
}
return Value::null;
}
static void CopyNodeStats(std::vector<CNodeStats>& vstats)
{
vstats.clear();
LOCK(cs_vNodes);
vstats.reserve(vNodes.size());
BOOST_FOREACH (CNode* pnode, vNodes) {
CNodeStats stats;
pnode->copyStats(stats);
vstats.push_back(stats);
}
}
Value getpeerinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getpeerinfo\n"
"\nReturns data about each connected network node as a json array of objects.\n"
"\nbResult:\n"
"[\n"
" {\n"
" \"id\": n, (numeric) Peer index\n"
" \"addr\":\"host:port\", (string) The ip address and port of the peer\n"
" \"addrlocal\":\"ip:port\", (string) local address\n"
" \"services\":\"xxxxxxxxxxxxxxxx\", (string) The services offered\n"
" \"lastsend\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send\n"
" \"lastrecv\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive\n"
" \"bytessent\": n, (numeric) The total bytes sent\n"
" \"bytesrecv\": n, (numeric) The total bytes received\n"
" \"conntime\": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)\n"
" \"pingtime\": n, (numeric) ping time\n"
" \"pingwait\": n, (numeric) ping wait\n"
" \"version\": v, (numeric) The peer version, such as 7001\n"
" \"subver\": \"/BLX Core:x.x.x.x/\", (string) The string version\n"
" \"inbound\": true|false, (boolean) Inbound (true) or Outbound (false)\n"
" \"startingheight\": n, (numeric) The starting height (block) of the peer\n"
" \"banscore\": n, (numeric) The ban score\n"
" \"synced_headers\": n, (numeric) The last header we have in common with this peer\n"
" \"synced_blocks\": n, (numeric) The last block we have in common with this peer\n"
" \"inflight\": [\n"
" n, (numeric) The heights of blocks we're currently asking from this peer\n"
" ...\n"
" ]\n"
" }\n"
" ,...\n"
"]\n"
"\nExamples:\n" +
HelpExampleCli("getpeerinfo", "") + HelpExampleRpc("getpeerinfo", ""));
vector<CNodeStats> vstats;
CopyNodeStats(vstats);
Array ret;
BOOST_FOREACH (const CNodeStats& stats, vstats) {
Object obj;
CNodeStateStats statestats;
bool fStateStats = GetNodeStateStats(stats.nodeid, statestats);
obj.push_back(Pair("id", stats.nodeid));
obj.push_back(Pair("addr", stats.addrName));
if (!(stats.addrLocal.empty()))
obj.push_back(Pair("addrlocal", stats.addrLocal));
obj.push_back(Pair("services", strprintf("%016x", stats.nServices)));
obj.push_back(Pair("lastsend", stats.nLastSend));
obj.push_back(Pair("lastrecv", stats.nLastRecv));
obj.push_back(Pair("bytessent", stats.nSendBytes));
obj.push_back(Pair("bytesrecv", stats.nRecvBytes));
obj.push_back(Pair("conntime", stats.nTimeConnected));
obj.push_back(Pair("pingtime", stats.dPingTime));
if (stats.dPingWait > 0.0)
obj.push_back(Pair("pingwait", stats.dPingWait));
obj.push_back(Pair("version", stats.nVersion));
// Use the sanitized form of subver here, to avoid tricksy remote peers from
// corrupting or modifiying the JSON output by putting special characters in
// their ver message.
obj.push_back(Pair("subver", stats.cleanSubVer));
obj.push_back(Pair("inbound", stats.fInbound));
obj.push_back(Pair("startingheight", stats.nStartingHeight));
if (fStateStats) {
obj.push_back(Pair("banscore", statestats.nMisbehavior));
obj.push_back(Pair("synced_headers", statestats.nSyncHeight));
obj.push_back(Pair("synced_blocks", statestats.nCommonHeight));
Array heights;
BOOST_FOREACH (int height, statestats.vHeightInFlight) {
heights.push_back(height);
}
obj.push_back(Pair("inflight", heights));
}
obj.push_back(Pair("whitelisted", stats.fWhitelisted));
ret.push_back(obj);
}
return ret;
}
Value addnode(const Array& params, bool fHelp)
{
string strCommand;
if (params.size() == 2)
strCommand = params[1].get_str();
if (fHelp || params.size() != 2 ||
(strCommand != "onetry" && strCommand != "add" && strCommand != "remove"))
throw runtime_error(
"addnode \"node\" \"add|remove|onetry\"\n"
"\nAttempts add or remove a node from the addnode list.\n"
"Or try a connection to a node once.\n"
"\nArguments:\n"
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n"
"\nExamples:\n" +
HelpExampleCli("addnode", "\"192.168.0.6:44444\" \"onetry\"") + HelpExampleRpc("addnode", "\"192.168.0.6:44444\", \"onetry\""));
string strNode = params[0].get_str();
if (strCommand == "onetry") {
CAddress addr;
OpenNetworkConnection(addr, NULL, strNode.c_str());
return Value::null;
}
LOCK(cs_vAddedNodes);
vector<string>::iterator it = vAddedNodes.begin();
for (; it != vAddedNodes.end(); it++)
if (strNode == *it)
break;
if (strCommand == "add") {
if (it != vAddedNodes.end())
throw JSONRPCError(RPC_CLIENT_NODE_ALREADY_ADDED, "Error: Node already added");
vAddedNodes.push_back(strNode);
} else if (strCommand == "remove") {
if (it == vAddedNodes.end())
throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, "Error: Node has not been added.");
vAddedNodes.erase(it);
}
return Value::null;
}
Value getaddednodeinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"getaddednodeinfo dns ( \"node\" )\n"
"\nReturns information about the given added node, or all added nodes\n"
"(note that onetry addnodes are not listed here)\n"
"If dns is false, only a list of added nodes will be provided,\n"
"otherwise connected information will also be available.\n"
"\nArguments:\n"
"1. dns (boolean, required) If false, only a list of added nodes will be provided, otherwise connected information will also be available.\n"
"2. \"node\" (string, optional) If provided, return information about this specific node, otherwise all nodes are returned.\n"
"\nResult:\n"
"[\n"
" {\n"
" \"addednode\" : \"192.168.0.201\", (string) The node ip address\n"
" \"connected\" : true|false, (boolean) If connected\n"
" \"addresses\" : [\n"
" {\n"
" \"address\" : \"192.168.0.201:44444\", (string) The blx server host and port\n"
" \"connected\" : \"outbound\" (string) connection, inbound or outbound\n"
" }\n"
" ,...\n"
" ]\n"
" }\n"
" ,...\n"
"]\n"
"\nExamples:\n" +
HelpExampleCli("getaddednodeinfo", "true") + HelpExampleCli("getaddednodeinfo", "true \"192.168.0.201\"") + HelpExampleRpc("getaddednodeinfo", "true, \"192.168.0.201\""));
bool fDns = params[0].get_bool();
list<string> laddedNodes(0);
if (params.size() == 1) {
LOCK(cs_vAddedNodes);
BOOST_FOREACH (string& strAddNode, vAddedNodes)
laddedNodes.push_back(strAddNode);
} else {
string strNode = params[1].get_str();
LOCK(cs_vAddedNodes);
BOOST_FOREACH (string& strAddNode, vAddedNodes)
if (strAddNode == strNode) {
laddedNodes.push_back(strAddNode);
break;
}
if (laddedNodes.size() == 0)
throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, "Error: Node has not been added.");
}
Array ret;
if (!fDns) {
BOOST_FOREACH (string& strAddNode, laddedNodes) {
Object obj;
obj.push_back(Pair("addednode", strAddNode));
ret.push_back(obj);
}
return ret;
}
list<pair<string, vector<CService> > > laddedAddreses(0);
BOOST_FOREACH (string& strAddNode, laddedNodes) {
vector<CService> vservNode(0);
if (Lookup(strAddNode.c_str(), vservNode, Params().GetDefaultPort(), fNameLookup, 0))
laddedAddreses.push_back(make_pair(strAddNode, vservNode));
else {
Object obj;
obj.push_back(Pair("addednode", strAddNode));
obj.push_back(Pair("connected", false));
Array addresses;
obj.push_back(Pair("addresses", addresses));
}
}
LOCK(cs_vNodes);
for (list<pair<string, vector<CService> > >::iterator it = laddedAddreses.begin(); it != laddedAddreses.end(); it++) {
Object obj;
obj.push_back(Pair("addednode", it->first));
Array addresses;
bool fConnected = false;
BOOST_FOREACH (CService& addrNode, it->second) {
bool fFound = false;
Object node;
node.push_back(Pair("address", addrNode.ToString()));
BOOST_FOREACH (CNode* pnode, vNodes)
if (pnode->addr == addrNode) {
fFound = true;
fConnected = true;
node.push_back(Pair("connected", pnode->fInbound ? "inbound" : "outbound"));
break;
}
if (!fFound)
node.push_back(Pair("connected", "false"));
addresses.push_back(node);
}
obj.push_back(Pair("connected", fConnected));
obj.push_back(Pair("addresses", addresses));
ret.push_back(obj);
}
return ret;
}
Value getnettotals(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 0)
throw runtime_error(
"getnettotals\n"
"\nReturns information about network traffic, including bytes in, bytes out,\n"
"and current time.\n"
"\nResult:\n"
"{\n"
" \"totalbytesrecv\": n, (numeric) Total bytes received\n"
" \"totalbytessent\": n, (numeric) Total bytes sent\n"
" \"timemillis\": t (numeric) Total cpu time\n"
"}\n"
"\nExamples:\n" +
HelpExampleCli("getnettotals", "") + HelpExampleRpc("getnettotals", ""));
Object obj;
obj.push_back(Pair("totalbytesrecv", CNode::GetTotalBytesRecv()));
obj.push_back(Pair("totalbytessent", CNode::GetTotalBytesSent()));
obj.push_back(Pair("timemillis", GetTimeMillis()));
return obj;
}
static Array GetNetworksInfo()
{
Array networks;
for (int n = 0; n < NET_MAX; ++n) {
enum Network network = static_cast<enum Network>(n);
if (network == NET_UNROUTABLE)
continue;
proxyType proxy;
Object obj;
GetProxy(network, proxy);
obj.push_back(Pair("name", GetNetworkName(network)));
obj.push_back(Pair("limited", IsLimited(network)));
obj.push_back(Pair("reachable", IsReachable(network)));
obj.push_back(Pair("proxy", proxy.IsValid() ? proxy.proxy.ToStringIPPort() : string()));
obj.push_back(Pair("proxy_randomize_credentials", proxy.randomize_credentials));
networks.push_back(obj);
}
return networks;
}
Value getnetworkinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getnetworkinfo\n"
"Returns an object containing various state info regarding P2P networking.\n"
"\nResult:\n"
"{\n"
" \"version\": xxxxx, (numeric) the server version\n"
" \"subversion\": \"/BLX Core:x.x.x.x/\", (string) the server subversion string\n"
" \"protocolversion\": xxxxx, (numeric) the protocol version\n"
" \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
" \"timeoffset\": xxxxx, (numeric) the time offset\n"
" \"connections\": xxxxx, (numeric) the number of connections\n"
" \"networks\": [ (array) information per network\n"
" {\n"
" \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n"
" \"limited\": true|false, (boolean) is the network limited using -onlynet?\n"
" \"reachable\": true|false, (boolean) is the network reachable?\n"
" \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n"
" }\n"
" ,...\n"
" ],\n"
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in blx/kb\n"
" \"localaddresses\": [ (array) list of local addresses\n"
" {\n"
" \"address\": \"xxxx\", (string) network address\n"
" \"port\": xxx, (numeric) network port\n"
" \"score\": xxx (numeric) relative score\n"
" }\n"
" ,...\n"
" ]\n"
"}\n"
"\nExamples:\n" +
HelpExampleCli("getnetworkinfo", "") + HelpExampleRpc("getnetworkinfo", ""));
Object obj;
obj.push_back(Pair("version", CLIENT_VERSION));
obj.push_back(Pair("subversion",
FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>())));
obj.push_back(Pair("protocolversion", PROTOCOL_VERSION));
obj.push_back(Pair("localservices", strprintf("%016x", nLocalServices)));
obj.push_back(Pair("timeoffset", GetTimeOffset()));
obj.push_back(Pair("connections", (int)vNodes.size()));
obj.push_back(Pair("networks", GetNetworksInfo()));
obj.push_back(Pair("relayfee", ValueFromAmount(::minRelayTxFee.GetFeePerK())));
Array localAddresses;
{
LOCK(cs_mapLocalHost);
BOOST_FOREACH (const PAIRTYPE(CNetAddr, LocalServiceInfo) & item, mapLocalHost) {
Object rec;
rec.push_back(Pair("address", item.first.ToString()));
rec.push_back(Pair("port", item.second.nPort));
rec.push_back(Pair("score", item.second.nScore));
localAddresses.push_back(rec);
}
}
obj.push_back(Pair("localaddresses", localAddresses));
return obj;
}
| [
"root@vmi433587.contaboserver.net"
] | root@vmi433587.contaboserver.net |
412b199f7b7a9d3a7da20ad3721cdb2aee6b8045 | e9f3369247da3435cd63f2d67aa95c890912255c | /problem30.cpp | c4210f776082ef1261e04f1fb50ef7a18acacf63 | [] | no_license | panthitesh6410/problem-solving-C- | 27b31a141669b91eb36709f0126be05f241dfb13 | 24b72fc795b7b5a44e22e5f6ca9faad462a097fb | refs/heads/master | 2021-11-15T21:52:33.523503 | 2021-10-17T16:20:58 | 2021-10-17T16:20:58 | 248,523,681 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 979 | cpp | // program to find the longest possible palindrome sub-string in a given string.
// abcdaabbaaxetr --> aabbaa
#include<iostream>
#include<string>
#include<stack>
using namespace std;
int main()
{
string str;
cin>>str;
int max_length = 0;
string max_palindrome_str;
for(int i=0;i<str.length();i++)
{
for(int j=i+1;j<str.length();j++)
{
if(reverse(str, i, j) == str[from i to j] && length(str[from i to j]) >= max_length)
max_palindrome_str = str[from i to j];
}
}
cout<<max_palindrome_str;
return 0;
}
bool reverse(string str, int i, int j)
{
string s = '\0';
while(i <= j)
{
s = s + str[i];
i++;
}
char temp;
string ori = s;
for(int k=0;k<s.length()/2;k++)
{
temp = s[k];
s[k] = s[s.length() - 1 - k];
s[s.length() - 1 - k] = temp;
}
if(ori == s)
return true;
else
return false;
} | [
"panthitesh6410@gmail.com"
] | panthitesh6410@gmail.com |
17ad829638b39d8a98f7edfa87e355a837bc8b4e | f9b224cd9abc6cf7a7f53588072cd6cc2e958398 | /RTA_Rendering_Engine/RTA_Rendering_Engine/RasterizerStateManager.cpp | dc980449be022970b249df093df250e07e80a568 | [] | no_license | ProtheanGH/RTA_Project | 768734914c6fbd003236ce61b9763f9603a591a2 | b0fe989201976b8dff6d5658646c1650a7619251 | refs/heads/master | 2021-01-10T16:07:32.429418 | 2016-03-02T20:42:10 | 2016-03-02T20:42:10 | 52,796,397 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,107 | cpp | #include "RasterizerStateManager.h"
#include "Renderer.h"
RasterizerStateManager* RasterizerStateManager::s_Instance = nullptr;
// ===== Destructor ===== //
RasterizerStateManager::~RasterizerStateManager()
{
}
// ====================== //
// ===== Static Interface ===== //
RasterizerStateManager* RasterizerStateManager::GetInstance()
{
if (s_Instance == nullptr) {
s_Instance = new RasterizerStateManager();
s_Instance->Initialize();
}
return s_Instance;
}
// ============================ //
// ===== Interface ===== //
void RasterizerStateManager::Apply(RasterizerStates _rasterizerState)
{
if (_rasterizerState >= RasterizerStates::MAX_RASTERIZER_STATES)
return;
Renderer::GetInstance()->GetDeviceContext()->RSSetState(m_RasterizerStates[_rasterizerState]);
}
void RasterizerStateManager::Revert()
{
Renderer::GetInstance()->GetDeviceContext()->RSSetState(m_RasterizerStates[RasterizerStates::Default]);
}
// ===================== //
// === Private Interface === //
void RasterizerStateManager::Initialize()
{
// *** Add all the Rasterizer States
}
// ========================= //
| [
"protocolx15@gmail.com"
] | protocolx15@gmail.com |
429eff579c87325143148a151e4ef43a4e038716 | 9ec7a8865d0d4bbc09fd4d6b5fd01682f1f86fd8 | /InNextWeekend/InNextWeekend/Vec3.cpp | 96a0b8c90169c65f1088222f795b70cb2a690847 | [] | no_license | tzarevich/RayTracing | 354c44891c527b0dd337d3fdfc617786e1110f5d | 388d0e02e59c6cc3190e10700478e1a7fa6597a4 | refs/heads/master | 2023-01-06T10:36:17.937546 | 2020-10-31T06:20:22 | 2020-10-31T06:20:22 | 284,233,525 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,640 | cpp | #include "Vec3.h"
#include "CCGRay.h"
namespace CCG{
CCGVec3::CCGVec3()
{
}
CCGVec3::CCGVec3(CCGdouble e0, CCGdouble e1, CCGdouble e2)
{
e[0] = e0;
e[1] = e1;
e[2] = e2;
}
CCGVec3::CCGVec3(const CCGVec3 &v)
{
e[0] = v.e[0];
e[1] = v.e[1];
e[2] = v.e[2];
}
CCGdouble CCGVec3::x() const
{
return e[0];
}
CCGdouble CCGVec3::y() const
{
return e[1];
}
CCGdouble CCGVec3::z() const
{
return e[2];
}
CCGdouble CCGVec3::r() const
{
return e[0];
}
CCGdouble CCGVec3::g() const
{
return e[1];
}
CCGdouble CCGVec3::b() const
{
return e[2];
}
const CCGVec3& CCGVec3::operator+() const
{
return *this;
}
CCGVec3 CCGVec3::operator-() const
{
return CCGVec3(-e[0], -e[1], -e[2]);
}
/*CCGdouble CCGVec3::operator[](int i) const
{
return e[i];
}
CCGdouble& CCGVec3::operator[](int i)
{
return e[i];
}*/
CCGVec3& CCGVec3::operator+=(const CCGVec3& v)
{
e[0] += v.e[0];
e[1] += v.e[1];
e[2] += v.e[2];
return *this;
}
CCGVec3& CCGVec3::operator-=(const CCGVec3& v)
{
e[0] -= v.e[0];
e[1] -= v.e[1];
e[2] -= v.e[2];
return *this;
}
CCGVec3& CCGVec3::operator*=(const CCGVec3& v)
{
e[0] *= v.e[0];
e[1] *= v.e[1];
e[2] *= v.e[2];
return *this;
}
CCGVec3& CCGVec3::operator/=(const CCGVec3& v)
{
e[0] /= v.e[0];
e[1] /= v.e[1];
e[2] /= v.e[2];
return *this;
}
CCGVec3& CCGVec3::operator*=(const CCGdouble t)
{
e[0] *= t;
e[1] *= t;
e[2] *= t;
return *this;
}
CCGVec3& CCGVec3::operator/=(const CCGdouble t)
{
CCGdouble k = 1.0 / t;
e[0] *= k;
e[1] *= k;
e[2] *= k;
return *this;
}
CCGdouble CCGVec3::length() const
{
return sqrt(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]);
}
CCGdouble CCGVec3::suqared_length() const
{
return e[0] * e[0] + e[1] * e[1] + e[2] * e[2];
}
void CCGVec3::make_unit_vector()
{
CCGdouble k = 1.0 / sqrt(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]);
e[0] *= k;
e[1] *= k;
e[2] *= k;
}
CCGVec3::~CCGVec3()
{
}
std::istream& operator>>(std::istream& is, CCGVec3 &t)
{
is >> t.e[0] >> t.e[1] >> t.e[2];
return is;
}
std::ostream& operator<<(std::ostream& os, CCGVec3 &t)
{
os << t.e[0] << " " << t.e[1] << " " << t.e[2];
return os;
}
CCGVec3 operator+(const CCGVec3 &v1, const CCGVec3 &v2)
{
return CCGVec3(v1.e[0] + v2.e[0], v1.e[1] + v2.e[1], v1.e[2] + v2.e[2]);
}
CCGVec3 operator-(const CCGVec3 &v1, const CCGVec3 &v2)
{
return CCGVec3(v1.e[0] - v2.e[0], v1.e[1] - v2.e[1], v1.e[2] - v2.e[2]);
}
CCGVec3 operator*(const CCGVec3 &v1, const CCGVec3 &v2)
{
return CCGVec3(v1.e[0] * v2.e[0], v1.e[1] * v2.e[1], v1.e[2] * v2.e[2]);
}
CCGVec3 operator/(const CCGVec3 &v1, const CCGVec3 &v2)
{
return CCGVec3(v1.e[0] / v2.e[0], v1.e[1] / v2.e[1], v1.e[2] / v2.e[2]);
}
CCGVec3 operator*(CCGdouble t, const CCGVec3 &v)
{
return CCGVec3(t * v.e[0], t * v.e[1], t * v.e[2]);
}
CCGVec3 operator*(const CCGVec3 &v, CCGdouble t)
{
return CCGVec3(t * v.e[0], t * v.e[1], t * v.e[2]);
}
CCGVec3 operator/(const CCGVec3 &v, CCGdouble t)
{
return CCGVec3(v.e[0] / t, v.e[1] / t, v.e[2] / t);
}
CCGdouble Dot(const CCGVec3 &v1, const CCGVec3 &v2)
{
return v1.e[0] * v2.e[0] + v1.e[1] * v2.e[1] + v1.e[2] * v2.e[2];
}
CCGVec3 Cross(const CCGVec3 &v1, const CCGVec3 &v2)
{
return CCGVec3((v1.e[1] * v2.e[2] - v1.e[2] * v2.e[1]),
(v1.e[2] * v2.e[0] - v1.e[0] * v2.e[2]),
(v1.e[0] * v2.e[1] - v1.e[1] * v2.e[0]));
}
CCGVec3 unit_vector(CCGVec3 v)
{
return v / v.length();
}
CCGVec3 CCGVec3::RandVec()
{
auto x = Rand();
auto y = Rand();
auto z = Rand();
return CCGVec3(x, y, z);
}
} | [
"1441614567@qq.com"
] | 1441614567@qq.com |
ae340e0d4d7ff44f28c2935ce0d1636b56b0e126 | e5d702eefc376941fa7ee9365b3505779ec4a0ae | /2020/group04/FUSION_CENTRE_FINAL_OFFLINE/FUSION_CENTRE_FINAL/Builds/VisualStudio2019/libs/libDSP/dsp.h | 105aa918d8593c69cae1d8eaafb249a4ee6c2724 | [
"MIT"
] | permissive | SPAI-course-project/SPAI-course-project-code | 0d95c74dd3c532a025711bdcdb04c712c8d893dd | 1b8bd0c0367d6bbd00f60ffec33e14716248538e | refs/heads/main | 2023-05-02T08:10:26.515327 | 2021-05-20T09:46:03 | 2021-05-20T09:46:03 | 318,172,080 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,759 | h | #pragma once
#include "pch.h"
#include "DFT.h"
using namespace gam;
///Holds and defines what process will be used:
///PITCH_SHIFT/ AUTO_TUNE
enum ProcessActivity {
PITCH_SHIFT,
AUTO_TUNE,
VOICE_COMPRESSION,
VOICE_COMPRESSION_AND_PITCH_SHIFT
};
class DSPDLL_API DSP {
public:
///\param[in] WindowSize Stft: Size of window (use power of 2 or equall to size of buffer)
///\param[in] HopSize Stft: Size of the hop that is applied between two consecutive windows ( use WindowSize/(power of 2) ), 4 is great!
///\param[in] padSize Stft: How many zeros that need to be added, generally 0
///\param[in] windowType Stft: Pass the window type ( Hamming favorite): BARTLETT, BLACKMAN, BLACKMAN_HARRIS, HAMMING, HANN, WELCH, NYQUIST, or RECTANGLE
///\param[in] sampleRate set Sample rate
DSP(unsigned WindowSize, unsigned HopSize, unsigned padSize, WindowType windowType, unsigned sampleRate);
///\param[in] processActivity Select which process needs to be executed, check ProcessActivity for all options.
///\param[in] inputArrayPointer Pass a const float pointer to the input-array buffer.
///\param[in] outputArrayPointer Will write to a float pointer that points to the output-array buffer.
///\param[in] numberOfSamples Number of samples in inputarray and outputarray, both need to match this amount.
///\param[in] pshift Float value that will be used to shift the frequency spectrum. Generally between [ 0.5, 2 ]
///\param[in] notes Array which holds to what notes the input signals needs to be shifted.
void process(ProcessActivity processActivity, const float* inputArrayPointer, float* outputArrayPointer, const unsigned numberOfSamples, unsigned sampleRate, float pshift, std::vector<float> notes, float tresholdFrequency, float compressionFactor);
unsigned getcurrentSampleRate() { return currentSampleRate; }
void setcurrentSampleRate(unsigned SampleRate) { this->currentSampleRate = SampleRate; }
private:
STFT stft;
unsigned currentSampleRate;
enum {
PREV_MAG = 0,
TEMP_MAG,
TEMP_FRQ
};
///\param[in] pshift Float value that will be used to shift the frequency spectrum. Generally between [ 0.5, 2 ] (two octaves)
void pitchShift(float pshift);
///\param[in] notes Array which holds to what notes the input signals needs to be shifted.
void autoTune(std::vector<float> notes);
void voiceCompression(float tresholdFrequency, float factor);
};
| [
"45704289+simon-ra@users.noreply.github.com"
] | 45704289+simon-ra@users.noreply.github.com |
d6b3acbe2cdde9dedf92af46291406fdbe30ac20 | 2c29793ba3776f468beee98013126bb3efd4f2d5 | /MegaMiniSynth.ino | 88699aa8823b03eeb8001be84da6343632d61618 | [] | no_license | dqmcdonald/MegaMiniSynth | a6d07e6ee1fab800efde5d4d53aec87f6440188c | ffbd4aa991e8c4018ad5a43cc296e7335c5a5c0e | refs/heads/master | 2020-12-25T18:19:59.345620 | 2014-09-16T07:55:30 | 2014-09-16T07:55:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,346 | ino | /***************************************************************************
* Mega Mini Synth
*
* An Arduino Mega2560 based music synthesizer
*
* See http://megaminisynth.blogspot.co.nz/ for details.
*
* This file is the main routine for the synth - all command and control operations
* are performed from here.
*
* D. Quentin McDonald
* dqmcdonald@gmail.com
* 2014
*
****************************************************************************/
#include <MIDI.h>
#include <Encoder.h>
#include <Adafruit_GFX.h> // Core graphics library
#include "Adafruit_ILI9340.h" // Hardware-specific library
#include <SPI.h>
#include <SD.h>
MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);
// Pin definitions:
#define ENC1_BUTTON_PIN 7
// The following are channels on the PA8685
// PWM driver IC:
#define ENC1_RED_CHANNEL 8
#define ENC1_GREEN_CHANNEL 9
#define ENC1_BLUE_CHANNEL 10
#define DIGITAL_POT_SS_PIN 9
#define TIMER1_OUT 11
#define ENC1_PIN1 2
#define ENC1_PIN2 3
#define TFT_RST 47
#define TFT_DC 49
#define TFT_CS 53
#define SD_CS 45
#define DIGITAL_SWITCH_PIN1 22
#define DIGITAL_SWITCH_PIN2 24
class Oscillator {
public:
//
Oscillator( int timer ); // Create an instance of an Oscillator using Timer "timer"
void begin();
void setNote( int current_note ); // Set the current MIDI note
void setPitchBend( int pitch_bend ); // Set the Pitchbend amount
void testScaling( int method ); // Simply a test of the pitch bend scaling
protected:
void setPreScaling( int midi_note );// Set up the pre-scaler appropriate for the given note
int m_note;
int m_pitch_bend;
int m_timer;
};
// This class subclasses the Encoder library described here:
// http://www.pjrc.com/teensy/td_libs_Encoder.html
// As such the pins the encoder pins should be attached to hardware interrupts.
// Additions to this class are support for the RGB led and the push button.
// The LED pins should support PWM
// The Button Pin needs a pull-down resistor on it and is normally low.
class RGBEncoder :
public Encoder {
public:
RGBEncoder( int enc_pin_1, int enc_pin_2, int red_channel, int blue_channel, int green_channel, int button_pin );
void begin(); // Start the rotary encoder operating
void setColor( int red, int green, int blue ); // Set the color based on the RGB values.
// Each one is in the range 2-255;
void update ( ); // Read the current encoder value, looking for changes
int getValue( ); // Get the current encoder value
boolean buttonPressed(); // Returns true if the button has been pressed.
private:
int m_red_channel;
int m_green_channel;
int m_blue_channel;
int m_button_pin;
boolean m_button_pressed;
long int m_button_down_time;
long int m_button_check_time;
};
class DigitalPot {
public:
DigitalPot( int ss_pin, int num_channels );
// Value is from 0-255
void setValue( int channel, int val );
protected:
int m_ss_pin;
int m_num_channels;
};
// Object creation:
// Create Oscillator instances
Oscillator OSC1(1);
// Rotary Encoder instances:
RGBEncoder Encoder1( ENC1_PIN1, ENC1_PIN2, ENC1_RED_CHANNEL, ENC1_GREEN_CHANNEL, ENC1_BLUE_CHANNEL,
ENC1_BUTTON_PIN );
Adafruit_ILI9340 tft = Adafruit_ILI9340(TFT_CS, TFT_DC, TFT_RST);
// DigitalPot Instance:
DigitalPot pot1 = DigitalPot( DIGITAL_POT_SS_PIN, 2 );
int switch_mode;
void setup() {
Serial.begin(9600);
OSC1.begin();
Encoder1.begin();
Encoder1.setColor(255,0, 0 );
delay(500);
Encoder1.setColor( 0, 255, 0 );
delay(500);
Encoder1.setColor( 0, 0, 255 );
delay(500);
Encoder1.setColor( 255, 255, 0 );
// Connect the callbacks for MIDI input - these will be called on certain MIDI events:
//
MIDI.setHandleNoteOn(handleNoteOn);
MIDI.setHandleNoteOff(handleNoteOff);
MIDI.setHandlePitchBend(handlePitchBend);
// Initiate MIDI communications, listen to all channels
MIDI.begin(MIDI_CHANNEL_OMNI);
Serial.print("Initializing SD card...");
if (!SD.begin(SD_CS)) {
Serial.println("failed!");
return;
}
Serial.println("OK!");
tft.begin();
tft.fillScreen(ILI9340_BLUE);
tft.setRotation(1);
bmpDraw("mms.bmp", 0, 0);
delay(1000);
tft.fillScreen(0xFFFF);
drawSlider( 50, 100 );
pinMode(DIGITAL_SWITCH_PIN1, OUTPUT );
pinMode(DIGITAL_SWITCH_PIN2, OUTPUT );
digitalWrite( DIGITAL_SWITCH_PIN1, LOW );
digitalWrite( DIGITAL_SWITCH_PIN1, LOW );
switch_mode = 0;
pot1.setValue( 0, 127 );
pot1.setValue( 1, 127 );
}
void loop() {
// Call MIDI.read the fastest you can for real-time performance.
MIDI.read();
Encoder1.update();
handleRotaryEncoders();
}
// ************************************************************************************
// MIDI Event handlers:
//A Note-on event has been received
void handleNoteOn(byte channel, byte pitch, byte velocity)
{
static char* note_string[] = {
"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" };
int octave = (pitch / 12) - 1;
int note_index = (pitch % 12);
// Pass the note onto the oscillators
OSC1.setNote(int(pitch));
Serial.print("Note on ");
Serial.println(pitch);
setSwitchMode( switch_mode );
tft.fillRect(40, 200, 80, 40, 0xFFFF);
tft.setTextSize( 4 );
tft.setTextColor( 0x0);
tft.setCursor( 40,200);
tft.print(note_string[note_index]);
tft.print(octave);
}
// A Note-off event has been received
void handleNoteOff(byte channel, byte pitch, byte velocity)
{
// Do something when the note is released.
// Note that NoteOn messages with 0 velocity are interpreted as NoteOffs.
setSwitchMode( 0 );
tft.fillRect(40, 200, 80, 40, 0xFFFF);
}
// A pitch-bend event has been received:
void handlePitchBend( byte channel, int bend )
{
// Pass the pitchbend onto the oscillators
OSC1.setPitchBend(bend);
}
// ************************************************************************************
// Rotary Encoder Event Handlers
int last_val_enc1= 0;
int current_note = 69;
int current_pot_val = 127;
void handleRotaryEncoders( ) {
if( Encoder1.buttonPressed() ){
// reset the current note to A
//current_note = 69;
// OSC1.setNote( current_note );
switch_mode += 1;
if( switch_mode == 4 ) {
switch_mode =1;
}
}
int val = Encoder1.read();
if( val < last_val_enc1 ) {
current_pot_val--;
if( current_pot_val < 0 )
current_pot_val = 0;
drawSlider( current_pot_val, 255 );
pot1.setValue( 0, current_pot_val );
}
else if( val > last_val_enc1 ) {
current_pot_val++;
if( current_pot_val > 255 ) {
current_note = 255;
}
drawSlider( current_pot_val, 255 );
pot1.setValue( 0, current_pot_val );
}
last_val_enc1 = val;
}
// Draw a slider rectangle to represent the current value:
void drawSlider( int val, int maxval ) {
const int RECT_X = 40;
const int RECT_Y = 20;
const int RECT_WIDTH = 240;
const int RECT_HEIGHT = 50;
static int last_val = -1;
if( last_val < 0 ) {
tft.drawRect(RECT_X, RECT_Y, RECT_WIDTH, RECT_HEIGHT, 0x0);
tft.setTextSize( 3 );
tft.setTextColor( 0x0);
tft.setCursor( RECT_X, RECT_Y+RECT_HEIGHT+5);
tft.print("PWM");
}
// tft.fillRect( RECT_X + 1, RECT_Y+1, RECT_WIDTH-2, RECT_HEIGHT-2,
// 0xFFFF );
double frac = (double)val/maxval;
int width = (int)( frac * (RECT_WIDTH-2));
if( val >= last_val ) {
tft.fillRect( RECT_X + 1, RECT_Y+1, width, RECT_HEIGHT-2,0x0 );
}
else {
tft.fillRect( RECT_X+width, RECT_Y+1, RECT_WIDTH-width-2, RECT_HEIGHT-2,
0xFFFF );
}
last_val = val;
}
void setSwitchMode( int smode )
{
if( smode == 0 ) {
digitalWrite( DIGITAL_SWITCH_PIN1, LOW );
digitalWrite( DIGITAL_SWITCH_PIN2, LOW );
}
else if( smode == 1 ) {
digitalWrite( DIGITAL_SWITCH_PIN1, HIGH );
digitalWrite( DIGITAL_SWITCH_PIN2, LOW );
}
else if (smode == 2 ) {
digitalWrite( DIGITAL_SWITCH_PIN1, LOW );
digitalWrite( DIGITAL_SWITCH_PIN2, HIGH );
}
else if (smode == 3 ) {
digitalWrite( DIGITAL_SWITCH_PIN1, HIGH );
digitalWrite( DIGITAL_SWITCH_PIN2, HIGH );
}
}
// This function opens a Windows Bitmap (BMP) file and
// displays it at the given coordinates. It's sped up
// by reading many pixels worth of data at a time
// (rather than pixel by pixel). Increasing the buffer
// size takes more of the Arduino's precious RAM but
// makes loading a little faster. 20 pixels seems a
// good balance.
#define BUFFPIXEL 20
void bmpDraw(char *filename, uint8_t x, uint8_t y) {
File bmpFile;
int bmpWidth, bmpHeight; // W+H in pixels
uint8_t bmpDepth; // Bit depth (currently must be 24)
uint32_t bmpImageoffset; // Start of image data in file
uint32_t rowSize; // Not always = bmpWidth; may have padding
uint8_t sdbuffer[3*BUFFPIXEL]; // pixel buffer (R+G+B per pixel)
uint8_t buffidx = sizeof(sdbuffer); // Current position in sdbuffer
boolean goodBmp = false; // Set to true on valid header parse
boolean flip = true; // BMP is stored bottom-to-top
int w, h, row, col;
uint8_t r, g, b;
uint32_t pos = 0, startTime = millis();
if((x >= tft.width()) || (y >= tft.height())) return;
Serial.println();
Serial.print("Loading image '");
Serial.print(filename);
Serial.println('\'');
// Open requested file on SD card
if ((bmpFile = SD.open(filename)) == NULL) {
Serial.print("File not found");
return;
}
// Parse BMP header
if(read16(bmpFile) == 0x4D42) { // BMP signature
Serial.print("File size: ");
Serial.println(read32(bmpFile));
(void)read32(bmpFile); // Read & ignore creator bytes
bmpImageoffset = read32(bmpFile); // Start of image data
Serial.print("Image Offset: ");
Serial.println(bmpImageoffset, DEC);
// Read DIB header
Serial.print("Header size: ");
Serial.println(read32(bmpFile));
bmpWidth = read32(bmpFile);
bmpHeight = read32(bmpFile);
if(read16(bmpFile) == 1) { // # planes -- must be '1'
bmpDepth = read16(bmpFile); // bits per pixel
Serial.print("Bit Depth: ");
Serial.println(bmpDepth);
if((bmpDepth == 24) && (read32(bmpFile) == 0)) { // 0 = uncompressed
goodBmp = true; // Supported BMP format -- proceed!
Serial.print("Image size: ");
Serial.print(bmpWidth);
Serial.print('x');
Serial.println(bmpHeight);
// BMP rows are padded (if needed) to 4-byte boundary
rowSize = (bmpWidth * 3 + 3) & ~3;
// If bmpHeight is negative, image is in top-down order.
// This is not canon but has been observed in the wild.
if(bmpHeight < 0) {
bmpHeight = -bmpHeight;
flip = false;
}
// Crop area to be loaded
w = bmpWidth;
h = bmpHeight;
if((x+w-1) >= tft.width()) w = tft.width() - x;
if((y+h-1) >= tft.height()) h = tft.height() - y;
// Set TFT address window to clipped image bounds
tft.setAddrWindow(x, y, x+w-1, y+h-1);
for (row=0; row<h; row++) { // For each scanline...
// Seek to start of scan line. It might seem labor-
// intensive to be doing this on every line, but this
// method covers a lot of gritty details like cropping
// and scanline padding. Also, the seek only takes
// place if the file position actually needs to change
// (avoids a lot of cluster math in SD library).
if(flip) // Bitmap is stored bottom-to-top order (normal BMP)
pos = bmpImageoffset + (bmpHeight - 1 - row) * rowSize;
else // Bitmap is stored top-to-bottom
pos = bmpImageoffset + row * rowSize;
if(bmpFile.position() != pos) { // Need seek?
bmpFile.seek(pos);
buffidx = sizeof(sdbuffer); // Force buffer reload
}
for (col=0; col<w; col++) { // For each pixel...
// Time to read more pixel data?
if (buffidx >= sizeof(sdbuffer)) { // Indeed
bmpFile.read(sdbuffer, sizeof(sdbuffer));
buffidx = 0; // Set index to beginning
}
// Convert pixel from BMP to TFT format, push to display
b = sdbuffer[buffidx++];
g = sdbuffer[buffidx++];
r = sdbuffer[buffidx++];
tft.pushColor(tft.Color565(r,g,b));
} // end pixel
} // end scanline
Serial.print("Loaded in ");
Serial.print(millis() - startTime);
Serial.println(" ms");
} // end goodBmp
}
}
bmpFile.close();
if(!goodBmp) Serial.println("BMP format not recognized.");
}
// These read 16- and 32-bit types from the SD card file.
// BMP data is stored little-endian, Arduino is little-endian too.
// May need to reverse subscript order if porting elsewhere.
uint16_t read16(File & f) {
uint16_t result;
((uint8_t *)&result)[0] = f.read(); // LSB
((uint8_t *)&result)[1] = f.read(); // MSB
return result;
}
uint32_t read32(File & f) {
uint32_t result;
((uint8_t *)&result)[0] = f.read(); // LSB
((uint8_t *)&result)[1] = f.read();
((uint8_t *)&result)[2] = f.read();
((uint8_t *)&result)[3] = f.read(); // MSB
return result;
}
| [
"dqmcdonald@gmail.com"
] | dqmcdonald@gmail.com |
6578824dccc0f2bbfa1fe35f7b65ca2cd4c27159 | e6e79b789c1d68a9812627d8b874bf7f15586f30 | /src/Projectile.h | d1ade43740563a99adef49954091ba5ff4356470 | [] | no_license | sjf25/TSA-Game | e5be97b5d5273b33fa6415e2c11c31bd51c3c3a2 | 223106f6c1a94c60dcb7fe2fd64bd1a2829f15ad | refs/heads/master | 2021-01-10T03:19:20.431211 | 2016-04-12T00:29:25 | 2016-04-12T00:29:25 | 50,381,437 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 334 | h | #include "Object.h"
#include "Ship.h"
#include "utils.h"
#include <SDL2/SDL.h>
class Projectile : public Object
{
public:
int teamId;
double speed;
unsigned int timeSinceCreation = 0;
bool visible = true;
//Projectile(double, double, double, double, double, double);
Projectile(Ship, double);
void move(int);
void draw();
};
| [
"sohaibjf@gmail.com"
] | sohaibjf@gmail.com |
43094cf82ef27b7bf50508ce58de22fa80b5c52d | 6504215c8de43b1e3d1bfb9e9740d8d1848e6282 | /SDK/UE4_CamShake_WEP_Medium_parameters.hpp | 2c21a4b63770d212e6c89475b25394d169017705 | [] | no_license | MuhanjalaRE/Midair-1.0.4.9504-SDK | d9d82cdaf72d16bcd56400edf27092d85867db5f | c935e6e8f07953c3ab71e10d405db42a7c60627b | refs/heads/main | 2023-02-24T11:59:43.891011 | 2021-01-29T19:04:11 | 2021-01-29T19:04:11 | 334,117,758 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 370 | hpp | #pragma once
// Unreal Engine 4 (4) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "UE4_CamShake_WEP_Medium_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"78203566+MuhanjalaRE@users.noreply.github.com"
] | 78203566+MuhanjalaRE@users.noreply.github.com |
7376360fff5f55971d3c7a0878bc9f0057fac03a | d3124ea9d16cdda8fe69c6d6a4298822c993eaca | /SAMPLE/src/pluginNode.cpp | efa0e6da3b70f7daf68a2483101b2989a55a2078 | [] | no_license | martinnj/MayaDGNodeSample | 4ecd3bdd5a063cd58ae74cab8b357ae44c45459c | 84fe4e949051f4dd3c0ab6ffaf073ef9159971a8 | refs/heads/master | 2021-01-10T07:18:13.097028 | 2013-09-16T17:52:25 | 2013-09-16T17:52:25 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,721 | cpp | /* This is the example plugin from the autodesk MAya 2013 API.
* it is found at: http://docs.autodesk.com/MAYAUL/2013/ENU/Maya-API-Documentation/files/Dependency_graph_plugins_The_basics.htm
* I'm implementing it to learn.
*/
// Basic and plugin related headers, common with command plugins
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <maya/MString.h>
#include <maya/MFnPlugin.h>
// Node related headers
#include <maya/MPxNode.h>
#include <maya/MTypeId.h>
#include <maya/MPlug.h>
#include <maya/MDataBlock.h>
#include <maya/MDataHandle.h>
// We only use numeric data so only one extra header is needed
#include <maya/MFnNumericAttribute.h>
// Class for the node, derived from MPxNode.
class sine : public MPxNode
{
public:
// Functions
sine();
virtual ~sine();
virtual MStatus compute( const MPlug& plug,
MDataBlock& data);
static void* creator();
static MStatus Initialize();
// Attributes
static MObject input;
static MObject output;
static MTypeId id;
};
/* Assign node ID. For actual nodes you should contact Autodesk Technical Support
* and request a permanent ID. If your ID's collide with another node, a fatal error
* will occur
*/
MTypeId sine::id(0x80000);
// Initialize attributes to Null.
MObject sine::input;
MObject sine::output;
void* sine::creator() {
return new sine;
}
// Initialize gets called when the node gets registered with Maya
MStatus sine::Initialize() {
MFnNumericAttribute nAttr;
// Create the output attribute with a long name, shortname, float datatype and initial value 0.0.
output = nAttr.create("output","out",
MFnNumericData::kFloat, 0.0);
// Since it is the output, it cannot be written to, or stored (waste of space)
nAttr.setWritable(false);
nAttr.setStorable(false);
// Repeat for input, except it's both wriable and storable.
input = nAttr.create("input","in",
MFnNumericData::kFloat, 0.0);
nAttr.setStorable(true);
// Add the attribute to the node, mark it as affecting the output attribute.
addAttribute(input);
attributeAffects(input, output);
addAttribute(output);
//Node initialized, good job :)
return MS::kSuccess;
}
// Simple node, so constructor and destructor do nothing.
sine::sine() {}
sine::~sine() {}
// The actual "brain" of the plugin.
MStatus sine::compute( const MPlug& plug, MDataBlock& data ) {
MStatus returnStatus;
// Check that the requested plug is the output plug
if(plug == output) {
// Get the input data from the input.
MDataHandle inputData = data.inputValue (input, &returnStatus);
// If we couldn't get the data, write to console error stream.
if( returnStatus != MS::kSuccess) {
cerr << "Error getting input data!" << endl;
} else {
// Otherwise, calculate the result.
float result = sin(inputData.asFloat());
MDataHandle outputHandle = data.outputValue(output);
// Put the result in the output and mark the plug as clean (newly recomputed)
outputHandle.set(result);
data.setClean(plug);
}
}
return MS::kSuccess;
}
// Like all other plugins, we need to register it with Maya
MStatus initializePlugin( MObject obj ) {
MStatus status;
MFnPlugin plugin (obj, "Martin Jørgensen", "1.0", "Any");
// Note how a node have more aruments for registration than a command.
status = plugin.registerNode("sine", sine::id, sine::creator, sine::Initialize);
// return the registration result, if it failed the PLUGIN will NOT be registered!
return status;
}
// And deregister it, note that deregistration also passes the node ID.
MStatus uninitializePlugin( MObject obj ) {
MStatus status;
MFnPlugin plugin( obj );
status = plugin.deregisterNode(sine::id);
return status;
} | [
"martinnjorgensen@gmail.com"
] | martinnjorgensen@gmail.com |
22899d77c3e8767569277785ac269385bb91df33 | 4ea6a61aef7ddd8785d75513a8ea73576f103d1e | /benchmarks/real-verification/GraphicsMagick-1.2.2/Magick++/lib/BlobRef.cpp | 75e42a5cce6998e6995440f3b530cb03f977d51d | [
"LicenseRef-scancode-warranty-disclaimer",
"Xfig",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"LicenseRef-scancode-other-permissive",
"libtiff"
] | permissive | probertool/Prober | 287190a03b6d6a40ba77295ccef132226f800420 | c75047af835ba7ddf60fb3f72f686ea4c56a08b5 | refs/heads/master | 2020-09-09T07:45:33.005153 | 2019-11-13T05:39:15 | 2019-11-13T05:39:15 | 221,385,993 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 996 | cpp | // This may look like C code, but it is really -*- C++ -*-
//
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2004
//
// Implementation of Blob
//
#define MAGICK_IMPLEMENTATION
#include "Magick++/Include.h"
#include "Magick++/Thread.h"
#include "Magick++/BlobRef.h"
#include <string.h>
//
// Implementation of Magick::BlobRef
//
// Construct with data, making private copy of data
Magick::BlobRef::BlobRef ( const void* data_,
size_t length_ )
: _data(0),
_length(length_),
_allocator(Magick::Blob::NewAllocator),
_refCount(1),
_mutexLock()
{
if( data_ )
{
_data = new unsigned char[length_];
memcpy( _data, data_, length_ );
}
}
// Destructor (actually destroys data)
Magick::BlobRef::~BlobRef ( void )
{
if ( _allocator == Magick::Blob::NewAllocator )
{
delete [] static_cast<unsigned char*>(_data);
_data=0;
}
else if ( _allocator == Magick::Blob::MallocAllocator )
{
MagickFreeMemory(_data);
}
}
| [
"hongyuliu@salsa2.it.utsa.edu"
] | hongyuliu@salsa2.it.utsa.edu |
73bdee611838c4ba40aa81cac6413f3868b0485d | d61d05748a59a1a73bbf3c39dd2c1a52d649d6e3 | /chromium/chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.h | ac4f292d3b8f83549d69a34a50aac6aabbdb6f90 | [
"BSD-3-Clause"
] | permissive | Csineneo/Vivaldi | 4eaad20fc0ff306ca60b400cd5fad930a9082087 | d92465f71fb8e4345e27bd889532339204b26f1e | refs/heads/master | 2022-11-23T17:11:50.714160 | 2019-05-25T11:45:11 | 2019-05-25T11:45:11 | 144,489,531 | 5 | 4 | BSD-3-Clause | 2022-11-04T05:55:33 | 2018-08-12T18:04:37 | null | UTF-8 | C++ | false | false | 2,959 | h | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H_
#define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H_
#include <jni.h>
#include <stddef.h>
#include <vector>
#include "base/android/scoped_java_ref.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "chrome/browser/ui/autofill/autofill_popup_view.h"
namespace autofill {
class AutofillPopupController;
// A suggestion view that acts as an alternative to the field-attached popup
// window. This view appears above the keyboard and spans the width of the
// screen, condensing rather than overlaying the content area.
class AutofillKeyboardAccessoryView : public AutofillPopupView {
public:
AutofillKeyboardAccessoryView(AutofillPopupController* controller,
unsigned int animation_duration_millis,
bool should_limit_label_width);
// --------------------------------------------------------------------------
// Methods called from Java via JNI
// --------------------------------------------------------------------------
// Called when an autofill item was selected.
void SuggestionSelected(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jint list_index);
void DeletionRequested(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jint list_index);
void DeletionConfirmed(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
void ViewDismissed(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
protected:
// AutofillPopupView implementation.
void Show() override;
void Hide() override;
void OnSelectedRowChanged(base::Optional<int> previous_row_selection,
base::Optional<int> current_row_selection) override;
void OnSuggestionsChanged() override;
private:
~AutofillKeyboardAccessoryView() override;
AutofillPopupController* controller_; // weak.
// If 0, don't animate suggestion view.
const unsigned int animation_duration_millis_;
// If true, limits label width to 1/2 device's width.
const bool should_limit_label_width_;
// The index of the last item the user long-pressed (they will be shown a
// confirmation dialog).
int deleting_index_;
// Mapping from Java list index to autofill suggestion index.
std::vector<int> positions_;
// The corresponding java object.
base::android::ScopedJavaGlobalRef<jobject> java_object_;
DISALLOW_COPY_AND_ASSIGN(AutofillKeyboardAccessoryView);
};
} // namespace autofill
#endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H_
| [
"csineneo@gmail.com"
] | csineneo@gmail.com |
0580fc51e6793e713c6dc5223f24bab19741a2cc | 3a17418505f5c68564100f03caa789db2e214477 | /testCases/Cavity/Galbraith/semi-anal-comparison/cavity_stoich_ideal_CASE/0.009/d32 | 30c2600ac676721f916e4b3672b7922d66ebe1c5 | [] | no_license | BJankauskas/mapFoam | 2554798c7a4435c90e3f269e84c1c6e6109bb1e7 | 06200cf3a51da3e9a8d284d9df18f8634964dc1a | refs/heads/master | 2020-05-24T16:31:26.833077 | 2019-05-21T18:40:15 | 2019-05-21T18:40:15 | 187,356,603 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,128 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0.009";
object d32;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
fixedWalls
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
movingWall
{
type zeroGradient;
}
}
// ************************************************************************* //
| [
"bernardas.jankauskas@gmail.com"
] | bernardas.jankauskas@gmail.com | |
0042fad4f901ed5657399b451ff70b3043b2b4ae | 892a0a813f381769c76085105d2e633b4a427e7b | /common/SslClient.h | 310cadf4b80c2be9c06fb4d442dec399ec459ed8 | [] | no_license | mskwarek/mbedTLScppClient | ddc5d39cba2ce898901776c929c9f709e9fb1f5b | 962cd09e68d67f682893d55b868f9433ecb1ab28 | refs/heads/master | 2020-12-31T00:03:13.149256 | 2017-02-23T21:53:02 | 2017-02-23T21:53:02 | 56,868,212 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,307 | h | #include "mbedtls/net.h"
#include "mbedtls/ssl.h"
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/certs.h"
#include "mbedtls/x509.h"
#include "mbedtls/error.h"
#include "mbedtls/debug.h"
#include "mbedtls/timing.h"
#include "DefaultConfig.h"
#include "MbedException.cpp"
class SslClient
{
public:
SslClient();
~SslClient();
void InitRng();
void LoadTrustedCerts(Options);
void LoadClientKeys(Options);
void StartConnection(Options);
void SetupStuff(Options, const char**, unsigned char*, size_t);
void PerformHandshake(Options);
void VerifyServerCert(Options);
void SendGet(Options);
void ReadResponse(Options);
void ReuseConnection(Options);
void CloseConnection();
void Reconnect(Options);
unsigned char buf[MBEDTLS_SSL_MAX_CONTENT_LEN + 1];
mbedtls_ssl_context ssl;
int retry_left;
private:
const char *pers = "ssl_client2";
mbedtls_net_context server_fd;
mbedtls_entropy_context entropy;
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_config conf;
mbedtls_ssl_session saved_session;
#if defined(MBEDTLS_TIMING_C)
mbedtls_timing_delay_context timer;
#endif
#if defined(MBEDTLS_X509_CRT_PARSE_C)
uint32_t flags;
mbedtls_x509_crt cacert;
mbedtls_x509_crt clicert;
mbedtls_pk_context pkey;
#endif
int ret;
};
| [
"m.skwarek@stud.elka.pw.edu.pl"
] | m.skwarek@stud.elka.pw.edu.pl |
021be86fd9388a8e9ff70a4b9de4888de4f06e32 | 0a89ed5464bc9573a11a1a74722b35b1150a9c65 | /09-ast-asm-parser/ast/expression/PrintVariableExpression.h | 35a1fbe617d48d62692239e7cd6d0a14bbf369f7 | [] | no_license | klwxsrx/compiler-course | 0b3bcc09ad51ae3dddddc67ed002232d46978762 | c3812fce92b37f0df310850dc6d1ebcb9304648c | refs/heads/master | 2023-03-22T00:56:40.996940 | 2021-03-10T18:08:47 | 2021-03-10T18:08:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 284 | h | #pragma once
#include "IExpression.h"
class PrintVariableExpression : public IExpression {
public:
explicit PrintVariableExpression(std::string const& variableName);
void AcceptVisitor(IExpressionVisitor &visitor) const override;
private:
std::string m_variableName;
};
| [
"Slavyan58@yandex.ru"
] | Slavyan58@yandex.ru |
9033cf035a10a82be71eb27e89e01c16875c0693 | 8a6b518482b730af80cdff00c76fe2a38b922f64 | /HACKER RANK/SUM & DIFF.cpp | 3d7048d0eec17b19dc2ea11f4c5591c5e605d002 | [] | no_license | AymanHasib/CPP-Random-problem-solve | 9753dae86604a97f6752de389a59a319ac3615a4 | e78202205bca6e47e3cfd4554a45608927a5bc19 | refs/heads/main | 2023-06-18T01:57:12.497390 | 2021-07-06T07:29:54 | 2021-07-06T07:29:54 | 382,254,718 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 339 | cpp | #include <iostream>
#include <string.h>
using namespace std;
int main ()
{
char a[1000],b[1000],c[1000],d[1000];
cin >>a;
cin >>b;
cout << strlen (a)<<" ";
cout << strlen (b) <<endl;
cout <<a;
cout <<b<<endl;
d[0]=a[0];
a[0]=b[0];
b[0]=d[0];
cout <<a<< " " ;
cout <<b<<endl;
return 0;
}
| [
"77047245+AymanHasib@users.noreply.github.com"
] | 77047245+AymanHasib@users.noreply.github.com |
b6e9c07c66d2840459fe4e249c61b451c56bbb37 | f0bf16f03cfc1a31d00c94124710062a39a19a61 | /ScaryFortune.cpp | 2d36c0d72b7c10a965bb73ab26c4f243e4295c27 | [] | no_license | speedopico/Scary-Fortune | 178d7c850ad478c7034f54b2ad451eddf7f503f6 | 7ccf4ba4cd87dd4dc5ba8a7b2c009947afff16c1 | refs/heads/main | 2023-02-12T13:59:20.519709 | 2021-01-17T07:34:46 | 2021-01-17T07:34:46 | 330,338,328 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,921 | cpp | #include <iostream>
#include <chrono>
#include <thread>
using namespace std;
int main(){
char answer;
int numchoice = 0;
cout << "Good evening. I am the cloudy and mysterious crystal ball.\n";
chrono::milliseconds dura( 2000 );
this_thread::sleep_for( dura );
cout << "\n";
cout << "... so mysterious ...\n";
this_thread::sleep_for( dura );
cout << "\n";
cout << "... like really really mysterious ...\n";
this_thread::sleep_for( dura * 1.5);
cout << "\n";
do {
cout << "Would you like to know your fortune ...?\n" << "Press y or n.\n";
cin >> answer;
if(answer == 'n'){
cout << "Sucks to be you then.\n";
}
else{
cout << "Yes? Delicious ... Please pick a number from 1 to 6.\n";
cin >> numchoice;}
if(numchoice == 1){
cout << "You are in terrible danger. For real, terrible danger. Something fucking bad is headed for you my friend.\n";
chrono::milliseconds dura( 3000 );
this_thread::sleep_for( dura );
cout << "... I'm kinda getting scared now too. Yo back-up. Back AWAY from me.\n";
this_thread::sleep_for( dura );
cout << "... Omg ...\n";
this_thread::sleep_for( dura / 2);
cout << "Dude, get AWAY from me.\n";
this_thread::sleep_for( dura / 4);
cout << "Get";
this_thread::sleep_for( dura / 10);
cout << ".";
this_thread::sleep_for( dura / 10);
cout << ".";
this_thread::sleep_for( dura / 10);
cout << ".";
this_thread::sleep_for( dura / 4);
cout << " Away";
this_thread::sleep_for( dura / 10);
cout << ".";
this_thread::sleep_for( dura / 10);
cout << ".";
this_thread::sleep_for( dura / 10);
cout << ".";
this_thread::sleep_for( dura / 4 );
cout << "AHHHHHHHH!!!";
}
else if(numchoice == 2){
cout << "Someday, many years from today, you will look back at this moment and realize how much time you wasted making stupid jokes on C++.\n";
}else if(numchoice == 3){
cout << "Shit, drop everything and head to the doctor dude. They'll know what to do. It might not be too late.";
this_thread::sleep_for( dura * 2);
cout << "... You might have time.\n";
}else if(numchoice == 4){
cout << "Today everyone will laugh at your jokes so don't hold back!\n";
}else if(numchoice == 5){
this_thread::sleep_for( dura );
cout << "I'd ask you to sit down, but you're not going to anyway. And don't worry about the vase.\n";
this_thread::sleep_for( dura * 2);
cout << "\n";
cout << "What vase? [Neo knocks over a vase with his elbow. It falls down and breaks.]\n";
this_thread::sleep_for( dura * 1.5);
cout << "\n";
cout << "That vase.\n";
this_thread::sleep_for( dura );
cout << "\n";
cout << "I'm sorry.\n";
this_thread::sleep_for( dura );
cout << "\n";
cout << "I said don't worry about it. I'll get one of my kids to fix it.\n";
this_thread::sleep_for( dura * 1.5);
cout << "\n";
cout << "How did you know?\n";
this_thread::sleep_for( dura );
cout << "\n";
cout << "Ohhh, what's really going to bake your noodle later on is, would you still have broken it if I hadn't said anything?... You're cuter than I thought. I can see why she likes you.\n";
this_thread::sleep_for( dura * 2.5);
cout << "\n";
cout << "Who.\n";
this_thread::sleep_for( dura * 1.5);
cout << "\n";
cout << "Not too bright though.\n";
}else if(numchoice == 6){
cout << "Get up and get out of your freakin chair MAN.\n";
this_thread::sleep_for( dura );
cout << "Go DO something.\n";
this_thread::sleep_for( dura * 1.5);
cout << "Go spread your creativity, your love!\n";
this_thread::sleep_for( dura );
cout << "You are super cool and you should spread your super awesomeness all over the place.\n";
this_thread::sleep_for( dura * 2 );
cout << "Go angel, go be a SUPER spreader.\n";
this_thread::sleep_for( dura );
}
cout << "\n";
chrono::milliseconds dura( 2000 );
this_thread::sleep_for( dura );
}
while (numchoice < 6 && answer != 'n');
}
| [
"noreply@github.com"
] | noreply@github.com |
8298f7445c323f01e8a5cdfb6501d9aeebd32cf4 | 58303daa269d707d3a817e56f7d1887cfa6c405f | /GameFramework/Input.cpp | c0d79a4323ef854fc2b8825e87560bdafdab2cde | [
"MIT"
] | permissive | FireFlyForLife/GameFramework | 3fc4507d3f73e939cbd198d14649b1f6b495faf0 | 7d4f45799514f031a93393ff6b980cfc5bd4fa80 | refs/heads/master | 2021-08-16T11:29:12.082938 | 2017-11-19T18:23:08 | 2017-11-19T18:23:08 | 110,681,247 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,646 | cpp | #include "Input.h"
#include <GL\glew.h>
#include <GLFW\glfw3.h>
#include "Screen.h"
#include "MathFunctions.h"
//MouseMoveArgs::MouseMoveArgs() : point(0, 0), dragging(false), scan_code(-1)
//{
//}
//MouseMoveArgs::MouseMoveArgs(Point point, bool dragging, __int8 scan_code) : point(point), dragging(dragging), scan_code(scan_code)
//{
//}
//
//MouseClickArgs::MouseClickArgs() : point(0, 0), down(false), scan_code(-1)
//{
//}
//MouseClickArgs::MouseClickArgs(Point point, bool down, __int8 scan_code) : point(point), down(down), scan_code(scan_code)
//{
//}
//
//KeyClickArgs::KeyClickArgs() : down(false), scan_code(-1)
//{
//}
//KeyClickArgs::KeyClickArgs(bool down, __int16 scan_code) : down(down), scan_code(scan_code)
//{
//}
namespace Input {
EventSource<MouseMoveArgs*, int> mouseMoveListeners;
EventSource<MouseClickArgs*, int> mouseClickListeners;
EventSource<MouseClickArgs*, int> mouseDownListeners;
EventSource<MouseClickArgs*, int> mouseUpListeners;
EventSource<KeyClickArgs*, int> keyClickListeners;
EventSource<KeyClickArgs*, int> keyDownListeners;
EventSource<KeyClickArgs*, int> keyUpListeners;
bool IsKeyDown(unsigned int a_uiKey)
{
return (glfwGetKey(Screen::window, a_uiKey) == GLFW_PRESS);
}
DPoint GetMousePos()
{
DPoint pos;
glfwGetCursorPos(Screen::window, &pos.x, &pos.y);
pos.x = Math::Clampf(pos.x, 0, Screen::width);
pos.y = Math::Clampf(pos.y, 0, Screen::height);
return pos;
}
bool GetMouseButtonDown(int a_uiMouseButton)
{
return (glfwGetMouseButton(Screen::window, a_uiMouseButton) == GLFW_PRESS);
}
bool GetMouseButtonReleased(int a_uiMouseButton)
{
return (glfwGetMouseButton(Screen::window, a_uiMouseButton) == GLFW_RELEASE);
}
#ifdef USE_SDL
void handle_SDL_Event(SDL_Event* e) {
if (e->type == SDL_EventType::SDL_KEYDOWN)
{
GameEngine::KeyClickArgs args(true, e->key.keysym.scancode);
GameEngine::keyDownListeners.call(&args, 0);
}
else if (e->type == SDL_EventType::SDL_KEYUP) {
GameEngine::KeyClickArgs args(false, e->key.keysym.scancode);
GameEngine::keyUpListeners.call(&args, 0);
}
else if (e->type == SDL_EventType::SDL_MOUSEBUTTONDOWN) {
MouseClickArgs args({ e->button.x, e->button.y }, true, e->button.button);
mouseDownListeners.call(&args, 0);
}
else if (e->type == SDL_EventType::SDL_MOUSEBUTTONUP) {
MouseClickArgs args({ e->button.x, e->button.y }, false, e->button.button);
mouseUpListeners.call(&args, 0);
}
else if (e->type == SDL_EventType::SDL_MOUSEMOTION) {
MouseMoveArgs args({ e->motion.x, e->motion.y }, e->motion.state, e->button.button);
mouseMoveListeners.call(&args, 0);
}
}
#endif
} | [
"maiko.s.99@gmail.com"
] | maiko.s.99@gmail.com |
a01d296f09190ad18e49e5d0bda4b4246a414673 | 43192accb4e0d9e0ff48a1935275845398a110d4 | /code/vpp/src/vppLangScalarTypes.cpp | d60c2d351709b2f95405d332793869735793a591 | [
"BSD-2-Clause"
] | permissive | maikebing/vpp | 3593b24820257bbf56ec4568c342a85c15f7bdba | efa6c32f898e103d749764ce3a0b7dc29d6e9a51 | refs/heads/master | 2023-01-21T14:03:49.557239 | 2019-04-01T10:00:08 | 2019-04-01T10:00:08 | 316,381,624 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,762 | cpp | /*
Copyright 2016-2019 SOFT-ERG, Przemek Kuczmierczyk (www.softerg.com)
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.
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.
*/
// -----------------------------------------------------------------------------
#include "ph.hpp"
#include "../include/vppLangScalarTypes.hpp"
// -----------------------------------------------------------------------------
namespace vpp {
// -----------------------------------------------------------------------------
// Rules are in spec Appendix A
// -----------------------------------------------------------------------------
KPointerBase :: KPointerBase ( spv::StorageClass storageClass ) :
d_storageClass ( storageClass )
{
switch ( d_storageClass )
{
case spv::StorageClassWorkgroup:
case spv::StorageClassUniform:
case spv::StorageClassImage:
break;
case spv::StorageClassStorageBuffer:
KShaderTranslator::get()->requireVersion11();
break;
default:
raiseUsageError ( "Only images, uniform/storage buffers and shared variables can have atomic pointers" );
break;
}
}
// -----------------------------------------------------------------------------
spv::Scope KPointerBase :: getScope() const
{
if ( d_storageClass == spv::StorageClassWorkgroup )
return spv::ScopeWorkgroup;
else
return spv::ScopeDevice;
}
// -----------------------------------------------------------------------------
spv::MemorySemanticsMask KPointerBase :: getSemanticsMask ( spv::Op op ) const
{
spv::MemorySemanticsMask memoryMask;
switch ( d_storageClass )
{
case spv::StorageClassWorkgroup:
memoryMask = spv::MemorySemanticsWorkgroupMemoryMask;
break;
case spv::StorageClassImage:
memoryMask = spv::MemorySemanticsImageMemoryMask;
break;
default:
memoryMask = spv::MemorySemanticsUniformMemoryMask;
break;
}
if ( op == spv::OpAtomicLoad || op == spv::OpAtomicStore )
return spv::MemorySemanticsMaskNone | memoryMask;
else
return spv::MemorySemanticsAcquireReleaseMask | memoryMask;
}
// -----------------------------------------------------------------------------
} // namespace vpp
// -----------------------------------------------------------------------------
| [
"softerg@fc0145be-4d46-4df3-883e-5264cf7f6dad"
] | softerg@fc0145be-4d46-4df3-883e-5264cf7f6dad |
d6f042e1fc539c6ebc7292aec949c63214d2a388 | 5fe9fb23e5df770cd15ead80cb48808288d6da75 | /pc_incarnates.h | 99cabc232f0c340734e5c7381b48b5548d32f23a | [] | no_license | DennisStanistan/stevens | bd3788f2ae74815036794a53e15e92edbacbe54b | caf92c4bf3cfce0f5461e3f22f60753593cec410 | refs/heads/master | 2022-04-06T21:27:03.051608 | 2020-02-26T09:55:46 | 2020-02-26T09:55:46 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 317 | h | #ifndef __XENTAX_PC_RISE_OF_INCARNATES_H
#define __XENTAX_PC_RISE_OF_INCARNATES_H
#define X_SYSTEM PC
#define X_GAME RISE_OF_INCARNATES
namespace X_SYSTEM { namespace X_GAME {
bool add_title(void);
bool extract(void);
bool extract(LPCTSTR pathname);
}};
#undef X_SYSTEM
#undef X_GAME
#endif
| [
"contact@the3096.com"
] | contact@the3096.com |
b1ae6cf7b00bfaec3863b9c0957d8844ce51fa10 | a508345914e71367f7b3790ebfb93872735aa486 | /OldDriver_Draft_Detail/src/SubjectThree/OvertakingSettingsPage.cpp | 36428213fb832347947b8fe9312e83015ac1debf | [] | no_license | crablet/Old-Driver | 48e4ab77c90d4f398ba20a8bebb21b046ef22af2 | 0d4d54a78f6a415920357bbbf82dda6a44d399d0 | refs/heads/master | 2022-03-13T09:59:19.658486 | 2019-11-24T08:36:56 | 2019-11-24T08:36:56 | 197,403,678 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,043 | cpp | #include "OvertakingSettingsPage.h"
OvertakingSettingsPage::OvertakingSettingsPage(QWidget *parent) : SettingsPageBase(parent)
{
InitializeUi();
InitializeConnect();
}
void OvertakingSettingsPage::mousePressEvent(QMouseEvent *e)
{
// 点击旁边空白处隐藏设置页面
if (!this->isHidden())
{
int x = e->pos().x();
int y = e->pos().y();
if (!(x >= TableBackgroundWidgetX && x <= TableBackgroundWidgetX + TableBackgroundWidgetW
&& y >= TableBackgroundWidgetY && y <= TableBackgroundWidgetY + TableBackgroundWidgetH))
{
this->hide();
//Config::Save<Type>(this);
}
}
QWidget::mousePressEvent(e);
}
void OvertakingSettingsPage::InitializeConnect()
{
SettingsPageBase::InitializeConnect();
}
void OvertakingSettingsPage::AddSpecificItemToSettingsTable()
{
SettingsTable->insertRow(SettingsTable->rowCount());
SettingsTable->setCellWidget(3, 0, CreateHeaderLabel("超车评判"));
auto *WidgetLayout1 = new QHBoxLayout;
WidgetLayout1->addWidget(CreateLabel("超车前不通过内、外后视镜观察后方和\n左侧交通情况"));
WidgetLayout1->addStretch();
WidgetLayout1->addWidget(CreateLabel("扣"));
WidgetLayout1->addWidget(CreateComboBox({ "100", "50" }));
WidgetLayout1->addWidget(CreateLabel("分"));
auto *WidgetLine1 = CreateWidget();
WidgetLine1->setLayout(WidgetLayout1);
/////////////////////////////////////////
auto *WidgetLayout2 = new QHBoxLayout;
WidgetLayout2->addWidget(CreateLabel("超车时机选择不合理,影响其他\n车辆正常行驶"));
WidgetLayout2->addStretch();
WidgetLayout2->addWidget(CreateLabel("扣"));
WidgetLayout2->addWidget(CreateComboBox({ "100", "50" }));
WidgetLayout2->addWidget(CreateLabel("分"));
auto *WidgetLine2 = CreateWidget();
WidgetLine2->setLayout(WidgetLayout2);
/////////////////////////////////////////
auto *WidgetLayout3 = new QHBoxLayout;
WidgetLayout3->addWidget(CreateLabel("超车时,未侧头观察被超越车辆动态"));
WidgetLayout3->addStretch();
WidgetLayout3->addWidget(CreateLabel("扣"));
WidgetLayout3->addWidget(CreateComboBox({ "100", "50" }));
WidgetLayout3->addWidget(CreateLabel("分"));
auto *WidgetLine3 = CreateWidget();
WidgetLine3->setLayout(WidgetLayout3);
/////////////////////////////////////////
auto *WidgetLayout4 = new QHBoxLayout;
WidgetLayout4->addWidget(CreateLabel("超车时未与被超越车辆保持安全距离"));
WidgetLayout4->addStretch();
WidgetLayout4->addWidget(CreateLabel("扣"));
WidgetLayout4->addWidget(CreateComboBox({ "100", "50" }));
WidgetLayout4->addWidget(CreateLabel("分"));
auto *WidgetLine4 = CreateWidget();
WidgetLine4->setLayout(WidgetLayout4);
/////////////////////////////////////////
auto *WidgetLayout5 = new QHBoxLayout;
WidgetLayout5->addWidget(CreateLabel("在没有中心线或同方向只有一条行\n车道的道路上从右侧超车"));
WidgetLayout5->addStretch();
WidgetLayout5->addWidget(CreateLabel("扣"));
WidgetLayout5->addWidget(CreateComboBox({ "100", "50" }));
WidgetLayout5->addWidget(CreateLabel("分"));
auto *WidgetLine5 = CreateWidget();
WidgetLine5->setLayout(WidgetLayout5);
/////////////////////////////////////////
auto *WidgetLayout6 = new QHBoxLayout;
WidgetLayout6->addWidget(CreateLabel("当后车发出超车信号时,具备让车条件\n不减速靠右让行"));
WidgetLayout6->addStretch();
WidgetLayout6->addWidget(CreateLabel("扣"));
WidgetLayout6->addWidget(CreateComboBox({ "100", "50" }));
WidgetLayout6->addWidget(CreateLabel("分"));
auto *WidgetLine6 = CreateWidget();
WidgetLine6->setLayout(WidgetLayout6);
/////////////////////////////////////////
auto *OuterLayout = new QVBoxLayout;
OuterLayout->addWidget(WidgetLine1);
OuterLayout->addWidget(WidgetLine2);
OuterLayout->addWidget(WidgetLine3);
OuterLayout->addWidget(WidgetLine4);
OuterLayout->addWidget(WidgetLine5);
OuterLayout->addWidget(WidgetLine6);
auto *OuterWidget = new QWidget;
OuterWidget->setLayout(OuterLayout);
SettingsTable->setCellWidget(3, 1, OuterWidget);
}
| [
"love4uandgzfc@gmail.com"
] | love4uandgzfc@gmail.com |
85ddfeabec1d7ea44a0a72353b071efe4d2e928b | dbc83d2fa13aa9c3be50541335acea296f5c13f3 | /TextureQuad.h | c6992368b93be28dc015248b084084c9373c53ae | [] | no_license | kubakolecki/IMACCU | 3f7094e2f8bc6fb9c68c41b3af3bdf8818465874 | 52d21a8db0f838c8d8bdc3585c017cf4b0cf04b4 | refs/heads/master | 2020-07-10T01:31:45.211306 | 2020-02-17T19:55:39 | 2020-02-17T19:55:39 | 204,132,892 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 286 | h | #pragma once
class TextureQuad
{
public:
int X1, Y1, X2, Y2; //Narozniki - lewy gorny i prawy dolny
int Row; //Wiersz liczac od gory
int Col; //Kolumna liczac od lewej
TextureQuad(int _X1, int _Y1, int _X2, int _Y2, int _Row, int _Col);
TextureQuad(void);
~TextureQuad(void);
};
| [
"jjkolecki@gmail.com"
] | jjkolecki@gmail.com |
9d430d477670eb1208d26c8ef9993e7be77d979d | 76e3d88660f0110840b2be4d51220df514015405 | /C++ 1단원/문제 1-2.cpp | f663677326d5bec1a6630c00ec468f2b6b4dddf0 | [] | no_license | eunjee001/teample | 41b681e7914f362b0fb08bc337b5f168b45d4481 | 5a05e655ba4d3a5fa6a8e6f60413c67f94a9ee3d | refs/heads/master | 2021-02-08T12:39:53.226718 | 2020-03-04T12:11:37 | 2020-03-04T12:11:37 | 244,152,621 | 1 | 0 | null | null | null | null | UHC | C++ | false | false | 349 | cpp | #include <iostream>
int main(void)
{
char name[50];
char phonenum[50];
std::cout << "이름 : ";
std::cin >> name;
std::cout << "전화번호 : ";
std::cin >> phonenum;
std::cout << "내이름은 " << name << "입니다.\n";
std::cout << "내 전화번호는" << phonenum << "입니다." << std::endl;
return 0;
}
| [
"noreply@github.com"
] | noreply@github.com |
7b2c2a61ce9f5ecab63ab805020889287e8fc61a | aa8b9618d8b0b41f58e26671378bee56a7883462 | /ball_chaser/src/drive_bot.cpp | 279481bfdfedd005acb5afd6cbc177d5d6b32349 | [] | no_license | b00019713/Project_3 | 8a0f403a1be46378c8db6f25b70d0490c857f275 | cefbfec1712bced05f6a3e210129c31c4339a3de | refs/heads/master | 2022-11-09T01:17:19.289847 | 2020-06-30T13:42:13 | 2020-06-30T13:42:13 | 273,854,429 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,922 | cpp | #include "ros/ros.h"
#include "geometry_msgs/Twist.h"
//TODO: Include the ball_chaser "DriveToTarget" header file
#include "ball_chaser/DriveToTarget.h"
// ROS::Publisher motor commands;
ros::Publisher motor_command_publisher;
// TODO: Create a handle_drive_request callback function that executes whenever a drive_bot service is requested
// This function should publish the requested linear x and angular velocities to the robot wheel joints
// After publishing the requested velocities, a message feedback should be returned with the requested wheel velocities
bool handle_drive_request(ball_chaser::DriveToTarget::Request& req, ball_chaser::DriveToTarget::Response& res)
{
geometry_msgs::Twist motor_command;
motor_command.linear.x=req.linear_x;
motor_command.angular.z=req.angular_z;
motor_command_publisher.publish(motor_command);
res.msg_feedback = "Velocities are linear:" + std::to_string(req.linear_x) + " angular: " + std::to_string(req.angular_z);
ROS_INFO_STREAM(res.msg_feedback);
return true;
}
int main(int argc, char** argv)
{
// Initialize a ROS node
ros::init(argc, argv, "drive_bot");
// Create a ROS NodeHandle object
ros::NodeHandle n;
// Inform ROS master that we will be publishing a message of type geometry_msgs::Twist on the robot actuation topic with a publishing queue size of 10
motor_command_publisher = n.advertise<geometry_msgs::Twist>("/cmd_vel", 10);
// Define a drive /ball_chaser/command_robot service with a handle_drive_request callback function
ros::ServiceServer service = n.advertiseService("/ball_chaser/command_robot", handle_drive_request);
// Delete the loop, move the code to the inside of the callback function and make the necessary changes to publish the requested velocities instead of constant values
ROS_INFO("Ready to send drive commands");
// Handle ROS communication events
ros::spin();
return 0;
}
| [
"b00019713@gmail.com"
] | b00019713@gmail.com |
94607c7eeb8328141769f070ef5fe44a01e92577 | 060ff4f21ad24778c5a8bcb08e54b14becba3d89 | /Colorpop/Library/Il2cppBuildCache/Android/armeabi-v7a/il2cppOutput/Il2CppCCTypeValuesTable.cpp | 3c8000114fdcc0e942d1d0d039a7a5c5febe3c77 | [
"MIT"
] | permissive | GreenApple-jsy/ColorPop | 4951b69d8931d86b2accc655b8167dba67abb1b7 | 8579ae351019a34e501db3cb9449ca3af5202351 | refs/heads/master | 2023-04-07T14:16:16.156017 | 2023-03-28T05:35:16 | 2023-03-28T05:35:16 | 200,963,229 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 242,797 | cpp | #include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize0;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize3;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize4;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize5;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize6;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize7;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize8;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize9;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize10;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize11;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize12;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize13;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize14;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize15;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize16;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize17;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize18;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize19;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize20;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize21;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize22;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize23;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize24;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize25;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize26;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize27;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize28;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize29;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize30;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize31;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize32;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize33;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize34;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize35;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize36;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize37;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize38;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize39;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize40;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize41;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize42;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize43;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize44;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize45;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize46;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize47;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize48;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize49;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize50;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize51;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize52;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize53;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize54;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize55;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize56;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize57;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize58;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize59;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize60;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize61;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize62;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize63;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize64;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize65;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize66;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize67;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize68;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize69;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize70;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize71;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize72;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize73;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize74;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize75;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize76;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize77;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize78;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize79;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize80;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize81;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize82;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize83;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize84;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize85;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize86;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize87;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize88;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize89;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize90;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize91;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize92;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize93;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize94;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize95;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize96;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize97;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize98;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize99;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize100;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize101;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize102;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize103;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize104;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize105;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize106;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize107;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize108;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize109;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize110;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize111;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize112;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize113;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize114;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize115;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize116;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize117;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize118;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize119;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize120;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize121;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize122;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize123;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize124;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize125;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize126;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize127;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize128;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize129;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize130;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize131;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize132;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize133;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize134;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize135;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize136;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize137;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize138;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize139;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize140;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize141;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize142;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize143;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize144;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize145;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize146;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize147;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize148;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize149;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize150;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize151;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize152;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize153;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize154;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize155;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize156;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize157;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize158;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize159;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize160;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize161;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize162;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize163;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize164;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize165;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize166;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize167;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize168;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize169;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize170;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize171;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize172;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize173;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize174;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize175;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize176;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize177;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize178;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize179;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize180;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize181;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize182;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize183;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize184;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize185;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize186;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize187;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize188;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize189;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize190;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize191;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize192;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize193;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize194;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize195;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize196;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize197;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize198;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize199;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize200;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize201;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize202;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize203;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize204;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize205;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize206;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize207;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize208;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize209;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize210;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize211;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize212;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize213;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize214;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize215;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize216;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize217;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize218;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize219;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize220;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize221;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize222;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize223;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize224;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize225;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize226;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize227;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize228;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize229;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize230;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize231;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize232;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize233;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize234;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize235;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize236;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize237;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize238;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize239;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize240;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize241;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize242;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize243;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize244;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize245;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize246;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize247;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize248;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize249;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize250;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize251;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize252;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize253;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize254;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize255;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize256;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize257;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize258;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize259;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize260;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize261;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize262;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize263;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize264;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize265;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize266;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize267;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize268;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize269;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize270;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize271;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize272;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize273;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize274;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize275;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize276;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize277;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize278;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize279;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize280;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize281;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize282;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize283;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize284;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize285;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize286;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize287;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize288;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize289;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize290;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize291;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize292;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize293;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize294;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize295;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize296;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize297;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize298;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize299;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize300;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize301;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize302;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize303;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize304;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize305;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize306;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize307;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize308;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize309;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize310;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize311;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize312;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize313;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize314;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize315;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize316;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize317;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize318;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize319;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize320;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize321;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize322;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize323;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize324;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize325;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize326;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize327;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize328;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize329;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize330;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize331;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize332;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize333;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize334;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize335;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize336;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize337;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize338;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize339;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize340;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize341;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize342;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize343;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize344;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize345;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize346;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize347;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize348;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize349;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize350;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize351;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize352;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize353;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize354;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize355;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize356;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize357;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize358;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize359;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize360;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize361;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize362;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize363;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize364;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize365;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize366;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize367;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize368;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize369;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize370;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize371;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize372;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize373;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize374;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize375;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize376;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize377;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize378;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize379;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize380;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize381;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize382;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize383;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize384;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize385;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize386;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize387;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize388;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize389;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize390;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize391;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize392;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize393;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize394;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize395;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize396;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize397;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize398;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize399;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize400;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize401;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize402;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize403;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize404;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize405;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize406;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize407;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize408;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize409;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize410;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize411;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize412;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize413;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize414;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize415;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize416;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize417;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize418;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize419;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize420;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize421;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize422;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize423;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize424;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize425;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize426;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize427;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize428;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize429;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize430;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize431;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize432;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize433;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize434;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize435;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize436;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize437;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize438;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize439;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize440;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize441;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize442;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize443;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize444;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize445;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize446;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize447;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize448;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize449;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize450;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize451;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize452;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize453;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize454;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize455;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize456;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize457;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize458;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize459;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize460;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize461;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize462;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize463;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize464;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize465;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize466;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize467;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize468;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize469;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize470;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize471;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize472;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize473;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize474;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize475;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize476;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize477;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize478;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize479;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize480;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize481;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize482;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize483;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize484;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize485;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize486;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize487;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize488;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize489;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize490;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize491;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize492;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize493;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize494;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize495;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize496;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize497;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize498;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize499;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize500;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize501;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize502;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize503;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize504;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize505;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize506;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize507;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize508;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize509;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize510;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize511;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize512;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize513;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize514;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize515;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize516;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize517;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize518;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize519;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize520;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize521;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize522;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize523;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize524;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize525;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize526;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize527;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize528;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize529;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize530;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize531;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize532;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize533;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize534;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize535;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize536;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize537;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize538;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize539;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize540;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize541;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize542;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize543;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize544;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize545;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize546;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize547;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize548;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize549;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize550;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize551;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize552;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize553;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize554;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize555;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize556;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize557;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize558;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize559;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize560;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize561;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize562;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize563;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize564;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize565;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize566;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize567;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize568;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize569;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize570;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize571;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize572;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize573;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize574;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize575;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize576;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize577;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize578;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize579;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize580;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize581;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize582;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize583;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize584;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize585;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize586;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize587;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize588;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize589;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize590;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize591;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize592;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize593;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize594;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize595;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize596;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize597;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize598;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize599;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize600;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize601;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize602;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize603;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize604;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize605;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize606;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize607;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize608;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize609;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize610;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize611;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize612;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize613;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize614;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize615;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize616;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize617;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize618;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize619;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize620;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize621;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize622;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize623;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize624;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize625;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize626;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize627;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize628;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize629;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize630;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize631;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize632;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize633;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize634;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize635;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize636;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize637;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize638;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize639;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize640;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize641;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize642;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize643;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize644;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize645;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize646;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize647;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize648;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize649;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize650;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize651;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize652;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize653;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize654;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize655;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize656;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize657;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize658;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize659;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize660;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize661;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize662;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize663;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize664;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize665;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize666;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize667;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize668;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize669;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize670;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize671;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize672;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize673;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize674;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize675;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize676;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize677;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize678;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize679;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize680;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize681;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize682;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize683;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize684;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize685;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize686;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize687;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize688;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize689;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize690;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize691;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize692;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize693;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize694;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize695;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize696;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize697;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize698;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize699;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize700;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize701;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize702;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize703;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize704;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize705;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize706;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize707;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize708;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize709;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize710;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize711;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize712;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize713;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize714;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize715;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize716;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize717;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize718;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize719;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize720;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize721;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize722;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize723;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize724;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize725;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize726;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize727;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize728;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize729;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize730;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize731;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize732;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize733;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize734;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize735;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize736;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize737;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize738;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize739;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize740;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize741;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize742;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize743;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize744;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize745;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize746;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize747;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize748;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize749;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize750;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize751;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize752;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize753;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize754;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize755;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize756;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize757;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize758;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize759;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize760;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize761;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize762;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize763;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize764;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize765;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize766;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize767;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize768;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize769;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize770;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize771;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize772;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize773;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize774;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize775;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize776;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize777;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize778;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize779;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize780;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize781;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize782;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize783;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize784;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize785;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize786;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize787;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize788;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize789;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize790;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize791;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize792;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize793;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize794;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize795;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize796;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize797;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize798;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize799;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize800;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize801;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize802;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize803;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize804;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize805;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize806;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize807;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize808;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize809;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize810;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize811;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize812;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize813;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize814;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize815;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize816;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize817;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize818;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize819;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize820;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize821;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize822;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize823;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize824;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize825;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize826;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize827;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize828;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize829;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize830;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize831;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize832;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize833;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize834;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize835;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize836;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize837;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize838;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize839;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize840;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize841;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize842;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize843;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize844;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize845;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize846;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize847;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize848;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize849;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize850;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize851;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize852;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize853;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize854;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize855;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize856;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize857;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize858;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize859;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize860;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize861;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize862;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize863;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize864;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize865;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize866;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize867;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize868;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize869;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize870;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize871;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize872;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize873;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize874;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize875;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize876;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize877;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize878;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize879;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize880;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize881;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize882;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize883;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize884;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize885;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize886;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize887;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize888;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize889;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize890;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize891;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize892;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize893;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize894;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize895;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize896;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize897;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize898;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize899;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize900;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize901;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize902;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize903;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize904;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize905;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize906;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize907;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize908;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize909;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize910;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize911;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize912;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize913;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize914;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize915;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize916;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize917;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize918;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize919;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize920;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize921;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize922;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize923;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize924;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize925;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize926;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize927;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize928;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize929;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize930;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize931;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize932;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize933;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize934;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize935;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize936;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize937;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize938;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize939;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize940;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize941;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize942;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize943;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize944;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize945;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize946;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize947;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize948;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize949;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize950;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize951;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize952;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize953;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize954;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize955;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize956;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize957;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize958;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize959;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize960;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize961;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize962;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize963;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize964;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize965;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize966;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize967;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize968;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize969;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize970;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize971;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize972;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize973;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize974;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize975;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize976;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize977;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize978;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize979;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize980;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize981;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize982;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize983;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize984;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize985;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize986;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize987;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize988;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize989;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize990;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize991;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize992;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize993;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize994;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize995;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize996;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize997;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize998;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize999;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1000;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1001;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1002;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1003;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1004;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1005;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1006;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1007;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1008;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1009;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1010;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1011;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1012;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1013;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1014;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1015;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1016;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1017;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1018;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1019;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1020;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1021;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1022;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1023;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1024;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1025;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1026;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1027;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1028;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1029;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1030;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1031;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1032;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1033;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1034;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1035;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1036;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1037;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1038;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1039;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1040;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1041;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1042;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1043;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1044;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1045;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1046;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1047;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1048;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1049;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1050;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1051;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1052;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1053;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1054;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1055;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1056;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1057;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1058;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1059;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1060;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1061;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1062;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1063;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1064;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1065;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1066;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1067;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1068;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1069;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1070;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1071;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1072;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1073;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1074;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1075;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1076;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1077;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1078;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1079;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1080;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1081;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1082;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1083;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1084;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1085;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1086;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1087;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1088;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1089;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1090;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1091;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1092;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1093;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1094;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1095;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1096;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1097;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1098;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1099;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1100;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1101;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1102;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1103;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1104;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1105;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1106;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1107;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1108;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1109;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1110;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1111;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1112;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1113;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1114;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1115;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1116;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1117;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1118;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1119;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1120;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1121;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1122;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1123;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1124;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1125;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1126;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1127;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1128;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1129;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1130;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1131;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1132;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1133;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1134;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1135;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1136;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1137;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1138;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1139;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1140;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1141;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1142;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1143;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1144;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1145;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1146;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1147;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1148;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1149;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1150;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1151;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1152;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1153;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1154;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1155;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1156;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1157;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1158;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1159;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1160;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1161;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1162;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1163;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1164;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1165;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1166;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1167;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1168;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1169;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1170;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1171;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1172;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1173;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1174;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1175;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1176;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1177;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1178;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1179;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1180;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1181;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1182;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1183;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1184;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1185;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1186;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1187;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1188;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1189;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1190;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1191;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1192;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1193;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1194;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1195;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1196;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1197;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1198;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1199;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1200;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1201;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1202;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1203;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1204;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1205;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1206;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1207;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1208;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1209;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1210;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1211;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1212;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1213;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1214;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1215;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1216;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1217;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1218;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1219;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1220;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1221;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1222;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1223;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1224;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1225;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1226;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1227;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1228;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1229;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1230;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1231;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1232;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1233;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1234;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1235;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1236;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1237;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1238;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1239;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1240;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1241;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1242;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1243;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1244;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1245;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1246;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1247;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1248;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1249;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1250;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1251;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1252;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1253;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1254;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1255;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1256;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1257;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1258;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1259;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1260;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1261;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1262;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1263;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1264;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1265;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1266;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1267;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1268;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1269;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1270;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1271;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1272;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1273;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1274;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1275;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1276;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1277;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1278;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1279;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1280;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1281;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1282;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1283;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1284;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1285;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1286;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1287;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1288;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1289;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1290;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1291;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1292;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1293;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1294;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1295;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1296;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1297;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1298;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1299;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1300;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1301;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1302;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1303;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1304;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1305;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1306;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1307;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1308;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1309;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1310;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1311;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1312;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1313;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1314;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1315;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1316;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1317;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1318;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1319;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1320;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1321;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1322;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1323;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1324;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1325;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1326;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1327;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1328;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1329;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1330;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1331;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1332;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1333;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1334;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1335;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1336;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1337;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1338;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1339;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1340;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1341;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1342;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1343;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1344;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1345;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1346;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1347;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1348;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1349;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1350;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1351;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1352;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1353;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1354;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1355;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1356;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1357;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1358;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1359;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1360;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1361;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1362;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1363;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1364;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1365;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1366;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1367;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1368;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1369;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1370;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1371;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1372;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1373;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1374;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1375;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1376;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1377;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1378;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1379;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1380;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1381;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1382;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1383;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1384;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1385;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1386;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1387;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1388;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1389;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1390;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1391;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1392;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1393;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1394;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1395;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1396;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1397;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1398;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1399;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1400;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1401;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1402;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1403;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1404;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1405;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1406;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1407;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1408;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1409;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1410;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1411;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1412;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1413;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1414;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1415;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1416;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1417;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1418;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1419;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1420;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1421;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1422;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1423;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1424;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1425;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1426;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1427;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1428;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1429;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1430;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1431;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1432;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1433;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1434;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1435;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1436;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1437;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1438;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1439;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1440;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1441;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1442;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1443;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1444;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1445;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1446;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1447;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1448;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1449;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1450;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1451;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1452;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1453;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1454;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1455;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1456;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1457;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1458;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1459;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1460;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1461;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1462;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1463;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1464;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1465;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1466;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1467;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1468;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1469;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1470;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1471;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1472;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1473;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1474;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1475;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1476;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1477;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1478;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1479;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1480;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1481;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1482;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1483;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1484;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1485;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1486;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1487;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1488;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1489;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1490;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1491;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1492;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1493;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1494;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1495;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1496;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1497;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1498;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1499;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1500;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1501;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1502;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1503;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1504;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1505;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1506;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1507;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1508;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1509;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1510;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1511;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1512;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1513;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1514;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1515;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1516;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1517;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1518;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1519;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1520;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1521;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1522;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1523;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1524;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1525;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1526;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1527;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1528;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1529;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1530;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1531;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1532;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1533;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1534;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1535;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1536;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1537;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1538;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1539;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1540;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1541;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1542;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1543;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1544;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1545;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1546;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1547;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1548;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1549;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1550;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1551;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1552;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1553;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1554;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1555;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1556;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1557;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1558;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1559;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1560;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1561;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1562;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1563;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1564;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1565;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1566;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1567;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1568;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1569;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1570;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1571;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1572;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1573;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1574;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1575;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1576;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1577;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1578;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1579;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1580;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1581;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1582;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1583;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1584;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1585;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1586;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1587;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1588;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1589;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1590;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1591;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1592;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1593;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1594;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1595;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1596;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1597;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1598;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1599;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1600;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1601;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1602;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1603;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1604;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1605;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1606;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1607;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1608;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1609;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1610;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1611;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1612;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1613;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1614;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1615;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1616;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1617;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1618;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1619;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1620;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1621;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1622;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1623;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1624;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1625;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1626;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1627;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1628;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1629;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1630;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1631;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1632;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1633;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1634;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1635;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1636;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1637;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1638;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1639;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1640;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1641;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1642;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1643;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1644;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1645;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1646;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1647;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1648;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1649;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1650;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1651;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1652;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1653;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1654;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1655;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1656;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1657;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1658;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1659;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1660;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1661;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1662;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1663;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1664;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1665;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1666;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1667;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1668;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1669;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1670;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1671;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1672;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1673;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1674;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1675;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1676;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1677;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1678;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1679;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1680;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1681;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1682;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1683;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1684;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1685;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1686;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1687;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1688;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1689;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1690;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1691;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1692;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1693;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1694;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1695;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1696;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1697;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1698;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1699;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1700;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1701;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1702;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1703;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1704;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1705;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1706;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1707;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1708;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1709;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1710;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1711;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1712;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1713;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1714;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1715;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1716;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1717;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1718;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1719;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1720;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1721;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1722;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1723;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1724;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1725;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1726;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1727;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1728;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1729;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1730;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1731;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1732;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1733;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1734;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1735;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1736;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1737;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1738;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1739;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1740;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1741;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1742;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1743;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1744;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1745;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1746;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1747;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1748;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1749;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1750;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1751;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1752;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1753;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1754;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1755;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1756;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1757;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1758;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1759;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1760;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1761;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1762;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1763;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1764;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1765;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1766;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1767;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1768;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1769;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1770;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1771;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1772;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1773;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1774;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1775;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1776;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1777;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1778;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1779;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1780;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1781;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1782;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1783;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1784;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1785;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1786;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1787;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1788;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1789;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1790;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1791;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1792;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1793;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1794;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1795;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1796;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1797;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1798;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1799;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1800;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1801;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1802;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1803;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1804;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1805;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1806;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1807;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1808;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1809;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1810;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1811;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1812;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1813;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1814;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1815;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1816;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1817;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1818;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1819;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1820;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1821;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1822;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1823;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1824;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1825;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1826;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1827;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1828;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1829;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1830;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1831;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1832;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1833;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1834;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1835;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1836;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1837;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1838;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1839;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1840;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1841;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1842;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1843;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1844;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1845;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1846;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1847;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1848;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1849;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1850;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1851;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1852;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1853;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1854;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1855;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1856;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1857;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1858;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1859;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1860;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1861;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1862;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1863;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1864;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1865;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1866;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1867;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1868;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1869;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1870;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1871;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1872;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1873;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1874;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1875;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1876;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1877;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1878;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1879;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1880;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1881;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1882;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1883;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1884;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1885;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1886;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1887;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1888;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1889;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1890;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1891;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1892;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1893;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1894;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1895;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1896;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1897;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1898;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1899;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1900;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1901;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1902;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1903;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1904;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1905;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1906;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1907;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1908;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1909;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1910;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1911;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1912;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1913;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1914;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1915;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1916;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1917;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1918;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1919;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1920;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1921;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1922;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1923;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1924;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1925;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1926;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1927;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1928;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1929;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1930;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1931;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1932;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1933;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1934;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1935;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1936;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1937;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1938;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1939;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1940;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1941;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1942;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1943;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1944;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1945;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1946;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1947;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1948;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1949;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1950;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1951;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1952;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1953;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1954;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1955;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1956;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1957;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1958;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1959;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1960;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1961;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1962;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1963;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1964;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1965;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1966;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1967;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1968;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1969;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1970;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1971;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1972;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1973;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1974;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1975;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1976;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1977;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1978;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1979;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1980;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1981;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1982;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1983;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1984;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1985;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1986;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1987;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1988;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1989;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1990;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1991;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1992;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1993;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1994;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1995;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1996;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1997;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1998;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1999;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2000;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2001;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2002;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2003;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2004;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2005;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2006;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2007;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2008;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2009;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2010;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2011;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2012;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2013;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2014;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2015;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2016;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2017;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2018;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2019;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2020;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2021;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2022;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2023;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2024;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2025;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2026;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2027;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2028;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2029;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2030;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2031;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2032;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2033;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2034;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2035;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2036;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2037;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2038;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2039;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2040;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2041;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2042;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2043;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2044;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2045;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2046;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2047;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2048;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2049;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2050;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2051;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2052;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2053;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2054;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2055;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2056;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2057;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2058;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2059;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2060;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2061;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2062;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2063;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2064;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2065;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2066;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2067;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2068;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2069;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2070;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2071;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2072;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2073;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2074;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2075;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2076;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2077;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2078;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2079;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2080;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2081;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2082;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2083;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2084;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2085;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2086;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2087;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2088;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2089;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2090;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2091;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2092;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2093;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2094;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2095;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2096;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2097;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2098;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2099;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2100;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2101;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2102;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2103;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2104;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2105;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2106;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2107;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2108;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2109;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2110;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2111;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2112;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2113;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2114;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2115;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2116;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2117;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2118;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2119;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2120;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2121;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2122;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2123;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2124;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2125;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2126;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2127;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2128;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2129;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2130;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2131;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2132;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2133;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2134;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2135;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2136;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2137;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2138;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2139;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2140;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2141;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2142;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2143;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2144;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2145;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2146;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2147;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2148;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2149;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2150;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2151;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2152;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2153;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2154;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2155;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2156;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2157;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2158;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2159;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2160;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2161;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2162;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2163;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2164;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2165;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2166;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2167;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2168;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2169;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2170;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2171;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2172;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2173;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2174;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2175;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2176;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2177;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2178;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2179;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2180;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2181;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2182;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2183;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2184;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2185;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2186;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2187;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2188;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2189;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2190;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2191;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2192;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2193;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2194;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2195;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2196;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2197;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2198;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2199;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2200;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2201;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2202;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2203;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2204;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2205;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2206;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2207;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2208;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2209;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2210;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2211;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2212;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2213;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2214;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2215;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2216;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2217;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2218;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2219;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2220;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2221;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2222;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2223;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2224;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2225;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2226;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2227;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2228;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2229;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2230;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2231;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2232;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2233;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2234;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2235;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2236;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2237;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2238;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2239;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2240;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2241;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2242;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2243;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2244;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2245;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2246;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2247;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2248;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2249;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2250;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2251;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2252;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2253;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2254;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2255;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2256;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2257;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2258;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2259;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2260;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2261;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2262;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2263;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2264;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2265;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2266;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2267;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2268;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2269;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2270;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2271;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2272;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2273;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2274;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2275;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2276;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2277;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2278;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2279;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2280;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2281;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2282;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2283;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2284;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2285;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2286;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2287;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2288;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2289;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2290;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2291;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2292;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2293;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2294;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2295;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2296;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2297;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2298;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2299;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2300;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2301;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2302;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2303;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2304;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2305;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2306;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2307;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2308;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2309;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2310;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2311;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2312;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2313;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2314;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2315;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2316;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2317;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2318;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2319;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2320;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2321;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2322;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2323;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2324;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2325;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2326;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2327;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2328;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2329;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2330;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2331;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2332;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2333;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2334;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2335;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2336;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2337;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2338;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2339;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2340;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2341;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2342;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2343;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2344;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2345;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2346;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2347;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2348;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2349;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2350;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2351;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2352;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2353;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2354;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2355;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2356;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2357;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2358;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2359;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2360;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2361;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2362;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2363;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2364;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2365;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2366;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2367;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2368;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2369;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2370;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2371;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2372;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2373;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2374;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2375;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2376;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2377;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2378;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2379;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2380;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2381;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2382;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2383;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2384;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2385;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2386;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2387;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2388;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2389;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2390;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2391;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2392;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2393;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2394;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2395;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2396;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2397;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2398;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2399;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2400;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2401;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2402;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2403;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2404;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2405;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2406;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2407;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2408;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2409;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2410;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2411;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2412;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2413;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2414;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2415;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2416;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2417;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2418;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2419;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2420;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2421;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2422;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2423;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2424;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2425;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2426;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2427;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2428;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2429;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2430;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2431;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2432;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2433;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2434;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2435;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2436;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2437;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2438;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2439;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2440;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2441;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2442;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2443;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2444;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2445;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2446;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2447;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2448;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2449;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2450;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2451;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2452;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2453;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2454;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2455;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2456;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2457;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2458;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2459;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2460;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2461;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2462;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2463;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2464;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2465;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2466;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2467;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2468;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2469;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2470;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2471;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2472;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2473;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2474;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2475;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2476;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2477;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2478;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2479;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2480;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2481;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2482;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2483;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2484;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2485;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2486;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2487;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2488;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2489;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2490;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2491;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2492;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2493;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2494;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2495;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2496;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2497;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2498;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2499;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2500;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2501;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2502;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2503;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2504;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2505;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2506;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2507;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2508;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2509;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2510;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2511;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2512;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2513;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2514;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2515;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2516;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2517;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2518;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2519;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2520;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2521;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2522;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2523;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2524;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2525;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2526;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2527;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2528;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2529;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2530;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2531;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2532;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2533;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2534;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2535;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2536;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2537;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2538;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2539;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2540;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2541;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2542;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2543;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2544;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2545;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2546;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2547;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2548;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2549;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2550;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2551;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2552;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2553;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2554;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2555;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2556;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2557;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2558;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2559;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2560;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2561;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2562;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2563;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2564;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2565;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2566;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2567;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2568;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2569;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2570;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2571;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2572;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2573;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2574;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2575;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2576;
IL2CPP_EXTERN_C_CONST Il2CppTypeDefinitionSizes* g_Il2CppTypeDefinitionSizesTable[2577] =
{
(&g_typeDefinitionSize0),
(&g_typeDefinitionSize1),
(&g_typeDefinitionSize2),
(&g_typeDefinitionSize3),
(&g_typeDefinitionSize4),
(&g_typeDefinitionSize5),
(&g_typeDefinitionSize6),
(&g_typeDefinitionSize7),
(&g_typeDefinitionSize8),
(&g_typeDefinitionSize9),
(&g_typeDefinitionSize10),
(&g_typeDefinitionSize11),
(&g_typeDefinitionSize12),
(&g_typeDefinitionSize13),
(&g_typeDefinitionSize14),
(&g_typeDefinitionSize15),
(&g_typeDefinitionSize16),
(&g_typeDefinitionSize17),
(&g_typeDefinitionSize18),
(&g_typeDefinitionSize19),
(&g_typeDefinitionSize20),
(&g_typeDefinitionSize21),
(&g_typeDefinitionSize22),
(&g_typeDefinitionSize23),
(&g_typeDefinitionSize24),
(&g_typeDefinitionSize25),
(&g_typeDefinitionSize26),
(&g_typeDefinitionSize27),
(&g_typeDefinitionSize28),
(&g_typeDefinitionSize29),
(&g_typeDefinitionSize30),
(&g_typeDefinitionSize31),
(&g_typeDefinitionSize32),
(&g_typeDefinitionSize33),
(&g_typeDefinitionSize34),
(&g_typeDefinitionSize35),
(&g_typeDefinitionSize36),
(&g_typeDefinitionSize37),
(&g_typeDefinitionSize38),
(&g_typeDefinitionSize39),
(&g_typeDefinitionSize40),
(&g_typeDefinitionSize41),
(&g_typeDefinitionSize42),
(&g_typeDefinitionSize43),
(&g_typeDefinitionSize44),
(&g_typeDefinitionSize45),
(&g_typeDefinitionSize46),
(&g_typeDefinitionSize47),
(&g_typeDefinitionSize48),
(&g_typeDefinitionSize49),
(&g_typeDefinitionSize50),
(&g_typeDefinitionSize51),
(&g_typeDefinitionSize52),
(&g_typeDefinitionSize53),
(&g_typeDefinitionSize54),
(&g_typeDefinitionSize55),
(&g_typeDefinitionSize56),
(&g_typeDefinitionSize57),
(&g_typeDefinitionSize58),
(&g_typeDefinitionSize59),
(&g_typeDefinitionSize60),
(&g_typeDefinitionSize61),
(&g_typeDefinitionSize62),
(&g_typeDefinitionSize63),
(&g_typeDefinitionSize64),
(&g_typeDefinitionSize65),
(&g_typeDefinitionSize66),
(&g_typeDefinitionSize67),
(&g_typeDefinitionSize68),
(&g_typeDefinitionSize69),
(&g_typeDefinitionSize70),
(&g_typeDefinitionSize71),
(&g_typeDefinitionSize72),
(&g_typeDefinitionSize73),
(&g_typeDefinitionSize74),
(&g_typeDefinitionSize75),
(&g_typeDefinitionSize76),
(&g_typeDefinitionSize77),
(&g_typeDefinitionSize78),
(&g_typeDefinitionSize79),
(&g_typeDefinitionSize80),
(&g_typeDefinitionSize81),
(&g_typeDefinitionSize82),
(&g_typeDefinitionSize83),
(&g_typeDefinitionSize84),
(&g_typeDefinitionSize85),
(&g_typeDefinitionSize86),
(&g_typeDefinitionSize87),
(&g_typeDefinitionSize88),
(&g_typeDefinitionSize89),
(&g_typeDefinitionSize90),
(&g_typeDefinitionSize91),
(&g_typeDefinitionSize92),
(&g_typeDefinitionSize93),
(&g_typeDefinitionSize94),
(&g_typeDefinitionSize95),
(&g_typeDefinitionSize96),
(&g_typeDefinitionSize97),
(&g_typeDefinitionSize98),
(&g_typeDefinitionSize99),
(&g_typeDefinitionSize100),
(&g_typeDefinitionSize101),
(&g_typeDefinitionSize102),
(&g_typeDefinitionSize103),
(&g_typeDefinitionSize104),
(&g_typeDefinitionSize105),
(&g_typeDefinitionSize106),
(&g_typeDefinitionSize107),
(&g_typeDefinitionSize108),
(&g_typeDefinitionSize109),
(&g_typeDefinitionSize110),
(&g_typeDefinitionSize111),
(&g_typeDefinitionSize112),
(&g_typeDefinitionSize113),
(&g_typeDefinitionSize114),
(&g_typeDefinitionSize115),
(&g_typeDefinitionSize116),
(&g_typeDefinitionSize117),
(&g_typeDefinitionSize118),
(&g_typeDefinitionSize119),
(&g_typeDefinitionSize120),
(&g_typeDefinitionSize121),
(&g_typeDefinitionSize122),
(&g_typeDefinitionSize123),
(&g_typeDefinitionSize124),
(&g_typeDefinitionSize125),
(&g_typeDefinitionSize126),
(&g_typeDefinitionSize127),
(&g_typeDefinitionSize128),
(&g_typeDefinitionSize129),
(&g_typeDefinitionSize130),
(&g_typeDefinitionSize131),
(&g_typeDefinitionSize132),
(&g_typeDefinitionSize133),
(&g_typeDefinitionSize134),
(&g_typeDefinitionSize135),
(&g_typeDefinitionSize136),
(&g_typeDefinitionSize137),
(&g_typeDefinitionSize138),
(&g_typeDefinitionSize139),
(&g_typeDefinitionSize140),
(&g_typeDefinitionSize141),
(&g_typeDefinitionSize142),
(&g_typeDefinitionSize143),
(&g_typeDefinitionSize144),
(&g_typeDefinitionSize145),
(&g_typeDefinitionSize146),
(&g_typeDefinitionSize147),
(&g_typeDefinitionSize148),
(&g_typeDefinitionSize149),
(&g_typeDefinitionSize150),
(&g_typeDefinitionSize151),
(&g_typeDefinitionSize152),
(&g_typeDefinitionSize153),
(&g_typeDefinitionSize154),
(&g_typeDefinitionSize155),
(&g_typeDefinitionSize156),
(&g_typeDefinitionSize157),
(&g_typeDefinitionSize158),
(&g_typeDefinitionSize159),
(&g_typeDefinitionSize160),
(&g_typeDefinitionSize161),
(&g_typeDefinitionSize162),
(&g_typeDefinitionSize163),
(&g_typeDefinitionSize164),
(&g_typeDefinitionSize165),
(&g_typeDefinitionSize166),
(&g_typeDefinitionSize167),
(&g_typeDefinitionSize168),
(&g_typeDefinitionSize169),
(&g_typeDefinitionSize170),
(&g_typeDefinitionSize171),
(&g_typeDefinitionSize172),
(&g_typeDefinitionSize173),
(&g_typeDefinitionSize174),
(&g_typeDefinitionSize175),
(&g_typeDefinitionSize176),
(&g_typeDefinitionSize177),
(&g_typeDefinitionSize178),
(&g_typeDefinitionSize179),
(&g_typeDefinitionSize180),
(&g_typeDefinitionSize181),
(&g_typeDefinitionSize182),
(&g_typeDefinitionSize183),
(&g_typeDefinitionSize184),
(&g_typeDefinitionSize185),
(&g_typeDefinitionSize186),
(&g_typeDefinitionSize187),
(&g_typeDefinitionSize188),
(&g_typeDefinitionSize189),
(&g_typeDefinitionSize190),
(&g_typeDefinitionSize191),
(&g_typeDefinitionSize192),
(&g_typeDefinitionSize193),
(&g_typeDefinitionSize194),
(&g_typeDefinitionSize195),
(&g_typeDefinitionSize196),
(&g_typeDefinitionSize197),
(&g_typeDefinitionSize198),
(&g_typeDefinitionSize199),
(&g_typeDefinitionSize200),
(&g_typeDefinitionSize201),
(&g_typeDefinitionSize202),
(&g_typeDefinitionSize203),
(&g_typeDefinitionSize204),
(&g_typeDefinitionSize205),
(&g_typeDefinitionSize206),
(&g_typeDefinitionSize207),
(&g_typeDefinitionSize208),
(&g_typeDefinitionSize209),
(&g_typeDefinitionSize210),
(&g_typeDefinitionSize211),
(&g_typeDefinitionSize212),
(&g_typeDefinitionSize213),
(&g_typeDefinitionSize214),
(&g_typeDefinitionSize215),
(&g_typeDefinitionSize216),
(&g_typeDefinitionSize217),
(&g_typeDefinitionSize218),
(&g_typeDefinitionSize219),
(&g_typeDefinitionSize220),
(&g_typeDefinitionSize221),
(&g_typeDefinitionSize222),
(&g_typeDefinitionSize223),
(&g_typeDefinitionSize224),
(&g_typeDefinitionSize225),
(&g_typeDefinitionSize226),
(&g_typeDefinitionSize227),
(&g_typeDefinitionSize228),
(&g_typeDefinitionSize229),
(&g_typeDefinitionSize230),
(&g_typeDefinitionSize231),
(&g_typeDefinitionSize232),
(&g_typeDefinitionSize233),
(&g_typeDefinitionSize234),
(&g_typeDefinitionSize235),
(&g_typeDefinitionSize236),
(&g_typeDefinitionSize237),
(&g_typeDefinitionSize238),
(&g_typeDefinitionSize239),
(&g_typeDefinitionSize240),
(&g_typeDefinitionSize241),
(&g_typeDefinitionSize242),
(&g_typeDefinitionSize243),
(&g_typeDefinitionSize244),
(&g_typeDefinitionSize245),
(&g_typeDefinitionSize246),
(&g_typeDefinitionSize247),
(&g_typeDefinitionSize248),
(&g_typeDefinitionSize249),
(&g_typeDefinitionSize250),
(&g_typeDefinitionSize251),
(&g_typeDefinitionSize252),
(&g_typeDefinitionSize253),
(&g_typeDefinitionSize254),
(&g_typeDefinitionSize255),
(&g_typeDefinitionSize256),
(&g_typeDefinitionSize257),
(&g_typeDefinitionSize258),
(&g_typeDefinitionSize259),
(&g_typeDefinitionSize260),
(&g_typeDefinitionSize261),
(&g_typeDefinitionSize262),
(&g_typeDefinitionSize263),
(&g_typeDefinitionSize264),
(&g_typeDefinitionSize265),
(&g_typeDefinitionSize266),
(&g_typeDefinitionSize267),
(&g_typeDefinitionSize268),
(&g_typeDefinitionSize269),
(&g_typeDefinitionSize270),
(&g_typeDefinitionSize271),
(&g_typeDefinitionSize272),
(&g_typeDefinitionSize273),
(&g_typeDefinitionSize274),
(&g_typeDefinitionSize275),
(&g_typeDefinitionSize276),
(&g_typeDefinitionSize277),
(&g_typeDefinitionSize278),
(&g_typeDefinitionSize279),
(&g_typeDefinitionSize280),
(&g_typeDefinitionSize281),
(&g_typeDefinitionSize282),
(&g_typeDefinitionSize283),
(&g_typeDefinitionSize284),
(&g_typeDefinitionSize285),
(&g_typeDefinitionSize286),
(&g_typeDefinitionSize287),
(&g_typeDefinitionSize288),
(&g_typeDefinitionSize289),
(&g_typeDefinitionSize290),
(&g_typeDefinitionSize291),
(&g_typeDefinitionSize292),
(&g_typeDefinitionSize293),
(&g_typeDefinitionSize294),
(&g_typeDefinitionSize295),
(&g_typeDefinitionSize296),
(&g_typeDefinitionSize297),
(&g_typeDefinitionSize298),
(&g_typeDefinitionSize299),
(&g_typeDefinitionSize300),
(&g_typeDefinitionSize301),
(&g_typeDefinitionSize302),
(&g_typeDefinitionSize303),
(&g_typeDefinitionSize304),
(&g_typeDefinitionSize305),
(&g_typeDefinitionSize306),
(&g_typeDefinitionSize307),
(&g_typeDefinitionSize308),
(&g_typeDefinitionSize309),
(&g_typeDefinitionSize310),
(&g_typeDefinitionSize311),
(&g_typeDefinitionSize312),
(&g_typeDefinitionSize313),
(&g_typeDefinitionSize314),
(&g_typeDefinitionSize315),
(&g_typeDefinitionSize316),
(&g_typeDefinitionSize317),
(&g_typeDefinitionSize318),
(&g_typeDefinitionSize319),
(&g_typeDefinitionSize320),
(&g_typeDefinitionSize321),
(&g_typeDefinitionSize322),
(&g_typeDefinitionSize323),
(&g_typeDefinitionSize324),
(&g_typeDefinitionSize325),
(&g_typeDefinitionSize326),
(&g_typeDefinitionSize327),
(&g_typeDefinitionSize328),
(&g_typeDefinitionSize329),
(&g_typeDefinitionSize330),
(&g_typeDefinitionSize331),
(&g_typeDefinitionSize332),
(&g_typeDefinitionSize333),
(&g_typeDefinitionSize334),
(&g_typeDefinitionSize335),
(&g_typeDefinitionSize336),
(&g_typeDefinitionSize337),
(&g_typeDefinitionSize338),
(&g_typeDefinitionSize339),
(&g_typeDefinitionSize340),
(&g_typeDefinitionSize341),
(&g_typeDefinitionSize342),
(&g_typeDefinitionSize343),
(&g_typeDefinitionSize344),
(&g_typeDefinitionSize345),
(&g_typeDefinitionSize346),
(&g_typeDefinitionSize347),
(&g_typeDefinitionSize348),
(&g_typeDefinitionSize349),
(&g_typeDefinitionSize350),
(&g_typeDefinitionSize351),
(&g_typeDefinitionSize352),
(&g_typeDefinitionSize353),
(&g_typeDefinitionSize354),
(&g_typeDefinitionSize355),
(&g_typeDefinitionSize356),
(&g_typeDefinitionSize357),
(&g_typeDefinitionSize358),
(&g_typeDefinitionSize359),
(&g_typeDefinitionSize360),
(&g_typeDefinitionSize361),
(&g_typeDefinitionSize362),
(&g_typeDefinitionSize363),
(&g_typeDefinitionSize364),
(&g_typeDefinitionSize365),
(&g_typeDefinitionSize366),
(&g_typeDefinitionSize367),
(&g_typeDefinitionSize368),
(&g_typeDefinitionSize369),
(&g_typeDefinitionSize370),
(&g_typeDefinitionSize371),
(&g_typeDefinitionSize372),
(&g_typeDefinitionSize373),
(&g_typeDefinitionSize374),
(&g_typeDefinitionSize375),
(&g_typeDefinitionSize376),
(&g_typeDefinitionSize377),
(&g_typeDefinitionSize378),
(&g_typeDefinitionSize379),
(&g_typeDefinitionSize380),
(&g_typeDefinitionSize381),
(&g_typeDefinitionSize382),
(&g_typeDefinitionSize383),
(&g_typeDefinitionSize384),
(&g_typeDefinitionSize385),
(&g_typeDefinitionSize386),
(&g_typeDefinitionSize387),
(&g_typeDefinitionSize388),
(&g_typeDefinitionSize389),
(&g_typeDefinitionSize390),
(&g_typeDefinitionSize391),
(&g_typeDefinitionSize392),
(&g_typeDefinitionSize393),
(&g_typeDefinitionSize394),
(&g_typeDefinitionSize395),
(&g_typeDefinitionSize396),
(&g_typeDefinitionSize397),
(&g_typeDefinitionSize398),
(&g_typeDefinitionSize399),
(&g_typeDefinitionSize400),
(&g_typeDefinitionSize401),
(&g_typeDefinitionSize402),
(&g_typeDefinitionSize403),
(&g_typeDefinitionSize404),
(&g_typeDefinitionSize405),
(&g_typeDefinitionSize406),
(&g_typeDefinitionSize407),
(&g_typeDefinitionSize408),
(&g_typeDefinitionSize409),
(&g_typeDefinitionSize410),
(&g_typeDefinitionSize411),
(&g_typeDefinitionSize412),
(&g_typeDefinitionSize413),
(&g_typeDefinitionSize414),
(&g_typeDefinitionSize415),
(&g_typeDefinitionSize416),
(&g_typeDefinitionSize417),
(&g_typeDefinitionSize418),
(&g_typeDefinitionSize419),
(&g_typeDefinitionSize420),
(&g_typeDefinitionSize421),
(&g_typeDefinitionSize422),
(&g_typeDefinitionSize423),
(&g_typeDefinitionSize424),
(&g_typeDefinitionSize425),
(&g_typeDefinitionSize426),
(&g_typeDefinitionSize427),
(&g_typeDefinitionSize428),
(&g_typeDefinitionSize429),
(&g_typeDefinitionSize430),
(&g_typeDefinitionSize431),
(&g_typeDefinitionSize432),
(&g_typeDefinitionSize433),
(&g_typeDefinitionSize434),
(&g_typeDefinitionSize435),
(&g_typeDefinitionSize436),
(&g_typeDefinitionSize437),
(&g_typeDefinitionSize438),
(&g_typeDefinitionSize439),
(&g_typeDefinitionSize440),
(&g_typeDefinitionSize441),
(&g_typeDefinitionSize442),
(&g_typeDefinitionSize443),
(&g_typeDefinitionSize444),
(&g_typeDefinitionSize445),
(&g_typeDefinitionSize446),
(&g_typeDefinitionSize447),
(&g_typeDefinitionSize448),
(&g_typeDefinitionSize449),
(&g_typeDefinitionSize450),
(&g_typeDefinitionSize451),
(&g_typeDefinitionSize452),
(&g_typeDefinitionSize453),
(&g_typeDefinitionSize454),
(&g_typeDefinitionSize455),
(&g_typeDefinitionSize456),
(&g_typeDefinitionSize457),
(&g_typeDefinitionSize458),
(&g_typeDefinitionSize459),
(&g_typeDefinitionSize460),
(&g_typeDefinitionSize461),
(&g_typeDefinitionSize462),
(&g_typeDefinitionSize463),
(&g_typeDefinitionSize464),
(&g_typeDefinitionSize465),
(&g_typeDefinitionSize466),
(&g_typeDefinitionSize467),
(&g_typeDefinitionSize468),
(&g_typeDefinitionSize469),
(&g_typeDefinitionSize470),
(&g_typeDefinitionSize471),
(&g_typeDefinitionSize472),
(&g_typeDefinitionSize473),
(&g_typeDefinitionSize474),
(&g_typeDefinitionSize475),
(&g_typeDefinitionSize476),
(&g_typeDefinitionSize477),
(&g_typeDefinitionSize478),
(&g_typeDefinitionSize479),
(&g_typeDefinitionSize480),
(&g_typeDefinitionSize481),
(&g_typeDefinitionSize482),
(&g_typeDefinitionSize483),
(&g_typeDefinitionSize484),
(&g_typeDefinitionSize485),
(&g_typeDefinitionSize486),
(&g_typeDefinitionSize487),
(&g_typeDefinitionSize488),
(&g_typeDefinitionSize489),
(&g_typeDefinitionSize490),
(&g_typeDefinitionSize491),
(&g_typeDefinitionSize492),
(&g_typeDefinitionSize493),
(&g_typeDefinitionSize494),
(&g_typeDefinitionSize495),
(&g_typeDefinitionSize496),
(&g_typeDefinitionSize497),
(&g_typeDefinitionSize498),
(&g_typeDefinitionSize499),
(&g_typeDefinitionSize500),
(&g_typeDefinitionSize501),
(&g_typeDefinitionSize502),
(&g_typeDefinitionSize503),
(&g_typeDefinitionSize504),
(&g_typeDefinitionSize505),
(&g_typeDefinitionSize506),
(&g_typeDefinitionSize507),
(&g_typeDefinitionSize508),
(&g_typeDefinitionSize509),
(&g_typeDefinitionSize510),
(&g_typeDefinitionSize511),
(&g_typeDefinitionSize512),
(&g_typeDefinitionSize513),
(&g_typeDefinitionSize514),
(&g_typeDefinitionSize515),
(&g_typeDefinitionSize516),
(&g_typeDefinitionSize517),
(&g_typeDefinitionSize518),
(&g_typeDefinitionSize519),
(&g_typeDefinitionSize520),
(&g_typeDefinitionSize521),
(&g_typeDefinitionSize522),
(&g_typeDefinitionSize523),
(&g_typeDefinitionSize524),
(&g_typeDefinitionSize525),
(&g_typeDefinitionSize526),
(&g_typeDefinitionSize527),
(&g_typeDefinitionSize528),
(&g_typeDefinitionSize529),
(&g_typeDefinitionSize530),
(&g_typeDefinitionSize531),
(&g_typeDefinitionSize532),
(&g_typeDefinitionSize533),
(&g_typeDefinitionSize534),
(&g_typeDefinitionSize535),
(&g_typeDefinitionSize536),
(&g_typeDefinitionSize537),
(&g_typeDefinitionSize538),
(&g_typeDefinitionSize539),
(&g_typeDefinitionSize540),
(&g_typeDefinitionSize541),
(&g_typeDefinitionSize542),
(&g_typeDefinitionSize543),
(&g_typeDefinitionSize544),
(&g_typeDefinitionSize545),
(&g_typeDefinitionSize546),
(&g_typeDefinitionSize547),
(&g_typeDefinitionSize548),
(&g_typeDefinitionSize549),
(&g_typeDefinitionSize550),
(&g_typeDefinitionSize551),
(&g_typeDefinitionSize552),
(&g_typeDefinitionSize553),
(&g_typeDefinitionSize554),
(&g_typeDefinitionSize555),
(&g_typeDefinitionSize556),
(&g_typeDefinitionSize557),
(&g_typeDefinitionSize558),
(&g_typeDefinitionSize559),
(&g_typeDefinitionSize560),
(&g_typeDefinitionSize561),
(&g_typeDefinitionSize562),
(&g_typeDefinitionSize563),
(&g_typeDefinitionSize564),
(&g_typeDefinitionSize565),
(&g_typeDefinitionSize566),
(&g_typeDefinitionSize567),
(&g_typeDefinitionSize568),
(&g_typeDefinitionSize569),
(&g_typeDefinitionSize570),
(&g_typeDefinitionSize571),
(&g_typeDefinitionSize572),
(&g_typeDefinitionSize573),
(&g_typeDefinitionSize574),
(&g_typeDefinitionSize575),
(&g_typeDefinitionSize576),
(&g_typeDefinitionSize577),
(&g_typeDefinitionSize578),
(&g_typeDefinitionSize579),
(&g_typeDefinitionSize580),
(&g_typeDefinitionSize581),
(&g_typeDefinitionSize582),
(&g_typeDefinitionSize583),
(&g_typeDefinitionSize584),
(&g_typeDefinitionSize585),
(&g_typeDefinitionSize586),
(&g_typeDefinitionSize587),
(&g_typeDefinitionSize588),
(&g_typeDefinitionSize589),
(&g_typeDefinitionSize590),
(&g_typeDefinitionSize591),
(&g_typeDefinitionSize592),
(&g_typeDefinitionSize593),
(&g_typeDefinitionSize594),
(&g_typeDefinitionSize595),
(&g_typeDefinitionSize596),
(&g_typeDefinitionSize597),
(&g_typeDefinitionSize598),
(&g_typeDefinitionSize599),
(&g_typeDefinitionSize600),
(&g_typeDefinitionSize601),
(&g_typeDefinitionSize602),
(&g_typeDefinitionSize603),
(&g_typeDefinitionSize604),
(&g_typeDefinitionSize605),
(&g_typeDefinitionSize606),
(&g_typeDefinitionSize607),
(&g_typeDefinitionSize608),
(&g_typeDefinitionSize609),
(&g_typeDefinitionSize610),
(&g_typeDefinitionSize611),
(&g_typeDefinitionSize612),
(&g_typeDefinitionSize613),
(&g_typeDefinitionSize614),
(&g_typeDefinitionSize615),
(&g_typeDefinitionSize616),
(&g_typeDefinitionSize617),
(&g_typeDefinitionSize618),
(&g_typeDefinitionSize619),
(&g_typeDefinitionSize620),
(&g_typeDefinitionSize621),
(&g_typeDefinitionSize622),
(&g_typeDefinitionSize623),
(&g_typeDefinitionSize624),
(&g_typeDefinitionSize625),
(&g_typeDefinitionSize626),
(&g_typeDefinitionSize627),
(&g_typeDefinitionSize628),
(&g_typeDefinitionSize629),
(&g_typeDefinitionSize630),
(&g_typeDefinitionSize631),
(&g_typeDefinitionSize632),
(&g_typeDefinitionSize633),
(&g_typeDefinitionSize634),
(&g_typeDefinitionSize635),
(&g_typeDefinitionSize636),
(&g_typeDefinitionSize637),
(&g_typeDefinitionSize638),
(&g_typeDefinitionSize639),
(&g_typeDefinitionSize640),
(&g_typeDefinitionSize641),
(&g_typeDefinitionSize642),
(&g_typeDefinitionSize643),
(&g_typeDefinitionSize644),
(&g_typeDefinitionSize645),
(&g_typeDefinitionSize646),
(&g_typeDefinitionSize647),
(&g_typeDefinitionSize648),
(&g_typeDefinitionSize649),
(&g_typeDefinitionSize650),
(&g_typeDefinitionSize651),
(&g_typeDefinitionSize652),
(&g_typeDefinitionSize653),
(&g_typeDefinitionSize654),
(&g_typeDefinitionSize655),
(&g_typeDefinitionSize656),
(&g_typeDefinitionSize657),
(&g_typeDefinitionSize658),
(&g_typeDefinitionSize659),
(&g_typeDefinitionSize660),
(&g_typeDefinitionSize661),
(&g_typeDefinitionSize662),
(&g_typeDefinitionSize663),
(&g_typeDefinitionSize664),
(&g_typeDefinitionSize665),
(&g_typeDefinitionSize666),
(&g_typeDefinitionSize667),
(&g_typeDefinitionSize668),
(&g_typeDefinitionSize669),
(&g_typeDefinitionSize670),
(&g_typeDefinitionSize671),
(&g_typeDefinitionSize672),
(&g_typeDefinitionSize673),
(&g_typeDefinitionSize674),
(&g_typeDefinitionSize675),
(&g_typeDefinitionSize676),
(&g_typeDefinitionSize677),
(&g_typeDefinitionSize678),
(&g_typeDefinitionSize679),
(&g_typeDefinitionSize680),
(&g_typeDefinitionSize681),
(&g_typeDefinitionSize682),
(&g_typeDefinitionSize683),
(&g_typeDefinitionSize684),
(&g_typeDefinitionSize685),
(&g_typeDefinitionSize686),
(&g_typeDefinitionSize687),
(&g_typeDefinitionSize688),
(&g_typeDefinitionSize689),
(&g_typeDefinitionSize690),
(&g_typeDefinitionSize691),
(&g_typeDefinitionSize692),
(&g_typeDefinitionSize693),
(&g_typeDefinitionSize694),
(&g_typeDefinitionSize695),
(&g_typeDefinitionSize696),
(&g_typeDefinitionSize697),
(&g_typeDefinitionSize698),
(&g_typeDefinitionSize699),
(&g_typeDefinitionSize700),
(&g_typeDefinitionSize701),
(&g_typeDefinitionSize702),
(&g_typeDefinitionSize703),
(&g_typeDefinitionSize704),
(&g_typeDefinitionSize705),
(&g_typeDefinitionSize706),
(&g_typeDefinitionSize707),
(&g_typeDefinitionSize708),
(&g_typeDefinitionSize709),
(&g_typeDefinitionSize710),
(&g_typeDefinitionSize711),
(&g_typeDefinitionSize712),
(&g_typeDefinitionSize713),
(&g_typeDefinitionSize714),
(&g_typeDefinitionSize715),
(&g_typeDefinitionSize716),
(&g_typeDefinitionSize717),
(&g_typeDefinitionSize718),
(&g_typeDefinitionSize719),
(&g_typeDefinitionSize720),
(&g_typeDefinitionSize721),
(&g_typeDefinitionSize722),
(&g_typeDefinitionSize723),
(&g_typeDefinitionSize724),
(&g_typeDefinitionSize725),
(&g_typeDefinitionSize726),
(&g_typeDefinitionSize727),
(&g_typeDefinitionSize728),
(&g_typeDefinitionSize729),
(&g_typeDefinitionSize730),
(&g_typeDefinitionSize731),
(&g_typeDefinitionSize732),
(&g_typeDefinitionSize733),
(&g_typeDefinitionSize734),
(&g_typeDefinitionSize735),
(&g_typeDefinitionSize736),
(&g_typeDefinitionSize737),
(&g_typeDefinitionSize738),
(&g_typeDefinitionSize739),
(&g_typeDefinitionSize740),
(&g_typeDefinitionSize741),
(&g_typeDefinitionSize742),
(&g_typeDefinitionSize743),
(&g_typeDefinitionSize744),
(&g_typeDefinitionSize745),
(&g_typeDefinitionSize746),
(&g_typeDefinitionSize747),
(&g_typeDefinitionSize748),
(&g_typeDefinitionSize749),
(&g_typeDefinitionSize750),
(&g_typeDefinitionSize751),
(&g_typeDefinitionSize752),
(&g_typeDefinitionSize753),
(&g_typeDefinitionSize754),
(&g_typeDefinitionSize755),
(&g_typeDefinitionSize756),
(&g_typeDefinitionSize757),
(&g_typeDefinitionSize758),
(&g_typeDefinitionSize759),
(&g_typeDefinitionSize760),
(&g_typeDefinitionSize761),
(&g_typeDefinitionSize762),
(&g_typeDefinitionSize763),
(&g_typeDefinitionSize764),
(&g_typeDefinitionSize765),
(&g_typeDefinitionSize766),
(&g_typeDefinitionSize767),
(&g_typeDefinitionSize768),
(&g_typeDefinitionSize769),
(&g_typeDefinitionSize770),
(&g_typeDefinitionSize771),
(&g_typeDefinitionSize772),
(&g_typeDefinitionSize773),
(&g_typeDefinitionSize774),
(&g_typeDefinitionSize775),
(&g_typeDefinitionSize776),
(&g_typeDefinitionSize777),
(&g_typeDefinitionSize778),
(&g_typeDefinitionSize779),
(&g_typeDefinitionSize780),
(&g_typeDefinitionSize781),
(&g_typeDefinitionSize782),
(&g_typeDefinitionSize783),
(&g_typeDefinitionSize784),
(&g_typeDefinitionSize785),
(&g_typeDefinitionSize786),
(&g_typeDefinitionSize787),
(&g_typeDefinitionSize788),
(&g_typeDefinitionSize789),
(&g_typeDefinitionSize790),
(&g_typeDefinitionSize791),
(&g_typeDefinitionSize792),
(&g_typeDefinitionSize793),
(&g_typeDefinitionSize794),
(&g_typeDefinitionSize795),
(&g_typeDefinitionSize796),
(&g_typeDefinitionSize797),
(&g_typeDefinitionSize798),
(&g_typeDefinitionSize799),
(&g_typeDefinitionSize800),
(&g_typeDefinitionSize801),
(&g_typeDefinitionSize802),
(&g_typeDefinitionSize803),
(&g_typeDefinitionSize804),
(&g_typeDefinitionSize805),
(&g_typeDefinitionSize806),
(&g_typeDefinitionSize807),
(&g_typeDefinitionSize808),
(&g_typeDefinitionSize809),
(&g_typeDefinitionSize810),
(&g_typeDefinitionSize811),
(&g_typeDefinitionSize812),
(&g_typeDefinitionSize813),
(&g_typeDefinitionSize814),
(&g_typeDefinitionSize815),
(&g_typeDefinitionSize816),
(&g_typeDefinitionSize817),
(&g_typeDefinitionSize818),
(&g_typeDefinitionSize819),
(&g_typeDefinitionSize820),
(&g_typeDefinitionSize821),
(&g_typeDefinitionSize822),
(&g_typeDefinitionSize823),
(&g_typeDefinitionSize824),
(&g_typeDefinitionSize825),
(&g_typeDefinitionSize826),
(&g_typeDefinitionSize827),
(&g_typeDefinitionSize828),
(&g_typeDefinitionSize829),
(&g_typeDefinitionSize830),
(&g_typeDefinitionSize831),
(&g_typeDefinitionSize832),
(&g_typeDefinitionSize833),
(&g_typeDefinitionSize834),
(&g_typeDefinitionSize835),
(&g_typeDefinitionSize836),
(&g_typeDefinitionSize837),
(&g_typeDefinitionSize838),
(&g_typeDefinitionSize839),
(&g_typeDefinitionSize840),
(&g_typeDefinitionSize841),
(&g_typeDefinitionSize842),
(&g_typeDefinitionSize843),
(&g_typeDefinitionSize844),
(&g_typeDefinitionSize845),
(&g_typeDefinitionSize846),
(&g_typeDefinitionSize847),
(&g_typeDefinitionSize848),
(&g_typeDefinitionSize849),
(&g_typeDefinitionSize850),
(&g_typeDefinitionSize851),
(&g_typeDefinitionSize852),
(&g_typeDefinitionSize853),
(&g_typeDefinitionSize854),
(&g_typeDefinitionSize855),
(&g_typeDefinitionSize856),
(&g_typeDefinitionSize857),
(&g_typeDefinitionSize858),
(&g_typeDefinitionSize859),
(&g_typeDefinitionSize860),
(&g_typeDefinitionSize861),
(&g_typeDefinitionSize862),
(&g_typeDefinitionSize863),
(&g_typeDefinitionSize864),
(&g_typeDefinitionSize865),
(&g_typeDefinitionSize866),
(&g_typeDefinitionSize867),
(&g_typeDefinitionSize868),
(&g_typeDefinitionSize869),
(&g_typeDefinitionSize870),
(&g_typeDefinitionSize871),
(&g_typeDefinitionSize872),
(&g_typeDefinitionSize873),
(&g_typeDefinitionSize874),
(&g_typeDefinitionSize875),
(&g_typeDefinitionSize876),
(&g_typeDefinitionSize877),
(&g_typeDefinitionSize878),
(&g_typeDefinitionSize879),
(&g_typeDefinitionSize880),
(&g_typeDefinitionSize881),
(&g_typeDefinitionSize882),
(&g_typeDefinitionSize883),
(&g_typeDefinitionSize884),
(&g_typeDefinitionSize885),
(&g_typeDefinitionSize886),
(&g_typeDefinitionSize887),
(&g_typeDefinitionSize888),
(&g_typeDefinitionSize889),
(&g_typeDefinitionSize890),
(&g_typeDefinitionSize891),
(&g_typeDefinitionSize892),
(&g_typeDefinitionSize893),
(&g_typeDefinitionSize894),
(&g_typeDefinitionSize895),
(&g_typeDefinitionSize896),
(&g_typeDefinitionSize897),
(&g_typeDefinitionSize898),
(&g_typeDefinitionSize899),
(&g_typeDefinitionSize900),
(&g_typeDefinitionSize901),
(&g_typeDefinitionSize902),
(&g_typeDefinitionSize903),
(&g_typeDefinitionSize904),
(&g_typeDefinitionSize905),
(&g_typeDefinitionSize906),
(&g_typeDefinitionSize907),
(&g_typeDefinitionSize908),
(&g_typeDefinitionSize909),
(&g_typeDefinitionSize910),
(&g_typeDefinitionSize911),
(&g_typeDefinitionSize912),
(&g_typeDefinitionSize913),
(&g_typeDefinitionSize914),
(&g_typeDefinitionSize915),
(&g_typeDefinitionSize916),
(&g_typeDefinitionSize917),
(&g_typeDefinitionSize918),
(&g_typeDefinitionSize919),
(&g_typeDefinitionSize920),
(&g_typeDefinitionSize921),
(&g_typeDefinitionSize922),
(&g_typeDefinitionSize923),
(&g_typeDefinitionSize924),
(&g_typeDefinitionSize925),
(&g_typeDefinitionSize926),
(&g_typeDefinitionSize927),
(&g_typeDefinitionSize928),
(&g_typeDefinitionSize929),
(&g_typeDefinitionSize930),
(&g_typeDefinitionSize931),
(&g_typeDefinitionSize932),
(&g_typeDefinitionSize933),
(&g_typeDefinitionSize934),
(&g_typeDefinitionSize935),
(&g_typeDefinitionSize936),
(&g_typeDefinitionSize937),
(&g_typeDefinitionSize938),
(&g_typeDefinitionSize939),
(&g_typeDefinitionSize940),
(&g_typeDefinitionSize941),
(&g_typeDefinitionSize942),
(&g_typeDefinitionSize943),
(&g_typeDefinitionSize944),
(&g_typeDefinitionSize945),
(&g_typeDefinitionSize946),
(&g_typeDefinitionSize947),
(&g_typeDefinitionSize948),
(&g_typeDefinitionSize949),
(&g_typeDefinitionSize950),
(&g_typeDefinitionSize951),
(&g_typeDefinitionSize952),
(&g_typeDefinitionSize953),
(&g_typeDefinitionSize954),
(&g_typeDefinitionSize955),
(&g_typeDefinitionSize956),
(&g_typeDefinitionSize957),
(&g_typeDefinitionSize958),
(&g_typeDefinitionSize959),
(&g_typeDefinitionSize960),
(&g_typeDefinitionSize961),
(&g_typeDefinitionSize962),
(&g_typeDefinitionSize963),
(&g_typeDefinitionSize964),
(&g_typeDefinitionSize965),
(&g_typeDefinitionSize966),
(&g_typeDefinitionSize967),
(&g_typeDefinitionSize968),
(&g_typeDefinitionSize969),
(&g_typeDefinitionSize970),
(&g_typeDefinitionSize971),
(&g_typeDefinitionSize972),
(&g_typeDefinitionSize973),
(&g_typeDefinitionSize974),
(&g_typeDefinitionSize975),
(&g_typeDefinitionSize976),
(&g_typeDefinitionSize977),
(&g_typeDefinitionSize978),
(&g_typeDefinitionSize979),
(&g_typeDefinitionSize980),
(&g_typeDefinitionSize981),
(&g_typeDefinitionSize982),
(&g_typeDefinitionSize983),
(&g_typeDefinitionSize984),
(&g_typeDefinitionSize985),
(&g_typeDefinitionSize986),
(&g_typeDefinitionSize987),
(&g_typeDefinitionSize988),
(&g_typeDefinitionSize989),
(&g_typeDefinitionSize990),
(&g_typeDefinitionSize991),
(&g_typeDefinitionSize992),
(&g_typeDefinitionSize993),
(&g_typeDefinitionSize994),
(&g_typeDefinitionSize995),
(&g_typeDefinitionSize996),
(&g_typeDefinitionSize997),
(&g_typeDefinitionSize998),
(&g_typeDefinitionSize999),
(&g_typeDefinitionSize1000),
(&g_typeDefinitionSize1001),
(&g_typeDefinitionSize1002),
(&g_typeDefinitionSize1003),
(&g_typeDefinitionSize1004),
(&g_typeDefinitionSize1005),
(&g_typeDefinitionSize1006),
(&g_typeDefinitionSize1007),
(&g_typeDefinitionSize1008),
(&g_typeDefinitionSize1009),
(&g_typeDefinitionSize1010),
(&g_typeDefinitionSize1011),
(&g_typeDefinitionSize1012),
(&g_typeDefinitionSize1013),
(&g_typeDefinitionSize1014),
(&g_typeDefinitionSize1015),
(&g_typeDefinitionSize1016),
(&g_typeDefinitionSize1017),
(&g_typeDefinitionSize1018),
(&g_typeDefinitionSize1019),
(&g_typeDefinitionSize1020),
(&g_typeDefinitionSize1021),
(&g_typeDefinitionSize1022),
(&g_typeDefinitionSize1023),
(&g_typeDefinitionSize1024),
(&g_typeDefinitionSize1025),
(&g_typeDefinitionSize1026),
(&g_typeDefinitionSize1027),
(&g_typeDefinitionSize1028),
(&g_typeDefinitionSize1029),
(&g_typeDefinitionSize1030),
(&g_typeDefinitionSize1031),
(&g_typeDefinitionSize1032),
(&g_typeDefinitionSize1033),
(&g_typeDefinitionSize1034),
(&g_typeDefinitionSize1035),
(&g_typeDefinitionSize1036),
(&g_typeDefinitionSize1037),
(&g_typeDefinitionSize1038),
(&g_typeDefinitionSize1039),
(&g_typeDefinitionSize1040),
(&g_typeDefinitionSize1041),
(&g_typeDefinitionSize1042),
(&g_typeDefinitionSize1043),
(&g_typeDefinitionSize1044),
(&g_typeDefinitionSize1045),
(&g_typeDefinitionSize1046),
(&g_typeDefinitionSize1047),
(&g_typeDefinitionSize1048),
(&g_typeDefinitionSize1049),
(&g_typeDefinitionSize1050),
(&g_typeDefinitionSize1051),
(&g_typeDefinitionSize1052),
(&g_typeDefinitionSize1053),
(&g_typeDefinitionSize1054),
(&g_typeDefinitionSize1055),
(&g_typeDefinitionSize1056),
(&g_typeDefinitionSize1057),
(&g_typeDefinitionSize1058),
(&g_typeDefinitionSize1059),
(&g_typeDefinitionSize1060),
(&g_typeDefinitionSize1061),
(&g_typeDefinitionSize1062),
(&g_typeDefinitionSize1063),
(&g_typeDefinitionSize1064),
(&g_typeDefinitionSize1065),
(&g_typeDefinitionSize1066),
(&g_typeDefinitionSize1067),
(&g_typeDefinitionSize1068),
(&g_typeDefinitionSize1069),
(&g_typeDefinitionSize1070),
(&g_typeDefinitionSize1071),
(&g_typeDefinitionSize1072),
(&g_typeDefinitionSize1073),
(&g_typeDefinitionSize1074),
(&g_typeDefinitionSize1075),
(&g_typeDefinitionSize1076),
(&g_typeDefinitionSize1077),
(&g_typeDefinitionSize1078),
(&g_typeDefinitionSize1079),
(&g_typeDefinitionSize1080),
(&g_typeDefinitionSize1081),
(&g_typeDefinitionSize1082),
(&g_typeDefinitionSize1083),
(&g_typeDefinitionSize1084),
(&g_typeDefinitionSize1085),
(&g_typeDefinitionSize1086),
(&g_typeDefinitionSize1087),
(&g_typeDefinitionSize1088),
(&g_typeDefinitionSize1089),
(&g_typeDefinitionSize1090),
(&g_typeDefinitionSize1091),
(&g_typeDefinitionSize1092),
(&g_typeDefinitionSize1093),
(&g_typeDefinitionSize1094),
(&g_typeDefinitionSize1095),
(&g_typeDefinitionSize1096),
(&g_typeDefinitionSize1097),
(&g_typeDefinitionSize1098),
(&g_typeDefinitionSize1099),
(&g_typeDefinitionSize1100),
(&g_typeDefinitionSize1101),
(&g_typeDefinitionSize1102),
(&g_typeDefinitionSize1103),
(&g_typeDefinitionSize1104),
(&g_typeDefinitionSize1105),
(&g_typeDefinitionSize1106),
(&g_typeDefinitionSize1107),
(&g_typeDefinitionSize1108),
(&g_typeDefinitionSize1109),
(&g_typeDefinitionSize1110),
(&g_typeDefinitionSize1111),
(&g_typeDefinitionSize1112),
(&g_typeDefinitionSize1113),
(&g_typeDefinitionSize1114),
(&g_typeDefinitionSize1115),
(&g_typeDefinitionSize1116),
(&g_typeDefinitionSize1117),
(&g_typeDefinitionSize1118),
(&g_typeDefinitionSize1119),
(&g_typeDefinitionSize1120),
(&g_typeDefinitionSize1121),
(&g_typeDefinitionSize1122),
(&g_typeDefinitionSize1123),
(&g_typeDefinitionSize1124),
(&g_typeDefinitionSize1125),
(&g_typeDefinitionSize1126),
(&g_typeDefinitionSize1127),
(&g_typeDefinitionSize1128),
(&g_typeDefinitionSize1129),
(&g_typeDefinitionSize1130),
(&g_typeDefinitionSize1131),
(&g_typeDefinitionSize1132),
(&g_typeDefinitionSize1133),
(&g_typeDefinitionSize1134),
(&g_typeDefinitionSize1135),
(&g_typeDefinitionSize1136),
(&g_typeDefinitionSize1137),
(&g_typeDefinitionSize1138),
(&g_typeDefinitionSize1139),
(&g_typeDefinitionSize1140),
(&g_typeDefinitionSize1141),
(&g_typeDefinitionSize1142),
(&g_typeDefinitionSize1143),
(&g_typeDefinitionSize1144),
(&g_typeDefinitionSize1145),
(&g_typeDefinitionSize1146),
(&g_typeDefinitionSize1147),
(&g_typeDefinitionSize1148),
(&g_typeDefinitionSize1149),
(&g_typeDefinitionSize1150),
(&g_typeDefinitionSize1151),
(&g_typeDefinitionSize1152),
(&g_typeDefinitionSize1153),
(&g_typeDefinitionSize1154),
(&g_typeDefinitionSize1155),
(&g_typeDefinitionSize1156),
(&g_typeDefinitionSize1157),
(&g_typeDefinitionSize1158),
(&g_typeDefinitionSize1159),
(&g_typeDefinitionSize1160),
(&g_typeDefinitionSize1161),
(&g_typeDefinitionSize1162),
(&g_typeDefinitionSize1163),
(&g_typeDefinitionSize1164),
(&g_typeDefinitionSize1165),
(&g_typeDefinitionSize1166),
(&g_typeDefinitionSize1167),
(&g_typeDefinitionSize1168),
(&g_typeDefinitionSize1169),
(&g_typeDefinitionSize1170),
(&g_typeDefinitionSize1171),
(&g_typeDefinitionSize1172),
(&g_typeDefinitionSize1173),
(&g_typeDefinitionSize1174),
(&g_typeDefinitionSize1175),
(&g_typeDefinitionSize1176),
(&g_typeDefinitionSize1177),
(&g_typeDefinitionSize1178),
(&g_typeDefinitionSize1179),
(&g_typeDefinitionSize1180),
(&g_typeDefinitionSize1181),
(&g_typeDefinitionSize1182),
(&g_typeDefinitionSize1183),
(&g_typeDefinitionSize1184),
(&g_typeDefinitionSize1185),
(&g_typeDefinitionSize1186),
(&g_typeDefinitionSize1187),
(&g_typeDefinitionSize1188),
(&g_typeDefinitionSize1189),
(&g_typeDefinitionSize1190),
(&g_typeDefinitionSize1191),
(&g_typeDefinitionSize1192),
(&g_typeDefinitionSize1193),
(&g_typeDefinitionSize1194),
(&g_typeDefinitionSize1195),
(&g_typeDefinitionSize1196),
(&g_typeDefinitionSize1197),
(&g_typeDefinitionSize1198),
(&g_typeDefinitionSize1199),
(&g_typeDefinitionSize1200),
(&g_typeDefinitionSize1201),
(&g_typeDefinitionSize1202),
(&g_typeDefinitionSize1203),
(&g_typeDefinitionSize1204),
(&g_typeDefinitionSize1205),
(&g_typeDefinitionSize1206),
(&g_typeDefinitionSize1207),
(&g_typeDefinitionSize1208),
(&g_typeDefinitionSize1209),
(&g_typeDefinitionSize1210),
(&g_typeDefinitionSize1211),
(&g_typeDefinitionSize1212),
(&g_typeDefinitionSize1213),
(&g_typeDefinitionSize1214),
(&g_typeDefinitionSize1215),
(&g_typeDefinitionSize1216),
(&g_typeDefinitionSize1217),
(&g_typeDefinitionSize1218),
(&g_typeDefinitionSize1219),
(&g_typeDefinitionSize1220),
(&g_typeDefinitionSize1221),
(&g_typeDefinitionSize1222),
(&g_typeDefinitionSize1223),
(&g_typeDefinitionSize1224),
(&g_typeDefinitionSize1225),
(&g_typeDefinitionSize1226),
(&g_typeDefinitionSize1227),
(&g_typeDefinitionSize1228),
(&g_typeDefinitionSize1229),
(&g_typeDefinitionSize1230),
(&g_typeDefinitionSize1231),
(&g_typeDefinitionSize1232),
(&g_typeDefinitionSize1233),
(&g_typeDefinitionSize1234),
(&g_typeDefinitionSize1235),
(&g_typeDefinitionSize1236),
(&g_typeDefinitionSize1237),
(&g_typeDefinitionSize1238),
(&g_typeDefinitionSize1239),
(&g_typeDefinitionSize1240),
(&g_typeDefinitionSize1241),
(&g_typeDefinitionSize1242),
(&g_typeDefinitionSize1243),
(&g_typeDefinitionSize1244),
(&g_typeDefinitionSize1245),
(&g_typeDefinitionSize1246),
(&g_typeDefinitionSize1247),
(&g_typeDefinitionSize1248),
(&g_typeDefinitionSize1249),
(&g_typeDefinitionSize1250),
(&g_typeDefinitionSize1251),
(&g_typeDefinitionSize1252),
(&g_typeDefinitionSize1253),
(&g_typeDefinitionSize1254),
(&g_typeDefinitionSize1255),
(&g_typeDefinitionSize1256),
(&g_typeDefinitionSize1257),
(&g_typeDefinitionSize1258),
(&g_typeDefinitionSize1259),
(&g_typeDefinitionSize1260),
(&g_typeDefinitionSize1261),
(&g_typeDefinitionSize1262),
(&g_typeDefinitionSize1263),
(&g_typeDefinitionSize1264),
(&g_typeDefinitionSize1265),
(&g_typeDefinitionSize1266),
(&g_typeDefinitionSize1267),
(&g_typeDefinitionSize1268),
(&g_typeDefinitionSize1269),
(&g_typeDefinitionSize1270),
(&g_typeDefinitionSize1271),
(&g_typeDefinitionSize1272),
(&g_typeDefinitionSize1273),
(&g_typeDefinitionSize1274),
(&g_typeDefinitionSize1275),
(&g_typeDefinitionSize1276),
(&g_typeDefinitionSize1277),
(&g_typeDefinitionSize1278),
(&g_typeDefinitionSize1279),
(&g_typeDefinitionSize1280),
(&g_typeDefinitionSize1281),
(&g_typeDefinitionSize1282),
(&g_typeDefinitionSize1283),
(&g_typeDefinitionSize1284),
(&g_typeDefinitionSize1285),
(&g_typeDefinitionSize1286),
(&g_typeDefinitionSize1287),
(&g_typeDefinitionSize1288),
(&g_typeDefinitionSize1289),
(&g_typeDefinitionSize1290),
(&g_typeDefinitionSize1291),
(&g_typeDefinitionSize1292),
(&g_typeDefinitionSize1293),
(&g_typeDefinitionSize1294),
(&g_typeDefinitionSize1295),
(&g_typeDefinitionSize1296),
(&g_typeDefinitionSize1297),
(&g_typeDefinitionSize1298),
(&g_typeDefinitionSize1299),
(&g_typeDefinitionSize1300),
(&g_typeDefinitionSize1301),
(&g_typeDefinitionSize1302),
(&g_typeDefinitionSize1303),
(&g_typeDefinitionSize1304),
(&g_typeDefinitionSize1305),
(&g_typeDefinitionSize1306),
(&g_typeDefinitionSize1307),
(&g_typeDefinitionSize1308),
(&g_typeDefinitionSize1309),
(&g_typeDefinitionSize1310),
(&g_typeDefinitionSize1311),
(&g_typeDefinitionSize1312),
(&g_typeDefinitionSize1313),
(&g_typeDefinitionSize1314),
(&g_typeDefinitionSize1315),
(&g_typeDefinitionSize1316),
(&g_typeDefinitionSize1317),
(&g_typeDefinitionSize1318),
(&g_typeDefinitionSize1319),
(&g_typeDefinitionSize1320),
(&g_typeDefinitionSize1321),
(&g_typeDefinitionSize1322),
(&g_typeDefinitionSize1323),
(&g_typeDefinitionSize1324),
(&g_typeDefinitionSize1325),
(&g_typeDefinitionSize1326),
(&g_typeDefinitionSize1327),
(&g_typeDefinitionSize1328),
(&g_typeDefinitionSize1329),
(&g_typeDefinitionSize1330),
(&g_typeDefinitionSize1331),
(&g_typeDefinitionSize1332),
(&g_typeDefinitionSize1333),
(&g_typeDefinitionSize1334),
(&g_typeDefinitionSize1335),
(&g_typeDefinitionSize1336),
(&g_typeDefinitionSize1337),
(&g_typeDefinitionSize1338),
(&g_typeDefinitionSize1339),
(&g_typeDefinitionSize1340),
(&g_typeDefinitionSize1341),
(&g_typeDefinitionSize1342),
(&g_typeDefinitionSize1343),
(&g_typeDefinitionSize1344),
(&g_typeDefinitionSize1345),
(&g_typeDefinitionSize1346),
(&g_typeDefinitionSize1347),
(&g_typeDefinitionSize1348),
(&g_typeDefinitionSize1349),
(&g_typeDefinitionSize1350),
(&g_typeDefinitionSize1351),
(&g_typeDefinitionSize1352),
(&g_typeDefinitionSize1353),
(&g_typeDefinitionSize1354),
(&g_typeDefinitionSize1355),
(&g_typeDefinitionSize1356),
(&g_typeDefinitionSize1357),
(&g_typeDefinitionSize1358),
(&g_typeDefinitionSize1359),
(&g_typeDefinitionSize1360),
(&g_typeDefinitionSize1361),
(&g_typeDefinitionSize1362),
(&g_typeDefinitionSize1363),
(&g_typeDefinitionSize1364),
(&g_typeDefinitionSize1365),
(&g_typeDefinitionSize1366),
(&g_typeDefinitionSize1367),
(&g_typeDefinitionSize1368),
(&g_typeDefinitionSize1369),
(&g_typeDefinitionSize1370),
(&g_typeDefinitionSize1371),
(&g_typeDefinitionSize1372),
(&g_typeDefinitionSize1373),
(&g_typeDefinitionSize1374),
(&g_typeDefinitionSize1375),
(&g_typeDefinitionSize1376),
(&g_typeDefinitionSize1377),
(&g_typeDefinitionSize1378),
(&g_typeDefinitionSize1379),
(&g_typeDefinitionSize1380),
(&g_typeDefinitionSize1381),
(&g_typeDefinitionSize1382),
(&g_typeDefinitionSize1383),
(&g_typeDefinitionSize1384),
(&g_typeDefinitionSize1385),
(&g_typeDefinitionSize1386),
(&g_typeDefinitionSize1387),
(&g_typeDefinitionSize1388),
(&g_typeDefinitionSize1389),
(&g_typeDefinitionSize1390),
(&g_typeDefinitionSize1391),
(&g_typeDefinitionSize1392),
(&g_typeDefinitionSize1393),
(&g_typeDefinitionSize1394),
(&g_typeDefinitionSize1395),
(&g_typeDefinitionSize1396),
(&g_typeDefinitionSize1397),
(&g_typeDefinitionSize1398),
(&g_typeDefinitionSize1399),
(&g_typeDefinitionSize1400),
(&g_typeDefinitionSize1401),
(&g_typeDefinitionSize1402),
(&g_typeDefinitionSize1403),
(&g_typeDefinitionSize1404),
(&g_typeDefinitionSize1405),
(&g_typeDefinitionSize1406),
(&g_typeDefinitionSize1407),
(&g_typeDefinitionSize1408),
(&g_typeDefinitionSize1409),
(&g_typeDefinitionSize1410),
(&g_typeDefinitionSize1411),
(&g_typeDefinitionSize1412),
(&g_typeDefinitionSize1413),
(&g_typeDefinitionSize1414),
(&g_typeDefinitionSize1415),
(&g_typeDefinitionSize1416),
(&g_typeDefinitionSize1417),
(&g_typeDefinitionSize1418),
(&g_typeDefinitionSize1419),
(&g_typeDefinitionSize1420),
(&g_typeDefinitionSize1421),
(&g_typeDefinitionSize1422),
(&g_typeDefinitionSize1423),
(&g_typeDefinitionSize1424),
(&g_typeDefinitionSize1425),
(&g_typeDefinitionSize1426),
(&g_typeDefinitionSize1427),
(&g_typeDefinitionSize1428),
(&g_typeDefinitionSize1429),
(&g_typeDefinitionSize1430),
(&g_typeDefinitionSize1431),
(&g_typeDefinitionSize1432),
(&g_typeDefinitionSize1433),
(&g_typeDefinitionSize1434),
(&g_typeDefinitionSize1435),
(&g_typeDefinitionSize1436),
(&g_typeDefinitionSize1437),
(&g_typeDefinitionSize1438),
(&g_typeDefinitionSize1439),
(&g_typeDefinitionSize1440),
(&g_typeDefinitionSize1441),
(&g_typeDefinitionSize1442),
(&g_typeDefinitionSize1443),
(&g_typeDefinitionSize1444),
(&g_typeDefinitionSize1445),
(&g_typeDefinitionSize1446),
(&g_typeDefinitionSize1447),
(&g_typeDefinitionSize1448),
(&g_typeDefinitionSize1449),
(&g_typeDefinitionSize1450),
(&g_typeDefinitionSize1451),
(&g_typeDefinitionSize1452),
(&g_typeDefinitionSize1453),
(&g_typeDefinitionSize1454),
(&g_typeDefinitionSize1455),
(&g_typeDefinitionSize1456),
(&g_typeDefinitionSize1457),
(&g_typeDefinitionSize1458),
(&g_typeDefinitionSize1459),
(&g_typeDefinitionSize1460),
(&g_typeDefinitionSize1461),
(&g_typeDefinitionSize1462),
(&g_typeDefinitionSize1463),
(&g_typeDefinitionSize1464),
(&g_typeDefinitionSize1465),
(&g_typeDefinitionSize1466),
(&g_typeDefinitionSize1467),
(&g_typeDefinitionSize1468),
(&g_typeDefinitionSize1469),
(&g_typeDefinitionSize1470),
(&g_typeDefinitionSize1471),
(&g_typeDefinitionSize1472),
(&g_typeDefinitionSize1473),
(&g_typeDefinitionSize1474),
(&g_typeDefinitionSize1475),
(&g_typeDefinitionSize1476),
(&g_typeDefinitionSize1477),
(&g_typeDefinitionSize1478),
(&g_typeDefinitionSize1479),
(&g_typeDefinitionSize1480),
(&g_typeDefinitionSize1481),
(&g_typeDefinitionSize1482),
(&g_typeDefinitionSize1483),
(&g_typeDefinitionSize1484),
(&g_typeDefinitionSize1485),
(&g_typeDefinitionSize1486),
(&g_typeDefinitionSize1487),
(&g_typeDefinitionSize1488),
(&g_typeDefinitionSize1489),
(&g_typeDefinitionSize1490),
(&g_typeDefinitionSize1491),
(&g_typeDefinitionSize1492),
(&g_typeDefinitionSize1493),
(&g_typeDefinitionSize1494),
(&g_typeDefinitionSize1495),
(&g_typeDefinitionSize1496),
(&g_typeDefinitionSize1497),
(&g_typeDefinitionSize1498),
(&g_typeDefinitionSize1499),
(&g_typeDefinitionSize1500),
(&g_typeDefinitionSize1501),
(&g_typeDefinitionSize1502),
(&g_typeDefinitionSize1503),
(&g_typeDefinitionSize1504),
(&g_typeDefinitionSize1505),
(&g_typeDefinitionSize1506),
(&g_typeDefinitionSize1507),
(&g_typeDefinitionSize1508),
(&g_typeDefinitionSize1509),
(&g_typeDefinitionSize1510),
(&g_typeDefinitionSize1511),
(&g_typeDefinitionSize1512),
(&g_typeDefinitionSize1513),
(&g_typeDefinitionSize1514),
(&g_typeDefinitionSize1515),
(&g_typeDefinitionSize1516),
(&g_typeDefinitionSize1517),
(&g_typeDefinitionSize1518),
(&g_typeDefinitionSize1519),
(&g_typeDefinitionSize1520),
(&g_typeDefinitionSize1521),
(&g_typeDefinitionSize1522),
(&g_typeDefinitionSize1523),
(&g_typeDefinitionSize1524),
(&g_typeDefinitionSize1525),
(&g_typeDefinitionSize1526),
(&g_typeDefinitionSize1527),
(&g_typeDefinitionSize1528),
(&g_typeDefinitionSize1529),
(&g_typeDefinitionSize1530),
(&g_typeDefinitionSize1531),
(&g_typeDefinitionSize1532),
(&g_typeDefinitionSize1533),
(&g_typeDefinitionSize1534),
(&g_typeDefinitionSize1535),
(&g_typeDefinitionSize1536),
(&g_typeDefinitionSize1537),
(&g_typeDefinitionSize1538),
(&g_typeDefinitionSize1539),
(&g_typeDefinitionSize1540),
(&g_typeDefinitionSize1541),
(&g_typeDefinitionSize1542),
(&g_typeDefinitionSize1543),
(&g_typeDefinitionSize1544),
(&g_typeDefinitionSize1545),
(&g_typeDefinitionSize1546),
(&g_typeDefinitionSize1547),
(&g_typeDefinitionSize1548),
(&g_typeDefinitionSize1549),
(&g_typeDefinitionSize1550),
(&g_typeDefinitionSize1551),
(&g_typeDefinitionSize1552),
(&g_typeDefinitionSize1553),
(&g_typeDefinitionSize1554),
(&g_typeDefinitionSize1555),
(&g_typeDefinitionSize1556),
(&g_typeDefinitionSize1557),
(&g_typeDefinitionSize1558),
(&g_typeDefinitionSize1559),
(&g_typeDefinitionSize1560),
(&g_typeDefinitionSize1561),
(&g_typeDefinitionSize1562),
(&g_typeDefinitionSize1563),
(&g_typeDefinitionSize1564),
(&g_typeDefinitionSize1565),
(&g_typeDefinitionSize1566),
(&g_typeDefinitionSize1567),
(&g_typeDefinitionSize1568),
(&g_typeDefinitionSize1569),
(&g_typeDefinitionSize1570),
(&g_typeDefinitionSize1571),
(&g_typeDefinitionSize1572),
(&g_typeDefinitionSize1573),
(&g_typeDefinitionSize1574),
(&g_typeDefinitionSize1575),
(&g_typeDefinitionSize1576),
(&g_typeDefinitionSize1577),
(&g_typeDefinitionSize1578),
(&g_typeDefinitionSize1579),
(&g_typeDefinitionSize1580),
(&g_typeDefinitionSize1581),
(&g_typeDefinitionSize1582),
(&g_typeDefinitionSize1583),
(&g_typeDefinitionSize1584),
(&g_typeDefinitionSize1585),
(&g_typeDefinitionSize1586),
(&g_typeDefinitionSize1587),
(&g_typeDefinitionSize1588),
(&g_typeDefinitionSize1589),
(&g_typeDefinitionSize1590),
(&g_typeDefinitionSize1591),
(&g_typeDefinitionSize1592),
(&g_typeDefinitionSize1593),
(&g_typeDefinitionSize1594),
(&g_typeDefinitionSize1595),
(&g_typeDefinitionSize1596),
(&g_typeDefinitionSize1597),
(&g_typeDefinitionSize1598),
(&g_typeDefinitionSize1599),
(&g_typeDefinitionSize1600),
(&g_typeDefinitionSize1601),
(&g_typeDefinitionSize1602),
(&g_typeDefinitionSize1603),
(&g_typeDefinitionSize1604),
(&g_typeDefinitionSize1605),
(&g_typeDefinitionSize1606),
(&g_typeDefinitionSize1607),
(&g_typeDefinitionSize1608),
(&g_typeDefinitionSize1609),
(&g_typeDefinitionSize1610),
(&g_typeDefinitionSize1611),
(&g_typeDefinitionSize1612),
(&g_typeDefinitionSize1613),
(&g_typeDefinitionSize1614),
(&g_typeDefinitionSize1615),
(&g_typeDefinitionSize1616),
(&g_typeDefinitionSize1617),
(&g_typeDefinitionSize1618),
(&g_typeDefinitionSize1619),
(&g_typeDefinitionSize1620),
(&g_typeDefinitionSize1621),
(&g_typeDefinitionSize1622),
(&g_typeDefinitionSize1623),
(&g_typeDefinitionSize1624),
(&g_typeDefinitionSize1625),
(&g_typeDefinitionSize1626),
(&g_typeDefinitionSize1627),
(&g_typeDefinitionSize1628),
(&g_typeDefinitionSize1629),
(&g_typeDefinitionSize1630),
(&g_typeDefinitionSize1631),
(&g_typeDefinitionSize1632),
(&g_typeDefinitionSize1633),
(&g_typeDefinitionSize1634),
(&g_typeDefinitionSize1635),
(&g_typeDefinitionSize1636),
(&g_typeDefinitionSize1637),
(&g_typeDefinitionSize1638),
(&g_typeDefinitionSize1639),
(&g_typeDefinitionSize1640),
(&g_typeDefinitionSize1641),
(&g_typeDefinitionSize1642),
(&g_typeDefinitionSize1643),
(&g_typeDefinitionSize1644),
(&g_typeDefinitionSize1645),
(&g_typeDefinitionSize1646),
(&g_typeDefinitionSize1647),
(&g_typeDefinitionSize1648),
(&g_typeDefinitionSize1649),
(&g_typeDefinitionSize1650),
(&g_typeDefinitionSize1651),
(&g_typeDefinitionSize1652),
(&g_typeDefinitionSize1653),
(&g_typeDefinitionSize1654),
(&g_typeDefinitionSize1655),
(&g_typeDefinitionSize1656),
(&g_typeDefinitionSize1657),
(&g_typeDefinitionSize1658),
(&g_typeDefinitionSize1659),
(&g_typeDefinitionSize1660),
(&g_typeDefinitionSize1661),
(&g_typeDefinitionSize1662),
(&g_typeDefinitionSize1663),
(&g_typeDefinitionSize1664),
(&g_typeDefinitionSize1665),
(&g_typeDefinitionSize1666),
(&g_typeDefinitionSize1667),
(&g_typeDefinitionSize1668),
(&g_typeDefinitionSize1669),
(&g_typeDefinitionSize1670),
(&g_typeDefinitionSize1671),
(&g_typeDefinitionSize1672),
(&g_typeDefinitionSize1673),
(&g_typeDefinitionSize1674),
(&g_typeDefinitionSize1675),
(&g_typeDefinitionSize1676),
(&g_typeDefinitionSize1677),
(&g_typeDefinitionSize1678),
(&g_typeDefinitionSize1679),
(&g_typeDefinitionSize1680),
(&g_typeDefinitionSize1681),
(&g_typeDefinitionSize1682),
(&g_typeDefinitionSize1683),
(&g_typeDefinitionSize1684),
(&g_typeDefinitionSize1685),
(&g_typeDefinitionSize1686),
(&g_typeDefinitionSize1687),
(&g_typeDefinitionSize1688),
(&g_typeDefinitionSize1689),
(&g_typeDefinitionSize1690),
(&g_typeDefinitionSize1691),
(&g_typeDefinitionSize1692),
(&g_typeDefinitionSize1693),
(&g_typeDefinitionSize1694),
(&g_typeDefinitionSize1695),
(&g_typeDefinitionSize1696),
(&g_typeDefinitionSize1697),
(&g_typeDefinitionSize1698),
(&g_typeDefinitionSize1699),
(&g_typeDefinitionSize1700),
(&g_typeDefinitionSize1701),
(&g_typeDefinitionSize1702),
(&g_typeDefinitionSize1703),
(&g_typeDefinitionSize1704),
(&g_typeDefinitionSize1705),
(&g_typeDefinitionSize1706),
(&g_typeDefinitionSize1707),
(&g_typeDefinitionSize1708),
(&g_typeDefinitionSize1709),
(&g_typeDefinitionSize1710),
(&g_typeDefinitionSize1711),
(&g_typeDefinitionSize1712),
(&g_typeDefinitionSize1713),
(&g_typeDefinitionSize1714),
(&g_typeDefinitionSize1715),
(&g_typeDefinitionSize1716),
(&g_typeDefinitionSize1717),
(&g_typeDefinitionSize1718),
(&g_typeDefinitionSize1719),
(&g_typeDefinitionSize1720),
(&g_typeDefinitionSize1721),
(&g_typeDefinitionSize1722),
(&g_typeDefinitionSize1723),
(&g_typeDefinitionSize1724),
(&g_typeDefinitionSize1725),
(&g_typeDefinitionSize1726),
(&g_typeDefinitionSize1727),
(&g_typeDefinitionSize1728),
(&g_typeDefinitionSize1729),
(&g_typeDefinitionSize1730),
(&g_typeDefinitionSize1731),
(&g_typeDefinitionSize1732),
(&g_typeDefinitionSize1733),
(&g_typeDefinitionSize1734),
(&g_typeDefinitionSize1735),
(&g_typeDefinitionSize1736),
(&g_typeDefinitionSize1737),
(&g_typeDefinitionSize1738),
(&g_typeDefinitionSize1739),
(&g_typeDefinitionSize1740),
(&g_typeDefinitionSize1741),
(&g_typeDefinitionSize1742),
(&g_typeDefinitionSize1743),
(&g_typeDefinitionSize1744),
(&g_typeDefinitionSize1745),
(&g_typeDefinitionSize1746),
(&g_typeDefinitionSize1747),
(&g_typeDefinitionSize1748),
(&g_typeDefinitionSize1749),
(&g_typeDefinitionSize1750),
(&g_typeDefinitionSize1751),
(&g_typeDefinitionSize1752),
(&g_typeDefinitionSize1753),
(&g_typeDefinitionSize1754),
(&g_typeDefinitionSize1755),
(&g_typeDefinitionSize1756),
(&g_typeDefinitionSize1757),
(&g_typeDefinitionSize1758),
(&g_typeDefinitionSize1759),
(&g_typeDefinitionSize1760),
(&g_typeDefinitionSize1761),
(&g_typeDefinitionSize1762),
(&g_typeDefinitionSize1763),
(&g_typeDefinitionSize1764),
(&g_typeDefinitionSize1765),
(&g_typeDefinitionSize1766),
(&g_typeDefinitionSize1767),
(&g_typeDefinitionSize1768),
(&g_typeDefinitionSize1769),
(&g_typeDefinitionSize1770),
(&g_typeDefinitionSize1771),
(&g_typeDefinitionSize1772),
(&g_typeDefinitionSize1773),
(&g_typeDefinitionSize1774),
(&g_typeDefinitionSize1775),
(&g_typeDefinitionSize1776),
(&g_typeDefinitionSize1777),
(&g_typeDefinitionSize1778),
(&g_typeDefinitionSize1779),
(&g_typeDefinitionSize1780),
(&g_typeDefinitionSize1781),
(&g_typeDefinitionSize1782),
(&g_typeDefinitionSize1783),
(&g_typeDefinitionSize1784),
(&g_typeDefinitionSize1785),
(&g_typeDefinitionSize1786),
(&g_typeDefinitionSize1787),
(&g_typeDefinitionSize1788),
(&g_typeDefinitionSize1789),
(&g_typeDefinitionSize1790),
(&g_typeDefinitionSize1791),
(&g_typeDefinitionSize1792),
(&g_typeDefinitionSize1793),
(&g_typeDefinitionSize1794),
(&g_typeDefinitionSize1795),
(&g_typeDefinitionSize1796),
(&g_typeDefinitionSize1797),
(&g_typeDefinitionSize1798),
(&g_typeDefinitionSize1799),
(&g_typeDefinitionSize1800),
(&g_typeDefinitionSize1801),
(&g_typeDefinitionSize1802),
(&g_typeDefinitionSize1803),
(&g_typeDefinitionSize1804),
(&g_typeDefinitionSize1805),
(&g_typeDefinitionSize1806),
(&g_typeDefinitionSize1807),
(&g_typeDefinitionSize1808),
(&g_typeDefinitionSize1809),
(&g_typeDefinitionSize1810),
(&g_typeDefinitionSize1811),
(&g_typeDefinitionSize1812),
(&g_typeDefinitionSize1813),
(&g_typeDefinitionSize1814),
(&g_typeDefinitionSize1815),
(&g_typeDefinitionSize1816),
(&g_typeDefinitionSize1817),
(&g_typeDefinitionSize1818),
(&g_typeDefinitionSize1819),
(&g_typeDefinitionSize1820),
(&g_typeDefinitionSize1821),
(&g_typeDefinitionSize1822),
(&g_typeDefinitionSize1823),
(&g_typeDefinitionSize1824),
(&g_typeDefinitionSize1825),
(&g_typeDefinitionSize1826),
(&g_typeDefinitionSize1827),
(&g_typeDefinitionSize1828),
(&g_typeDefinitionSize1829),
(&g_typeDefinitionSize1830),
(&g_typeDefinitionSize1831),
(&g_typeDefinitionSize1832),
(&g_typeDefinitionSize1833),
(&g_typeDefinitionSize1834),
(&g_typeDefinitionSize1835),
(&g_typeDefinitionSize1836),
(&g_typeDefinitionSize1837),
(&g_typeDefinitionSize1838),
(&g_typeDefinitionSize1839),
(&g_typeDefinitionSize1840),
(&g_typeDefinitionSize1841),
(&g_typeDefinitionSize1842),
(&g_typeDefinitionSize1843),
(&g_typeDefinitionSize1844),
(&g_typeDefinitionSize1845),
(&g_typeDefinitionSize1846),
(&g_typeDefinitionSize1847),
(&g_typeDefinitionSize1848),
(&g_typeDefinitionSize1849),
(&g_typeDefinitionSize1850),
(&g_typeDefinitionSize1851),
(&g_typeDefinitionSize1852),
(&g_typeDefinitionSize1853),
(&g_typeDefinitionSize1854),
(&g_typeDefinitionSize1855),
(&g_typeDefinitionSize1856),
(&g_typeDefinitionSize1857),
(&g_typeDefinitionSize1858),
(&g_typeDefinitionSize1859),
(&g_typeDefinitionSize1860),
(&g_typeDefinitionSize1861),
(&g_typeDefinitionSize1862),
(&g_typeDefinitionSize1863),
(&g_typeDefinitionSize1864),
(&g_typeDefinitionSize1865),
(&g_typeDefinitionSize1866),
(&g_typeDefinitionSize1867),
(&g_typeDefinitionSize1868),
(&g_typeDefinitionSize1869),
(&g_typeDefinitionSize1870),
(&g_typeDefinitionSize1871),
(&g_typeDefinitionSize1872),
(&g_typeDefinitionSize1873),
(&g_typeDefinitionSize1874),
(&g_typeDefinitionSize1875),
(&g_typeDefinitionSize1876),
(&g_typeDefinitionSize1877),
(&g_typeDefinitionSize1878),
(&g_typeDefinitionSize1879),
(&g_typeDefinitionSize1880),
(&g_typeDefinitionSize1881),
(&g_typeDefinitionSize1882),
(&g_typeDefinitionSize1883),
(&g_typeDefinitionSize1884),
(&g_typeDefinitionSize1885),
(&g_typeDefinitionSize1886),
(&g_typeDefinitionSize1887),
(&g_typeDefinitionSize1888),
(&g_typeDefinitionSize1889),
(&g_typeDefinitionSize1890),
(&g_typeDefinitionSize1891),
(&g_typeDefinitionSize1892),
(&g_typeDefinitionSize1893),
(&g_typeDefinitionSize1894),
(&g_typeDefinitionSize1895),
(&g_typeDefinitionSize1896),
(&g_typeDefinitionSize1897),
(&g_typeDefinitionSize1898),
(&g_typeDefinitionSize1899),
(&g_typeDefinitionSize1900),
(&g_typeDefinitionSize1901),
(&g_typeDefinitionSize1902),
(&g_typeDefinitionSize1903),
(&g_typeDefinitionSize1904),
(&g_typeDefinitionSize1905),
(&g_typeDefinitionSize1906),
(&g_typeDefinitionSize1907),
(&g_typeDefinitionSize1908),
(&g_typeDefinitionSize1909),
(&g_typeDefinitionSize1910),
(&g_typeDefinitionSize1911),
(&g_typeDefinitionSize1912),
(&g_typeDefinitionSize1913),
(&g_typeDefinitionSize1914),
(&g_typeDefinitionSize1915),
(&g_typeDefinitionSize1916),
(&g_typeDefinitionSize1917),
(&g_typeDefinitionSize1918),
(&g_typeDefinitionSize1919),
(&g_typeDefinitionSize1920),
(&g_typeDefinitionSize1921),
(&g_typeDefinitionSize1922),
(&g_typeDefinitionSize1923),
(&g_typeDefinitionSize1924),
(&g_typeDefinitionSize1925),
(&g_typeDefinitionSize1926),
(&g_typeDefinitionSize1927),
(&g_typeDefinitionSize1928),
(&g_typeDefinitionSize1929),
(&g_typeDefinitionSize1930),
(&g_typeDefinitionSize1931),
(&g_typeDefinitionSize1932),
(&g_typeDefinitionSize1933),
(&g_typeDefinitionSize1934),
(&g_typeDefinitionSize1935),
(&g_typeDefinitionSize1936),
(&g_typeDefinitionSize1937),
(&g_typeDefinitionSize1938),
(&g_typeDefinitionSize1939),
(&g_typeDefinitionSize1940),
(&g_typeDefinitionSize1941),
(&g_typeDefinitionSize1942),
(&g_typeDefinitionSize1943),
(&g_typeDefinitionSize1944),
(&g_typeDefinitionSize1945),
(&g_typeDefinitionSize1946),
(&g_typeDefinitionSize1947),
(&g_typeDefinitionSize1948),
(&g_typeDefinitionSize1949),
(&g_typeDefinitionSize1950),
(&g_typeDefinitionSize1951),
(&g_typeDefinitionSize1952),
(&g_typeDefinitionSize1953),
(&g_typeDefinitionSize1954),
(&g_typeDefinitionSize1955),
(&g_typeDefinitionSize1956),
(&g_typeDefinitionSize1957),
(&g_typeDefinitionSize1958),
(&g_typeDefinitionSize1959),
(&g_typeDefinitionSize1960),
(&g_typeDefinitionSize1961),
(&g_typeDefinitionSize1962),
(&g_typeDefinitionSize1963),
(&g_typeDefinitionSize1964),
(&g_typeDefinitionSize1965),
(&g_typeDefinitionSize1966),
(&g_typeDefinitionSize1967),
(&g_typeDefinitionSize1968),
(&g_typeDefinitionSize1969),
(&g_typeDefinitionSize1970),
(&g_typeDefinitionSize1971),
(&g_typeDefinitionSize1972),
(&g_typeDefinitionSize1973),
(&g_typeDefinitionSize1974),
(&g_typeDefinitionSize1975),
(&g_typeDefinitionSize1976),
(&g_typeDefinitionSize1977),
(&g_typeDefinitionSize1978),
(&g_typeDefinitionSize1979),
(&g_typeDefinitionSize1980),
(&g_typeDefinitionSize1981),
(&g_typeDefinitionSize1982),
(&g_typeDefinitionSize1983),
(&g_typeDefinitionSize1984),
(&g_typeDefinitionSize1985),
(&g_typeDefinitionSize1986),
(&g_typeDefinitionSize1987),
(&g_typeDefinitionSize1988),
(&g_typeDefinitionSize1989),
(&g_typeDefinitionSize1990),
(&g_typeDefinitionSize1991),
(&g_typeDefinitionSize1992),
(&g_typeDefinitionSize1993),
(&g_typeDefinitionSize1994),
(&g_typeDefinitionSize1995),
(&g_typeDefinitionSize1996),
(&g_typeDefinitionSize1997),
(&g_typeDefinitionSize1998),
(&g_typeDefinitionSize1999),
(&g_typeDefinitionSize2000),
(&g_typeDefinitionSize2001),
(&g_typeDefinitionSize2002),
(&g_typeDefinitionSize2003),
(&g_typeDefinitionSize2004),
(&g_typeDefinitionSize2005),
(&g_typeDefinitionSize2006),
(&g_typeDefinitionSize2007),
(&g_typeDefinitionSize2008),
(&g_typeDefinitionSize2009),
(&g_typeDefinitionSize2010),
(&g_typeDefinitionSize2011),
(&g_typeDefinitionSize2012),
(&g_typeDefinitionSize2013),
(&g_typeDefinitionSize2014),
(&g_typeDefinitionSize2015),
(&g_typeDefinitionSize2016),
(&g_typeDefinitionSize2017),
(&g_typeDefinitionSize2018),
(&g_typeDefinitionSize2019),
(&g_typeDefinitionSize2020),
(&g_typeDefinitionSize2021),
(&g_typeDefinitionSize2022),
(&g_typeDefinitionSize2023),
(&g_typeDefinitionSize2024),
(&g_typeDefinitionSize2025),
(&g_typeDefinitionSize2026),
(&g_typeDefinitionSize2027),
(&g_typeDefinitionSize2028),
(&g_typeDefinitionSize2029),
(&g_typeDefinitionSize2030),
(&g_typeDefinitionSize2031),
(&g_typeDefinitionSize2032),
(&g_typeDefinitionSize2033),
(&g_typeDefinitionSize2034),
(&g_typeDefinitionSize2035),
(&g_typeDefinitionSize2036),
(&g_typeDefinitionSize2037),
(&g_typeDefinitionSize2038),
(&g_typeDefinitionSize2039),
(&g_typeDefinitionSize2040),
(&g_typeDefinitionSize2041),
(&g_typeDefinitionSize2042),
(&g_typeDefinitionSize2043),
(&g_typeDefinitionSize2044),
(&g_typeDefinitionSize2045),
(&g_typeDefinitionSize2046),
(&g_typeDefinitionSize2047),
(&g_typeDefinitionSize2048),
(&g_typeDefinitionSize2049),
(&g_typeDefinitionSize2050),
(&g_typeDefinitionSize2051),
(&g_typeDefinitionSize2052),
(&g_typeDefinitionSize2053),
(&g_typeDefinitionSize2054),
(&g_typeDefinitionSize2055),
(&g_typeDefinitionSize2056),
(&g_typeDefinitionSize2057),
(&g_typeDefinitionSize2058),
(&g_typeDefinitionSize2059),
(&g_typeDefinitionSize2060),
(&g_typeDefinitionSize2061),
(&g_typeDefinitionSize2062),
(&g_typeDefinitionSize2063),
(&g_typeDefinitionSize2064),
(&g_typeDefinitionSize2065),
(&g_typeDefinitionSize2066),
(&g_typeDefinitionSize2067),
(&g_typeDefinitionSize2068),
(&g_typeDefinitionSize2069),
(&g_typeDefinitionSize2070),
(&g_typeDefinitionSize2071),
(&g_typeDefinitionSize2072),
(&g_typeDefinitionSize2073),
(&g_typeDefinitionSize2074),
(&g_typeDefinitionSize2075),
(&g_typeDefinitionSize2076),
(&g_typeDefinitionSize2077),
(&g_typeDefinitionSize2078),
(&g_typeDefinitionSize2079),
(&g_typeDefinitionSize2080),
(&g_typeDefinitionSize2081),
(&g_typeDefinitionSize2082),
(&g_typeDefinitionSize2083),
(&g_typeDefinitionSize2084),
(&g_typeDefinitionSize2085),
(&g_typeDefinitionSize2086),
(&g_typeDefinitionSize2087),
(&g_typeDefinitionSize2088),
(&g_typeDefinitionSize2089),
(&g_typeDefinitionSize2090),
(&g_typeDefinitionSize2091),
(&g_typeDefinitionSize2092),
(&g_typeDefinitionSize2093),
(&g_typeDefinitionSize2094),
(&g_typeDefinitionSize2095),
(&g_typeDefinitionSize2096),
(&g_typeDefinitionSize2097),
(&g_typeDefinitionSize2098),
(&g_typeDefinitionSize2099),
(&g_typeDefinitionSize2100),
(&g_typeDefinitionSize2101),
(&g_typeDefinitionSize2102),
(&g_typeDefinitionSize2103),
(&g_typeDefinitionSize2104),
(&g_typeDefinitionSize2105),
(&g_typeDefinitionSize2106),
(&g_typeDefinitionSize2107),
(&g_typeDefinitionSize2108),
(&g_typeDefinitionSize2109),
(&g_typeDefinitionSize2110),
(&g_typeDefinitionSize2111),
(&g_typeDefinitionSize2112),
(&g_typeDefinitionSize2113),
(&g_typeDefinitionSize2114),
(&g_typeDefinitionSize2115),
(&g_typeDefinitionSize2116),
(&g_typeDefinitionSize2117),
(&g_typeDefinitionSize2118),
(&g_typeDefinitionSize2119),
(&g_typeDefinitionSize2120),
(&g_typeDefinitionSize2121),
(&g_typeDefinitionSize2122),
(&g_typeDefinitionSize2123),
(&g_typeDefinitionSize2124),
(&g_typeDefinitionSize2125),
(&g_typeDefinitionSize2126),
(&g_typeDefinitionSize2127),
(&g_typeDefinitionSize2128),
(&g_typeDefinitionSize2129),
(&g_typeDefinitionSize2130),
(&g_typeDefinitionSize2131),
(&g_typeDefinitionSize2132),
(&g_typeDefinitionSize2133),
(&g_typeDefinitionSize2134),
(&g_typeDefinitionSize2135),
(&g_typeDefinitionSize2136),
(&g_typeDefinitionSize2137),
(&g_typeDefinitionSize2138),
(&g_typeDefinitionSize2139),
(&g_typeDefinitionSize2140),
(&g_typeDefinitionSize2141),
(&g_typeDefinitionSize2142),
(&g_typeDefinitionSize2143),
(&g_typeDefinitionSize2144),
(&g_typeDefinitionSize2145),
(&g_typeDefinitionSize2146),
(&g_typeDefinitionSize2147),
(&g_typeDefinitionSize2148),
(&g_typeDefinitionSize2149),
(&g_typeDefinitionSize2150),
(&g_typeDefinitionSize2151),
(&g_typeDefinitionSize2152),
(&g_typeDefinitionSize2153),
(&g_typeDefinitionSize2154),
(&g_typeDefinitionSize2155),
(&g_typeDefinitionSize2156),
(&g_typeDefinitionSize2157),
(&g_typeDefinitionSize2158),
(&g_typeDefinitionSize2159),
(&g_typeDefinitionSize2160),
(&g_typeDefinitionSize2161),
(&g_typeDefinitionSize2162),
(&g_typeDefinitionSize2163),
(&g_typeDefinitionSize2164),
(&g_typeDefinitionSize2165),
(&g_typeDefinitionSize2166),
(&g_typeDefinitionSize2167),
(&g_typeDefinitionSize2168),
(&g_typeDefinitionSize2169),
(&g_typeDefinitionSize2170),
(&g_typeDefinitionSize2171),
(&g_typeDefinitionSize2172),
(&g_typeDefinitionSize2173),
(&g_typeDefinitionSize2174),
(&g_typeDefinitionSize2175),
(&g_typeDefinitionSize2176),
(&g_typeDefinitionSize2177),
(&g_typeDefinitionSize2178),
(&g_typeDefinitionSize2179),
(&g_typeDefinitionSize2180),
(&g_typeDefinitionSize2181),
(&g_typeDefinitionSize2182),
(&g_typeDefinitionSize2183),
(&g_typeDefinitionSize2184),
(&g_typeDefinitionSize2185),
(&g_typeDefinitionSize2186),
(&g_typeDefinitionSize2187),
(&g_typeDefinitionSize2188),
(&g_typeDefinitionSize2189),
(&g_typeDefinitionSize2190),
(&g_typeDefinitionSize2191),
(&g_typeDefinitionSize2192),
(&g_typeDefinitionSize2193),
(&g_typeDefinitionSize2194),
(&g_typeDefinitionSize2195),
(&g_typeDefinitionSize2196),
(&g_typeDefinitionSize2197),
(&g_typeDefinitionSize2198),
(&g_typeDefinitionSize2199),
(&g_typeDefinitionSize2200),
(&g_typeDefinitionSize2201),
(&g_typeDefinitionSize2202),
(&g_typeDefinitionSize2203),
(&g_typeDefinitionSize2204),
(&g_typeDefinitionSize2205),
(&g_typeDefinitionSize2206),
(&g_typeDefinitionSize2207),
(&g_typeDefinitionSize2208),
(&g_typeDefinitionSize2209),
(&g_typeDefinitionSize2210),
(&g_typeDefinitionSize2211),
(&g_typeDefinitionSize2212),
(&g_typeDefinitionSize2213),
(&g_typeDefinitionSize2214),
(&g_typeDefinitionSize2215),
(&g_typeDefinitionSize2216),
(&g_typeDefinitionSize2217),
(&g_typeDefinitionSize2218),
(&g_typeDefinitionSize2219),
(&g_typeDefinitionSize2220),
(&g_typeDefinitionSize2221),
(&g_typeDefinitionSize2222),
(&g_typeDefinitionSize2223),
(&g_typeDefinitionSize2224),
(&g_typeDefinitionSize2225),
(&g_typeDefinitionSize2226),
(&g_typeDefinitionSize2227),
(&g_typeDefinitionSize2228),
(&g_typeDefinitionSize2229),
(&g_typeDefinitionSize2230),
(&g_typeDefinitionSize2231),
(&g_typeDefinitionSize2232),
(&g_typeDefinitionSize2233),
(&g_typeDefinitionSize2234),
(&g_typeDefinitionSize2235),
(&g_typeDefinitionSize2236),
(&g_typeDefinitionSize2237),
(&g_typeDefinitionSize2238),
(&g_typeDefinitionSize2239),
(&g_typeDefinitionSize2240),
(&g_typeDefinitionSize2241),
(&g_typeDefinitionSize2242),
(&g_typeDefinitionSize2243),
(&g_typeDefinitionSize2244),
(&g_typeDefinitionSize2245),
(&g_typeDefinitionSize2246),
(&g_typeDefinitionSize2247),
(&g_typeDefinitionSize2248),
(&g_typeDefinitionSize2249),
(&g_typeDefinitionSize2250),
(&g_typeDefinitionSize2251),
(&g_typeDefinitionSize2252),
(&g_typeDefinitionSize2253),
(&g_typeDefinitionSize2254),
(&g_typeDefinitionSize2255),
(&g_typeDefinitionSize2256),
(&g_typeDefinitionSize2257),
(&g_typeDefinitionSize2258),
(&g_typeDefinitionSize2259),
(&g_typeDefinitionSize2260),
(&g_typeDefinitionSize2261),
(&g_typeDefinitionSize2262),
(&g_typeDefinitionSize2263),
(&g_typeDefinitionSize2264),
(&g_typeDefinitionSize2265),
(&g_typeDefinitionSize2266),
(&g_typeDefinitionSize2267),
(&g_typeDefinitionSize2268),
(&g_typeDefinitionSize2269),
(&g_typeDefinitionSize2270),
(&g_typeDefinitionSize2271),
(&g_typeDefinitionSize2272),
(&g_typeDefinitionSize2273),
(&g_typeDefinitionSize2274),
(&g_typeDefinitionSize2275),
(&g_typeDefinitionSize2276),
(&g_typeDefinitionSize2277),
(&g_typeDefinitionSize2278),
(&g_typeDefinitionSize2279),
(&g_typeDefinitionSize2280),
(&g_typeDefinitionSize2281),
(&g_typeDefinitionSize2282),
(&g_typeDefinitionSize2283),
(&g_typeDefinitionSize2284),
(&g_typeDefinitionSize2285),
(&g_typeDefinitionSize2286),
(&g_typeDefinitionSize2287),
(&g_typeDefinitionSize2288),
(&g_typeDefinitionSize2289),
(&g_typeDefinitionSize2290),
(&g_typeDefinitionSize2291),
(&g_typeDefinitionSize2292),
(&g_typeDefinitionSize2293),
(&g_typeDefinitionSize2294),
(&g_typeDefinitionSize2295),
(&g_typeDefinitionSize2296),
(&g_typeDefinitionSize2297),
(&g_typeDefinitionSize2298),
(&g_typeDefinitionSize2299),
(&g_typeDefinitionSize2300),
(&g_typeDefinitionSize2301),
(&g_typeDefinitionSize2302),
(&g_typeDefinitionSize2303),
(&g_typeDefinitionSize2304),
(&g_typeDefinitionSize2305),
(&g_typeDefinitionSize2306),
(&g_typeDefinitionSize2307),
(&g_typeDefinitionSize2308),
(&g_typeDefinitionSize2309),
(&g_typeDefinitionSize2310),
(&g_typeDefinitionSize2311),
(&g_typeDefinitionSize2312),
(&g_typeDefinitionSize2313),
(&g_typeDefinitionSize2314),
(&g_typeDefinitionSize2315),
(&g_typeDefinitionSize2316),
(&g_typeDefinitionSize2317),
(&g_typeDefinitionSize2318),
(&g_typeDefinitionSize2319),
(&g_typeDefinitionSize2320),
(&g_typeDefinitionSize2321),
(&g_typeDefinitionSize2322),
(&g_typeDefinitionSize2323),
(&g_typeDefinitionSize2324),
(&g_typeDefinitionSize2325),
(&g_typeDefinitionSize2326),
(&g_typeDefinitionSize2327),
(&g_typeDefinitionSize2328),
(&g_typeDefinitionSize2329),
(&g_typeDefinitionSize2330),
(&g_typeDefinitionSize2331),
(&g_typeDefinitionSize2332),
(&g_typeDefinitionSize2333),
(&g_typeDefinitionSize2334),
(&g_typeDefinitionSize2335),
(&g_typeDefinitionSize2336),
(&g_typeDefinitionSize2337),
(&g_typeDefinitionSize2338),
(&g_typeDefinitionSize2339),
(&g_typeDefinitionSize2340),
(&g_typeDefinitionSize2341),
(&g_typeDefinitionSize2342),
(&g_typeDefinitionSize2343),
(&g_typeDefinitionSize2344),
(&g_typeDefinitionSize2345),
(&g_typeDefinitionSize2346),
(&g_typeDefinitionSize2347),
(&g_typeDefinitionSize2348),
(&g_typeDefinitionSize2349),
(&g_typeDefinitionSize2350),
(&g_typeDefinitionSize2351),
(&g_typeDefinitionSize2352),
(&g_typeDefinitionSize2353),
(&g_typeDefinitionSize2354),
(&g_typeDefinitionSize2355),
(&g_typeDefinitionSize2356),
(&g_typeDefinitionSize2357),
(&g_typeDefinitionSize2358),
(&g_typeDefinitionSize2359),
(&g_typeDefinitionSize2360),
(&g_typeDefinitionSize2361),
(&g_typeDefinitionSize2362),
(&g_typeDefinitionSize2363),
(&g_typeDefinitionSize2364),
(&g_typeDefinitionSize2365),
(&g_typeDefinitionSize2366),
(&g_typeDefinitionSize2367),
(&g_typeDefinitionSize2368),
(&g_typeDefinitionSize2369),
(&g_typeDefinitionSize2370),
(&g_typeDefinitionSize2371),
(&g_typeDefinitionSize2372),
(&g_typeDefinitionSize2373),
(&g_typeDefinitionSize2374),
(&g_typeDefinitionSize2375),
(&g_typeDefinitionSize2376),
(&g_typeDefinitionSize2377),
(&g_typeDefinitionSize2378),
(&g_typeDefinitionSize2379),
(&g_typeDefinitionSize2380),
(&g_typeDefinitionSize2381),
(&g_typeDefinitionSize2382),
(&g_typeDefinitionSize2383),
(&g_typeDefinitionSize2384),
(&g_typeDefinitionSize2385),
(&g_typeDefinitionSize2386),
(&g_typeDefinitionSize2387),
(&g_typeDefinitionSize2388),
(&g_typeDefinitionSize2389),
(&g_typeDefinitionSize2390),
(&g_typeDefinitionSize2391),
(&g_typeDefinitionSize2392),
(&g_typeDefinitionSize2393),
(&g_typeDefinitionSize2394),
(&g_typeDefinitionSize2395),
(&g_typeDefinitionSize2396),
(&g_typeDefinitionSize2397),
(&g_typeDefinitionSize2398),
(&g_typeDefinitionSize2399),
(&g_typeDefinitionSize2400),
(&g_typeDefinitionSize2401),
(&g_typeDefinitionSize2402),
(&g_typeDefinitionSize2403),
(&g_typeDefinitionSize2404),
(&g_typeDefinitionSize2405),
(&g_typeDefinitionSize2406),
(&g_typeDefinitionSize2407),
(&g_typeDefinitionSize2408),
(&g_typeDefinitionSize2409),
(&g_typeDefinitionSize2410),
(&g_typeDefinitionSize2411),
(&g_typeDefinitionSize2412),
(&g_typeDefinitionSize2413),
(&g_typeDefinitionSize2414),
(&g_typeDefinitionSize2415),
(&g_typeDefinitionSize2416),
(&g_typeDefinitionSize2417),
(&g_typeDefinitionSize2418),
(&g_typeDefinitionSize2419),
(&g_typeDefinitionSize2420),
(&g_typeDefinitionSize2421),
(&g_typeDefinitionSize2422),
(&g_typeDefinitionSize2423),
(&g_typeDefinitionSize2424),
(&g_typeDefinitionSize2425),
(&g_typeDefinitionSize2426),
(&g_typeDefinitionSize2427),
(&g_typeDefinitionSize2428),
(&g_typeDefinitionSize2429),
(&g_typeDefinitionSize2430),
(&g_typeDefinitionSize2431),
(&g_typeDefinitionSize2432),
(&g_typeDefinitionSize2433),
(&g_typeDefinitionSize2434),
(&g_typeDefinitionSize2435),
(&g_typeDefinitionSize2436),
(&g_typeDefinitionSize2437),
(&g_typeDefinitionSize2438),
(&g_typeDefinitionSize2439),
(&g_typeDefinitionSize2440),
(&g_typeDefinitionSize2441),
(&g_typeDefinitionSize2442),
(&g_typeDefinitionSize2443),
(&g_typeDefinitionSize2444),
(&g_typeDefinitionSize2445),
(&g_typeDefinitionSize2446),
(&g_typeDefinitionSize2447),
(&g_typeDefinitionSize2448),
(&g_typeDefinitionSize2449),
(&g_typeDefinitionSize2450),
(&g_typeDefinitionSize2451),
(&g_typeDefinitionSize2452),
(&g_typeDefinitionSize2453),
(&g_typeDefinitionSize2454),
(&g_typeDefinitionSize2455),
(&g_typeDefinitionSize2456),
(&g_typeDefinitionSize2457),
(&g_typeDefinitionSize2458),
(&g_typeDefinitionSize2459),
(&g_typeDefinitionSize2460),
(&g_typeDefinitionSize2461),
(&g_typeDefinitionSize2462),
(&g_typeDefinitionSize2463),
(&g_typeDefinitionSize2464),
(&g_typeDefinitionSize2465),
(&g_typeDefinitionSize2466),
(&g_typeDefinitionSize2467),
(&g_typeDefinitionSize2468),
(&g_typeDefinitionSize2469),
(&g_typeDefinitionSize2470),
(&g_typeDefinitionSize2471),
(&g_typeDefinitionSize2472),
(&g_typeDefinitionSize2473),
(&g_typeDefinitionSize2474),
(&g_typeDefinitionSize2475),
(&g_typeDefinitionSize2476),
(&g_typeDefinitionSize2477),
(&g_typeDefinitionSize2478),
(&g_typeDefinitionSize2479),
(&g_typeDefinitionSize2480),
(&g_typeDefinitionSize2481),
(&g_typeDefinitionSize2482),
(&g_typeDefinitionSize2483),
(&g_typeDefinitionSize2484),
(&g_typeDefinitionSize2485),
(&g_typeDefinitionSize2486),
(&g_typeDefinitionSize2487),
(&g_typeDefinitionSize2488),
(&g_typeDefinitionSize2489),
(&g_typeDefinitionSize2490),
(&g_typeDefinitionSize2491),
(&g_typeDefinitionSize2492),
(&g_typeDefinitionSize2493),
(&g_typeDefinitionSize2494),
(&g_typeDefinitionSize2495),
(&g_typeDefinitionSize2496),
(&g_typeDefinitionSize2497),
(&g_typeDefinitionSize2498),
(&g_typeDefinitionSize2499),
(&g_typeDefinitionSize2500),
(&g_typeDefinitionSize2501),
(&g_typeDefinitionSize2502),
(&g_typeDefinitionSize2503),
(&g_typeDefinitionSize2504),
(&g_typeDefinitionSize2505),
(&g_typeDefinitionSize2506),
(&g_typeDefinitionSize2507),
(&g_typeDefinitionSize2508),
(&g_typeDefinitionSize2509),
(&g_typeDefinitionSize2510),
(&g_typeDefinitionSize2511),
(&g_typeDefinitionSize2512),
(&g_typeDefinitionSize2513),
(&g_typeDefinitionSize2514),
(&g_typeDefinitionSize2515),
(&g_typeDefinitionSize2516),
(&g_typeDefinitionSize2517),
(&g_typeDefinitionSize2518),
(&g_typeDefinitionSize2519),
(&g_typeDefinitionSize2520),
(&g_typeDefinitionSize2521),
(&g_typeDefinitionSize2522),
(&g_typeDefinitionSize2523),
(&g_typeDefinitionSize2524),
(&g_typeDefinitionSize2525),
(&g_typeDefinitionSize2526),
(&g_typeDefinitionSize2527),
(&g_typeDefinitionSize2528),
(&g_typeDefinitionSize2529),
(&g_typeDefinitionSize2530),
(&g_typeDefinitionSize2531),
(&g_typeDefinitionSize2532),
(&g_typeDefinitionSize2533),
(&g_typeDefinitionSize2534),
(&g_typeDefinitionSize2535),
(&g_typeDefinitionSize2536),
(&g_typeDefinitionSize2537),
(&g_typeDefinitionSize2538),
(&g_typeDefinitionSize2539),
(&g_typeDefinitionSize2540),
(&g_typeDefinitionSize2541),
(&g_typeDefinitionSize2542),
(&g_typeDefinitionSize2543),
(&g_typeDefinitionSize2544),
(&g_typeDefinitionSize2545),
(&g_typeDefinitionSize2546),
(&g_typeDefinitionSize2547),
(&g_typeDefinitionSize2548),
(&g_typeDefinitionSize2549),
(&g_typeDefinitionSize2550),
(&g_typeDefinitionSize2551),
(&g_typeDefinitionSize2552),
(&g_typeDefinitionSize2553),
(&g_typeDefinitionSize2554),
(&g_typeDefinitionSize2555),
(&g_typeDefinitionSize2556),
(&g_typeDefinitionSize2557),
(&g_typeDefinitionSize2558),
(&g_typeDefinitionSize2559),
(&g_typeDefinitionSize2560),
(&g_typeDefinitionSize2561),
(&g_typeDefinitionSize2562),
(&g_typeDefinitionSize2563),
(&g_typeDefinitionSize2564),
(&g_typeDefinitionSize2565),
(&g_typeDefinitionSize2566),
(&g_typeDefinitionSize2567),
(&g_typeDefinitionSize2568),
(&g_typeDefinitionSize2569),
(&g_typeDefinitionSize2570),
(&g_typeDefinitionSize2571),
(&g_typeDefinitionSize2572),
(&g_typeDefinitionSize2573),
(&g_typeDefinitionSize2574),
(&g_typeDefinitionSize2575),
(&g_typeDefinitionSize2576),
};
| [
"greenapplej16@gmail.com"
] | greenapplej16@gmail.com |
98710d8164046892f8f4baaae3faf82a809d6d7f | 2f557f60fc609c03fbb42badf2c4f41ef2e60227 | /CondTools/SiPixel/test/SiPixelCondObjAllPayloadsReader.cc | 091c48178215448768c8746a7b811b1bcdc0f846 | [
"Apache-2.0"
] | permissive | CMS-TMTT/cmssw | 91d70fc40a7110832a2ceb2dc08c15b5a299bd3b | 80cb3a25c0d63594fe6455b837f7c3cbe3cf42d7 | refs/heads/TMTT_1060 | 2020-03-24T07:49:39.440996 | 2020-03-04T17:21:36 | 2020-03-04T17:21:36 | 142,576,342 | 3 | 5 | Apache-2.0 | 2019-12-05T21:16:34 | 2018-07-27T12:48:13 | C++ | UTF-8 | C++ | false | false | 5,014 | cc | #include <memory>
#include "CondTools/SiPixel/test/SiPixelCondObjAllPayloadsReader.h"
#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h"
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
#include "Geometry/CommonTopologies/interface/PixelTopology.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "CommonTools/UtilAlgos/interface/TFileService.h"
namespace cms{
SiPixelCondObjAllPayloadsReader::SiPixelCondObjAllPayloadsReader(const edm::ParameterSet& conf):
conf_(conf)
{
std::string payloadType = conf.getParameter<std::string>("payloadType");
if (strcmp(payloadType.c_str(), "HLT") == 0)
{
SiPixelGainCalibrationService_ = new SiPixelGainCalibrationForHLTService(conf);
} else if (strcmp(payloadType.c_str(), "Offline") == 0)
{
SiPixelGainCalibrationService_ = new SiPixelGainCalibrationOfflineService(conf);
} else if (strcmp(payloadType.c_str(), "Full") == 0)
{
SiPixelGainCalibrationService_ = new SiPixelGainCalibrationService(conf);
}
}
void
SiPixelCondObjAllPayloadsReader::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
{
//Create Subdirectories
edm::Service<TFileService> fs;
TFileDirectory subDirPed = fs->mkdir("Pedestals");
TFileDirectory subDirGain = fs->mkdir("Gains");
char name[128];
unsigned int nmodules = 0;
uint32_t nchannels = 0;
// Get the calibration data
SiPixelGainCalibrationService_->setESObjects(iSetup);
edm::LogInfo("SiPixelCondObjAllPayloadsReader") << "[SiPixelCondObjAllPayloadsReader::beginJob] End Reading CondObjects" << std::endl;
// Get the Geometry
iSetup.get<TrackerDigiGeometryRecord>().get( tkgeom );
edm::LogInfo("SiPixelCondObjAllPayloadsReader") <<" There are "<<tkgeom->dets().size() <<" detectors"<<std::endl;
//Get list of DetIDs
std::vector<uint32_t> vdetId_ = SiPixelGainCalibrationService_->getDetIds();
//Create histograms
_TH1F_Gains_sum = fs->make<TH1F>("Summary_Gain","Gain Summary", vdetId_.size()+1,0,vdetId_.size()+1);
_TH1F_Pedestals_sum = fs->make<TH1F>("Summary_Pedestal","Pedestal Summary", vdetId_.size()+1,0,vdetId_.size()+1);
_TH1F_Pedestals_all = fs->make<TH1F>("PedestalsAll","all Pedestals",350,-100,250);
_TH1F_Gains_all = fs->make<TH1F>("GainsAll","all Gains",100,0,10);
// Loop over DetId's
int ibin = 1;
for (std::vector<uint32_t>::const_iterator detid_iter=vdetId_.begin();detid_iter!=vdetId_.end();detid_iter++){
uint32_t detid = *detid_iter;
sprintf(name,"Pedestals_%d",detid);
_TH1F_Pedestals_m[detid] = subDirPed.make<TH1F>(name,name,250,0.,250.);
sprintf(name,"Gains_%d",detid);
_TH1F_Gains_m[detid] = subDirGain.make<TH1F>(name,name,100,0.,10.);
DetId detIdObject(detid);
const PixelGeomDetUnit* _PixelGeomDetUnit = dynamic_cast<const PixelGeomDetUnit*>(tkgeom->idToDetUnit(DetId(detid)));
if (_PixelGeomDetUnit==0){
edm::LogError("SiPixelCondObjDisplay")<<"[SiPixelCondObjAllPayloadsReader::beginJob] the detID "<<detid<<" doesn't seem to belong to Tracker"<<std::endl;
continue;
}
nmodules++;
const GeomDetUnit * geoUnit = tkgeom->idToDetUnit( detIdObject );
const PixelGeomDetUnit * pixDet = dynamic_cast<const PixelGeomDetUnit*>(geoUnit);
const PixelTopology & topol = pixDet->specificTopology();
// Get the module sizes.
int nrows = topol.nrows(); // rows in x
int ncols = topol.ncolumns(); // cols in y
for(int col_iter=0; col_iter<ncols; col_iter++) {
for(int row_iter=0; row_iter<nrows; row_iter++) {
nchannels++;
float gain = SiPixelGainCalibrationService_->getGain(detid, col_iter, row_iter);
_TH1F_Gains_m[detid]->Fill( gain );
_TH1F_Gains_all->Fill(gain);
float ped = SiPixelGainCalibrationService_->getPedestal(detid, col_iter, row_iter);
_TH1F_Pedestals_m[detid]->Fill( ped );
_TH1F_Pedestals_all->Fill(ped);
//std::cout << " Col "<<col_iter<<" Row "<<row_iter<<" Ped "<<ped<<" Gain "<<gain<<std::endl;
}
}
_TH1F_Gains_sum->SetBinContent(ibin,_TH1F_Gains_m[detid]->GetMean());
_TH1F_Gains_sum->SetBinError(ibin,_TH1F_Gains_m[detid]->GetRMS());
_TH1F_Pedestals_sum->SetBinContent(ibin,_TH1F_Pedestals_m[detid]->GetMean());
_TH1F_Pedestals_sum->SetBinError(ibin,_TH1F_Pedestals_m[detid]->GetRMS());
ibin++;
}
edm::LogInfo("SiPixelCondObjAllPayloadsReader") <<"[SiPixelCondObjAllPayloadsReader::analyze] ---> PIXEL Modules " << nmodules << std::endl;
edm::LogInfo("SiPixelCondObjAllPayloadsReader") <<"[SiPixelCondObjAllPayloadsReader::analyze] ---> PIXEL Channels " << nchannels << std::endl;
}
// ------------ method called once each job just before starting event loop ------------
void
SiPixelCondObjAllPayloadsReader::beginJob()
{
}
// ------------ method called once each job just after ending the event loop ------------
void
SiPixelCondObjAllPayloadsReader::endJob() {
std::cout<<" ---> End job "<<std::endl;
}
}
| [
"giulio.eulisse@gmail.com"
] | giulio.eulisse@gmail.com |
d751dc8a8801e9b3ca509cee93c6a2abdaf8804b | 074b35577b67e9a683f588b626224bd7c396b4d3 | /SRP.h | 6c81301c15e97488d80de29a5ef4521ff111c23b | [] | no_license | lisacvuk/wow-SRP | 484bdfa01cd65dbb46c5870dc09a0f4c3bc18dc7 | bee9aab7052a798024428694d3bd989d388452a8 | refs/heads/master | 2020-12-26T22:20:45.293941 | 2020-03-10T19:15:55 | 2020-03-10T19:15:55 | 237,666,290 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 369 | h | #pragma once
#include "BigNum.h"
#include <string>
#include <openssl/evp.h>
namespace WOW_SRP{
class SRPClient{
public:
SRPClient();
void step1(std::string username, std::string password,
BigNum B, BigNum g, BigNum N, BigNum s);
private:
BigNum k, a, A, x, M, S, K;
EVP_MD_CTX* digest;
};
} | [
"lisacvukhome@gmail.com"
] | lisacvukhome@gmail.com |
1b75a6cf231ed30a3b5ad7795bee706d4bebfaa0 | 9d36fcaa53f56132ebf1f9fe129c275865c52e4c | /0810/源x.cpp | b23ec154ed9d32740229fe3b5042fc4ec8902db5 | [] | no_license | zhangtufei/HDOJ | d7d4c2cb3e97506dfe42506169caa34afd71abcd | 3703b66ea67bd624e85db6c8d0de62d9b1d83840 | refs/heads/master | 2021-01-10T19:31:23.277767 | 2015-06-29T06:11:55 | 2015-06-29T06:11:55 | 38,360,994 | 4 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 322 | cpp | #include <iostream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int Calculate(const int numerator, const int denominator, char *decimaltostring)
{
return 0;
}
int main()
{
int a, b;
scanf("%d/%d", &a, &b);
char re[110];
char s[10]; itoa(111,s,10);
Calculate(a, b, re);
return 0;
} | [
"412710370@qq.com"
] | 412710370@qq.com |
6078301bf0f972026424146b555843abe956d321 | 600df3590cce1fe49b9a96e9ca5b5242884a2a70 | /chrome/browser/ui/tabs/hover_tab_selector.cc | 79f0b653ecdedc276b58f4b39ed272f1871bd1a1 | [
"BSD-3-Clause"
] | permissive | metux/chromium-suckless | efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a | 72a05af97787001756bae2511b7985e61498c965 | refs/heads/orig | 2022-12-04T23:53:58.681218 | 2017-04-30T10:59:06 | 2017-04-30T23:35:58 | 89,884,931 | 5 | 3 | BSD-3-Clause | 2022-11-23T20:52:53 | 2017-05-01T00:09:08 | null | UTF-8 | C++ | false | false | 1,929 | 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 "chrome/browser/ui/tabs/hover_tab_selector.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
HoverTabSelector::HoverTabSelector(
TabStripModel* tab_strip_model)
: tab_strip_model_(tab_strip_model),
tab_transition_tab_index_(-1),
weak_factory_(this) {
DCHECK(tab_strip_model_);
}
HoverTabSelector::~HoverTabSelector() {
}
void HoverTabSelector::StartTabTransition(int index) {
// If there is a transition underway already, only start a new
// transition (canceling the old one) if the target tab differs.
if (weak_factory_.HasWeakPtrs()) {
if (index == tab_transition_tab_index_)
return;
CancelTabTransition();
}
// Start a new transition if the target isn't active already.
if (index != tab_strip_model_->active_index()) {
// The delay between beginning to hover over a tab and the transition
// to that tab taking place.
const base::TimeDelta kHoverTransitionDelay =
base::TimeDelta::FromMilliseconds(500);
tab_transition_tab_index_ = index;
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&HoverTabSelector::PerformTabTransition,
weak_factory_.GetWeakPtr()),
kHoverTransitionDelay);
}
}
void HoverTabSelector::CancelTabTransition() {
weak_factory_.InvalidateWeakPtrs();
}
void HoverTabSelector::PerformTabTransition() {
DCHECK(tab_transition_tab_index_ >= 0 &&
tab_transition_tab_index_ < tab_strip_model_->count());
tab_strip_model_->ActivateTabAt(tab_transition_tab_index_, true);
}
| [
"enrico.weigelt@gr13.net"
] | enrico.weigelt@gr13.net |
1a43fdd59525f2ad22e3f554906cd16c9b3b5b54 | c08441e1ad5d33bc42ed6ee090a6231778960d34 | /c++/C-Free/datastructures/linklist/single linklist/12_merge_two_sorted_linklist.cpp | 2f4f9a49ce142541b15b3fb39f7d4d0ed238a48b | [] | no_license | Sahilbatra1211/c- | 45e3129e4994629bc80cc2cddaf16f2e3f21fe4c | 7b8eb89d2db4a6eaec04197f8776e7fadffa3275 | refs/heads/master | 2020-03-31T18:34:22.640547 | 2018-10-10T17:38:03 | 2018-10-10T17:38:03 | 152,463,752 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,562 | cpp | #include<iostream>
using namespace std;
struct node
{
node *next;
int data;
};
node *head=NULL;
node *temp;
void insert()
{
cout<<"enter the data";
int a;
cin>>a;
if(head==NULL)
{ temp=new node();
temp->next=NULL;
temp->data=a;
head=temp;
}
else
{ node *temp2=new node();
temp2->data=a;
temp2->next=NULL;
temp->next=temp2;
temp=temp2;
}
}
node *head2=NULL;
node *temp3;
void insert2()
{
cout<<"enter the data";
int a;
cin>>a;
if(head2==NULL)
{ temp3=new node();
temp3->next=NULL;
temp3->data=a;
head2=temp3;
}
else
{ node *temp2=new node();
temp2->data=a;
temp2->next=NULL;
temp3->next=temp2;
temp3=temp2;
}
}
void mergetwolinklist()
{
node *first=head;
node *second=head2;
node *sort;
if(first->data<=second->data)
{
sort=first;
first=sort->next;
}
else
{
sort=second;
second=sort->next;
}
node *flag=sort;
while(first && second)
{
if(first->data<=second->data)
{
sort->next=first;
sort=sort->next;
first=first->next;
}
else
{
sort->next=second;
sort=sort->next;
second=second->next;
}
}
if(first==NULL)sort->next=second;
if(second==NULL)sort->next=first;
head=flag;
}
void display()
{
node *temp2=head;
while(temp2!=NULL)
{
cout<<temp2->data;
temp2=temp2->next;
}
}
void display2()
{
node *temp2=head2;
while(temp2!=NULL)
{
cout<<temp2->data;
temp2=temp2->next;
}
}
int main()
{
insert();
insert();
insert();
insert2();
insert2();
insert2();
mergetwolinklist();
display();
} | [
"sahil27ahuja1999@gmail.com"
] | sahil27ahuja1999@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.