void TagsOptionsData::DeSerialize(Archive &arch)
{
	arch.Read(wxT("m_ccFlags"), m_ccFlags);
	arch.Read(wxT("m_prepFile"), m_prepFile);
	arch.Read(wxT("m_fileSpec"), m_fileSpec);
	arch.Read(wxT("m_languages"), m_languages);
}
示例#2
0
void CScopeConfData::DeSerialize(Archive& arch)
{
    arch.Read(wxT("m_cscopeFilepath"), m_cscopeFilepath);
    arch.Read(wxT("m_scanScope"), m_scanScope);
    arch.Read(wxT("m_rebuildDb"), m_rebuildDb);
    arch.Read(wxT("m_buildRevertedIndex"), m_buildRevertedIndex);
}
	void ShaderManager::Load(Archive& archive, Renderer* renderer)
	{
		RemoveAll();

		UINT count;
		archive.Read(&count);

		for (UINT x = 0; x < count; ++x)
		{
			std::string name;
			archive.Read(&name);

			ULONG size;
			archive.Read(&size);

			ULONG bound;
			archive.Read(&bound);

			char* comp_source = (char*)malloc(bound);
			archive.Read(comp_source, bound);

			char* source = (char*)malloc(size + 1);
			source[size] = 0;

			uncompress(reinterpret_cast<Bytef*>(source), &size, reinterpret_cast<Bytef*>(comp_source), bound);

			Debug::Log(STREAM("Compiling '" << name << "'..."));

			Add(name, std::shared_ptr<Shader>(renderer->CreateShaderFromMemory(source)));

			free(comp_source);
		}
	}
void CopyrightsConfigData::DeSerialize(Archive& arch)
{
	arch.Read(wxT("m_templateFilename"), m_templateFilename);
	arch.Read(wxT("m_fileMasking"), m_fileMasking);
	arch.Read(wxT("m_backupFiles"), m_backupFiles);
	arch.Read(wxT("m_ignoreString"), m_ignoreString);
}
示例#5
0
		void Label::Load(Archive& archive)
		{
			Component::Drawable::Load(archive);

			archive.Read(&mText);
			archive.Read(&mColor);
		}
示例#6
0
void QuickDebugInfo::DeSerialize(Archive& arch)
{
	arch.Read(wxT("m_arguments"), m_arguments);
	arch.Read(wxT("m_exeFilepaths"), m_exeFilepaths);
	arch.Read(wxT("m_selectedDbg"), m_selectedDbg);
	arch.Read(wxT("m_startCmds"), m_startCmds);
	arch.Read(wxT("m_wds"), m_wds);
}
示例#7
0
void DebuggerCmdData::DeSerialize(Archive &arch)
{
	arch.Read(wxT("m_name"), m_name);
	arch.Read(wxT("m_command"), m_command);
	if( arch.Read(wxT("m_dbgCommand"), m_dbgCommand) == false ) {
		m_dbgCommand = wxT("print");
	}
}
// ------------------------------------------------------------
void SpellCheckerOptions::DeSerialize( Archive& arch )
{
    arch.Read( wxT( "m_dictionary" ), m_dictionary );
    arch.Read( wxT( "m_dictionaryPath" ), m_dictionaryPath );
    arch.Read( wxT( "m_scanStr" ), m_scanStr );
    arch.Read( wxT( "m_scanCPP" ), m_scanCPP );
    arch.Read( wxT( "m_scanC" ), m_scanC );
    arch.Read( wxT( "m_scanD1" ), m_scanD1 );
    arch.Read( wxT( "m_scanD2" ), m_scanD2 );
}
示例#9
0
void SimpleRectValue::DeSerialize(Archive& arch)
{
    wxPoint pos;
    wxSize size;

    arch.Read(wxT("TopLeft"), pos);
    arch.Read(wxT("Size"), size);

    m_rect = wxRect(pos, size);
}
示例#10
0
void DebuggerSettingsData::DeSerialize(Archive &arch)
{
	size_t size(0);
	arch.Read(wxT("size"), size);

	for(size_t i=0; i<size; i++){
		wxString cmdname;
		cmdname << wxT("DebuggerCmd") << i;
		DebuggerCmdData cmdData;
		arch.Read(cmdname, &cmdData);
		m_cmds.push_back(cmdData);
	}
}
示例#11
0
void FindReplaceData::DeSerialize(Archive& arch)
{
	arch.Read(wxT("m_findString"),    m_findString);
	arch.Read(wxT("m_replaceString"), m_replaceString);
	arch.Read(wxT("m_flags"),         (long&)m_flags);
	arch.Read(wxT("m_searchPaths"),   m_searchPaths);

	long max_value(10);
	EditorConfigST::Get()->GetLongValue(wxT("MaxItemsInFindReplaceDialog"), max_value);

	TruncateArray(m_findString,    (size_t)max_value);
	TruncateArray(m_replaceString, (size_t)max_value);
	TruncateArray(m_searchPaths,   (size_t)max_value);
}
	void MeshPhysicsShape::Load(Archive& archive)
	{
		int count;
		archive.Read(&count);

		Vector3 v;
		for (int x = 0; x < count; ++x)
		{
			archive.Read(&v);
			AddPoint(v);
		}

		archive.Read(&v);
		SetScale(v);
	}
