knyazsergei / Image_viewer

MIT License
1 stars 0 forks source link

Review #1 #1

Open knyazsergei opened 8 years ago

knyazsergei commented 8 years ago
class CGdiPlus
{
    CGdiPlus()
    {   
        ULONG_PTR token;
        GdiplusStartupInput input;
        GdiplusStartup(&token, &input, 0);
    }
    ~CGdiPlus()
    {
        GdiplusShutdown(token);
    }
    // ...
}

{
    CGdiPlus initGdi;   
    throw 1;
}
CImage 
  Bitmap& GetBitmap() const;

CImageCollection (size_t imageSize = 0)
   size_t Size() const;
   CImage const& GetImage(size_t i) const;
   void EmplaceImage(CImage& image); // movable
   void Clear();

CImageLoader (std::wstring const& path)
    size_t GetImagePageSize() const; // return 30;
    void Load(CImageCollection& images, size_t startIndex);

CException : public std::runtime_exception
liblazyloader
    liblazyloadertest
        data
            test1
                image1.png
                image2.png
            test2
                image1.png
                image1.txt // throw CException("can't load image");
            ...
        ... //      
evkalinin commented 8 years ago
CGdiPlus init; // setup

CImageLoader loader(path);
loader.SetImagePageSize(10);

CImageCollection c;
loader.Load(collection, 3);

// CImageLoader.Load()
{
    for (all images in path)
    {
        try {
            auto bitmap = Load(path);
            //lload::CImage image(bitmap);
            c.EmplaceImage(lload::CImage(bitmap));
        }
        catch (CLLException const& e)
        {
            // ...
        }
    }
}

ASSERT(c.GetSize() == 10);
evkalinin commented 8 years ago
evkalinin commented 8 years ago

Проект должен представлять из себя:

после выполенения вышеуказанного

согласовано с Сергеем.