Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[dad864]: dialog.h Maximize Restore History

Download this file

dialog.h    116 lines (107 with data), 2.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// dialog.h: interface for the Cdialog class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DIALOG_H__A73F5549_F90F_4642_92A6_A13FF3F97FE5__INCLUDED_)
#define AFX_DIALOG_H__A73F5549_F90F_4642_92A6_A13FF3F97FE5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "structs.h"
class Cdialog
{
private:
int fhandle;
int startpoint;
int maxlen;
public:
dlg_header header;
long statecount;
dlg_state *dlgstates;
long transcount;
dlg_trans *dlgtrans;
long sttriggercount;
CString *sttriggers;
long trtriggercount;
CString *trtriggers;
long actioncount;
CString *actions;
int changed;
int extlinkcnt;
dlg_extlink *extlinks;
Cdialog();
virtual ~Cdialog();
int adjust_actpoint(long offset);
inline long myseek(long pos)
{
return lseek(fhandle, pos+startpoint,SEEK_SET)-startpoint;
}
inline long actpoint()
{
return tell(fhandle)-startpoint;
}
void new_dialog();
CString GetPartName(int stateindex);
int AddExternals();
int ResolveLinks(dlg_extlink *baselinks, int baselinkcount, CString basename);
int MergeDialog(Cdialog &add, CString key);
bool GetExternalLink(dlg_trans &extlink);
int CheckExternalLink(int fh, int stateidx); //checks if stateidx state exists in dialog
int ReadDialogFromFile(int fh, long ml, CString self);
int WriteDialogToFile(int fh, int calculate);
int findtrigger(int trnumber);
inline void KillStates()
{
if(dlgstates)
{
delete[] dlgstates;
dlgstates=NULL;
statecount=0;
}
}
inline void KillTrans()
{
if(dlgtrans)
{
delete[] dlgtrans;
dlgtrans=NULL;
transcount=0;
}
}
inline void KillStateTriggers()
{
if(sttriggers)
{
delete[] sttriggers;
sttriggers=NULL;
sttriggercount=0;
}
}
inline void KillTransTriggers()
{
if(trtriggers)
{
delete[] trtriggers;
trtriggers=NULL;
trtriggercount=0;
}
}
inline void KillActions()
{
if(actions)
{
delete[] actions;
actions=NULL;
actioncount=0;
}
}
inline void KillExternalLinks()
{
if(extlinks)
{
delete[] extlinks;
extlinks=NULL;
extlinkcnt=0;
}
}
};
#endif // !defined(AFX_DIALOG_H__A73F5549_F90F_4642_92A6_A13FF3F97FE5__INCLUDED_)