Skip to content
Permalink
Browse files

CrumbsViewer first commit

Fully functional projects for xcode and visual studio 2012.
All document viewing functionality activated.
  • Loading branch information...
Ricardo Garcia
Ricardo Garcia committed Jan 23, 2017
1 parent 25a86ac commit 5a5edbc3beece08f35300e488a923af3cc731e73
Showing with 171,562 additions and 0 deletions.
  1. +90 −0 .gitignore
  2. +170 −0 CrumbsViewer2/CrumbsViewer/CRFiles.cpp
  3. +73 −0 CrumbsViewer2/CrumbsViewer/CRFiles.h
  4. +72 −0 CrumbsViewer2/CrumbsViewer/CRMultipleInstances.h
  5. +228 −0 CrumbsViewer2/CrumbsViewer/CRSystemUtils.cpp
  6. +53 −0 CrumbsViewer2/CrumbsViewer/CRSystemUtils.h
  7. +36 −0 CrumbsViewer2/CrumbsViewer/CrumbsViewer2-Info.plist
  8. +6 −0 CrumbsViewer2/CrumbsViewer/CrumbsViewer2.entitlements
  9. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/1024x1024.png
  10. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/128x128.png
  11. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/16x16.png
  12. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/256x256-1.png
  13. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/256x256.png
  14. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/32x32-1.png
  15. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/32x32.png
  16. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/512x512-1.png
  17. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/512x512.png
  18. BIN CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/64x64.png
  19. +68 −0 CrumbsViewer2/CrumbsViewer/Images.xcassets/AppIcon.appiconset/Contents.json
  20. +2,919 −0 CrumbsViewer2/CrumbsViewer/crumbsviewer_frame.cpp
  21. +352 −0 CrumbsViewer2/CrumbsViewer/crumbsviewer_frame.h
  22. +231 −0 CrumbsViewer2/CrumbsViewer/cvfilelisttool.cpp
  23. +121 −0 CrumbsViewer2/CrumbsViewer/cvfilelisttool.h
  24. +188 −0 CrumbsViewer2/CrumbsViewer/cvsearchhelp_frame.cpp
  25. +98 −0 CrumbsViewer2/CrumbsViewer/cvsearchhelp_frame.h
  26. +31 −0 CrumbsViewer2/CrumbsViewer/en.lproj/Credits.rtf
  27. +2 −0 CrumbsViewer2/CrumbsViewer/en.lproj/InfoPlist.strings
  28. +436 −0 CrumbsViewer2/CrumbsViewer/main.cpp
  29. +590 −0 CrumbsViewer2/CrumbsViewer2.xcodeproj/project.pbxproj
  30. +3,830 −0 CrumbsViewer2/CrumbsViewerDialogBlocks/CrumbsViewer2.pjd
  31. +3,992 −0 CrumbsViewer2/CrumbsViewerDialogBlocks/CrumbsViewer2.pjd.bak
  32. +1 −0 CrumbsViewer2/CrumbsViewerDialogBlocks/CrumbsViewer2.rc
  33. +20 −0 CrumbsViewer2/CrumbsViewerWin/CrumbsViewerWin.sln
  34. +237 −0 CrumbsViewer2/CrumbsViewerWin/CrumbsViewerWin.vcproj
  35. +126 −0 CrumbsViewer2/CrumbsViewerWin/CrumbsViewerWin.vcxproj
  36. +76 −0 CrumbsViewer2/CrumbsViewerWin/CrumbsViewerWin.vcxproj.filters
  37. BIN CrumbsViewer2/CrumbsViewerWin/icon.rc
  38. BIN CrumbsViewer2/CrumbsViewerWin/resource.h
  39. BIN CrumbsViewer2/images/1024x1024.png
  40. BIN CrumbsViewer2/images/128x128.png
  41. BIN CrumbsViewer2/images/16x16.png
  42. BIN CrumbsViewer2/images/24x24.png
  43. BIN CrumbsViewer2/images/256x256.png
  44. BIN CrumbsViewer2/images/32x32.png
  45. BIN CrumbsViewer2/images/48x48.png
  46. BIN CrumbsViewer2/images/512x512.png
  47. BIN CrumbsViewer2/images/64x64.png
  48. BIN CrumbsViewer2/images/96x96.png
  49. +3,566 −0 CrumbsViewer2/images/crumbs_cookie.png.hqx
  50. BIN CrumbsViewer2/images/crumbs_cookie.png.ico
  51. +123 −0 README.md
  52. BIN docs/Using_Crumbs.pdf
  53. +48 −0 docs/compiling_crumbs.txt
  54. BIN docs/images/crumbs_logo.png
  55. BIN docs/images/crumbs_mac.png
  56. BIN docs/images/crumbs_win.png
  57. BIN docs/images/excel_connection.png
  58. +146,393 −0 thirdparty/sqlite/sqlite3.c
  59. +7,386 −0 thirdparty/sqlite/sqlite3.h
@@ -250,3 +250,93 @@ paket-files/
# JetBrains Rider
.idea/
*.sln.iml



#####
# OS X temporary files that should never be committed
.DS_Store
*.swp
*.lock
profile

#####
# DotEnv files
.env