void SpriteDrawable::Load(Archive& archive)
{
    _ASSERT(mOwner);
    _ASSERT(mOwner->GetWorld());
    _ASSERT(mOwner->GetWorld()->mSpriteManager);

    Drawable::Load(archive);

    std::string name;
    archive.Read(&name);

    mSprite = mOwner->GetWorld()->mSpriteManager->Get(name);

    archive.Read(&mFrame);
    archive.Read(&mColor);
}
	void BoxPhysicsShape::Load(Archive& archive)
	{
		Vector3 scale;
		archive.Read(&scale);

		SetScale(scale);
	}
	void SpherePhysicsShape::Load(Archive& archive)
	{
		float radius;
		archive.Read(&radius);

		SetRadius(radius);
	}
示例#16
0
void CppCheckSettings::DeSerialize(Archive& arch)
{
	arch.Read(wxT("option.style"),           m_Style);
	arch.Read(wxT("option.performance"),     m_Performance);
	arch.Read(wxT("option.portability"),     m_Portability);
	arch.Read(wxT("option.unusedFunctions"), m_UnusedFunctions);
	arch.Read(wxT("option.missingIncludes"), m_MissingIncludes);
	arch.Read(wxT("option.information"),     m_Information);
	arch.Read(wxT("option.posixStandards"),  m_PosixStandards);
	arch.Read(wxT("option.c99Standards"),    m_C99Standards);
	arch.Read(wxT("option.cpp11Standards"),  m_Cpp11Standards);
	arch.Read(wxT("option.force"),           m_Force);
	
	arch.Read(wxT("m_excludeFiles"),         m_excludeFiles);
	
	arch.Read(wxT("SuppressedWarningsStrings0"), m_SuppressedWarnings0);	// Unchecked ones
	arch.Read(wxT("SuppressedWarningsStrings1"), m_SuppressedWarnings1);	// Checked ones
}
示例#17
0
void SessionEntry::DeSerialize(Archive& arch)
{
    arch.Read(wxT("m_selectedTab"), m_selectedTab);
    arch.Read(wxT("m_tabs"), m_tabs);
    arch.Read(wxT("m_workspaceName"), m_workspaceName);
    arch.Read(wxT("TabInfoArray"), m_vTabInfoArr);
    arch.Read(wxT("m_breakpoints"), (SerializedObject*)&m_breakpoints);
    // initialize tab info array from m_tabs if in config file wasn't yet tab info array
    if(m_vTabInfoArr.size() == 0 && m_tabs.GetCount() > 0) {
        for(size_t i = 0; i < m_tabs.GetCount(); i++) {
            TabInfo oTabInfo;
            oTabInfo.SetFileName(m_tabs.Item(i));
            oTabInfo.SetFirstVisibleLine(0);
            oTabInfo.SetCurrentLine(0);
            m_vTabInfoArr.push_back(oTabInfo);
        }
    }
}
示例#18
0
void TagsOptionsData::DeSerialize(Archive &arch)
{
	arch.Read     (wxT("m_ccFlags"),           m_ccFlags);
	arch.Read     (wxT("m_ccColourFlags"),     m_ccColourFlags);
	arch.ReadCData(wxT("m_tokens"),            m_tokens);
	arch.ReadCData(wxT("m_types"),             m_types);
	arch.Read     (wxT("m_fileSpec"),          m_fileSpec);
	arch.Read     (wxT("m_languages"),         m_languages);
	arch.Read     (wxT("m_minWordLen"),        m_minWordLen);
	arch.Read     (wxT("m_parserSearchPaths"), m_parserSearchPaths);
	arch.Read     (wxT("m_parserEnabled"),     m_parserEnabled);
	arch.Read     (wxT("m_parserExcludePaths"),m_parserExcludePaths);
	arch.Read     (wxT("m_maxItemToColour"),   m_maxItemToColour);

	// since of build 3749, we *always* set CC_ACCURATE_SCOPE_RESOLVING to true
	m_ccFlags |= CC_ACCURATE_SCOPE_RESOLVING;
}
示例#19
0
void ContinousBuildConf::DeSerialize(Archive& arch)
{
	arch.Read(wxT("m_enabled"), m_enabled);
	arch.Read(wxT("m_parallelProcesses"), m_parallelProcesses);
}
示例#20
0
 void DeSerialize(Archive& arch) {
     arch.Read(wxT("m_flags"), m_flags);
     arch.Read(wxT("m_category"), m_category);
     arch.Read(wxT("m_lastSelection"), m_lastSelection);
 }
