All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4NetFilenameAdapt Struct Reference

#include <C4PacketBase.h>

Collaboration diagram for C4NetFilenameAdapt:

Public Member Functions

 C4NetFilenameAdapt (StdStrBuf &FileName)
void CompileFunc (StdCompiler *pComp) const
template<class T >
bool operator== (const T &rVal)
template<class T >
C4NetFilenameAdaptoperator= (const T &rVal)

Public Attributes


Detailed Description

Definition at line 47 of file C4PacketBase.h.

Constructor & Destructor Documentation

C4NetFilenameAdapt::C4NetFilenameAdapt ( StdStrBuf FileName)

Definition at line 50 of file C4PacketBase.h.

50 : FileName(FileName) { }
StdStrBuf & FileName
Definition: C4PacketBase.h:49

Member Function Documentation

void C4NetFilenameAdapt::CompileFunc ( StdCompiler pComp) const

Definition at line 51 of file C4PacketBase.h.

References StdStrBuf::Copy(), DirectorySeparator, FileName, StdStrBuf::getMData(), StdCompiler::isDeserializer(), StdCompiler::isSerializer(), SReplaceChar(), StdStrBuf::Take(), and StdCompiler::Value().

52  {
53 #ifdef _WIN32
54  pComp->Value(FileName);
55 #else
56  StdCopyStrBuf FileName2;
57  if (pComp->isSerializer() && FileName)
58  {
59  FileName2.Copy(FileName);
60  SReplaceChar(FileName2.getMData(),DirectorySeparator,'\\');
61  }
62  pComp->Value(FileName2);
63  if (pComp->isDeserializer())
64  {
65  FileName.Take(FileName2);
67  }
68 #endif
69  }
char * getMData()
Definition: StdBuf.h:443
bool isSerializer()
Definition: StdCompiler.h:54
void Take(char *pnData)
Definition: StdBuf.h:457
void Value(const T &rStruct)
Definition: StdCompiler.h:161
virtual bool isDeserializer()
Definition: StdCompiler.h:53
#define DirectorySeparator
void Copy()
Definition: StdBuf.h:467
void SReplaceChar(char *str, char fc, char tc)
Definition: Standard.cpp:348
StdStrBuf & FileName
Definition: C4PacketBase.h:49

Here is the call graph for this function:

template<class T >
C4NetFilenameAdapt& C4NetFilenameAdapt::operator= ( const T &  rVal)

Definition at line 71 of file C4PacketBase.h.

71 { FileName = rVal; return *this; }
StdStrBuf & FileName
Definition: C4PacketBase.h:49
template<class T >
bool C4NetFilenameAdapt::operator== ( const T &  rVal)

Definition at line 70 of file C4PacketBase.h.

70 { return FileName == rVal; }
StdStrBuf & FileName
Definition: C4PacketBase.h:49

Member Data Documentation

StdStrBuf& C4NetFilenameAdapt::FileName

Definition at line 49 of file C4PacketBase.h.

Referenced by CompileFunc().

The documentation for this struct was generated from the following file: