MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / GetText

Method GetText

engine/Evaluator/express.cpp:1908–1954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1906#endif
1907
1908RString GameDataNil::GetText() const
1909{
1910 if (_type == GameVoid)
1911 {
1912 return "scalar bool array string 0xfcffffef";
1913 }
1914 if (_type == ~0)
1915 {
1916 return "all";
1917 }
1918 char buf[MAX_EXPR_LEN];
1919 strcpy(buf, "");
1920 int rest = _type;
1921 while (rest)
1922 {
1923 if (*buf)
1924 {
1925 strcat(buf, " ");
1926 }
1927 if (rest & GameScalar)
1928 {
1929 strcat(buf, "scalar"), rest &= ~GameScalar;
1930 }
1931 else if (rest & GameBool)
1932 {
1933 strcat(buf, "bool"), rest &= ~GameBool;
1934 }
1935 else if (rest & GameArray)
1936 {
1937 strcat(buf, "array"), rest &= ~GameArray;
1938 }
1939 else if (rest & GameString)
1940 {
1941 strcat(buf, "string"), rest &= ~GameString;
1942 }
1943 else if (rest & GameNothing)
1944 {
1945 strcat(buf, "nothing"), rest &= ~GameNothing;
1946 }
1947 else
1948 {
1949 sprintf(buf + strlen(buf), "0x%x", _type);
1950 break;
1951 }
1952 }
1953 return buf;
1954}
1955
1956bool GameDataNothing::IsEqualTo(const GameData* data) const
1957{

Callers 10

GetDebugTextMethod · 0.45
displayTextFunction · 0.45
EvalFormatFunction · 0.45
EvalToStringFunction · 0.45
EvaluateExpressionMethod · 0.45
EvaluateSqfFileMethod · 0.45

Calls 4

sprintfFunction · 0.85
RStringClass · 0.50
SizeMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected