Changeset 2358


Ignore:
Timestamp:
Feb 5, 2013, 3:08:45 AM (6 years ago)
Author:
sam
Message:

sys: create an empty File class.

Location:
trunk/src
Files:
1 added
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/Makefile.am

    r2357 r2358  
    4343    \
    4444    lol/sys/sys.h \
    45     lol/sys/init.h lol/sys/thread.h lol/sys/timer.h \
     45    lol/sys/init.h lol/sys/file.h lol/sys/thread.h lol/sys/timer.h \
    4646    \
    4747    lol/image/image.h \
     
    9191    mesh/mesh.cpp mesh/mesh.h \
    9292    \
    93     sys/init.cpp sys/timer.cpp \
     93    sys/init.cpp sys/timer.cpp sys/file.cpp \
    9494    sys/threadbase.h \
    9595    \
  • trunk/src/lol/sys/init.h

    r2306 r2358  
    4747                 String const &solutiondir = LOL_CONFIG_SOLUTIONDIR);
    4848
    49 extern void SetDataDir(char const *dir);
    50 extern char const *GetDataDir();
     49extern void SetDataDir(String const &dir);
     50extern String const &GetDataDir();
    5151
    5252} /* namespace System */
  • trunk/src/lol/sys/sys.h

    r2354 r2358  
    1313
    1414#include <lol/sys/init.h>
     15#include <lol/sys/file.h>
    1516#include <lol/sys/thread.h>
    1617#include <lol/sys/timer.h>
  • trunk/src/lolcore.vcxproj

    r2354 r2358  
    295295    <ClCompile Include="scene.cpp" />
    296296    <ClCompile Include="sprite.cpp" />
     297    <ClCompile Include="sys\file.cpp" />
    297298    <ClCompile Include="sys\init.cpp" />
    298299    <ClCompile Include="sys\timer.cpp" />
     
    606607    <ClInclude Include="lol\math\remez.h" />
    607608    <ClInclude Include="lol\math\vector.h" />
     609    <ClInclude Include="lol\sys\file.h" />
    608610    <ClInclude Include="lol\sys\init.h" />
    609611    <ClInclude Include="lol\sys\sys.h" />
  • trunk/src/sys/file.cpp

    r2357 r2358  
    99//
    1010
    11 #if !defined __LOL_SYS_SYS_H__
    12 #define __LOL_SYS_SYS_H__
     11#if defined HAVE_CONFIG_H
     12#   include "config.h"
     13#endif
    1314
    14 #include <lol/sys/init.h>
    15 #include <lol/sys/thread.h>
    16 #include <lol/sys/timer.h>
     15#include "core.h"
    1716
    18 #endif // __LOL_SYS_SYS_H__
     17namespace lol
     18{
    1919
     20class FileData
     21{
     22    friend class File;
     23
     24};
     25
     26} /* namespace lol */
     27
  • trunk/src/sys/init.cpp

    r2306 r2358  
    9393
    9494    Log::Debug("binary dir: %s\n", &binarydir[0]);
    95     Log::Debug("root dir: %s\n", GetDataDir());
     95    Log::Debug("root dir: %s\n", &GetDataDir()[0]);
    9696}
    9797
     
    102102String data_dir = "";
    103103
    104 void SetDataDir(char const *dir)
     104void SetDataDir(String const &dir)
    105105{
    106106    data_dir = dir;
    107107}
    108108
    109 char const *GetDataDir()
     109String const &GetDataDir()
    110110{
    111     return &data_dir[0];
     111    return data_dir;
    112112}
    113 
    114113
    115114} /* namespace System */
Note: See TracChangeset for help on using the changeset viewer.