SDC C-Project CF Review 프로그램
LYW
2021-11-12 039bde2990b5b015232b5da9ff4df0cf1d88ddac
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#pragma once
 
 
#include "akCoreLinker.h"
 
#include <iostream>
#include <tchar.h>
 
 
extern AKCORE_DLLSPEC wchar_t* m_pWstrTemp;
AKCORE_DLLSPEC wchar_t* charToWchar(char* pstrSrc);
 
 
namespace akCore
{
    class AKCORE_DLLSPEC CakString
    {
    public:
        CakString(void);
        ~CakString(void);
 
    public:
        //wstring ToWString(const char * in_val);
        //string ToString(const wstring &in_val);
 
        
 
        //ã°íÀÚÇϴ ¹®ÀÚÀÇ À§Ä¡¸¦ ¹ÝÈ¯ÇØÁִ ÇÔ¼ö(-1ÀÌ ¹ÝȯµÇ¸é Ã£Áö ¸øÇѰÍÀÓ, Ã£¾ÒÀ¸¸é 1ÀÌ»óÀÇ °ªÀ» ¹Ýȯ)
        static int StringFind(const char* str, const char* keyward);
        
 
        static inline std::wstring ToWString(const char * in_val)
        {
            std::wstring temp;
            while (*in_val != '\0')
                temp += *in_val++;
            return temp;
        }
 
        static inline std::string ToString(const std::wstring &in_val)
        {
            std::string temp;
            std::wstring::const_iterator b = in_val.begin();
            const std::wstring::const_iterator e = in_val.end();
            while (b != e)
            {
                temp += static_cast<char>(*b);
                ++b;
            }
            return temp;
        }
 
        static bool IsNumber(char* strSource);
        static void StringReplace(char* strSource, char cSourceChar, char cDestChar);
        static void StringReplace(char* strSource, char* strSourceString, char* strDestString);
        static bool GetFullPathName(char* strDest, int nDestSize, const char* strSourceFront, const char* strSourceEnd);
        static void GetPath(char* strDest, int nDestSize, const char* strSource);
        static void GetName(char* strDest, int nDestSize, const char* strSource);
        static bool GetExt(char* strDest, int nDestSize, const char* strSource);
        static char* GetExt(const char* strSource);
        static int Find(const char* strSource, char cChar);
        static int Find(const char* strSource, char* strFindString);
        static int ReverseFind(const char* strSource, char cChar);
        static void MakeLower(char* strSource);
        static void MakeUpper(char* strSource);
        static bool Left(const char* strSource, char* strDest, int nDestLength, int nLeftCount);
        static bool Mid(const char* strSource, char* strDest, int nDestLength, int nFirstIndex, int nCount = -1);
        static bool Right(const char* strSource, char* strDest, int nDestLength, int nRightCount);
        
 
 
    private:
        
    };
}
 
 
//
//void CksgFontMaker::DrawStringOverray(
//                                      GLfloat x, 
//                                      GLfloat y,  
//                                      int windowWidth,
//                                      int windowHeight,
//                                      char* s
//                                      ,...)
//{
//    // Draws the given text string at the given location.
//
//    char text[256]={};
//    va_list ap;
//    va_start(ap, s);
//    vsprintf(text, s, ap);
//    va_end(ap);
//
//    GLsizei len = GLsizei(strlen(text));
//    if (text && len > 0) 
//    {
//        glPushMatrix();
//        {
//            glPushAttrib( GL_LIGHTING_BIT );
//            glDisable(GL_LIGHTING);
//            glMatrixMode(GL_PROJECTION);
//            glPushMatrix();
//            {
//                glLoadIdentity();
//                gluOrtho2D(0, windowWidth, 0,windowHeight);
//
//                glMatrixMode(GL_MODELVIEW);
//
//                glPushMatrix();
//                {
//                    glLoadIdentity();
//
//
//
//
//                    glRasterPos2i(x, windowHeight+m_logfont.lfHeight-y);
//
//                    glPushAttrib(GL_LIST_BIT);
//                    {
//                        glListBase(m_fontListBase);
//                        glCallLists(len, GL_UNSIGNED_BYTE, (const GLvoid*)text);
//                    } glPopAttrib();
//
//
//                }glPopMatrix();
//
//                glMatrixMode(GL_PROJECTION);
//
//            }glPopMatrix();
//
//            glMatrixMode(GL_MODELVIEW);
//
//
//            glPopAttrib();
//            //glEnable(GL_DEPTH_TEST);
//
//        }glPopMatrix();
//
//
//
//    }
//}