####
# Xcode temporary files that should never be committed
*~.nib

####
# Objective-C/Swift specific
*.hmap
*.ipa

####
# Xcode build files
DerivedData/
build/
Builds/

#####
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3

####
# Xcode 4
xcuserdata
!xcschemes
# Xcode 4
*.moved-aside

####
# XCode 4 workspaces - more detailed
!xcshareddata
!default.xcworkspace
*.xcworkspacedata


####
# Xcode 5
*.xccheckout
*.xcuserstate

####
# Xcode 7
*.xcscmblueprint

####
# AppCode
.idea/

####
# Other Xcode files
profile
*.hmap
*.ipa

####
# CocoaPods
Pods/
!Podfile
!Podfile.lock

####
# Carthage
Carthage/Build.rbenv-vars
!Cartfile
!Cartfile.private
!Cartfile.resolved

####
# rbenv
.rbenv-vars

@@ -0,0 +1,170 @@
/////////////////////////////////////////////////////////////////////////////
// Copyright 2013 Ricardo Garcia (rago)
// info: http://crumbssoftware.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/////////////////////////////////////////////////////////////////////////////

#include <string>
#include <iostream>
#ifdef _WIN32
#include "winsock2.h"
#endif
#include <stdio.h>

#include "CRFiles.h"


CRFile::CRFile()
{
vClean();
}

CRFile::~CRFile()
{

}

void CRFile::vClean()
{

m_nIndex = -1; //none!
m_sBates.clear();
m_sTIFFPath.clear();
m_sOCRPath.clear();
m_sTXTPath.clear();
m_sText.clear(); //full text
m_nDBID = 0; //by default first table
}

void CRFile::vPrint(std::ostream & myout)
{
myout <<"("<<m_nDBID<<")["<<m_nIndex<<"]";
myout <<" B:" <<m_sBates;
myout <<" G:" <<m_sTIFFPath;
myout <<" O:" <<m_sOCRPath;
myout <<" T:" <<m_sTXTPath;

myout <<" [["<<m_sText.substr(0,50)<<"...("<<m_sText.size()<<")]]";
}



/////////////////////
//////CRFile Array

CRFileArray::CRFileArray(int nInitialSize)
{
vClean();
bGrowArray(nInitialSize);
}

CRFileArray::~CRFileArray()
{

}

void CRFileArray::vClean()
{

}

void CRFileArray::vPrint(std::ostream & out)
{
int ii;
int nSize = (int)m_vFiles.size();

for(ii=0;ii<nSize; ii++)
{
m_vFiles[ii].vPrint(out);
out <<std::endl;

}

}

int CRFileArray::nGetCount()
{
return (int)m_vFiles.size();

}

bool CRFileArray::bGrowArray(int nNewSize)
{
bool bStatus = false;

CRFile tFile;
int nSize = (int)m_vFiles.size();

if(nSize < nNewSize)
{

m_vFiles.resize(nNewSize, tFile);

int ii;
for(ii=nSize; ii<nNewSize; ii++)
{
CRFile * pFile = pGetFile(ii);
if(pFile)
{
pFile->m_nIndex = ii;
}
}

bStatus = true;

}


return bStatus;


}

bool CRFileArray::bInsert(CRFile & tFile)
{
bool bStatus = false;

int nIndex = tFile.m_nIndex;

if(nIndex >= m_vFiles.size())
{
bGrowArray(nIndex+1);
}

if(nIndex>-1 && nIndex<m_vFiles.size())
{
m_vFiles[nIndex] = tFile;
}

return bStatus;
}

CRFile * CRFileArray::pGetFile(int nIndex, bool bCreate)
{
CRFile * pFile = NULL;


if(nIndex>=m_vFiles.size() && bCreate)
{
bGrowArray(nIndex+1);
}

if(nIndex > -1 && nIndex<m_vFiles.size())
{
pFile = &m_vFiles[nIndex];
}


return pFile;
}
@@ -0,0 +1,73 @@
/////////////////////////////////////////////////////////////////////////////
// Copyright 2013 Ricardo Garcia (rago)
// info: http://crumbssoftware.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/////////////////////////////////////////////////////////////////////////////

#ifndef crumbs_db_test_CRFiles_h
#define crumbs_db_test_CRFiles_h

#include <iostream>
#include <stdio.h>
#include <fstream>
#include <vector>


//create file structure
//create file populating code.


class CRFile
{
public:
CRFile();
~CRFile();

void vClean();
void vPrint(std::ostream & myout);

int m_nIndex; //bates based index

std::string m_sBates;
std::string m_sTIFFPath;
std::string m_sOCRPath;
std::string m_sTXTPath;
std::string m_sText; //full text
int m_nDBID;
};



class CRFileArray
{
public:

CRFileArray(int nInitialSize=100);
~CRFileArray();

void vClean();
bool bInsert(CRFile & tFile);
CRFile * pGetFile(int nIndex,bool bCreate = false);
bool bGrowArray(int nNewSize);
void vPrint(std::ostream & out);

int nGetCount();


private:
std::vector<CRFile> m_vFiles;
};


#endif

0 comments on commit 5a5edbc

Please sign in to comment.
You can’t perform that action at this time.