示例#21
0
void ConfFormBuilder::DeSerialize(Archive& arch)
{
	arch.Read(wxT("m_command"), m_command);
	arch.Read(wxT("m_fbPath"), m_fbPath);
}
示例#22
0
void AbbreviationEntry::DeSerialize(Archive& arch)
{
    arch.Read(wxT("m_entries"), m_entries);
    arch.Read(wxT("m_autoInsert"), m_autoInsert);
}
示例#23
0
 static common::FastString Deserialize(Archive& ar) {
     size_t size = ar.GetVarint();
     char* outdata = new char[size];
     ar.Read(outdata, size);
     return common::FastString::Take(outdata, size);
 }
示例#24
0
void SimpleStringValue::DeSerialize(Archive& arch) { arch.Read(wxT("m_value"), m_value); }
示例#25
0
void ConfCodeDesigner::DeSerialize(Archive& arch)
{
	arch.Read(wxT("m_port"), m_Port);
	arch.Read(wxT("m_path"), m_Path);
}
示例#26
0
void FormatOptions::DeSerialize(Archive& arch)
{
    arch.Read(wxT("m_options"), m_astyleOptions);
    arch.Read(wxT("m_customFlags"), m_customFlags);

    // By default, use clang-format as it is more robust and advanced
    int engine = kCxxFormatEngineClangFormat;
    arch.Read("m_engine", engine);
    m_engine = static_cast<CXXFormatterEngine>(engine);

    engine = kPhpFormatEngineBuiltin;
    arch.Read("m_phpEngine", engine);
    m_phpEngine = static_cast<PHPFormatterEngine>(engine);

    arch.Read("m_clangFormatOptions", m_clangFormatOptions);
    arch.Read("m_clangFormatExe", m_clangFormatExe);
    arch.Read("m_clangBreakBeforeBrace", m_clangBreakBeforeBrace);
    arch.Read("m_clangColumnLimit", m_clangColumnLimit);
    arch.Read("m_phpFormatOptions", m_phpFormatOptions);
    arch.Read("m_generalFlags", m_generalFlags);
    arch.Read("m_PHPCSFixerPhar", m_PHPCSFixerPhar);
    arch.Read("m_PHPCSFixerPharOptions", m_PHPCSFixerPharOptions);
    arch.Read("m_PHPCSFixerPharSettings", m_PHPCSFixerPharSettings);
    arch.Read("m_PHPCSFixerPharRules", m_PHPCSFixerPharRules);
    arch.Read("m_PhpcbfPhar", m_PhpcbfPhar);
    arch.Read("m_PhpcbfPharOptions", m_PhpcbfPharOptions);

    AutodetectSettings();
}
void SettersGettersData::DeSerialize(Archive &arch)
{
	arch.Read(wxT("m_flags"), m_flags);
}
示例#28
0
文件: list.cpp 项目: euwen/UnrarKit
void ListFileHeader(Archive &Arc,FileHeader &hd,bool &TitleShown,bool Verbose,bool Technical,bool Bare)
{
  wchar *Name=hd.FileName;
  RARFORMAT Format=Arc.Format;

  if (Bare)
  {
    mprintf(L"%s\n",Name);
    return;
  }

  if (!TitleShown && !Technical)
  {
    if (Verbose)
    {
      mprintf(L"\n%ls",St(MListTitleV));
      mprintf(L"\n----------- ---------  -------- ----- -------- -----  --------  ----");
    }
    else
    {
      mprintf(L"\n%ls",St(MListTitleL));
      mprintf(L"\n----------- ---------  -------- -----  ----");
    }
    TitleShown=true;
  }

  wchar UnpSizeText[20],PackSizeText[20];
  if (hd.UnpSize==INT64NDF)
    wcscpy(UnpSizeText,L"?");
  else
    itoa(hd.UnpSize,UnpSizeText);
  itoa(hd.PackSize,PackSizeText);

  wchar AttrStr[30];
  if (hd.HeaderType==HEAD_SERVICE)
    swprintf(AttrStr,ASIZE(AttrStr),L"%cB",hd.Inherited ? 'I' : '.');
  else
    ListFileAttr(hd.FileAttr,hd.HSType,AttrStr,ASIZE(AttrStr));

  wchar RatioStr[10];

  if (hd.SplitBefore && hd.SplitAfter)
    wcscpy(RatioStr,L"<->");
  else
    if (hd.SplitBefore)
      wcscpy(RatioStr,L"<--");
    else
      if (hd.SplitAfter)
        wcscpy(RatioStr,L"-->");
      else
        swprintf(RatioStr,ASIZE(RatioStr),L"%d%%",ToPercentUnlim(hd.PackSize,hd.UnpSize));

  wchar DateStr[50];
  hd.mtime.GetText(DateStr,ASIZE(DateStr),Technical,Technical);

  if (Technical)
  {
    mprintf(L"\n%12s: %s",St(MListName),Name);

    bool FileBlock=hd.HeaderType==HEAD_FILE;

    if (!FileBlock && Arc.SubHead.CmpName(SUBHEAD_TYPE_STREAM))
    {
      mprintf(L"\n%12ls: %ls",St(MListType),St(MListStream));
      wchar StreamName[NM];
      GetStreamNameNTFS(Arc,StreamName,ASIZE(StreamName));
      mprintf(L"\n%12ls: %ls",St(MListTarget),StreamName);
    }
    else
    {
      const wchar *Type=St(FileBlock ? (hd.Dir ? MListDir:MListFile):MListService);
    
      if (hd.RedirType!=FSREDIR_NONE)
        switch(hd.RedirType)
        {
          case FSREDIR_UNIXSYMLINK:
            Type=St(MListUSymlink); break;
          case FSREDIR_WINSYMLINK:
            Type=St(MListWSymlink); break;
          case FSREDIR_JUNCTION:
            Type=St(MListJunction); break;
          case FSREDIR_HARDLINK:
            Type=St(MListHardlink); break;
          case FSREDIR_FILECOPY:
            Type=St(MListCopy);     break;
        }
      mprintf(L"\n%12ls: %ls",St(MListType),Type);
      if (hd.RedirType!=FSREDIR_NONE)
        if (Format==RARFMT15)
        {
          char LinkTargetA[NM];
          if (Arc.FileHead.Encrypted)
          {
            // Link data are encrypted. We would need to ask for password
            // and initialize decryption routine to display the link target.
            strncpyz(LinkTargetA,"*<-?->",ASIZE(LinkTargetA));
          }
          else
          {
            int DataSize=(int)Min(hd.PackSize,ASIZE(LinkTargetA)-1);
            Arc.Read(LinkTargetA,DataSize);
            LinkTargetA[DataSize > 0 ? DataSize : 0] = 0;
          }
          wchar LinkTarget[NM];
          CharToWide(LinkTargetA,LinkTarget,ASIZE(LinkTarget));
          mprintf(L"\n%12ls: %ls",St(MListTarget),LinkTarget);
        }
        else
          mprintf(L"\n%12ls: %ls",St(MListTarget),hd.RedirName);
    }
    if (!hd.Dir)
    {
      mprintf(L"\n%12ls: %ls",St(MListSize),UnpSizeText);
      mprintf(L"\n%12ls: %ls",St(MListPacked),PackSizeText);
      mprintf(L"\n%12ls: %ls",St(MListRatio),RatioStr);
    }
    if (hd.mtime.IsSet())
      mprintf(L"\n%12ls: %ls",St(MListMtime),DateStr);
    if (hd.ctime.IsSet())
    {
      hd.ctime.GetText(DateStr,ASIZE(DateStr),true,true);
      mprintf(L"\n%12ls: %ls",St(MListCtime),DateStr);
    }
    if (hd.atime.IsSet())
    {
      hd.atime.GetText(DateStr,ASIZE(DateStr),true,true);
      mprintf(L"\n%12ls: %ls",St(MListAtime),DateStr);
    }
    mprintf(L"\n%12ls: %ls",St(MListAttr),AttrStr);
    if (hd.FileHash.Type==HASH_CRC32)
      mprintf(L"\n%12ls: %8.8X",
        hd.UseHashKey ? L"CRC32 MAC":hd.SplitAfter ? L"Pack-CRC32":L"CRC32",
        hd.FileHash.CRC32);
    if (hd.FileHash.Type==HASH_BLAKE2)
    {
      wchar BlakeStr[BLAKE2_DIGEST_SIZE*2+1];
      BinToHex(hd.FileHash.Digest,BLAKE2_DIGEST_SIZE,NULL,BlakeStr,ASIZE(BlakeStr));
      mprintf(L"\n%12ls: %ls",
        hd.UseHashKey ? L"BLAKE2 MAC":hd.SplitAfter ? L"Pack-BLAKE2":L"BLAKE2",
        BlakeStr);
    }

    const wchar *HostOS=L"";
    if (Format==RARFMT50 && hd.HSType!=HSYS_UNKNOWN)
      HostOS=hd.HSType==HSYS_WINDOWS ? L"Windows":L"Unix";
    if (Format==RARFMT15)
    {
      static const wchar *RarOS[]={
        L"DOS",L"OS/2",L"Windows",L"Unix",L"Mac OS",L"BeOS",L"WinCE",L"",L"",L""
      };
      if (hd.HostOS<ASIZE(RarOS))
        HostOS=RarOS[hd.HostOS];
    }
    if (*HostOS!=0)
      mprintf(L"\n%12ls: %ls",St(MListHostOS),HostOS);

    mprintf(L"\n%12ls: RAR %ls(v%d) -m%d -md=%d%s",St(MListCompInfo),
            Format==RARFMT15 ? L"3.0":L"5.0",hd.UnpVer,hd.Method,
            hd.WinSize>=0x100000 ? hd.WinSize/0x100000:hd.WinSize/0x400,
            hd.WinSize>=0x100000 ? L"M":L"K");

    if (hd.Solid || hd.Encrypted)
    {
      mprintf(L"\n%12ls: ",St(MListFlags));
      if (hd.Solid)
        mprintf(L"%ls ",St(MListSolid));
      if (hd.Encrypted)
        mprintf(L"%ls ",St(MListEnc));
    }

    if (hd.Version)
    {
      uint Version=ParseVersionFileName(Name,false);
      if (Version!=0)
        mprintf(L"\n%12ls: %u",St(MListFileVer),Version);
    }

    if (hd.UnixOwnerSet)
    {
      mprintf(L"\n%12ls: ",L"Unix owner");
      if (*hd.UnixOwnerName!=0)
        mprintf(L"%ls:",GetWide(hd.UnixOwnerName));
      if (*hd.UnixGroupName!=0)
        mprintf(L"%ls",GetWide(hd.UnixGroupName));
      if ((*hd.UnixOwnerName!=0 || *hd.UnixGroupName!=0) && (hd.UnixOwnerNumeric || hd.UnixGroupNumeric))
        mprintf(L"  ");
      if (hd.UnixOwnerNumeric)
        mprintf(L"#%d:",hd.UnixOwnerID);
      if (hd.UnixGroupNumeric)
        mprintf(L"#%d:",hd.UnixGroupID);
    }

    mprintf(L"\n");
    return;
  }

  mprintf(L"\n%c%10ls %9ls ",hd.Encrypted ? '*' : ' ',AttrStr,UnpSizeText);

  if (Verbose)
    mprintf(L"%9ls %4ls ",PackSizeText,RatioStr);

  mprintf(L" %ls  ",DateStr);

  if (Verbose)
  {
    if (hd.FileHash.Type==HASH_CRC32)
      mprintf(L"%8.8X  ",hd.FileHash.CRC32);
    else
      if (hd.FileHash.Type==HASH_BLAKE2)
      {
        byte *S=hd.FileHash.Digest;
        mprintf(L"%02x%02x..%02x  ",S[0],S[1],S[31]);
      }
      else
        mprintf(L"????????  ");
  }
  mprintf(L"%-12ls",Name);
}
示例#29
0
void GeneralInfo::DeSerialize(Archive &arch)
{
	arch.Read(wxT("m_frameSize"), m_frameSize);
	arch.Read(wxT("m_framePos"), m_framePos);
	arch.Read(wxT("m_flags"), m_flags);
}
void CppCheckSettings::DeSerialize(Archive& arch)
{
    arch.Read(wxT("option.style"), m_Style);
    arch.Read(wxT("option.performance"), m_Performance);
    arch.Read(wxT("option.portability"), m_Portability);
    arch.Read(wxT("option.unusedFunctions"), m_UnusedFunctions);
    arch.Read(wxT("option.missingIncludes"), m_MissingIncludes);
    arch.Read(wxT("option.information"), m_Information);
    arch.Read(wxT("option.posixStandards"), m_PosixStandards);
    arch.Read(wxT("option.c99Standards"), m_C99Standards);
    arch.Read(wxT("option.cpp11Standards"), m_Cpp11Standards);
    arch.Read(wxT("option.force"), m_Force);
    arch.Read(wxT("option.jobs"), m_Jobs);

    arch.Read(wxT("m_excludeFiles"), m_excludeFiles);

    arch.Read(wxT("SuppressedWarningsStrings0"), m_SuppressedWarnings0); // Unchecked ones
    arch.Read(wxT("SuppressedWarningsStrings1"), m_SuppressedWarnings1); // Checked ones

    arch.Read(wxT("ExtraIncludeDirs"), m_IncludeDirs);
    arch.Read(wxT("SuppressSystemIncludes"), m_SuppressSystemIncludes);
    m_saveIncludeDirs = m_IncludeDirs.GetCount() > 0; // If there are saved dirs, this must have been set last time
}